flowbite-angular 0.0.2 → 1.0.0-alpha.1

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 (400) hide show
  1. package/{esm2020 → esm2022}/flowbite-angular.mjs +2 -2
  2. package/esm2022/lib/common/flowbite.theme.init.mjs +318 -0
  3. package/esm2022/lib/common/index.mjs +3 -0
  4. package/esm2022/lib/common/type-definitions/colors/flowbite.colors.mjs +2 -0
  5. package/esm2022/lib/common/type-definitions/colors/flowbite.gradient-colors.mjs +2 -0
  6. package/esm2022/lib/common/type-definitions/colors/flowbite.gradient-duo-tone-colors.mjs +2 -0
  7. package/esm2022/lib/common/type-definitions/colors/index.mjs +2 -0
  8. package/esm2022/lib/common/type-definitions/flowbite.boolean.mjs +2 -0
  9. package/esm2022/lib/common/type-definitions/flowbite.class.mjs +2 -0
  10. package/esm2022/lib/common/type-definitions/flowbite.combination.mjs +5 -0
  11. package/esm2022/lib/common/type-definitions/flowbite.content-positions.mjs +2 -0
  12. package/esm2022/lib/common/type-definitions/flowbite.deep-partial.mjs +2 -0
  13. package/esm2022/lib/common/type-definitions/flowbite.heading-levels.mjs +2 -0
  14. package/esm2022/lib/common/type-definitions/flowbite.positions.mjs +2 -0
  15. package/esm2022/lib/common/type-definitions/flowbite.router-link-parameter.mjs +2 -0
  16. package/esm2022/lib/common/type-definitions/flowbite.sizes.mjs +2 -0
  17. package/esm2022/lib/common/type-definitions/flowbite.themes.mjs +2 -0
  18. package/esm2022/lib/common/type-definitions/index.mjs +2 -0
  19. package/esm2022/lib/components/accordion/accordion-content.component.mjs +46 -0
  20. package/esm2022/lib/components/accordion/accordion-content.theme.mjs +19 -0
  21. package/esm2022/lib/components/accordion/accordion-content.theme.service.mjs +17 -0
  22. package/esm2022/lib/components/accordion/accordion-panel.component.mjs +57 -0
  23. package/esm2022/lib/components/accordion/accordion-panel.theme.mjs +7 -0
  24. package/esm2022/lib/components/accordion/accordion-panel.theme.service.mjs +17 -0
  25. package/esm2022/lib/components/accordion/accordion-title.component.mjs +70 -0
  26. package/esm2022/lib/components/accordion/accordion-title.theme.mjs +26 -0
  27. package/esm2022/lib/components/accordion/accordion-title.theme.service.mjs +18 -0
  28. package/esm2022/lib/components/accordion/accordion.component.mjs +49 -0
  29. package/esm2022/lib/components/accordion/accordion.theme.mjs +19 -0
  30. package/esm2022/lib/components/accordion/accordion.theme.service.mjs +17 -0
  31. package/esm2022/lib/components/accordion/index.mjs +13 -0
  32. package/esm2022/lib/components/alert/alert.component.mjs +99 -0
  33. package/esm2022/lib/components/alert/alert.theme.mjs +34 -0
  34. package/esm2022/lib/components/alert/alert.theme.service.mjs +18 -0
  35. package/esm2022/lib/components/alert/index.mjs +4 -0
  36. package/esm2022/lib/components/badge/badge.component.mjs +47 -0
  37. package/esm2022/lib/components/badge/badge.theme.mjs +34 -0
  38. package/esm2022/lib/components/badge/badge.theme.service.mjs +17 -0
  39. package/esm2022/lib/components/badge/index.mjs +4 -0
  40. package/esm2022/lib/components/base-component.directive.mjs +34 -0
  41. package/esm2022/lib/components/breadcrumb/breadcrumb-item.component.mjs +57 -0
  42. package/esm2022/lib/components/breadcrumb/breadcrumb-item.theme.mjs +18 -0
  43. package/esm2022/lib/components/breadcrumb/breadcrumb-item.theme.service.mjs +18 -0
  44. package/esm2022/lib/components/breadcrumb/breadcrumb.component.mjs +46 -0
  45. package/esm2022/lib/components/breadcrumb/breadcrumb.theme.mjs +7 -0
  46. package/esm2022/lib/components/breadcrumb/breadcrumb.theme.service.mjs +17 -0
  47. package/esm2022/lib/components/breadcrumb/index.mjs +7 -0
  48. package/esm2022/lib/components/button/button.component.mjs +81 -0
  49. package/esm2022/lib/components/button/button.theme.mjs +113 -0
  50. package/esm2022/lib/components/button/button.theme.service.mjs +24 -0
  51. package/esm2022/lib/components/button/index.mjs +4 -0
  52. package/esm2022/lib/components/dark-theme-toggle/dark-theme-toggle.component.mjs +86 -0
  53. package/esm2022/lib/components/dark-theme-toggle/dark-theme-toggle.theme.mjs +7 -0
  54. package/esm2022/lib/components/dark-theme-toggle/dark-theme-toggle.theme.service.mjs +17 -0
  55. package/esm2022/lib/components/dark-theme-toggle/index.mjs +4 -0
  56. package/esm2022/lib/components/dropdown/dropdown-divider.component.mjs +34 -0
  57. package/esm2022/lib/components/dropdown/dropdown-divider.theme.mjs +7 -0
  58. package/esm2022/lib/components/dropdown/dropdown-divider.theme.service.mjs +17 -0
  59. package/esm2022/lib/components/dropdown/dropdown-header.component.mjs +44 -0
  60. package/esm2022/lib/components/dropdown/dropdown-header.theme.mjs +10 -0
  61. package/esm2022/lib/components/dropdown/dropdown-header.theme.service.mjs +18 -0
  62. package/esm2022/lib/components/dropdown/dropdown-item.component.mjs +34 -0
  63. package/esm2022/lib/components/dropdown/dropdown-item.theme.mjs +6 -0
  64. package/esm2022/lib/components/dropdown/dropdown-item.theme.service.mjs +17 -0
  65. package/esm2022/lib/components/dropdown/dropdown.component.mjs +161 -0
  66. package/esm2022/lib/components/dropdown/dropdown.theme.mjs +32 -0
  67. package/esm2022/lib/components/dropdown/dropdown.theme.service.mjs +22 -0
  68. package/esm2022/lib/components/dropdown/index.mjs +13 -0
  69. package/esm2022/lib/components/form-field/directives/addon.directive.mjs +32 -0
  70. package/esm2022/lib/components/form-field/directives/addon.directive.theme.mjs +8 -0
  71. package/esm2022/lib/components/form-field/directives/addon.directive.theme.service.mjs +17 -0
  72. package/esm2022/lib/components/form-field/directives/base-input.directive.mjs +26 -0
  73. package/esm2022/lib/components/form-field/directives/helper.directive.mjs +34 -0
  74. package/esm2022/lib/components/form-field/directives/helper.directive.theme.mjs +12 -0
  75. package/esm2022/lib/components/form-field/directives/helper.directive.theme.service.mjs +17 -0
  76. package/esm2022/lib/components/form-field/directives/icon.directive.mjs +32 -0
  77. package/esm2022/lib/components/form-field/directives/icon.directive.theme.mjs +8 -0
  78. package/esm2022/lib/components/form-field/directives/icon.directive.theme.service.mjs +17 -0
  79. package/esm2022/lib/components/form-field/directives/index.mjs +17 -0
  80. package/esm2022/lib/components/form-field/directives/input.directive.mjs +41 -0
  81. package/esm2022/lib/components/form-field/directives/input.directive.theme.mjs +79 -0
  82. package/esm2022/lib/components/form-field/directives/input.directive.theme.service.mjs +24 -0
  83. package/esm2022/lib/components/form-field/directives/label.directive.mjs +41 -0
  84. package/esm2022/lib/components/form-field/directives/label.directive.theme.mjs +51 -0
  85. package/esm2022/lib/components/form-field/directives/label.directive.theme.service.mjs +21 -0
  86. package/esm2022/lib/components/form-field/form-field.component.mjs +40 -0
  87. package/esm2022/lib/components/form-field/form-field.theme.mjs +8 -0
  88. package/esm2022/lib/components/form-field/form-field.theme.service.mjs +17 -0
  89. package/esm2022/lib/components/form-field/index.mjs +5 -0
  90. package/esm2022/lib/components/icon/icon-registry.mjs +159 -0
  91. package/esm2022/lib/components/icon/icon.component.mjs +67 -0
  92. package/esm2022/lib/components/icon/index.mjs +4 -0
  93. package/esm2022/lib/components/icon/trusted-types.mjs +21 -0
  94. package/esm2022/lib/components/index.mjs +16 -0
  95. package/esm2022/lib/components/indicators/index.mjs +4 -0
  96. package/esm2022/lib/components/indicators/indicators.component.mjs +54 -0
  97. package/esm2022/lib/components/indicators/indicators.theme.mjs +68 -0
  98. package/esm2022/lib/components/indicators/indicators.theme.service.mjs +17 -0
  99. package/esm2022/lib/components/modal/index.mjs +13 -0
  100. package/esm2022/lib/components/modal/modal-body.component.mjs +34 -0
  101. package/esm2022/lib/components/modal/modal-body.theme.mjs +7 -0
  102. package/esm2022/lib/components/modal/modal-body.theme.service.mjs +17 -0
  103. package/esm2022/lib/components/modal/modal-footer.component.mjs +34 -0
  104. package/esm2022/lib/components/modal/modal-footer.theme.mjs +7 -0
  105. package/esm2022/lib/components/modal/modal-footer.theme.service.mjs +17 -0
  106. package/esm2022/lib/components/modal/modal-header.component.mjs +70 -0
  107. package/esm2022/lib/components/modal/modal-header.theme.mjs +13 -0
  108. package/esm2022/lib/components/modal/modal-header.theme.service.mjs +19 -0
  109. package/esm2022/lib/components/modal/modal.component.mjs +146 -0
  110. package/esm2022/lib/components/modal/modal.theme.mjs +33 -0
  111. package/esm2022/lib/components/modal/modal.theme.service.mjs +20 -0
  112. package/esm2022/lib/components/navbar/index.mjs +19 -0
  113. package/esm2022/lib/components/navbar/navbar-brand.component.mjs +34 -0
  114. package/esm2022/lib/components/navbar/navbar-brand.theme.mjs +7 -0
  115. package/esm2022/lib/components/navbar/navbar-brand.theme.service.mjs +17 -0
  116. package/esm2022/lib/components/navbar/navbar-content.component.mjs +45 -0
  117. package/esm2022/lib/components/navbar/navbar-content.theme.mjs +14 -0
  118. package/esm2022/lib/components/navbar/navbar-content.theme.service.mjs +18 -0
  119. package/esm2022/lib/components/navbar/navbar-icon-button.component.mjs +42 -0
  120. package/esm2022/lib/components/navbar/navbar-icon-button.theme.mjs +15 -0
  121. package/esm2022/lib/components/navbar/navbar-icon-button.theme.service.mjs +17 -0
  122. package/esm2022/lib/components/navbar/navbar-item.component.mjs +47 -0
  123. package/esm2022/lib/components/navbar/navbar-item.theme.mjs +11 -0
  124. package/esm2022/lib/components/navbar/navbar-item.theme.service.mjs +17 -0
  125. package/esm2022/lib/components/navbar/navbar-toggle.component.mjs +58 -0
  126. package/esm2022/lib/components/navbar/navbar-toggle.theme.mjs +7 -0
  127. package/esm2022/lib/components/navbar/navbar-toggle.theme.service.mjs +17 -0
  128. package/esm2022/lib/components/navbar/navbar.component.mjs +62 -0
  129. package/esm2022/lib/components/navbar/navbar.theme.mjs +23 -0
  130. package/esm2022/lib/components/navbar/navbar.theme.service.mjs +17 -0
  131. package/esm2022/lib/components/scroll-top/index.mjs +4 -0
  132. package/esm2022/lib/components/scroll-top/scroll-top.component.mjs +54 -0
  133. package/esm2022/lib/components/scroll-top/scroll-top.theme.mjs +27 -0
  134. package/esm2022/lib/components/scroll-top/scroll-top.theme.service.mjs +17 -0
  135. package/esm2022/lib/components/sidebar/index.mjs +19 -0
  136. package/esm2022/lib/components/sidebar/sidebar-item-group.component.mjs +85 -0
  137. package/esm2022/lib/components/sidebar/sidebar-item-group.theme.mjs +18 -0
  138. package/esm2022/lib/components/sidebar/sidebar-item-group.theme.service.mjs +18 -0
  139. package/esm2022/lib/components/sidebar/sidebar-item.component.mjs +85 -0
  140. package/esm2022/lib/components/sidebar/sidebar-item.theme.mjs +18 -0
  141. package/esm2022/lib/components/sidebar/sidebar-item.theme.service.mjs +18 -0
  142. package/esm2022/lib/components/sidebar/sidebar-menu.component.mjs +49 -0
  143. package/esm2022/lib/components/sidebar/sidebar-menu.theme.mjs +24 -0
  144. package/esm2022/lib/components/sidebar/sidebar-menu.theme.service.mjs +17 -0
  145. package/esm2022/lib/components/sidebar/sidebar-page-content.component.mjs +36 -0
  146. package/esm2022/lib/components/sidebar/sidebar-page-content.theme.mjs +12 -0
  147. package/esm2022/lib/components/sidebar/sidebar-page-content.theme.service.mjs +17 -0
  148. package/esm2022/lib/components/sidebar/sidebar-toggle.component.mjs +53 -0
  149. package/esm2022/lib/components/sidebar/sidebar-toggle.theme.mjs +18 -0
  150. package/esm2022/lib/components/sidebar/sidebar-toggle.theme.service.mjs +17 -0
  151. package/esm2022/lib/components/sidebar/sidebar.component.mjs +61 -0
  152. package/esm2022/lib/components/sidebar/sidebar.theme.mjs +11 -0
  153. package/esm2022/lib/components/sidebar/sidebar.theme.service.mjs +17 -0
  154. package/esm2022/lib/directives/flowbite-router-link-active.directive.mjs +51 -0
  155. package/esm2022/lib/directives/flowbite-router-link.directive.mjs +44 -0
  156. package/esm2022/lib/directives/index.mjs +3 -0
  157. package/esm2022/lib/pipes/index.mjs +2 -0
  158. package/esm2022/lib/pipes/sanitize-html/sanitize-html.pipe.mjs +32 -0
  159. package/esm2022/lib/services/flowbite.theme.service.mjs +16 -0
  160. package/esm2022/lib/services/index.mjs +4 -0
  161. package/esm2022/lib/services/signal-store.service.mjs +61 -0
  162. package/esm2022/lib/services/state/index.mjs +2 -0
  163. package/esm2022/lib/services/state/theme.state.mjs +2 -0
  164. package/esm2022/lib/utils/boolean.util.mjs +10 -0
  165. package/esm2022/lib/utils/directives/index.mjs +3 -0
  166. package/esm2022/lib/utils/directives/inputs/index.mjs +3 -0
  167. package/esm2022/lib/utils/directives/inputs/router-link-active.input.mjs +8 -0
  168. package/esm2022/lib/utils/directives/inputs/router-link.inputs.mjs +20 -0
  169. package/esm2022/lib/utils/directives/outputs/index.mjs +3 -0
  170. package/esm2022/lib/utils/directives/outputs/router-link-active.output.mjs +8 -0
  171. package/esm2022/lib/utils/directives/outputs/router-link.output.mjs +8 -0
  172. package/esm2022/lib/utils/icon.list.mjs +39 -0
  173. package/esm2022/lib/utils/id.generator.mjs +81 -0
  174. package/esm2022/lib/utils/index.mjs +9 -0
  175. package/esm2022/lib/utils/theme/clone-deep.mjs +18 -0
  176. package/esm2022/lib/utils/theme/create-class.mjs +10 -0
  177. package/esm2022/lib/utils/theme/create-theme.mjs +10 -0
  178. package/esm2022/lib/utils/theme/is-object.mjs +10 -0
  179. package/esm2022/lib/utils/theme/merge-theme.mjs +27 -0
  180. package/esm2022/lib/utils/theme/to-string.mjs +10 -0
  181. package/esm2022/public-api.mjs +7 -0
  182. package/fesm2022/flowbite-angular.mjs +4326 -0
  183. package/fesm2022/flowbite-angular.mjs.map +1 -0
  184. package/index.d.ts +5 -4
  185. package/lib/common/flowbite.theme.init.d.ts +9 -0
  186. package/lib/common/index.d.ts +2 -0
  187. package/lib/common/type-definitions/colors/flowbite.colors.d.ts +19 -0
  188. package/lib/common/type-definitions/colors/flowbite.gradient-colors.d.ts +11 -0
  189. package/lib/common/type-definitions/colors/flowbite.gradient-duo-tone-colors.d.ts +12 -0
  190. package/lib/common/type-definitions/colors/index.d.ts +3 -0
  191. package/lib/common/type-definitions/flowbite.boolean.d.ts +7 -0
  192. package/lib/common/type-definitions/flowbite.class.d.ts +6 -0
  193. package/lib/common/type-definitions/flowbite.combination.d.ts +8 -0
  194. package/lib/common/type-definitions/flowbite.content-positions.d.ts +6 -0
  195. package/lib/common/type-definitions/flowbite.deep-partial.d.ts +6 -0
  196. package/lib/common/type-definitions/flowbite.heading-levels.d.ts +4 -0
  197. package/lib/common/type-definitions/flowbite.positions.d.ts +14 -0
  198. package/lib/common/type-definitions/flowbite.router-link-parameter.d.ts +5 -0
  199. package/lib/common/type-definitions/flowbite.sizes.d.ts +10 -0
  200. package/lib/common/type-definitions/flowbite.themes.d.ts +4 -0
  201. package/lib/common/type-definitions/index.d.ts +11 -0
  202. package/lib/components/accordion/accordion-content.component.d.ts +32 -0
  203. package/lib/components/accordion/accordion-content.theme.d.ts +16 -0
  204. package/lib/components/accordion/accordion-content.theme.service.d.ts +8 -0
  205. package/lib/components/accordion/accordion-panel.component.d.ts +27 -0
  206. package/lib/components/accordion/accordion-panel.theme.d.ts +11 -0
  207. package/lib/components/accordion/accordion-panel.theme.service.d.ts +9 -0
  208. package/lib/components/accordion/accordion-title.component.d.ts +46 -0
  209. package/lib/components/accordion/accordion-title.theme.d.ts +24 -0
  210. package/lib/components/accordion/accordion-title.theme.service.d.ts +8 -0
  211. package/lib/components/accordion/accordion.component.d.ts +35 -0
  212. package/lib/components/accordion/accordion.theme.d.ts +21 -0
  213. package/lib/components/accordion/accordion.theme.service.d.ts +8 -0
  214. package/lib/components/accordion/index.d.ts +16 -0
  215. package/lib/components/alert/alert.component.d.ts +53 -12
  216. package/lib/components/alert/alert.theme.d.ts +27 -0
  217. package/lib/components/alert/alert.theme.service.d.ts +8 -0
  218. package/lib/components/alert/index.d.ts +4 -1
  219. package/lib/components/badge/badge.component.d.ts +50 -10
  220. package/lib/components/badge/badge.theme.d.ts +32 -0
  221. package/lib/components/badge/badge.theme.service.d.ts +8 -0
  222. package/lib/components/badge/index.d.ts +4 -1
  223. package/lib/components/base-component.directive.d.ts +19 -0
  224. package/lib/components/breadcrumb/breadcrumb-item.component.d.ts +39 -0
  225. package/lib/components/breadcrumb/breadcrumb-item.theme.d.ts +22 -0
  226. package/lib/components/breadcrumb/breadcrumb-item.theme.service.d.ts +8 -0
  227. package/lib/components/breadcrumb/breadcrumb.component.d.ts +22 -0
  228. package/lib/components/breadcrumb/breadcrumb.theme.d.ts +14 -0
  229. package/lib/components/breadcrumb/breadcrumb.theme.service.d.ts +8 -0
  230. package/lib/components/breadcrumb/index.d.ts +8 -0
  231. package/lib/components/button/button.component.d.ts +110 -0
  232. package/lib/components/button/button.theme.d.ts +56 -0
  233. package/lib/components/button/button.theme.service.d.ts +8 -0
  234. package/lib/components/button/index.d.ts +4 -0
  235. package/lib/components/dark-theme-toggle/dark-theme-toggle.component.d.ts +21 -9
  236. package/lib/components/dark-theme-toggle/dark-theme-toggle.theme.d.ts +11 -0
  237. package/lib/components/dark-theme-toggle/dark-theme-toggle.theme.service.d.ts +8 -0
  238. package/lib/components/dark-theme-toggle/index.d.ts +4 -1
  239. package/lib/components/dropdown/dropdown-divider.component.d.ts +13 -0
  240. package/lib/components/dropdown/dropdown-divider.theme.d.ts +11 -0
  241. package/lib/components/dropdown/dropdown-divider.theme.service.d.ts +8 -0
  242. package/lib/components/dropdown/dropdown-header.component.d.ts +13 -0
  243. package/lib/components/dropdown/dropdown-header.theme.d.ts +16 -0
  244. package/lib/components/dropdown/dropdown-header.theme.service.d.ts +8 -0
  245. package/lib/components/dropdown/dropdown-item.component.d.ts +17 -0
  246. package/lib/components/dropdown/dropdown-item.theme.d.ts +11 -0
  247. package/lib/components/dropdown/dropdown-item.theme.service.d.ts +8 -0
  248. package/lib/components/dropdown/dropdown.component.d.ts +71 -0
  249. package/lib/components/dropdown/dropdown.theme.d.ts +44 -0
  250. package/lib/components/dropdown/dropdown.theme.service.d.ts +8 -0
  251. package/lib/components/dropdown/index.d.ts +16 -0
  252. package/lib/components/form-field/directives/addon.directive.d.ts +13 -0
  253. package/lib/components/form-field/directives/addon.directive.theme.d.ts +10 -0
  254. package/lib/components/form-field/directives/addon.directive.theme.service.d.ts +8 -0
  255. package/lib/components/form-field/directives/base-input.directive.d.ts +14 -0
  256. package/lib/components/form-field/directives/helper.directive.d.ts +18 -0
  257. package/lib/components/form-field/directives/helper.directive.theme.d.ts +13 -0
  258. package/lib/components/form-field/directives/helper.directive.theme.service.d.ts +8 -0
  259. package/lib/components/form-field/directives/icon.directive.d.ts +13 -0
  260. package/lib/components/form-field/directives/icon.directive.theme.d.ts +10 -0
  261. package/lib/components/form-field/directives/icon.directive.theme.service.d.ts +8 -0
  262. package/lib/components/form-field/directives/index.d.ts +21 -0
  263. package/lib/components/form-field/directives/input.directive.d.ts +100 -0
  264. package/lib/components/form-field/directives/input.directive.theme.d.ts +24 -0
  265. package/lib/components/form-field/directives/input.directive.theme.service.d.ts +8 -0
  266. package/lib/components/form-field/directives/label.directive.d.ts +62 -0
  267. package/lib/components/form-field/directives/label.directive.theme.d.ts +20 -0
  268. package/lib/components/form-field/directives/label.directive.theme.service.d.ts +8 -0
  269. package/lib/components/form-field/form-field.component.d.ts +20 -0
  270. package/lib/components/form-field/form-field.theme.d.ts +45 -0
  271. package/lib/components/form-field/form-field.theme.service.d.ts +8 -0
  272. package/lib/components/form-field/index.d.ts +5 -0
  273. package/lib/components/icon/icon-registry.d.ts +45 -0
  274. package/lib/components/icon/icon.component.d.ts +22 -0
  275. package/lib/components/icon/index.d.ts +5 -0
  276. package/lib/components/icon/trusted-types.d.ts +15 -0
  277. package/lib/components/index.d.ts +10 -0
  278. package/lib/components/indicators/index.d.ts +4 -0
  279. package/lib/components/indicators/indicators.component.d.ts +92 -0
  280. package/lib/components/indicators/indicators.theme.d.ts +43 -0
  281. package/lib/components/indicators/indicators.theme.service.d.ts +8 -0
  282. package/lib/components/modal/index.d.ts +16 -0
  283. package/lib/components/modal/modal-body.component.d.ts +17 -0
  284. package/lib/components/modal/modal-body.theme.d.ts +11 -0
  285. package/lib/components/modal/modal-body.theme.service.d.ts +8 -0
  286. package/lib/components/modal/modal-footer.component.d.ts +17 -0
  287. package/lib/components/modal/modal-footer.theme.d.ts +11 -0
  288. package/lib/components/modal/modal-footer.theme.service.d.ts +8 -0
  289. package/lib/components/modal/modal-header.component.d.ts +29 -0
  290. package/lib/components/modal/modal-header.theme.d.ts +20 -0
  291. package/lib/components/modal/modal-header.theme.service.d.ts +8 -0
  292. package/lib/components/modal/modal.component.d.ts +73 -0
  293. package/lib/components/modal/modal.theme.d.ts +39 -0
  294. package/lib/components/modal/modal.theme.service.d.ts +8 -0
  295. package/lib/components/navbar/index.d.ts +24 -1
  296. package/lib/components/navbar/navbar-brand.component.d.ts +17 -0
  297. package/lib/components/navbar/navbar-brand.theme.d.ts +11 -0
  298. package/lib/components/navbar/navbar-brand.theme.service.d.ts +8 -0
  299. package/lib/components/navbar/navbar-content.component.d.ts +27 -0
  300. package/lib/components/navbar/navbar-content.theme.d.ts +18 -0
  301. package/lib/components/navbar/navbar-content.theme.service.d.ts +8 -0
  302. package/lib/components/navbar/navbar-icon-button.component.d.ts +27 -0
  303. package/lib/components/navbar/navbar-icon-button.theme.d.ts +14 -0
  304. package/lib/components/navbar/navbar-icon-button.theme.service.d.ts +8 -0
  305. package/lib/components/navbar/navbar-item.component.d.ts +29 -0
  306. package/lib/components/navbar/navbar-item.theme.d.ts +15 -0
  307. package/lib/components/navbar/navbar-item.theme.service.d.ts +8 -0
  308. package/lib/components/navbar/navbar-toggle.component.d.ts +23 -0
  309. package/lib/components/navbar/navbar-toggle.theme.d.ts +11 -0
  310. package/lib/components/navbar/navbar-toggle.theme.service.d.ts +8 -0
  311. package/lib/components/navbar/navbar.component.d.ts +45 -6
  312. package/lib/components/navbar/navbar.theme.d.ts +24 -0
  313. package/lib/components/navbar/navbar.theme.service.d.ts +8 -0
  314. package/lib/components/scroll-top/index.d.ts +4 -0
  315. package/lib/components/scroll-top/scroll-top.component.d.ts +46 -0
  316. package/lib/components/scroll-top/scroll-top.theme.d.ts +21 -0
  317. package/lib/components/scroll-top/scroll-top.theme.service.d.ts +8 -0
  318. package/lib/components/sidebar/index.d.ts +24 -3
  319. package/lib/components/sidebar/sidebar-item-group.component.d.ts +41 -2
  320. package/lib/components/sidebar/sidebar-item-group.theme.d.ts +19 -0
  321. package/lib/components/sidebar/sidebar-item-group.theme.service.d.ts +8 -0
  322. package/lib/components/sidebar/sidebar-item.component.d.ts +38 -8
  323. package/lib/components/sidebar/sidebar-item.theme.d.ts +22 -0
  324. package/lib/components/sidebar/sidebar-item.theme.service.d.ts +8 -0
  325. package/lib/components/sidebar/sidebar-menu.component.d.ts +43 -0
  326. package/lib/components/sidebar/sidebar-menu.theme.d.ts +18 -0
  327. package/lib/components/sidebar/sidebar-menu.theme.service.d.ts +8 -0
  328. package/lib/components/sidebar/sidebar-page-content.component.d.ts +22 -0
  329. package/lib/components/sidebar/sidebar-page-content.theme.d.ts +15 -0
  330. package/lib/components/sidebar/sidebar-page-content.theme.service.d.ts +8 -0
  331. package/lib/components/sidebar/sidebar-toggle.component.d.ts +40 -0
  332. package/lib/components/sidebar/sidebar-toggle.theme.d.ts +19 -0
  333. package/lib/components/sidebar/sidebar-toggle.theme.service.d.ts +8 -0
  334. package/lib/components/sidebar/sidebar.component.d.ts +30 -7
  335. package/lib/components/sidebar/sidebar.theme.d.ts +25 -0
  336. package/lib/components/sidebar/sidebar.theme.service.d.ts +8 -0
  337. package/lib/directives/flowbite-router-link-active.directive.d.ts +25 -0
  338. package/lib/directives/flowbite-router-link.directive.d.ts +16 -0
  339. package/lib/directives/index.d.ts +2 -0
  340. package/lib/pipes/index.d.ts +1 -1
  341. package/lib/pipes/sanitize-html/sanitize-html.pipe.d.ts +14 -4
  342. package/lib/services/flowbite.theme.service.d.ts +10 -0
  343. package/lib/services/index.d.ts +3 -2
  344. package/lib/services/signal-store.service.d.ts +46 -0
  345. package/lib/services/state/index.d.ts +1 -0
  346. package/lib/services/state/theme.state.d.ts +4 -0
  347. package/lib/utils/boolean.util.d.ts +8 -0
  348. package/lib/utils/directives/index.d.ts +2 -0
  349. package/lib/utils/directives/inputs/index.d.ts +2 -0
  350. package/lib/utils/directives/inputs/router-link-active.input.d.ts +8 -0
  351. package/lib/utils/directives/inputs/router-link.inputs.d.ts +8 -0
  352. package/lib/utils/directives/outputs/index.d.ts +2 -0
  353. package/lib/utils/directives/outputs/router-link-active.output.d.ts +8 -0
  354. package/lib/utils/directives/outputs/router-link.output.d.ts +8 -0
  355. package/lib/utils/icon.list.d.ts +7 -0
  356. package/lib/utils/id.generator.d.ts +59 -0
  357. package/lib/utils/index.d.ts +8 -0
  358. package/lib/utils/theme/clone-deep.d.ts +7 -0
  359. package/lib/utils/theme/create-class.d.ts +7 -0
  360. package/lib/utils/theme/create-theme.d.ts +7 -0
  361. package/lib/utils/theme/is-object.d.ts +7 -0
  362. package/lib/utils/theme/merge-theme.d.ts +8 -0
  363. package/lib/utils/theme/to-string.d.ts +7 -0
  364. package/package.json +11 -25
  365. package/public-api.d.ts +6 -0
  366. package/LICENSE +0 -21
  367. package/README.md +0 -376
  368. package/esm2020/index.mjs +0 -5
  369. package/esm2020/lib/components/alert/alert.component.mjs +0 -128
  370. package/esm2020/lib/components/alert/index.mjs +0 -2
  371. package/esm2020/lib/components/badge/badge.component.mjs +0 -77
  372. package/esm2020/lib/components/badge/index.mjs +0 -2
  373. package/esm2020/lib/components/dark-theme-toggle/dark-theme-toggle.component.mjs +0 -122
  374. package/esm2020/lib/components/dark-theme-toggle/index.mjs +0 -2
  375. package/esm2020/lib/components/index.mjs +0 -6
  376. package/esm2020/lib/components/navbar/index.mjs +0 -2
  377. package/esm2020/lib/components/navbar/navbar.component.mjs +0 -49
  378. package/esm2020/lib/components/sidebar/index.mjs +0 -4
  379. package/esm2020/lib/components/sidebar/sidebar-item-group.component.mjs +0 -18
  380. package/esm2020/lib/components/sidebar/sidebar-item.component.mjs +0 -73
  381. package/esm2020/lib/components/sidebar/sidebar.component.mjs +0 -50
  382. package/esm2020/lib/flowbite.module.mjs +0 -45
  383. package/esm2020/lib/pipes/index.mjs +0 -2
  384. package/esm2020/lib/pipes/sanitize-html/sanitize-html.pipe.mjs +0 -21
  385. package/esm2020/lib/services/index.mjs +0 -3
  386. package/esm2020/lib/services/sidebar/index.mjs +0 -2
  387. package/esm2020/lib/services/sidebar/sidebar.service.mjs +0 -24
  388. package/esm2020/lib/services/theme/index.mjs +0 -2
  389. package/esm2020/lib/services/theme/theme.service.mjs +0 -24
  390. package/fesm2015/flowbite-angular.mjs +0 -600
  391. package/fesm2015/flowbite-angular.mjs.map +0 -1
  392. package/fesm2020/flowbite-angular.mjs +0 -599
  393. package/fesm2020/flowbite-angular.mjs.map +0 -1
  394. package/flowbite-angular.d.ts +0 -5
  395. package/lib/flowbite.module.d.ts +0 -16
  396. package/lib/services/sidebar/index.d.ts +0 -1
  397. package/lib/services/sidebar/sidebar.service.d.ts +0 -9
  398. package/lib/services/theme/index.d.ts +0 -1
  399. package/lib/services/theme/theme.service.d.ts +0 -10
  400. /package/{esm2020 → esm2022}/lib/pipes/sanitize-html/index.mjs +0 -0
@@ -0,0 +1,4326 @@
1
+ import * as i0 from '@angular/core';
2
+ import { inject, Injector, signal, computed, afterNextRender, Directive, InjectionToken, model, Component, PLATFORM_ID, SecurityContext, Injectable, ElementRef, effect, contentChild, untracked, contentChildren, ViewChild, input, viewChild, TemplateRef, ViewContainerRef, Pipe, makeEnvironmentProviders } from '@angular/core';
3
+ import { twMerge } from 'tailwind-merge';
4
+ import { NgIf, NgClass, DOCUMENT, isPlatformBrowser, NgTemplateOutlet, AsyncPipe, CommonModule } from '@angular/common';
5
+ import { HttpClient } from '@angular/common/http';
6
+ import { DomSanitizer } from '@angular/platform-browser';
7
+ import { of, throwError, map, tap, finalize, share, take, Subject, takeUntil, filter } from 'rxjs';
8
+ import * as i1 from '@angular/router';
9
+ import { Router, RouterLink, NavigationStart, RouterLinkActive } from '@angular/router';
10
+ import { computePosition, offset, flip, shift, autoUpdate } from '@floating-ui/dom';
11
+
12
+ /**
13
+ * This function cast a boolean to the internal flowbute-angular boolean type.
14
+ *
15
+ * @param value The input to be cast.
16
+ * @returns enabled if value is true ; disabled if value is false.
17
+ */
18
+ function booleanToFlowbiteBoolean(value) {
19
+ return value ? 'enabled' : 'disabled';
20
+ }
21
+
22
+ /**
23
+ * This class provide an implementation of Guid used as id for flowbite-angular components.
24
+ *
25
+ * @see https://gist.github.com/emptyother/1fd97db034ef848f38eca3354fa9ee90
26
+ */
27
+ class Guid {
28
+ /**
29
+ * If value is given and if the value is a valid Guid, then return a Guid from the string ; Otherwise or if no value is given, create a Guid class without value.
30
+ *
31
+ * @param value Guid as string if you want to get a Guid type from string
32
+ */
33
+ constructor(value) {
34
+ this.value = this.empty;
35
+ if (value) {
36
+ if (Guid.isValid(value)) {
37
+ this.value = value;
38
+ }
39
+ }
40
+ }
41
+ /**
42
+ * Function that generate new Guid.
43
+ *
44
+ * @returns New Guid.
45
+ */
46
+ static newGuid() {
47
+ return new Guid(crypto.randomUUID());
48
+ }
49
+ /**
50
+ * Function that generate an empty Guid.
51
+ *
52
+ * @return "00000000-0000-0000-0000-000000000000".
53
+ */
54
+ static get empty() {
55
+ return '00000000-0000-0000-0000-000000000000';
56
+ }
57
+ /**
58
+ * Function that generate an empty Guid.
59
+ *
60
+ * @return "00000000-0000-0000-0000-000000000000".
61
+ */
62
+ get empty() {
63
+ return Guid.empty;
64
+ }
65
+ /**
66
+ * Check if the provided Guid is valid.
67
+ *
68
+ * @param str The Guid to check.
69
+ * @returns true if the Guid is valid ; false otherwise.
70
+ */
71
+ static isValid(str) {
72
+ const validRegex = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
73
+ return validRegex.test(str);
74
+ }
75
+ /**
76
+ * ToString base method.
77
+ *
78
+ * @returns Value as string.
79
+ */
80
+ toString() {
81
+ return this.value;
82
+ }
83
+ /**
84
+ * ToJson base method.
85
+ *
86
+ * @returns Value as Json compatible string.
87
+ */
88
+ toJSON() {
89
+ return this.value;
90
+ }
91
+ }
92
+ /**
93
+ * Function that return a new Guid.
94
+ *
95
+ * @returns New {@link Guid}.
96
+ *
97
+ * @see `Guid`
98
+ */
99
+ function generateId() {
100
+ return Guid.newGuid();
101
+ }
102
+
103
+ class BaseComponent {
104
+ constructor() {
105
+ this.injector = inject(Injector);
106
+ this.flowbiteId = signal(new Guid(Guid.empty));
107
+ this.contentClasses = computed(() => this.fetchClass());
108
+ }
109
+ ngOnInit() {
110
+ this.verify();
111
+ this.init();
112
+ afterNextRender(() => {
113
+ this.flowbiteId.set(generateId());
114
+ }, { injector: this.injector });
115
+ }
116
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
117
+ init() { }
118
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
119
+ verify() { }
120
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: BaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
121
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.5", type: BaseComponent, isStandalone: true, host: { properties: { "class": "this.contentClasses().rootClass", "attr.flowbite-id": "this.flowbiteId()" } }, ngImport: i0 }); }
122
+ }
123
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: BaseComponent, decorators: [{
124
+ type: Directive,
125
+ args: [{
126
+ standalone: true,
127
+ host: {
128
+ '[class]': 'this.contentClasses().rootClass',
129
+ '[attr.flowbite-id]': 'this.flowbiteId()',
130
+ },
131
+ }]
132
+ }] });
133
+
134
+ /**
135
+ * Check if the provided parameter is an object or not.
136
+ *
137
+ * @param item The unknown type parameter.
138
+ * @returns true if it's an ibject ; false otherwise.
139
+ */
140
+ function isObject(item) {
141
+ return item !== null && typeof item === 'object' && item.constructor === Object;
142
+ }
143
+
144
+ /**
145
+ * Function that return the cloned type of the provided generic type.
146
+ *
147
+ * @param source Generic object to be cloned.
148
+ * @returns The clone type of th eprovided type.
149
+ */
150
+ function cloneDeep(source) {
151
+ if (!isObject(source)) {
152
+ return source;
153
+ }
154
+ const output = {};
155
+ for (const key in source) {
156
+ output[key] = cloneDeep(source[key]);
157
+ }
158
+ return output;
159
+ }
160
+
161
+ /**
162
+ * Merge two objects into one.
163
+ *
164
+ * @param target Object to be merged.
165
+ * @param source Object to be merged.
166
+ * @returns The merged object.
167
+ */
168
+ function mergeTheme(target, source) {
169
+ if (isObject(source) && Object.keys(source).length === 0) {
170
+ return cloneDeep({ ...target, ...source });
171
+ }
172
+ const output = { ...target, ...source };
173
+ if (isObject(source) && isObject(target)) {
174
+ for (const key in source) {
175
+ if (isObject(source[key]) && key in target && isObject(target[key])) {
176
+ output[key] = mergeTheme(target[key], source[key]);
177
+ }
178
+ else {
179
+ output[key] = isObject(source[key]) ? cloneDeep(source[key]) : source[key];
180
+ }
181
+ }
182
+ }
183
+ return output;
184
+ }
185
+
186
+ const FLOWBITE_ACCORDION_CONTENT_THEME_TOKEN = new InjectionToken('FLOWBITE_ACCORDION_CONTENT_THEME_TOKEN');
187
+ class AccordionContentThemeService {
188
+ constructor() {
189
+ this.baseTheme = inject(FLOWBITE_ACCORDION_CONTENT_THEME_TOKEN);
190
+ }
191
+ getClasses(properties) {
192
+ const theme = mergeTheme(this.baseTheme, properties.customStyle);
193
+ const output = {
194
+ rootClass: twMerge(theme.root.base, theme.root.color[properties.color], theme.root.isOpen[properties.isOpen]),
195
+ };
196
+ return output;
197
+ }
198
+ }
199
+
200
+ class AccordionContentComponent extends BaseComponent {
201
+ constructor() {
202
+ super(...arguments);
203
+ this.themeService = inject(AccordionContentThemeService);
204
+ this.accordionPanelComponent = inject(AccordionPanelComponent);
205
+ //#region properties
206
+ this.color = model(this.accordionPanelComponent.color());
207
+ this.customStyle = model({});
208
+ }
209
+ //#endregion
210
+ //#region BaseComponent implementation
211
+ fetchClass() {
212
+ return this.themeService.getClasses({
213
+ color: this.accordionPanelComponent.accordionComponent.color(),
214
+ isOpen: booleanToFlowbiteBoolean(this.accordionPanelComponent.isOpen()),
215
+ customStyle: this.customStyle(),
216
+ });
217
+ }
218
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: AccordionContentComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
219
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.5", type: AccordionContentComponent, isStandalone: true, selector: "flowbite-accordion-content", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, customStyle: { classPropertyName: "customStyle", publicName: "customStyle", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { color: "colorChange", customStyle: "customStyleChange" }, usesInheritance: true, ngImport: i0, template: `
220
+ <ng-container *ngIf="accordionPanelComponent.isOpen()">
221
+ <ng-content />
222
+ </ng-container>
223
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
224
+ }
225
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: AccordionContentComponent, decorators: [{
226
+ type: Component,
227
+ args: [{
228
+ standalone: true,
229
+ imports: [NgIf, NgClass],
230
+ selector: 'flowbite-accordion-content',
231
+ template: `
232
+ <ng-container *ngIf="accordionPanelComponent.isOpen()">
233
+ <ng-content />
234
+ </ng-container>
235
+ `,
236
+ }]
237
+ }] });
238
+
239
+ const FLOWBITE_ACCORDION_PANEL_THEME_TOKEN = new InjectionToken('FLOWBITE_ACCORDION_PANEL_THEME_TOKEN');
240
+ class AccordionPanelThemeService {
241
+ constructor() {
242
+ this.baseTheme = inject(FLOWBITE_ACCORDION_PANEL_THEME_TOKEN);
243
+ }
244
+ getClasses(properties) {
245
+ const theme = mergeTheme(this.baseTheme, properties.customStyle);
246
+ const output = {
247
+ rootClass: twMerge(theme.root.base),
248
+ };
249
+ return output;
250
+ }
251
+ }
252
+
253
+ const CLOSE_SVG_ICON = `
254
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
255
+ <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
256
+ d="M6 18 17.94 6M18 18 6.06 6" />
257
+ </svg>
258
+ `;
259
+ const CHEVRON_UP_SVG_ICON = `
260
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
261
+ <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m16 14-4-4-4 4" />
262
+ </svg>
263
+ `;
264
+ const CHEVRON_DOWN_SVG_ICON = `
265
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
266
+ <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m8 10 4 4 4-4" />
267
+ </svg>
268
+ `;
269
+ const CHEVRON_RIGHT_SVG_ICON = `
270
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
271
+ <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m10 16 4-4-4-4" />
272
+ </svg>
273
+ `;
274
+ const SUN_SVG_ICON = `
275
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
276
+ <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
277
+ d="M12 5V3m0 18v-2M7.05 7.05 5.636 5.636m12.728 12.728L16.95 16.95M5 12H3m18 0h-2M7.05 16.95l-1.414 1.414M18.364 5.636 16.95 7.05M16 12a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z" />
278
+ </svg>
279
+ `;
280
+ const MOON_SVG_ICON = `
281
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
282
+ <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
283
+ d="M12 21a9 9 0 0 1-.5-17.986V3c-.354.966-.5 1.911-.5 3a9 9 0 0 0 9 9c.239 0 .254.018.488 0A9.004 9.004 0 0 1 12 21Z" />
284
+ </svg>
285
+ `;
286
+ const BARS_SVG_ICON = `
287
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
288
+ <path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M5 7h14M5 12h14M5 17h14" />
289
+ </svg>
290
+ `;
291
+
292
+ /**
293
+ * Thanks to Angular Material for Icon part of this library : https://github.com/angular/components
294
+ */
295
+ let policy;
296
+ function getPolicy() {
297
+ if (!policy) {
298
+ if (typeof window !== 'undefined') {
299
+ const tWindow = window;
300
+ if (tWindow.trustedTypes !== undefined) {
301
+ policy = tWindow.trustedTypes.createPolicy('angular#components', {
302
+ createHTML: (s) => s,
303
+ });
304
+ }
305
+ }
306
+ }
307
+ return policy;
308
+ }
309
+ function trustedHTMLFromString(raw) {
310
+ return getPolicy()?.createHTML(raw) || raw;
311
+ }
312
+
313
+ /**
314
+ * Thanks to Angular Material for Icon part of this library : https://github.com/angular/components
315
+ */
316
+ function getSvgIconFromNamedError(iconName) {
317
+ return Error(`Unable to find icon with name ${iconName}`);
318
+ }
319
+ function getSvgIconFailedToSanitizeRawError(raw) {
320
+ return Error(`The raw provided to IconRegistry was not trusted as safe HTML by ANGULAR's DOMSanitizer. Attempted raw was : ${raw}`);
321
+ }
322
+ function getSvgIconFailedToSanitizeUrlError(url) {
323
+ return Error(`The URL provided to IconRegistry was not trusted as a resource URL via Angular's DOMSanitizer. Attempted URL was : ${url}`);
324
+ }
325
+ function getSvgIconNoHttpClientProvidedError() {
326
+ return Error(`Could not fid HttpClient provider for use with flowbite-angular icons. Please include the HttpClientModule from @angular/common/http in your app imports`);
327
+ }
328
+ class SvgIconConfig {
329
+ constructor(url, svgText, options) {
330
+ this.url = url;
331
+ this.svgText = svgText;
332
+ this.options = options;
333
+ this.svgElement = null;
334
+ }
335
+ }
336
+ class IconRegistry {
337
+ constructor() {
338
+ this.platformId = inject(PLATFORM_ID);
339
+ this._httpClient = inject(HttpClient, { optional: true });
340
+ this._sanitizer = inject(DomSanitizer);
341
+ this._document = inject(DOCUMENT);
342
+ this._svgIconConfig = new Map();
343
+ this._cachedSvgIconByUrl = new Map();
344
+ this._inProgressSvgIconFetch = new Map();
345
+ }
346
+ addSvgIcon(iconName, url, options) {
347
+ return this.addSvgIconInNamespace('', iconName, url, options);
348
+ }
349
+ addRawSvgIcon(iconName, raw, options) {
350
+ return this.addRawSvgIconInNamepsace('', iconName, raw, options);
351
+ }
352
+ addSvgIconInNamespace(namespace, iconName, url, options) {
353
+ return this._addSvgIconConfig(namespace, iconName, new SvgIconConfig(url, undefined, options));
354
+ }
355
+ addRawSvgIconInNamepsace(namespace, iconName, raw, options) {
356
+ const cleanRaw = this._sanitizer.sanitize(SecurityContext.HTML, raw);
357
+ if (!cleanRaw) {
358
+ throw getSvgIconFailedToSanitizeRawError(raw);
359
+ }
360
+ const trustedRaw = trustedHTMLFromString(cleanRaw);
361
+ return this._addSvgIconConfig(namespace, iconName, new SvgIconConfig('', trustedRaw, options));
362
+ }
363
+ getSvgIconFromUrl(safeUrl) {
364
+ const url = this._sanitizer.sanitize(SecurityContext.RESOURCE_URL, safeUrl);
365
+ if (!url) {
366
+ throw getSvgIconFailedToSanitizeUrlError(safeUrl);
367
+ }
368
+ const cachedIcon = this._cachedSvgIconByUrl.get(url);
369
+ if (cachedIcon) {
370
+ return of(cloneSvg(cachedIcon));
371
+ }
372
+ return this._loadSvgIconFromConfig(new SvgIconConfig(safeUrl, undefined));
373
+ }
374
+ getSvgIconFromName(iconName, namespace) {
375
+ const key = iconKey(namespace, iconName);
376
+ const config = this._svgIconConfig.get(key);
377
+ if (config) {
378
+ return this._getSvgIconFromConfig(config);
379
+ }
380
+ return throwError(() => getSvgIconFromNamedError(key));
381
+ }
382
+ ngOnDestroy() {
383
+ this._svgIconConfig.clear();
384
+ this._cachedSvgIconByUrl.clear();
385
+ }
386
+ _addSvgIconConfig(namespace, iconName, config) {
387
+ this._svgIconConfig.set(iconKey(namespace, iconName), config);
388
+ return this;
389
+ }
390
+ _getSvgIconFromConfig(config) {
391
+ if (config.svgText) {
392
+ return of(cloneSvg(this._svgElementFromConfig(config)));
393
+ }
394
+ else {
395
+ return this._loadSvgIconFromConfig(config).pipe(map((svg) => cloneSvg(svg)));
396
+ }
397
+ }
398
+ _loadSvgIconFromConfig(config) {
399
+ return this._fetchIcon(config).pipe(tap((svgText) => (config.svgText = svgText)), map(() => this._svgElementFromConfig(config)));
400
+ }
401
+ _setSvgAttributes(svg, options) {
402
+ svg.setAttribute('fit', '');
403
+ svg.setAttribute('height', '100%');
404
+ svg.setAttribute('width', '100%');
405
+ svg.setAttribute('preserveAspectRatio', 'xMidYMid meet');
406
+ svg.setAttribute('focusable', 'false');
407
+ if (options?.viewBox) {
408
+ svg.setAttribute('viewBox', options.viewBox);
409
+ }
410
+ return svg;
411
+ }
412
+ _svgElementFromConfig(config) {
413
+ if (!config.svgElement) {
414
+ const svg = this._svgElementFromString(config.svgText);
415
+ this._setSvgAttributes(svg, config.options);
416
+ config.svgElement = svg;
417
+ }
418
+ return config.svgElement;
419
+ }
420
+ _svgElementFromString(str) {
421
+ const div = this._document.createElement('div');
422
+ div.innerHTML = str;
423
+ const svg = div.querySelector('svg');
424
+ return svg;
425
+ }
426
+ _fetchIcon(iconConfig) {
427
+ if (isPlatformBrowser(this.platformId)) {
428
+ if (!this._httpClient) {
429
+ throw getSvgIconNoHttpClientProvidedError();
430
+ }
431
+ const url = this._sanitizer.sanitize(SecurityContext.RESOURCE_URL, iconConfig.url);
432
+ if (!url) {
433
+ throw getSvgIconFailedToSanitizeUrlError(iconConfig.url);
434
+ }
435
+ const inProgressFetch = this._inProgressSvgIconFetch.get(url);
436
+ if (inProgressFetch) {
437
+ return inProgressFetch;
438
+ }
439
+ const req = this._httpClient.get(url, { responseType: 'text' }).pipe(map((svg) => {
440
+ return trustedHTMLFromString(svg);
441
+ }), finalize(() => this._inProgressSvgIconFetch.delete(url)), share());
442
+ this._inProgressSvgIconFetch.set(url, req);
443
+ return req;
444
+ }
445
+ else {
446
+ return of(trustedHTMLFromString('<svg></svg>'));
447
+ }
448
+ }
449
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: IconRegistry, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
450
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: IconRegistry, providedIn: 'root' }); }
451
+ }
452
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: IconRegistry, decorators: [{
453
+ type: Injectable,
454
+ args: [{
455
+ providedIn: 'root',
456
+ }]
457
+ }] });
458
+ function cloneSvg(svg) {
459
+ return svg.cloneNode(true);
460
+ }
461
+ function iconKey(namespace, iconName) {
462
+ return `${namespace}:${iconName}`;
463
+ }
464
+
465
+ class IconComponent extends BaseComponent {
466
+ constructor() {
467
+ super(...arguments);
468
+ this._elementRef = inject((ElementRef));
469
+ this._iconRegistry = inject(IconRegistry);
470
+ this.svgIcon = model.required();
471
+ }
472
+ init() {
473
+ effect(() => {
474
+ this._updateSvgIcon();
475
+ }, { injector: this.injector });
476
+ }
477
+ fetchClass() {
478
+ return { rootClass: '' };
479
+ }
480
+ _splitIconName(iconName) {
481
+ if (!iconName) {
482
+ return ['', ''];
483
+ }
484
+ const parts = iconName.split(':');
485
+ switch (parts.length) {
486
+ case 1:
487
+ return ['', parts[0]];
488
+ case 2:
489
+ return parts;
490
+ default:
491
+ throw Error(`Invalid icon name: "${iconName}"`);
492
+ }
493
+ }
494
+ _updateSvgIcon() {
495
+ const [namespace, iconName] = this._splitIconName(this.svgIcon());
496
+ this._iconRegistry
497
+ .getSvgIconFromName(iconName, namespace)
498
+ .pipe(take(1))
499
+ .subscribe((svg) => this._setSvgElement(svg));
500
+ }
501
+ _setSvgElement(svg) {
502
+ this._clearSvgElements();
503
+ this._elementRef.nativeElement.appendChild(svg);
504
+ }
505
+ _clearSvgElements() {
506
+ const layoutElement = this._elementRef.nativeElement;
507
+ let childCount = layoutElement.childNodes.length;
508
+ while (childCount--) {
509
+ const child = layoutElement.childNodes[childCount];
510
+ if (child.nodeType !== 1 || child.nodeName.toLowerCase() === 'svg') {
511
+ child.remove();
512
+ }
513
+ }
514
+ }
515
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: IconComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
516
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.5", type: IconComponent, isStandalone: true, selector: "flowbite-icon", inputs: { svgIcon: { classPropertyName: "svgIcon", publicName: "svgIcon", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { svgIcon: "svgIconChange" }, usesInheritance: true, ngImport: i0, template: `<ng-content />`, isInline: true }); }
517
+ }
518
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: IconComponent, decorators: [{
519
+ type: Component,
520
+ args: [{
521
+ selector: 'flowbite-icon',
522
+ standalone: true,
523
+ template: `<ng-content />`,
524
+ }]
525
+ }] });
526
+
527
+ const FLOWBITE_ACCORDION_TITLE_THEME_TOKEN = new InjectionToken('FLOWBITE_ACCORDION_TITLE_THEME_TOKEN');
528
+ class AccordionTitleThemeService {
529
+ constructor() {
530
+ this.baseTheme = inject(FLOWBITE_ACCORDION_TITLE_THEME_TOKEN);
531
+ }
532
+ getClasses(properties) {
533
+ const theme = mergeTheme(this.baseTheme, properties.customStyle);
534
+ const output = {
535
+ rootClass: twMerge(theme.root.base, theme.root.color[properties.color], theme.root.isFlush[properties.isFlush], theme.root.isOpen[properties.isOpen]),
536
+ textClass: twMerge(theme.text.base),
537
+ };
538
+ return output;
539
+ }
540
+ }
541
+
542
+ class AccordionTitleComponent extends BaseComponent {
543
+ constructor() {
544
+ super(...arguments);
545
+ this.themeService = inject(AccordionTitleThemeService);
546
+ this.accordionPanelComponent = inject(AccordionPanelComponent);
547
+ this.iconRegistry = inject(IconRegistry);
548
+ this.domSanitizer = inject(DomSanitizer);
549
+ //#region properties
550
+ this.color = model(this.accordionPanelComponent.color());
551
+ this.customStyle = model({});
552
+ }
553
+ //#endregion
554
+ //#region BaseComponent implementation
555
+ fetchClass() {
556
+ return this.themeService.getClasses({
557
+ color: this.accordionPanelComponent.accordionComponent.color(),
558
+ isFlush: booleanToFlowbiteBoolean(this.accordionPanelComponent.accordionComponent.isFlush()),
559
+ isOpen: booleanToFlowbiteBoolean(this.accordionPanelComponent.isOpen()),
560
+ customStyle: this.customStyle(),
561
+ });
562
+ }
563
+ init() {
564
+ this.iconRegistry.addRawSvgIconInNamepsace('flowbite-angular', 'chevron-down', this.domSanitizer.bypassSecurityTrustHtml(CHEVRON_DOWN_SVG_ICON));
565
+ }
566
+ //#endregion
567
+ onClick() {
568
+ this.accordionPanelComponent.toggleVisibility();
569
+ }
570
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: AccordionTitleComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
571
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.5", type: AccordionTitleComponent, isStandalone: true, selector: "flowbite-accordion-title", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, customStyle: { classPropertyName: "customStyle", publicName: "customStyle", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { color: "colorChange", customStyle: "customStyleChange" }, host: { listeners: { "click": "onClick()" } }, usesInheritance: true, ngImport: i0, template: `
572
+ <h2 [ngClass]="contentClasses().textClass">
573
+ <ng-content />
574
+ </h2>
575
+ <flowbite-icon
576
+ svgIcon="flowbite-angular:chevron-down"
577
+ class="h-6 w-6 shrink-0 duration-200"
578
+ [class.rotate-180]="accordionPanelComponent.isOpen()" />
579
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: IconComponent, selector: "flowbite-icon", inputs: ["svgIcon"], outputs: ["svgIconChange"] }] }); }
580
+ }
581
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: AccordionTitleComponent, decorators: [{
582
+ type: Component,
583
+ args: [{
584
+ standalone: true,
585
+ imports: [NgClass, IconComponent],
586
+ selector: 'flowbite-accordion-title',
587
+ template: `
588
+ <h2 [ngClass]="contentClasses().textClass">
589
+ <ng-content />
590
+ </h2>
591
+ <flowbite-icon
592
+ svgIcon="flowbite-angular:chevron-down"
593
+ class="h-6 w-6 shrink-0 duration-200"
594
+ [class.rotate-180]="accordionPanelComponent.isOpen()" />
595
+ `,
596
+ host: {
597
+ '(click)': 'onClick()',
598
+ },
599
+ }]
600
+ }] });
601
+
602
+ class AccordionPanelComponent extends BaseComponent {
603
+ constructor() {
604
+ super(...arguments);
605
+ this.themeService = inject(AccordionPanelThemeService);
606
+ this.accordionComponent = inject(AccordionComponent);
607
+ this.accordionTitleChild = contentChild(AccordionTitleComponent);
608
+ this.accordionContentChild = contentChild(AccordionContentComponent);
609
+ //#region properties
610
+ this.color = model(this.accordionComponent.color());
611
+ this.isOpen = model(false);
612
+ this.customStyle = model({});
613
+ }
614
+ //#endregion
615
+ //#region BaseComponent implementation
616
+ fetchClass() {
617
+ return this.themeService.getClasses({
618
+ customStyle: this.customStyle(),
619
+ });
620
+ }
621
+ verify() {
622
+ if (this.accordionTitleChild() === undefined) {
623
+ throw new Error('No AccordionTitleComponent available');
624
+ }
625
+ if (this.accordionContentChild() == undefined) {
626
+ throw new Error('No AccordionContentComponent available');
627
+ }
628
+ }
629
+ //#endregion
630
+ toggleVisibility(isOpen) {
631
+ if (isOpen === undefined) {
632
+ isOpen = untracked(() => !this.isOpen());
633
+ }
634
+ if (isOpen && untracked(() => !this.accordionComponent.isAlwaysOpen())) {
635
+ this.accordionComponent.closeAll();
636
+ }
637
+ this.isOpen.set(isOpen);
638
+ }
639
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: AccordionPanelComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
640
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.5", type: AccordionPanelComponent, isStandalone: true, selector: "flowbite-accordion-panel", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: true, isRequired: false, transformFunction: null }, customStyle: { classPropertyName: "customStyle", publicName: "customStyle", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { color: "colorChange", isOpen: "isOpenChange", customStyle: "customStyleChange" }, queries: [{ propertyName: "accordionTitleChild", first: true, predicate: AccordionTitleComponent, descendants: true, isSignal: true }, { propertyName: "accordionContentChild", first: true, predicate: AccordionContentComponent, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `<ng-content />`, isInline: true }); }
641
+ }
642
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: AccordionPanelComponent, decorators: [{
643
+ type: Component,
644
+ args: [{
645
+ standalone: true,
646
+ imports: [],
647
+ selector: 'flowbite-accordion-panel',
648
+ template: `<ng-content />`,
649
+ }]
650
+ }] });
651
+
652
+ const FLOWBITE_ACCORDION_THEME_TOKEN = new InjectionToken('FLOWBITE_ACCORDION_THEME_TOKEN');
653
+ class AccordionThemeService {
654
+ constructor() {
655
+ this.baseTheme = inject(FLOWBITE_ACCORDION_THEME_TOKEN);
656
+ }
657
+ getClasses(properties) {
658
+ const theme = mergeTheme(this.baseTheme, properties.customStyle);
659
+ const output = {
660
+ rootClass: twMerge(theme.root.base, theme.root.isFlush[properties.isFlush], theme.root.color[properties.color]),
661
+ };
662
+ return output;
663
+ }
664
+ }
665
+
666
+ class AccordionComponent extends BaseComponent {
667
+ constructor() {
668
+ super(...arguments);
669
+ this.themeService = inject(AccordionThemeService);
670
+ this.accordionPanelChildren = contentChildren(AccordionPanelComponent);
671
+ //#region properties
672
+ this.isAlwaysOpen = model(false);
673
+ this.color = model('primary');
674
+ this.isFlush = model(false);
675
+ this.customStyle = model({});
676
+ }
677
+ //#endregion
678
+ //#region BaseComponent implementation
679
+ fetchClass() {
680
+ return this.themeService.getClasses({
681
+ color: this.color(),
682
+ isFlush: booleanToFlowbiteBoolean(this.isFlush()),
683
+ customStyle: this.customStyle(),
684
+ });
685
+ }
686
+ verify() {
687
+ if (this.accordionPanelChildren().length === 0) {
688
+ throw new Error('No AccordionPanelComponent available');
689
+ }
690
+ }
691
+ //#endregion
692
+ closeAll() {
693
+ this.accordionPanelChildren().forEach((child) => child.toggleVisibility(false));
694
+ }
695
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: AccordionComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
696
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.5", type: AccordionComponent, isStandalone: true, selector: "flowbite-accordion", inputs: { isAlwaysOpen: { classPropertyName: "isAlwaysOpen", publicName: "isAlwaysOpen", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, isFlush: { classPropertyName: "isFlush", publicName: "isFlush", isSignal: true, isRequired: false, transformFunction: null }, customStyle: { classPropertyName: "customStyle", publicName: "customStyle", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isAlwaysOpen: "isAlwaysOpenChange", color: "colorChange", isFlush: "isFlushChange", customStyle: "customStyleChange" }, queries: [{ propertyName: "accordionPanelChildren", predicate: AccordionPanelComponent, isSignal: true }], usesInheritance: true, ngImport: i0, template: `<ng-content />`, isInline: true }); }
697
+ }
698
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: AccordionComponent, decorators: [{
699
+ type: Component,
700
+ args: [{
701
+ standalone: true,
702
+ imports: [NgClass],
703
+ selector: 'flowbite-accordion',
704
+ template: `<ng-content />`,
705
+ }]
706
+ }] });
707
+
708
+ /**
709
+ * This function is used to create themes for component's while keeping the intellisens up for TailwindCSS and other extensions.
710
+ *
711
+ * @param input Generic type to be created.
712
+ * @returns The generic type's definition.
713
+ */
714
+ function createTheme(input) {
715
+ return input;
716
+ }
717
+
718
+ const accordionTheme = createTheme({
719
+ root: {
720
+ base: '',
721
+ color: {
722
+ primary: 'border-primary-200 dark:border-primary-700 divide-primary-200 dark:divide-primary-700',
723
+ light: 'border-gray-300 dark:border-gray-700 divide-gray-200 dark:divide-gray-700',
724
+ blue: 'border-blue-200 dark:border-blue-700 divide-blue-200 dark:divide-blue-700',
725
+ red: 'border-red-200 dark:border-red-700 divide-red-200 dark:divide-red-700',
726
+ green: 'border-green-200 dark:border-green-700 divide-green-200 dark:divide-green-700',
727
+ yellow: 'border-yellow-200 dark:border-yellow-700 divide-yellow-200 dark:divide-yellow-700',
728
+ },
729
+ isFlush: {
730
+ enabled: '',
731
+ disabled: 'rounded-lg border shadow-sm',
732
+ },
733
+ },
734
+ });
735
+
736
+ /**
737
+ * Register every inputs of RouterLink used in FlowbiteRouterLinkDirective.
738
+ *
739
+ * @see `RouterLink`
740
+ * @see `FlowbiteRouterLinkDirective`
741
+ */
742
+ var routerLinkInputs = [
743
+ 'target',
744
+ 'queryParams',
745
+ 'fragment',
746
+ 'queryParamsHandling',
747
+ 'state',
748
+ 'info',
749
+ 'relativeTo',
750
+ 'preserveFragment',
751
+ 'skipLocationChange',
752
+ 'replaceUrl',
753
+ 'routerLink',
754
+ ];
755
+
756
+ /**
757
+ * Register every inputs of RouterLinkActive used in FlowbiteRouterLinkActiveDirective.
758
+ *
759
+ * @see `RouterLinkActive`
760
+ * @see `FlowbiteRouterLinkActiveDirective`
761
+ */
762
+ var routerLinkActiveInputs = ['routerLinkActiveOptions', 'ariaCurrentWhenActive', 'routerLinkActive'];
763
+
764
+ /**
765
+ * Register every outputs of RouterLink used in FlowbiteRouterLinkDirective.
766
+ *
767
+ * @see `RouterLink`
768
+ * @see `FlowbiteRouterLinkDirective`
769
+ */
770
+ var routerLinkOutputs = [];
771
+
772
+ /**
773
+ * Register every outputs of RouterLinkActive used in FlowbiteRouterLinkActiveDirective.
774
+ *
775
+ * @see `RouterLinkActive`
776
+ * @see `FlowbiteRouterLinkActiveDirective`
777
+ */
778
+ var routerLinkActiveOutputs = ['isActiveChange'];
779
+
780
+ /**
781
+ * This function is used to create classes for component's while keeping the intellisens up for TailwindCSS and other extensions.
782
+ *
783
+ * @param input Generic type to be created.
784
+ * @returns The generic type's definition.
785
+ */
786
+ function createClass(input) {
787
+ return input;
788
+ }
789
+
790
+ /**
791
+ * Return theme value to an indented string.
792
+ *
793
+ * @param value The theme to be stringify.
794
+ * @returns The theme as string.
795
+ */
796
+ function themeToString(value) {
797
+ return JSON.stringify(value, undefined, 2);
798
+ }
799
+
800
+ const accordionContentTheme = createTheme({
801
+ root: {
802
+ base: 'flex flex-col gap-2',
803
+ color: {
804
+ primary: 'border-primary-200 dark:border-primary-700',
805
+ light: 'border-gray-200 dark:border-gray-700',
806
+ blue: 'border-blue-200 dark:border-blue-700',
807
+ red: 'border-red-200 dark:border-red-700',
808
+ green: 'border-green-200 dark:border-green-700',
809
+ yellow: 'border-yellow-200 dark:border-yellow-700',
810
+ },
811
+ isOpen: {
812
+ enabled: 'p-5',
813
+ disabled: '',
814
+ },
815
+ },
816
+ });
817
+
818
+ const accordionPanelTheme = createTheme({
819
+ root: {
820
+ base: 'group',
821
+ },
822
+ });
823
+
824
+ const accordionTitleTheme = createTheme({
825
+ root: {
826
+ base: 'cursor-pointer flex items-center p-5 justify-between group-first:rounded-t-lg',
827
+ color: {
828
+ primary: 'text-primary-900 dark:text-primary-50 border-primary-200 dark:border-primary-700 bg-primary-100 hover:bg-primary-100 dark:bg-primary-800 dark:hover:bg-primary-800',
829
+ light: 'text-gray-900 dark:text-gray-50 border-gray-200 dark:border-gray-700 bg-gray-100 hover:bg-gray-100 dark:bg-gray-800 dark:hover:bg-gray-800',
830
+ blue: 'text-blue-900 dark:text-blue-50 border-blue-200 dark:border-blue-700 bg-blue-100 hover:bg-blue-100 dark:bg-blue-800 dark:hover:bg-blue-800',
831
+ red: 'text-red-900 dark:text-red-50 border-red-200 dark:border-red-700 bg-red-100 hover:bg-red-100 dark:bg-red-800 dark:hover:bg-red-800',
832
+ green: 'text-green-900 dark:text-green-50 border-green-200 dark:border-green-700 bg-green-100 hover:bg-green-100 dark:bg-green-800 dark:hover:bg-green-800',
833
+ yellow: 'text-yellow-900 dark:text-yellow-50 border-yellow-200 dark:border-yellow-700 bg-yellow-100 hover:bg-yellow-100 dark:bg-yellow-800 dark:hover:bg-yellow-800',
834
+ },
835
+ isFlush: {
836
+ enabled: 'border-b bg-transparent hover:bg-transparent',
837
+ disabled: '',
838
+ },
839
+ isOpen: {
840
+ enabled: '',
841
+ disabled: 'bg-transparent dark:bg-transparent text-gray-500 ',
842
+ },
843
+ },
844
+ text: {
845
+ base: 'font-semibold text-base',
846
+ },
847
+ });
848
+
849
+ const FLOWBITE_BUTTON_THEME_TOKEN = new InjectionToken('FLOWBITE_BUTTON_THEME_TOKEN');
850
+ class ButtonThemeService {
851
+ constructor() {
852
+ this.baseTheme = inject(FLOWBITE_BUTTON_THEME_TOKEN);
853
+ }
854
+ getClasses(properties) {
855
+ const theme = mergeTheme(this.baseTheme, properties.customStyle);
856
+ const output = {
857
+ rootClass: twMerge(properties.gradientDuoTone && properties.fill == 'outline'
858
+ ? theme.root.base['span']
859
+ : `${theme.root.base['default']} ${theme.root.size[properties.size]}`, properties.gradientDuoTone
860
+ ? theme.root.gradientDuoTone[properties.gradientDuoTone][properties.fill]
861
+ : properties.gradientMonochrome
862
+ ? theme.root.gradientMonochrome[properties.gradientMonochrome]
863
+ : theme.root.color[properties.color][properties.fill], theme.root.isPill[properties.isPill], theme.root.isDisabled[properties.isDisabled]),
864
+ spanClass: twMerge(theme.span.base, theme.span.isPill[properties.isPill], theme.span.size[properties.size]),
865
+ };
866
+ return output;
867
+ }
868
+ }
869
+
870
+ /**
871
+ * @see https://flowbite.com/docs/components/buttons/
872
+ */
873
+ class ButtonComponent extends BaseComponent {
874
+ constructor() {
875
+ super(...arguments);
876
+ this.themeService = inject(ButtonThemeService);
877
+ //#region properties
878
+ this.color = model('primary');
879
+ this.size = model('md');
880
+ this.isPill = model(false);
881
+ this.fill = model('solid');
882
+ this.isDisabled = model(false);
883
+ this.gradientMonochrome = model(undefined);
884
+ this.gradientDuoTone = model(undefined);
885
+ this.customStyle = model({});
886
+ }
887
+ //#endregion
888
+ //#region BaseComponent implementation
889
+ fetchClass() {
890
+ return this.themeService.getClasses({
891
+ color: this.color(),
892
+ isDisabled: booleanToFlowbiteBoolean(this.isDisabled()),
893
+ fill: this.fill(),
894
+ isPill: booleanToFlowbiteBoolean(this.isPill()),
895
+ size: this.size(),
896
+ gradientMonochrome: this.gradientMonochrome(),
897
+ gradientDuoTone: this.gradientDuoTone(),
898
+ customStyle: this.customStyle(),
899
+ });
900
+ }
901
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: ButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
902
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.5", type: ButtonComponent, isStandalone: true, selector: "flowbite-button", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, isPill: { classPropertyName: "isPill", publicName: "isPill", isSignal: true, isRequired: false, transformFunction: null }, fill: { classPropertyName: "fill", publicName: "fill", isSignal: true, isRequired: false, transformFunction: null }, isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: true, isRequired: false, transformFunction: null }, gradientMonochrome: { classPropertyName: "gradientMonochrome", publicName: "gradientMonochrome", isSignal: true, isRequired: false, transformFunction: null }, gradientDuoTone: { classPropertyName: "gradientDuoTone", publicName: "gradientDuoTone", isSignal: true, isRequired: false, transformFunction: null }, customStyle: { classPropertyName: "customStyle", publicName: "customStyle", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { color: "colorChange", size: "sizeChange", isPill: "isPillChange", fill: "fillChange", isDisabled: "isDisabledChange", gradientMonochrome: "gradientMonochromeChange", gradientDuoTone: "gradientDuoToneChange", customStyle: "customStyleChange" }, host: { properties: { "attr.type": "button" } }, usesInheritance: true, ngImport: i0, template: `
903
+ <span
904
+ *ngIf="gradientDuoTone() && fill() === 'outline'; else default"
905
+ [ngClass]="contentClasses().spanClass">
906
+ <ng-container *ngTemplateOutlet="contentOutlet"></ng-container>
907
+ </span>
908
+
909
+ <ng-template #default>
910
+ <ng-container *ngTemplateOutlet="contentOutlet"></ng-container>
911
+ </ng-template>
912
+
913
+ <ng-template #contentOutlet>
914
+ <ng-content />
915
+ </ng-template>
916
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
917
+ }
918
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: ButtonComponent, decorators: [{
919
+ type: Component,
920
+ args: [{
921
+ standalone: true,
922
+ imports: [NgIf, NgClass, NgTemplateOutlet],
923
+ selector: 'flowbite-button',
924
+ template: `
925
+ <span
926
+ *ngIf="gradientDuoTone() && fill() === 'outline'; else default"
927
+ [ngClass]="contentClasses().spanClass">
928
+ <ng-container *ngTemplateOutlet="contentOutlet"></ng-container>
929
+ </span>
930
+
931
+ <ng-template #default>
932
+ <ng-container *ngTemplateOutlet="contentOutlet"></ng-container>
933
+ </ng-template>
934
+
935
+ <ng-template #contentOutlet>
936
+ <ng-content />
937
+ </ng-template>
938
+ `,
939
+ host: {
940
+ '[attr.type]': 'button',
941
+ },
942
+ }]
943
+ }] });
944
+
945
+ const FLOWBITE_ALERT_THEME_TOKEN = new InjectionToken('FLOWBITE_ALERT_THEME_TOKEN');
946
+ class AlertThemeService {
947
+ constructor() {
948
+ this.baseTheme = inject(FLOWBITE_ALERT_THEME_TOKEN);
949
+ }
950
+ getClasses(properties) {
951
+ const theme = mergeTheme(this.baseTheme, properties.customStyle);
952
+ const output = {
953
+ rootClass: twMerge(theme.root.base, theme.root.color[properties.color], theme.root.hasBorder[properties.hasBorder], theme.root.hasBorderAccent[properties.hasBorderAccent]),
954
+ closeButtonClass: twMerge(theme.closeButton.base, theme.closeButton.color[properties.color]),
955
+ };
956
+ return output;
957
+ }
958
+ }
959
+
960
+ class AlertComponent extends BaseComponent {
961
+ constructor() {
962
+ super(...arguments);
963
+ this.themeService = inject(AlertThemeService);
964
+ this.iconRegistry = inject(IconRegistry);
965
+ this.domSanitizer = inject(DomSanitizer);
966
+ //#region properties
967
+ this.color = model('primary');
968
+ this.hasBorder = model(false);
969
+ this.hasBorderAccent = model(false);
970
+ this.customStyle = model({});
971
+ this.icon = model(null);
972
+ this.additionalContent = model(null);
973
+ this.isDismissable = model(false);
974
+ this.onDismiss = model();
975
+ }
976
+ //#endregion
977
+ //#region BaseComponent implementation
978
+ fetchClass() {
979
+ return this.themeService.getClasses({
980
+ color: this.color(),
981
+ hasBorder: booleanToFlowbiteBoolean(this.hasBorder()),
982
+ hasBorderAccent: booleanToFlowbiteBoolean(this.hasBorderAccent()),
983
+ customStyle: this.customStyle(),
984
+ });
985
+ }
986
+ init() {
987
+ this.iconRegistry.addRawSvgIconInNamepsace('flowbite-angular', 'close', this.domSanitizer.bypassSecurityTrustHtml(CLOSE_SVG_ICON));
988
+ }
989
+ //#endregion
990
+ onDismissClick() {
991
+ const func = this.onDismiss();
992
+ if (func)
993
+ func();
994
+ }
995
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: AlertComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
996
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.5", type: AlertComponent, isStandalone: true, selector: "flowbite-alert", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, hasBorder: { classPropertyName: "hasBorder", publicName: "hasBorder", isSignal: true, isRequired: false, transformFunction: null }, hasBorderAccent: { classPropertyName: "hasBorderAccent", publicName: "hasBorderAccent", isSignal: true, isRequired: false, transformFunction: null }, customStyle: { classPropertyName: "customStyle", publicName: "customStyle", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, additionalContent: { classPropertyName: "additionalContent", publicName: "additionalContent", isSignal: true, isRequired: false, transformFunction: null }, isDismissable: { classPropertyName: "isDismissable", publicName: "isDismissable", isSignal: true, isRequired: false, transformFunction: null }, onDismiss: { classPropertyName: "onDismiss", publicName: "onDismiss", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { color: "colorChange", hasBorder: "hasBorderChange", hasBorderAccent: "hasBorderAccentChange", customStyle: "customStyleChange", icon: "iconChange", additionalContent: "additionalContentChange", isDismissable: "isDismissableChange", onDismiss: "onDismissChange" }, host: { properties: { "attr.role": "alert" } }, usesInheritance: true, ngImport: i0, template: `
997
+ <div class="flex items-center">
998
+ <ng-container [ngTemplateOutlet]="icon()"></ng-container>
999
+ <div>
1000
+ <ng-content />
1001
+ </div>
1002
+ <button
1003
+ type="button"
1004
+ [ngClass]="contentClasses()!.closeButtonClass"
1005
+ *ngIf="isDismissable()"
1006
+ aria-label="Close"
1007
+ (click)="onDismissClick()">
1008
+ <span class="sr-only">Close</span>
1009
+ <flowbite-icon
1010
+ svgIcon="flowbite-angular:close"
1011
+ class="h-5 w-5" />
1012
+ </button>
1013
+ </div>
1014
+ <ng-container [ngTemplateOutlet]="additionalContent()"></ng-container>
1015
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: IconComponent, selector: "flowbite-icon", inputs: ["svgIcon"], outputs: ["svgIconChange"] }] }); }
1016
+ }
1017
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: AlertComponent, decorators: [{
1018
+ type: Component,
1019
+ args: [{
1020
+ standalone: true,
1021
+ imports: [NgIf, NgClass, NgTemplateOutlet, IconComponent, ButtonComponent],
1022
+ selector: 'flowbite-alert',
1023
+ template: `
1024
+ <div class="flex items-center">
1025
+ <ng-container [ngTemplateOutlet]="icon()"></ng-container>
1026
+ <div>
1027
+ <ng-content />
1028
+ </div>
1029
+ <button
1030
+ type="button"
1031
+ [ngClass]="contentClasses()!.closeButtonClass"
1032
+ *ngIf="isDismissable()"
1033
+ aria-label="Close"
1034
+ (click)="onDismissClick()">
1035
+ <span class="sr-only">Close</span>
1036
+ <flowbite-icon
1037
+ svgIcon="flowbite-angular:close"
1038
+ class="h-5 w-5" />
1039
+ </button>
1040
+ </div>
1041
+ <ng-container [ngTemplateOutlet]="additionalContent()"></ng-container>
1042
+ `,
1043
+ host: {
1044
+ '[attr.role]': 'alert',
1045
+ },
1046
+ }]
1047
+ }] });
1048
+
1049
+ const alertTheme = createTheme({
1050
+ root: {
1051
+ base: 'flex flex-col gap-2 p-4 text-sm rounded-lg',
1052
+ color: {
1053
+ primary: 'text-primary-800 dark:text-primary-400 bg-primary-50 dark:bg-gray-800 border-primary-300 dark:border-primary-800',
1054
+ dark: 'text-gray-800 dark:text-gray-300 bg-gray-100 dark:bg-gray-800 border-gray-300 dark:border-gray-600',
1055
+ blue: 'text-blue-800 dark:text-blue-400 bg-blue-50 dark:bg-gray-800 border-blue-300 dark:border-blue-800',
1056
+ red: 'text-red-800 dark:text-red-400 bg-red-100 dark:bg-gray-800 border-red-300 dark:border-red-800',
1057
+ green: 'text-green-800 dark:text-green-400 bg-green-100 dark:bg-gray-800 border-green-300 dark:border-green-800',
1058
+ yellow: 'text-yellow-800 dark:text-yellow-300 bg-yellow-100 dark:bg-gray-800 border-yellow-300 dark:border-yellow-800',
1059
+ },
1060
+ hasBorder: {
1061
+ enabled: 'border',
1062
+ disabled: 'border-0',
1063
+ },
1064
+ hasBorderAccent: {
1065
+ enabled: 'border-t-4',
1066
+ disabled: '',
1067
+ },
1068
+ },
1069
+ closeButton: {
1070
+ base: '-mx-1.5 -my-1.5 ml-auto inline-flex h-8 w-8 rounded-lg p-1.5 focus:ring-2',
1071
+ color: {
1072
+ primary: 'text-primary-500 dark:text-primary-600 hover:bg-primary-200 dark:hover:bg-primary-300',
1073
+ dark: 'text-gray-500 dark:text-gray-600 hover:bg-gray-200 dark:hover:bg-gray-300',
1074
+ blue: 'text-blue-500 dark:text-blue-600 hover:bg-blue-200 dark:hover:bg-blue-300',
1075
+ red: 'text-red-500 dark:text-red-600 hover:bg-red-200 dark:hover:bg-red-300',
1076
+ green: 'text-green-500 dark:text-green-600 hover:bg-green-200 dark:hover:bg-green-300',
1077
+ yellow: 'text-yellow-500 dark:text-yellow-600 hover:bg-yellow-200 dark:hover:bg-yellow-300',
1078
+ },
1079
+ },
1080
+ });
1081
+
1082
+ /**
1083
+ * Wrapping directive over RouterLink.
1084
+ *
1085
+ * @see `RouterLink`
1086
+ */
1087
+ class FlowbiteRouterLinkDirective {
1088
+ constructor() {
1089
+ this.router = inject(Router);
1090
+ this.routerLink = inject(RouterLink);
1091
+ this.href = model();
1092
+ }
1093
+ onClick() {
1094
+ const hrefValue = this.href();
1095
+ if (hrefValue) {
1096
+ this.router.navigateByUrl(hrefValue);
1097
+ }
1098
+ }
1099
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: FlowbiteRouterLinkDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1100
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.5", type: FlowbiteRouterLinkDirective, isStandalone: true, selector: "[flowbiteRouterLink]", inputs: { href: { classPropertyName: "href", publicName: "href", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { href: "hrefChange" }, host: { listeners: { "click": "onClick()" } }, hostDirectives: [{ directive: i1.RouterLink, inputs: ["target", "target", "queryParams", "queryParams", "fragment", "fragment", "queryParamsHandling", "queryParamsHandling", "state", "state", "info", "info", "relativeTo", "relativeTo", "preserveFragment", "preserveFragment", "skipLocationChange", "skipLocationChange", "replaceUrl", "replaceUrl", "routerLink", "routerLink"] }], ngImport: i0 }); }
1101
+ }
1102
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: FlowbiteRouterLinkDirective, decorators: [{
1103
+ type: Directive,
1104
+ args: [{
1105
+ standalone: true,
1106
+ selector: '[flowbiteRouterLink]',
1107
+ host: {
1108
+ '(click)': 'onClick()',
1109
+ },
1110
+ hostDirectives: [
1111
+ {
1112
+ directive: RouterLink,
1113
+ inputs: routerLinkInputs,
1114
+ outputs: routerLinkOutputs,
1115
+ },
1116
+ ],
1117
+ }]
1118
+ }] });
1119
+
1120
+ const FLOWBITE_BADGE_THEME_TOKEN = new InjectionToken('FLOWBITE_BADGE_THEME_TOKEN');
1121
+ class BadgeThemeService {
1122
+ constructor() {
1123
+ this.baseTheme = inject(FLOWBITE_BADGE_THEME_TOKEN);
1124
+ }
1125
+ getClasses(properties) {
1126
+ const theme = mergeTheme(this.baseTheme, properties.customStyle);
1127
+ const output = {
1128
+ rootClass: twMerge(theme.root.base, theme.root.color[properties.color], theme.root.size[properties.size], theme.root.isPill[properties.isPill == 'enabled' || properties.isIconOnly == 'enabled' ? 'enabled' : properties.isPill], theme.root.isIconOnly[properties.isIconOnly], theme.root.link[properties.link ? 'enabled' : 'disabled']),
1129
+ };
1130
+ return output;
1131
+ }
1132
+ }
1133
+
1134
+ /**
1135
+ * @see https://flowbite.com/docs/components/badge/
1136
+ */
1137
+ class BadgeComponent extends BaseComponent {
1138
+ constructor() {
1139
+ super(...arguments);
1140
+ this.flowbiteRouterLink = inject(FlowbiteRouterLinkDirective, { optional: true });
1141
+ this.themeService = inject(BadgeThemeService);
1142
+ //#region properties
1143
+ this.color = model('primary');
1144
+ this.size = model('xs');
1145
+ this.isIconOnly = model(false);
1146
+ this.isPill = model(false);
1147
+ this.customStyle = model({});
1148
+ }
1149
+ //#endregion
1150
+ //#region BaseComponent implementation
1151
+ fetchClass() {
1152
+ return this.themeService.getClasses({
1153
+ color: this.color(),
1154
+ size: this.size(),
1155
+ isIconOnly: booleanToFlowbiteBoolean(this.isIconOnly()),
1156
+ isPill: booleanToFlowbiteBoolean(this.isPill()),
1157
+ link: this.flowbiteRouterLink?.routerLink.urlTree ?? null,
1158
+ customStyle: this.customStyle(),
1159
+ });
1160
+ }
1161
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: BadgeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1162
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.5", type: BadgeComponent, isStandalone: true, selector: "flowbite-badge", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, isIconOnly: { classPropertyName: "isIconOnly", publicName: "isIconOnly", isSignal: true, isRequired: false, transformFunction: null }, isPill: { classPropertyName: "isPill", publicName: "isPill", isSignal: true, isRequired: false, transformFunction: null }, customStyle: { classPropertyName: "customStyle", publicName: "customStyle", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { color: "colorChange", size: "sizeChange", isIconOnly: "isIconOnlyChange", isPill: "isPillChange", customStyle: "customStyleChange" }, usesInheritance: true, ngImport: i0, template: `<ng-content />`, isInline: true }); }
1163
+ }
1164
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: BadgeComponent, decorators: [{
1165
+ type: Component,
1166
+ args: [{
1167
+ standalone: true,
1168
+ imports: [NgClass],
1169
+ selector: 'flowbite-badge',
1170
+ template: `<ng-content />`,
1171
+ }]
1172
+ }] });
1173
+
1174
+ const badgeTheme = createTheme({
1175
+ root: {
1176
+ base: 'flex h-fit items-center gap-1 font-semibold',
1177
+ color: {
1178
+ primary: 'bg-primary-100 dark:bg-primary-700 text-primary-800 dark:text-primary-300 group-hover:bg-primary-200 dark:group-hover:bg-primary-600',
1179
+ dark: 'bg-gray-100 dark:bg-gray-700 text-gray-800 dark:text-gray-300 group-hover:bg-gray-200 dark:group-hover:bg-gray-600',
1180
+ blue: 'bg-blue-100 dark:bg-blue-200 text-blue-800 dark:text-blue-800 group-hover:bg-blue-200 dark:group-hover:bg-blue-300',
1181
+ red: 'bg-red-100 dark:bg-red-200 text-red-800 dark:text-red-900 group-hover:bg-red-200 dark:group-hover:bg-red-300',
1182
+ green: 'bg-green-100 dark:bg-green-200 text-green-800 dark:text-green-900 group-hover:bg-green-200 dark:group-hover:bg-green-300',
1183
+ yellow: 'bg-yellow-100 dark:bg-yellow-200 text-yellow-800 dark:text-yellow-900 group-hover:bg-yellow-200 dark:group-hover:bg-yellow-300',
1184
+ indigo: 'bg-indigo-100 dark:bg-indigo-200 text-indigo-800 dark:text-indigo-900 group-hover:bg-indigo-200 dark:group-hover:bg-indigo-300',
1185
+ purple: 'bg-purple-100 dark:bg-purple-200 text-purple-800 dark:text-purple-900 group-hover:bg-purple-200 dark:group-hover:bg-purple-300',
1186
+ pink: 'bg-pink-100 dark:bg-pink-200 text-pink-800 dark:text-pink-900 group-hover:bg-pink-200 dark:group-hover:bg-pink-300',
1187
+ },
1188
+ size: {
1189
+ xs: 'text-xs p-1',
1190
+ sm: 'text-sm p-1.5',
1191
+ },
1192
+ isPill: {
1193
+ enabled: 'rounded-full',
1194
+ disabled: 'rounded',
1195
+ },
1196
+ link: {
1197
+ enabled: 'group cursor-pointer',
1198
+ disabled: '',
1199
+ },
1200
+ isIconOnly: {
1201
+ enabled: '',
1202
+ disabled: 'px-2 py-0.5',
1203
+ },
1204
+ },
1205
+ });
1206
+
1207
+ const FLOWBITE_BREADCRUMB_ITEM_THEME_TOKEN = new InjectionToken('FLOWBITE_BREADCRUMB_ITEM_THEME_TOKEN');
1208
+ class BreadcrumbItemThemeService {
1209
+ constructor() {
1210
+ this.baseTheme = inject(FLOWBITE_BREADCRUMB_ITEM_THEME_TOKEN);
1211
+ }
1212
+ getClasses(properties) {
1213
+ const theme = mergeTheme(this.baseTheme, properties.customStyle);
1214
+ const output = {
1215
+ rootClass: twMerge(theme.root.base, theme.root.color[properties.color]),
1216
+ breadcrumbIconClass: twMerge(theme.icon.base),
1217
+ };
1218
+ return output;
1219
+ }
1220
+ }
1221
+
1222
+ class BreadcrumbItemComponent extends BaseComponent {
1223
+ constructor() {
1224
+ super(...arguments);
1225
+ this.themeService = inject(BreadcrumbItemThemeService);
1226
+ this.breadcrumbComponent = inject(BreadcrumbComponent);
1227
+ this.flowbiteRouterLink = inject(FlowbiteRouterLinkDirective, { optional: true });
1228
+ this.iconRegistry = inject(IconRegistry);
1229
+ this.domSanitizer = inject(DomSanitizer);
1230
+ //#region properties
1231
+ this.color = model(this.breadcrumbComponent.color());
1232
+ this.customStyle = model({});
1233
+ }
1234
+ //#endregion
1235
+ //#region BaseComponent implementation
1236
+ fetchClass() {
1237
+ return this.themeService.getClasses({
1238
+ color: this.color(),
1239
+ link: this.flowbiteRouterLink?.routerLink.urlTree ?? null,
1240
+ customStyle: this.customStyle(),
1241
+ });
1242
+ }
1243
+ init() {
1244
+ this.iconRegistry.addRawSvgIconInNamepsace('flowbite-angular', 'chevron-right', this.domSanitizer.bypassSecurityTrustHtml(CHEVRON_RIGHT_SVG_ICON));
1245
+ }
1246
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: BreadcrumbItemComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1247
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.5", type: BreadcrumbItemComponent, isStandalone: true, selector: "flowbite-breadcrumb-item", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, customStyle: { classPropertyName: "customStyle", publicName: "customStyle", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { color: "colorChange", customStyle: "customStyleChange" }, usesInheritance: true, ngImport: i0, template: `
1248
+ <flowbite-icon
1249
+ [ngClass]="contentClasses().breadcrumbIconClass"
1250
+ svgIcon="flowbite-angular:chevron-right" />
1251
+ <ng-content />
1252
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: IconComponent, selector: "flowbite-icon", inputs: ["svgIcon"], outputs: ["svgIconChange"] }] }); }
1253
+ }
1254
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: BreadcrumbItemComponent, decorators: [{
1255
+ type: Component,
1256
+ args: [{
1257
+ standalone: true,
1258
+ imports: [NgIf, NgClass, NgTemplateOutlet, IconComponent],
1259
+ selector: 'flowbite-breadcrumb-item',
1260
+ template: `
1261
+ <flowbite-icon
1262
+ [ngClass]="contentClasses().breadcrumbIconClass"
1263
+ svgIcon="flowbite-angular:chevron-right" />
1264
+ <ng-content />
1265
+ `,
1266
+ }]
1267
+ }] });
1268
+
1269
+ const FLOWBITE_BREADCRUMB_THEME_TOKEN = new InjectionToken('FLOWBITE_BREADCRUMB_THEME_TOKEN');
1270
+ class BreadcrumbThemeService {
1271
+ constructor() {
1272
+ this.baseTheme = inject(FLOWBITE_BREADCRUMB_THEME_TOKEN);
1273
+ }
1274
+ getClasses(properties) {
1275
+ const theme = mergeTheme(this.baseTheme, properties.customStyle);
1276
+ const output = {
1277
+ rootClass: twMerge(theme.root.base),
1278
+ };
1279
+ return output;
1280
+ }
1281
+ }
1282
+
1283
+ /**
1284
+ * @see https://flowbite.com/docs/components/breadcrumb/
1285
+ */
1286
+ class BreadcrumbComponent extends BaseComponent {
1287
+ constructor() {
1288
+ super(...arguments);
1289
+ this.themeService = inject(BreadcrumbThemeService);
1290
+ this.breadcrumbItemChildren = contentChildren(BreadcrumbItemComponent);
1291
+ //#region properties
1292
+ this.color = model('primary');
1293
+ this.customStyle = model({});
1294
+ }
1295
+ //#endregion
1296
+ //#region BaseComponent implementation
1297
+ fetchClass() {
1298
+ return this.themeService.getClasses({
1299
+ customStyle: this.customStyle(),
1300
+ });
1301
+ }
1302
+ verify() {
1303
+ if (this.breadcrumbItemChildren().length === 0) {
1304
+ throw new Error('No BreadcrumbItemComponent available');
1305
+ }
1306
+ }
1307
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: BreadcrumbComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1308
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.5", type: BreadcrumbComponent, isStandalone: true, selector: "flowbite-breadcrumb", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, customStyle: { classPropertyName: "customStyle", publicName: "customStyle", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { color: "colorChange", customStyle: "customStyleChange" }, host: { properties: { "attr.aria-label": "breadcrumb" } }, queries: [{ propertyName: "breadcrumbItemChildren", predicate: BreadcrumbItemComponent, isSignal: true }], usesInheritance: true, ngImport: i0, template: `<ng-content />`, isInline: true }); }
1309
+ }
1310
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: BreadcrumbComponent, decorators: [{
1311
+ type: Component,
1312
+ args: [{
1313
+ standalone: true,
1314
+ imports: [NgClass],
1315
+ selector: 'flowbite-breadcrumb',
1316
+ template: `<ng-content />`,
1317
+ host: {
1318
+ '[attr.aria-label]': 'breadcrumb',
1319
+ },
1320
+ }]
1321
+ }] });
1322
+
1323
+ const breadcrumbTheme = createTheme({
1324
+ root: {
1325
+ base: 'flex items-center',
1326
+ },
1327
+ });
1328
+
1329
+ const breadcrumbItemTheme = createTheme({
1330
+ root: {
1331
+ base: 'group flex items-center text-sm font-medium cursor-pointer',
1332
+ color: {
1333
+ primary: 'text-primary-700 dark:text-primary-400 hover:text-primary-900 dark:hover:text-primary-500',
1334
+ dark: 'text-gray-700 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white',
1335
+ blue: 'text-blue-700 dark:text-blue-400 hover:text-blue-900 dark:hover:text-blue-500',
1336
+ red: 'text-red-700 dark:text-red-400 hover:text-red-900 dark:hover:text-red-500',
1337
+ green: 'text-green-700 dark:text-green-400 hover:text-green-900 dark:hover:text-green-500',
1338
+ yellow: 'text-yellow-700 dark:text-yellow-400 hover:text-yellow-900 dark:hover:text-yellow-500',
1339
+ },
1340
+ },
1341
+ icon: {
1342
+ base: 'mx-1 h-6 w-6 md:mx-2 group-first:hidden',
1343
+ },
1344
+ });
1345
+
1346
+ const buttonTheme = createTheme({
1347
+ root: {
1348
+ base: {
1349
+ default: 'cursor-pointer group flex h-min w-fit items-center justify-center p-0.5 text-center font-medium focus:z-10',
1350
+ span: 'cursor-pointer group inline-flex relative items-center justify-center p-0.5 font-medium overflow-hidden',
1351
+ },
1352
+ color: {
1353
+ dark: {
1354
+ solid: 'text-white bg-gray-800 dark:bg-gray-800 border border-transparent dark:border-gray-700 hover:bg-gray-900 dark:hover:bg-gray-700 focus:ring-4 focus:ring-gray-300 dark:focus:ring-gray-800 disabled:hover:bg-gray-800 dark:disabled:hover:bg-gray-800',
1355
+ outline: 'text-gray-900 hover:text-white border border-gray-800 hover:bg-gray-900 dark:border-gray-600 dark:text-gray-400 dark:hover:text-white focus:ring-4 focus:outline-none focus:ring-gray-300 dark:hover:bg-gray-600 dark:focus:ring-gray-800',
1356
+ },
1357
+ primary: {
1358
+ solid: 'text-white bg-primary-700 border border-transparent hover:bg-primary-800 focus:ring-4 focus:ring-primary-300 dark:bg-primary-700 dark:hover:bg-primary-800 dark:focus:ring-primary-900',
1359
+ outline: 'text-primary-700 hover:text-white border border-primary-700 hover:bg-primary-800 focus:ring-4 focus:outline-none focus:ring-primary-300 dark:border-primary-500 dark:text-primary-500 dark:hover:text-white dark:hover:bg-primary-600 dark:focus:ring-primary-900',
1360
+ },
1361
+ red: {
1362
+ solid: 'text-white bg-red-700 border border-transparent hover:bg-red-800 focus:ring-4 focus:ring-red-300 dark:bg-red-600 dark:hover:bg-red-700 dark:focus:ring-red-900',
1363
+ outline: 'text-red-700 hover:text-white border border-red-700 hover:bg-red-800 focus:ring-4 focus:outline-none focus:ring-red-300 dark:border-red-500 dark:text-red-500 dark:hover:text-white dark:hover:bg-red-600 dark:focus:ring-red-900',
1364
+ },
1365
+ blue: {
1366
+ solid: 'text-white bg-blue-700 border border-transparent hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800',
1367
+ outline: 'text-blue-700 hover:text-white border border-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 dark:border-blue-500 dark:text-blue-500 dark:hover:text-white dark:hover:bg-blue-600 dark:focus:ring-blue-800',
1368
+ },
1369
+ light: {
1370
+ solid: 'text-gray-900 bg-white border border-gray-300 hover:bg-gray-100 focus:ring-4 focus:ring-blue-300 dark:bg-gray-600 dark:text-white dark:border-gray-600 dark:hover:bg-gray-700 dark:hover:border-gray-700 dark:focus:ring-gray-700',
1371
+ outline: 'text-gray-900 bg-transparent border border-gray-200 hover:bg-white focus:ring-4 focus:ring-blue-300 dark:bg-transparent dark:text-white dark:border-white dark:hover:text-gray-900 dark:hover:bg-white dark:hover:border-gray-700 dark:focus:ring-gray-700',
1372
+ },
1373
+ purple: {
1374
+ solid: 'text-white bg-purple-700 border border-transparent hover:bg-purple-800 focus:ring-4 focus:ring-purple-300 dark:bg-purple-600 dark:hover:bg-purple-700 dark:focus:ring-purple-900',
1375
+ outline: 'text-purple-700 hover:text-white border border-purple-700 hover:bg-purple-800 focus:ring-4 focus:outline-none focus:ring-purple-300 dark:border-purple-400 dark:text-purple-400 dark:hover:text-white dark:hover:bg-purple-500 dark:focus:ring-purple-900',
1376
+ },
1377
+ green: {
1378
+ solid: 'text-white bg-green-700 border border-transparent hover:bg-green-800 focus:ring-4 focus:ring-green-300 dark:bg-green-600 dark:hover:bg-green-700 dark:focus:ring-green-800',
1379
+ outline: 'text-green-700 hover:text-white border border-green-700 hover:bg-green-800 focus:ring-4 focus:outline-none focus:ring-green-300 dark:border-green-500 dark:text-green-500 dark:hover:text-white dark:hover:bg-green-600 dark:focus:ring-green-800',
1380
+ },
1381
+ yellow: {
1382
+ solid: 'text-white bg-yellow-400 border border-transparent hover:bg-yellow-500 focus:ring-4 focus:ring-yellow-300 dark:focus:ring-yellow-900',
1383
+ outline: 'text-yellow-400 hover:text-white border border-yellow-400 hover:bg-yellow-500 focus:ring-4 focus:outline-none focus:ring-yellow-300 dark:border-yellow-300 dark:text-yellow-300 dark:hover:text-white dark:hover:bg-yellow-400 dark:focus:ring-yellow-900',
1384
+ },
1385
+ },
1386
+ isDisabled: {
1387
+ enabled: 'cursor-not-allowed opacity-50',
1388
+ disabled: '',
1389
+ },
1390
+ gradientMonochrome: {
1391
+ cyan: 'text-white bg-gradient-to-r from-cyan-400 via-cyan-500 to-cyan-600 hover:bg-gradient-to-br focus:ring-4 focus:ring-cyan-300 dark:focus:ring-cyan-800',
1392
+ red: 'text-white bg-gradient-to-r from-red-400 via-red-500 to-red-600 hover:bg-gradient-to-br focus:ring-4 focus:ring-red-300 dark:focus:ring-red-800',
1393
+ blue: 'text-white bg-gradient-to-r from-blue-500 via-blue-600 to-blue-700 hover:bg-gradient-to-br focus:ring-4 focus:ring-blue-300 dark:focus:ring-blue-800',
1394
+ lime: 'text-gray-900 bg-gradient-to-r from-lime-200 via-lime-400 to-lime-500 hover:bg-gradient-to-br focus:ring-4 focus:ring-lime-300 dark:focus:ring-lime-800',
1395
+ pink: 'text-white bg-gradient-to-r from-pink-400 via-pink-500 to-pink-600 hover:bg-gradient-to-br focus:ring-4 focus:ring-pink-300 dark:focus:ring-pink-800',
1396
+ purple: 'text-white bg-gradient-to-r from-purple-500 via-purple-600 to-purple-700 hover:bg-gradient-to-br focus:ring-4 focus:ring-purple-300 dark:focus:ring-purple-800',
1397
+ green: 'text-white bg-gradient-to-r from-green-400 via-green-500 to-green-600 hover:bg-gradient-to-br focus:ring-4 focus:ring-green-300 dark:focus:ring-green-800',
1398
+ teal: 'text-white bg-gradient-to-r from-teal-400 via-teal-500 to-teal-600 hover:bg-gradient-to-br focus:ring-4 focus:ring-teal-300 dark:focus:ring-teal-800',
1399
+ },
1400
+ gradientDuoTone: {
1401
+ purpleToBlue: {
1402
+ solid: 'text-white bg-gradient-to-br from-purple-600 to-blue-500 hover:bg-gradient-to-bl focus:ring-4 focus:outline-none focus:ring-blue-300 dark:focus:ring-blue-800',
1403
+ outline: 'text-gray-900 bg-gradient-to-br from-purple-600 to-blue-500 group-hover:from-purple-600 group-hover:to-blue-500 hover:text-white dark:text-white focus:ring-4 focus:outline-none focus:ring-blue-300 dark:focus:ring-blue-800',
1404
+ },
1405
+ cyanToBlue: {
1406
+ solid: 'text-white bg-gradient-to-r from-cyan-500 to-blue-500 hover:bg-gradient-to-bl focus:ring-4 focus:outline-none focus:ring-cyan-300 dark:focus:ring-cyan-800',
1407
+ outline: 'text-gray-900 bg-gradient-to-br from-cyan-500 to-blue-500 group-hover:from-cyan-500 group-hover:to-blue-500 hover:text-white dark:text-white focus:ring-4 focus:outline-none focus:ring-cyan-200 dark:focus:ring-cyan-800',
1408
+ },
1409
+ greenToBlue: {
1410
+ solid: 'text-white bg-gradient-to-br from-green-400 to-blue-600 hover:bg-gradient-to-bl focus:ring-4 focus:outline-none focus:ring-green-200 dark:focus:ring-green-800',
1411
+ outline: 'text-gray-900 bg-gradient-to-br from-green-400 to-blue-600 group-hover:from-green-400 group-hover:to-blue-600 hover:text-white dark:text-white focus:ring-4 focus:outline-none focus:ring-green-200 dark:focus:ring-green-800',
1412
+ },
1413
+ purpleToPink: {
1414
+ solid: 'text-white bg-gradient-to-r from-purple-500 to-pink-500 hover:bg-gradient-to-l focus:ring-4 focus:outline-none focus:ring-purple-200 dark:focus:ring-purple-800',
1415
+ outline: 'text-gray-900 bg-gradient-to-br from-purple-500 to-pink-500 group-hover:from-purple-500 group-hover:to-pink-500 hover:text-white dark:text-white focus:ring-4 focus:outline-none focus:ring-purple-200 dark:focus:ring-purple-800',
1416
+ },
1417
+ pinkToOrange: {
1418
+ solid: 'text-white bg-gradient-to-br from-pink-500 to-orange-400 hover:bg-gradient-to-bl focus:ring-4 focus:outline-none focus:ring-pink-200 dark:focus:ring-pink-800',
1419
+ outline: 'text-gray-900 bg-gradient-to-br from-pink-500 to-orange-400 group-hover:from-pink-500 group-hover:to-orange-400 hover:text-white dark:text-white focus:ring-4 focus:outline-none focus:ring-pink-200 dark:focus:ring-pink-800',
1420
+ },
1421
+ tealToLime: {
1422
+ solid: 'text-gray-900 bg-gradient-to-r from-teal-200 to-lime-200 hover:bg-gradient-to-l hover:from-teal-200 hover:to-lime-200 focus:ring-4 focus:outline-none focus:ring-lime-200 dark:focus:ring-teal-700',
1423
+ outline: 'text-gray-900 bg-gradient-to-br from-teal-300 to-lime-300 group-hover:from-teal-300 group-hover:to-lime-300 dark:text-white dark:hover:text-gray-900 focus:ring-4 focus:outline-none focus:ring-lime-200 dark:focus:ring-lime-800',
1424
+ },
1425
+ redToYellow: {
1426
+ solid: 'text-gray-900 bg-gradient-to-r from-red-200 via-red-300 to-yellow-200 hover:bg-gradient-to-bl focus:ring-4 focus:outline-none focus:ring-red-100 dark:focus:ring-red-400',
1427
+ outline: 'text-gray-900 bg-gradient-to-br from-red-200 via-red-300 to-yellow-200 group-hover:from-red-200 group-hover:via-red-300 group-hover:to-yellow-200 dark:text-white dark:hover:text-gray-900 focus:ring-4 focus:outline-none focus:ring-red-100 dark:focus:ring-red-400',
1428
+ },
1429
+ },
1430
+ size: {
1431
+ xs: 'text-xs py-2 px-3',
1432
+ sm: 'text-sm py-2 px-3',
1433
+ md: 'text-sm px-5 py-2.5',
1434
+ lg: 'text-base py-3 px-5',
1435
+ xl: 'text-base px-6 py-3.5',
1436
+ },
1437
+ isPill: {
1438
+ enabled: 'rounded-full',
1439
+ disabled: 'rounded-lg',
1440
+ },
1441
+ },
1442
+ span: {
1443
+ base: 'cursor-pointer relative inline-flex items-center bg-white transition-all duration-75 ease-in group-hover:bg-opacity-0 dark:bg-gray-900',
1444
+ isPill: {
1445
+ enabled: 'rounded-full',
1446
+ disabled: 'rounded-md',
1447
+ },
1448
+ size: {
1449
+ xs: 'text-xs py-2 px-3',
1450
+ sm: 'text-sm py-2 px-3',
1451
+ md: 'text-sm px-5 py-2.5',
1452
+ lg: 'text-base py-3 px-5',
1453
+ xl: 'text-base px-6 py-3.5',
1454
+ },
1455
+ },
1456
+ });
1457
+
1458
+ /**
1459
+ * Signal based store service used in several flowbite-angular components.
1460
+ *
1461
+ * @usageNotes
1462
+ * You can't use SignalStoreService as it is, you must inherite another class from it with its generic type T.
1463
+ *
1464
+ * @example
1465
+ * export class ComponentStateService extends SignalStoreService<{isOpen: boolean;}> {}
1466
+ */
1467
+ class SignalStoreService {
1468
+ constructor() {
1469
+ this._state = signal({});
1470
+ }
1471
+ /**
1472
+ * Accessor for the data.
1473
+ */
1474
+ get state() {
1475
+ return this._state.asReadonly();
1476
+ }
1477
+ /**
1478
+ * Get the value for the provided key.
1479
+ *
1480
+ * @param key Keyof T type.
1481
+ * @returns The value for the provided key.
1482
+ */
1483
+ select(key) {
1484
+ return computed(() => this._state()[key]);
1485
+ }
1486
+ /**
1487
+ * Set the value for the provided key.
1488
+ *
1489
+ * @param key Keyof T type.
1490
+ * @param data Data for the key.
1491
+ */
1492
+ set(key, data) {
1493
+ this._state.update((currentValue) => ({ ...currentValue, [key]: data }));
1494
+ }
1495
+ /**
1496
+ * Set the value for the entire type.
1497
+ *
1498
+ * @param state The value to be set.
1499
+ */
1500
+ setState(state) {
1501
+ this._state.set(state);
1502
+ }
1503
+ }
1504
+ /**
1505
+ * @usageNotes
1506
+ * You can use SignalStoreService as it isSince it is provided in 'root'.
1507
+ */
1508
+ class GlobalSignalStoreService extends SignalStoreService {
1509
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: GlobalSignalStoreService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
1510
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: GlobalSignalStoreService, providedIn: 'root' }); }
1511
+ }
1512
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: GlobalSignalStoreService, decorators: [{
1513
+ type: Injectable,
1514
+ args: [{ providedIn: 'root' }]
1515
+ }] });
1516
+
1517
+ /**
1518
+ * Provide an abstract class used in themeing system of flowbite-angular.
1519
+ */
1520
+ class FlowbiteThemeService {
1521
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: FlowbiteThemeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1522
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: FlowbiteThemeService, providedIn: 'root' }); }
1523
+ }
1524
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: FlowbiteThemeService, decorators: [{
1525
+ type: Injectable,
1526
+ args: [{
1527
+ providedIn: 'root',
1528
+ }]
1529
+ }] });
1530
+
1531
+ const FLOWBITE_DARK_THEME_TOGGLE_THEME_TOKEN = new InjectionToken('FLOWBITE_DARK_THEME_TOGGLE_THEME_TOKEN');
1532
+ class DarkThemeToggleThemeService {
1533
+ constructor() {
1534
+ this.baseTheme = inject(FLOWBITE_DARK_THEME_TOGGLE_THEME_TOKEN);
1535
+ }
1536
+ getClasses(properties) {
1537
+ const theme = mergeTheme(this.baseTheme, properties.customStyle);
1538
+ const output = {
1539
+ rootClass: twMerge(theme.root.base),
1540
+ };
1541
+ return output;
1542
+ }
1543
+ }
1544
+
1545
+ class DarkThemeToggleComponent extends BaseComponent {
1546
+ constructor() {
1547
+ super(...arguments);
1548
+ this.themeService = inject(DarkThemeToggleThemeService);
1549
+ this.themeStateService = inject((GlobalSignalStoreService));
1550
+ this.iconRegistry = inject(IconRegistry);
1551
+ this.domSanitizer = inject(DomSanitizer);
1552
+ //#region properties
1553
+ this.customStyle = model({});
1554
+ }
1555
+ //#endregion
1556
+ //#region BaseComponent implementation
1557
+ fetchClass() {
1558
+ return this.themeService.getClasses({
1559
+ customStyle: this.customStyle(),
1560
+ });
1561
+ }
1562
+ init() {
1563
+ afterNextRender(() => {
1564
+ const localStorageTheme = localStorage.getItem('color-theme');
1565
+ if (localStorageTheme === 'dark' ||
1566
+ (!localStorageTheme && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
1567
+ this.themeStateService.set('theme', 'dark');
1568
+ document.documentElement.classList.add('dark');
1569
+ }
1570
+ else {
1571
+ this.themeStateService.set('theme', 'light');
1572
+ document.documentElement.classList.remove('dark');
1573
+ }
1574
+ effect(() => {
1575
+ const theme = this.themeStateService.select('theme')();
1576
+ localStorage.setItem('color-theme', theme);
1577
+ theme === 'dark'
1578
+ ? document.documentElement.classList.add('dark')
1579
+ : document.documentElement.classList.remove('dark');
1580
+ }, { injector: this.injector });
1581
+ }, { injector: this.injector });
1582
+ this.iconRegistry.addRawSvgIconInNamepsace('flowbite-angular', 'sun', this.domSanitizer.bypassSecurityTrustHtml(SUN_SVG_ICON));
1583
+ this.iconRegistry.addRawSvgIconInNamepsace('flowbite-angular', 'moon', this.domSanitizer.bypassSecurityTrustHtml(MOON_SVG_ICON));
1584
+ }
1585
+ //#endregion
1586
+ onClick() {
1587
+ if (this.themeStateService.select('theme')() === 'light')
1588
+ this.themeStateService.set('theme', 'dark');
1589
+ else
1590
+ this.themeStateService.set('theme', 'light');
1591
+ }
1592
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: DarkThemeToggleComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1593
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.5", type: DarkThemeToggleComponent, isStandalone: true, selector: "flowbite-dark-theme-toggle", inputs: { customStyle: { classPropertyName: "customStyle", publicName: "customStyle", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { customStyle: "customStyleChange" }, host: { listeners: { "click": "onClick()" } }, usesInheritance: true, ngImport: i0, template: `
1594
+ <flowbite-icon
1595
+ svgIcon="flowbite-angular:moon"
1596
+ class="h-5 w-5 block dark:hidden" />
1597
+ <flowbite-icon
1598
+ svgIcon="flowbite-angular:sun"
1599
+ class="h-5 w-5 hidden dark:block" />
1600
+ `, isInline: true, dependencies: [{ kind: "component", type: IconComponent, selector: "flowbite-icon", inputs: ["svgIcon"], outputs: ["svgIconChange"] }] }); }
1601
+ }
1602
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: DarkThemeToggleComponent, decorators: [{
1603
+ type: Component,
1604
+ args: [{
1605
+ standalone: true,
1606
+ imports: [NgIf, NgClass, IconComponent],
1607
+ selector: 'flowbite-dark-theme-toggle',
1608
+ template: `
1609
+ <flowbite-icon
1610
+ svgIcon="flowbite-angular:moon"
1611
+ class="h-5 w-5 block dark:hidden" />
1612
+ <flowbite-icon
1613
+ svgIcon="flowbite-angular:sun"
1614
+ class="h-5 w-5 hidden dark:block" />
1615
+ `,
1616
+ host: {
1617
+ '(click)': 'onClick()',
1618
+ },
1619
+ }]
1620
+ }] });
1621
+
1622
+ const darkThemeToggleTheme = createTheme({
1623
+ root: {
1624
+ base: 'cursor-pointer rounded-lg p-2.5 text-sm text-gray-500 hover:bg-gray-100 focus:outline-none focus:ring-4 focus:ring-gray-200 dark:text-gray-400 dark:hover:bg-gray-700 dark:focus:ring-gray-700',
1625
+ },
1626
+ });
1627
+
1628
+ const FLOWBITE_DROPDOWN_DIVIDER_THEME_TOKEN = new InjectionToken('FLOWBITE_DROPDOWN_DIVIDER_THEME_TOKEN');
1629
+ class DropdownDividerThemeService {
1630
+ constructor() {
1631
+ this.baseTheme = inject(FLOWBITE_DROPDOWN_DIVIDER_THEME_TOKEN);
1632
+ }
1633
+ getClasses(properties) {
1634
+ const theme = mergeTheme(this.baseTheme, properties.customStyle);
1635
+ const output = {
1636
+ rootClass: twMerge(theme.root.base),
1637
+ };
1638
+ return output;
1639
+ }
1640
+ }
1641
+
1642
+ class DropdownDividerComponent extends BaseComponent {
1643
+ constructor() {
1644
+ super(...arguments);
1645
+ this.themeService = inject(DropdownDividerThemeService);
1646
+ this.dropdownComponent = inject(DropdownComponent);
1647
+ //#region properties
1648
+ this.customStyle = model({});
1649
+ }
1650
+ //#endregion
1651
+ //#region BaseComponent implementation
1652
+ fetchClass() {
1653
+ return this.themeService.getClasses({
1654
+ customStyle: this.customStyle(),
1655
+ });
1656
+ }
1657
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: DropdownDividerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1658
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.5", type: DropdownDividerComponent, isStandalone: true, selector: "flowbite-dropdown-divider", inputs: { customStyle: { classPropertyName: "customStyle", publicName: "customStyle", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { customStyle: "customStyleChange" }, usesInheritance: true, ngImport: i0, template: ``, isInline: true }); }
1659
+ }
1660
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: DropdownDividerComponent, decorators: [{
1661
+ type: Component,
1662
+ args: [{
1663
+ standalone: true,
1664
+ imports: [NgClass],
1665
+ selector: 'flowbite-dropdown-divider',
1666
+ template: ``,
1667
+ }]
1668
+ }] });
1669
+
1670
+ const FLOWBITE_DROPDOWN_HEADER_THEME_TOKEN = new InjectionToken('FLOWBITE_DROPDOWN_HEADER_THEME_TOKEN');
1671
+ class DropdownHeaderThemeService {
1672
+ constructor() {
1673
+ this.baseTheme = inject(FLOWBITE_DROPDOWN_HEADER_THEME_TOKEN);
1674
+ }
1675
+ getClasses(properties) {
1676
+ const theme = mergeTheme(this.baseTheme, properties.customStyle);
1677
+ const output = {
1678
+ rootClass: twMerge(theme.root.base),
1679
+ root: twMerge(theme.content.base),
1680
+ };
1681
+ return output;
1682
+ }
1683
+ }
1684
+
1685
+ class DropdownHeaderComponent extends BaseComponent {
1686
+ constructor() {
1687
+ super(...arguments);
1688
+ this.themeService = inject(DropdownHeaderThemeService);
1689
+ this.dropdownComponent = inject(DropdownComponent);
1690
+ //#region properties
1691
+ this.customStyle = model({});
1692
+ }
1693
+ //#endregion
1694
+ //#region BaseComponent implementation
1695
+ fetchClass() {
1696
+ return this.themeService.getClasses({
1697
+ customStyle: this.customStyle(),
1698
+ });
1699
+ }
1700
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: DropdownHeaderComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1701
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.5", type: DropdownHeaderComponent, isStandalone: true, selector: "flowbite-dropdown-header", inputs: { customStyle: { classPropertyName: "customStyle", publicName: "customStyle", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { customStyle: "customStyleChange" }, usesInheritance: true, ngImport: i0, template: `
1702
+ <div [ngClass]="contentClasses().root">
1703
+ <ng-content />
1704
+ </div>
1705
+ <div class="my-1 h-px bg-gray-100 dark:bg-gray-600"></div>
1706
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
1707
+ }
1708
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: DropdownHeaderComponent, decorators: [{
1709
+ type: Component,
1710
+ args: [{
1711
+ standalone: true,
1712
+ imports: [NgClass],
1713
+ selector: 'flowbite-dropdown-header',
1714
+ template: `
1715
+ <div [ngClass]="contentClasses().root">
1716
+ <ng-content />
1717
+ </div>
1718
+ <div class="my-1 h-px bg-gray-100 dark:bg-gray-600"></div>
1719
+ `,
1720
+ }]
1721
+ }] });
1722
+
1723
+ const FLOWBITE_DROPDOWN_ITEM_THEME_TOKEN = new InjectionToken('FLOWBITE_DROPDOWN_ITEM_THEME_TOKEN');
1724
+ class DropdownItemThemeService {
1725
+ constructor() {
1726
+ this.baseTheme = inject(FLOWBITE_DROPDOWN_ITEM_THEME_TOKEN);
1727
+ }
1728
+ getClasses(properties) {
1729
+ const theme = mergeTheme(this.baseTheme, properties.customStyle);
1730
+ const output = {
1731
+ rootClass: twMerge(theme.root.base),
1732
+ };
1733
+ return output;
1734
+ }
1735
+ }
1736
+
1737
+ class DropdownItemComponent extends BaseComponent {
1738
+ constructor() {
1739
+ super(...arguments);
1740
+ this.themeService = inject(DropdownItemThemeService);
1741
+ this.dropdownComponent = inject(DropdownComponent);
1742
+ //#region properties
1743
+ this.customStyle = model({});
1744
+ }
1745
+ //#endregion
1746
+ //#region BaseComponent implementation
1747
+ fetchClass() {
1748
+ return this.themeService.getClasses({
1749
+ customStyle: this.customStyle(),
1750
+ });
1751
+ }
1752
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: DropdownItemComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1753
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.5", type: DropdownItemComponent, isStandalone: true, selector: "flowbite-dropdown-item", inputs: { customStyle: { classPropertyName: "customStyle", publicName: "customStyle", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { customStyle: "customStyleChange" }, usesInheritance: true, ngImport: i0, template: `<ng-content />`, isInline: true }); }
1754
+ }
1755
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: DropdownItemComponent, decorators: [{
1756
+ type: Component,
1757
+ args: [{
1758
+ standalone: true,
1759
+ imports: [NgClass],
1760
+ selector: 'flowbite-dropdown-item',
1761
+ template: `<ng-content />`,
1762
+ }]
1763
+ }] });
1764
+
1765
+ const FLOWBITE_DROPDOWN_THEME_TOKEN = new InjectionToken('FLOWBITE_DROPDOWN_THEME_TOKEN');
1766
+ class DropdownThemeService {
1767
+ constructor() {
1768
+ this.baseTheme = inject(FLOWBITE_DROPDOWN_THEME_TOKEN);
1769
+ }
1770
+ getClasses(properties) {
1771
+ const theme = mergeTheme(this.baseTheme, properties.customStyle);
1772
+ const output = {
1773
+ rootClass: twMerge(theme.root.base),
1774
+ dropdownClass: twMerge(theme.dropdown.base),
1775
+ spanClass: twMerge(theme.span.base),
1776
+ containerClass: twMerge(theme.container.base, theme.container.isOpen[properties.isOpen], theme.container.placement[properties.placement]),
1777
+ contentClass: twMerge(theme.content.base),
1778
+ subContentClass: twMerge(theme.subContent.base),
1779
+ };
1780
+ return output;
1781
+ }
1782
+ }
1783
+
1784
+ /**
1785
+ * @see https://flowbite.com/docs/components/dropdowns/
1786
+ */
1787
+ class DropdownComponent extends BaseComponent {
1788
+ constructor() {
1789
+ super(...arguments);
1790
+ this.themeService = inject(DropdownThemeService);
1791
+ this.iconRegistry = inject(IconRegistry);
1792
+ this.domSanitizer = inject(DomSanitizer);
1793
+ this.dropdownItemChildren = contentChildren(DropdownItemComponent);
1794
+ this.dropdownHeaderChildren = contentChildren(DropdownHeaderComponent);
1795
+ this.dropdownDividerChildren = contentChildren(DropdownDividerComponent);
1796
+ //#region properties
1797
+ this.label = model('Dropdown');
1798
+ this.isOpen = model(false);
1799
+ this.position = model('bottom-center');
1800
+ this.customStyle = model({});
1801
+ //#endregion
1802
+ this.x = 0;
1803
+ this.y = 0;
1804
+ this.width = 0;
1805
+ }
1806
+ //#endregion
1807
+ //#region BaseComponent implementation
1808
+ fetchClass() {
1809
+ return this.themeService.getClasses({
1810
+ label: this.label(),
1811
+ isOpen: booleanToFlowbiteBoolean(this.isOpen()),
1812
+ placement: this.position(),
1813
+ customStyle: this.customStyle(),
1814
+ });
1815
+ }
1816
+ init() {
1817
+ this.iconRegistry.addRawSvgIconInNamepsace('flowbite-angular', 'chevron-down', this.domSanitizer.bypassSecurityTrustHtml(CHEVRON_DOWN_SVG_ICON));
1818
+ }
1819
+ verify() {
1820
+ if (this.dropdownItemChildren().length === 0) {
1821
+ throw new Error('No DropdownItemComponent available');
1822
+ }
1823
+ }
1824
+ toggle() {
1825
+ this.isOpen.set(!this.isOpen());
1826
+ }
1827
+ calculatePosition() {
1828
+ computePosition(this.button.nativeElement, this.dropdown.nativeElement, {
1829
+ placement: this.convertPosition(this.position()),
1830
+ middleware: [offset(8), flip(), shift()],
1831
+ }).then(({ x, y }) => {
1832
+ this.dropdown.nativeElement.style.left = x + 'px';
1833
+ this.dropdown.nativeElement.style.top = y + 'px';
1834
+ this.width = this.button.nativeElement.offsetWidth;
1835
+ });
1836
+ }
1837
+ ngAfterViewInit() {
1838
+ autoUpdate(this.button.nativeElement, this.dropdown.nativeElement, () => {
1839
+ if (!this.isOpen())
1840
+ return;
1841
+ this.calculatePosition();
1842
+ });
1843
+ }
1844
+ // Onclick outside the dropdown, close it
1845
+ clickout(event) {
1846
+ if (!this.dropdown.nativeElement.contains(event.target) &&
1847
+ this.isOpen() &&
1848
+ !this.button.nativeElement.contains(event.target)) {
1849
+ this.isOpen.set(false);
1850
+ }
1851
+ }
1852
+ convertPosition(pos) {
1853
+ switch (pos) {
1854
+ case 'top-center':
1855
+ return 'top';
1856
+ case 'bottom-center':
1857
+ return 'bottom';
1858
+ case 'left-center':
1859
+ return 'left';
1860
+ case 'right-center':
1861
+ return 'right';
1862
+ }
1863
+ }
1864
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: DropdownComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1865
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.5", type: DropdownComponent, isStandalone: true, selector: "flowbite-dropdown", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, customStyle: { classPropertyName: "customStyle", publicName: "customStyle", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { label: "labelChange", isOpen: "isOpenChange", position: "positionChange", customStyle: "customStyleChange" }, host: { listeners: { "document:click": "clickout($event)" } }, queries: [{ propertyName: "dropdownItemChildren", predicate: DropdownItemComponent, isSignal: true }, { propertyName: "dropdownHeaderChildren", predicate: DropdownHeaderComponent, isSignal: true }, { propertyName: "dropdownDividerChildren", predicate: DropdownDividerComponent, isSignal: true }], viewQueries: [{ propertyName: "dropdown", first: true, predicate: ["dropdown"], descendants: true }, { propertyName: "button", first: true, predicate: ["button"], descendants: true }], usesInheritance: true, ngImport: i0, template: `
1866
+ <button
1867
+ type="button"
1868
+ [ngClass]="contentClasses().dropdownClass"
1869
+ (click)="toggle()"
1870
+ #button>
1871
+ <span [ngClass]="contentClasses().spanClass">
1872
+ {{ label() }}
1873
+ <flowbite-icon
1874
+ svgIcon="flowbite-angular:chevron-down"
1875
+ class="ml-2 h-4 w-4" />
1876
+ </span>
1877
+ </button>
1878
+ <div
1879
+ [ngClass]="contentClasses().containerClass"
1880
+ #dropdown
1881
+ [style.display]="isOpen() ? 'block' : 'none'">
1882
+ <div [ngClass]="contentClasses().contentClass">
1883
+ <ul [ngClass]="contentClasses().subContentClass">
1884
+ <ng-content />
1885
+ </ul>
1886
+ </div>
1887
+ </div>
1888
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: IconComponent, selector: "flowbite-icon", inputs: ["svgIcon"], outputs: ["svgIconChange"] }] }); }
1889
+ }
1890
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: DropdownComponent, decorators: [{
1891
+ type: Component,
1892
+ args: [{
1893
+ standalone: true,
1894
+ imports: [NgClass, IconComponent],
1895
+ selector: 'flowbite-dropdown',
1896
+ template: `
1897
+ <button
1898
+ type="button"
1899
+ [ngClass]="contentClasses().dropdownClass"
1900
+ (click)="toggle()"
1901
+ #button>
1902
+ <span [ngClass]="contentClasses().spanClass">
1903
+ {{ label() }}
1904
+ <flowbite-icon
1905
+ svgIcon="flowbite-angular:chevron-down"
1906
+ class="ml-2 h-4 w-4" />
1907
+ </span>
1908
+ </button>
1909
+ <div
1910
+ [ngClass]="contentClasses().containerClass"
1911
+ #dropdown
1912
+ [style.display]="isOpen() ? 'block' : 'none'">
1913
+ <div [ngClass]="contentClasses().contentClass">
1914
+ <ul [ngClass]="contentClasses().subContentClass">
1915
+ <ng-content />
1916
+ </ul>
1917
+ </div>
1918
+ </div>
1919
+ `,
1920
+ host: {
1921
+ '(document:click)': 'clickout($event)',
1922
+ },
1923
+ }]
1924
+ }], propDecorators: { dropdown: [{
1925
+ type: ViewChild,
1926
+ args: ['dropdown']
1927
+ }], button: [{
1928
+ type: ViewChild,
1929
+ args: ['button']
1930
+ }] } });
1931
+
1932
+ const dropdownTheme = createTheme({
1933
+ root: {
1934
+ base: '',
1935
+ },
1936
+ dropdown: {
1937
+ base: 'text-white bg-blue-700 border border-transparent hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 disabled:hover:bg-blue-700 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800 dark:disabled:hover:bg-blue-600 group flex h-min items-center justify-center p-0.5 text-center font-medium focus:z-10 rounded-lg',
1938
+ },
1939
+ span: {
1940
+ base: 'flex items-center rounded-md text-sm px-4 py-2',
1941
+ },
1942
+ container: {
1943
+ base: 'z-10 bg-white divide-y divide-gray-100 rounded-lg shadow dark:bg-gray-700 min-w-fit absolute',
1944
+ isOpen: {
1945
+ enabled: 'block',
1946
+ disabled: 'hidden',
1947
+ },
1948
+ placement: {
1949
+ 'top-center': '',
1950
+ 'bottom-center': '',
1951
+ 'left-center': '',
1952
+ 'right-center': '',
1953
+ },
1954
+ },
1955
+ content: {
1956
+ base: 'py-1 text-sm text-gray-700 dark:text-gray-200 shadow-md',
1957
+ },
1958
+ subContent: {
1959
+ base: 'py-1',
1960
+ },
1961
+ });
1962
+
1963
+ const dropdownItemTheme = {
1964
+ root: {
1965
+ base: 'flex items-center justify-start py-2 px-4 text-sm text-gray-700 cursor-pointer hover:bg-gray-100 dark:text-gray-200 dark:hover:bg-gray-600 dark:hover:text-white',
1966
+ },
1967
+ };
1968
+
1969
+ const dropdownDividerTheme = createTheme({
1970
+ root: {
1971
+ base: 'block my-1 h-px bg-gray-100 dark:bg-gray-600',
1972
+ },
1973
+ });
1974
+
1975
+ const dropdownHeaderTheme = createTheme({
1976
+ root: {
1977
+ base: '',
1978
+ },
1979
+ content: {
1980
+ base: 'block py-2 px-4 text-sm text-gray-700 dark:text-gray-200',
1981
+ },
1982
+ });
1983
+
1984
+ const addonDirectiveTheme = createTheme({
1985
+ base: 'inline-flex items-center px-3 text-sm text-gray-900 bg-gray-200 border border-r-0 border-gray-300 rounded-l-md dark:bg-gray-600 dark:text-gray-400 dark:border-gray-600',
1986
+ });
1987
+ const addonDirectiveClassInstance = {
1988
+ rootClass: '',
1989
+ };
1990
+
1991
+ const FLOWBITE_DIRECTIVE_ADDON_THEME_TOKEN = new InjectionToken('FLOWBITE_DIRECTIVE_ADDON_THEME_TOKEN');
1992
+ class AddonDirectiveThemeService {
1993
+ constructor() {
1994
+ this.baseTheme = inject(FLOWBITE_DIRECTIVE_ADDON_THEME_TOKEN);
1995
+ }
1996
+ getClasses(properties) {
1997
+ const theme = mergeTheme(this.baseTheme, properties.customStyle);
1998
+ const output = {
1999
+ rootClass: twMerge(theme.base),
2000
+ };
2001
+ return output;
2002
+ }
2003
+ }
2004
+
2005
+ const FLOWBITE_FORM_FIELD_THEME_TOKEN = new InjectionToken('FLOWBITE_FORM_FIELD_THEME_TOKEN');
2006
+ class FormFieldThemeService {
2007
+ constructor() {
2008
+ this.baseTheme = inject(FLOWBITE_FORM_FIELD_THEME_TOKEN);
2009
+ }
2010
+ getClasses(properties) {
2011
+ const theme = mergeTheme(this.baseTheme, properties.customStyle);
2012
+ const output = {
2013
+ rootClass: twMerge(theme.base),
2014
+ };
2015
+ return output;
2016
+ }
2017
+ }
2018
+
2019
+ class FormFieldComponent extends BaseComponent {
2020
+ constructor() {
2021
+ super(...arguments);
2022
+ this.themeService = inject(FormFieldThemeService);
2023
+ //#region properties
2024
+ this.type = model('text');
2025
+ this.size = model('md');
2026
+ this.isDisabled = model(false);
2027
+ this.validate = model(undefined);
2028
+ this.floatingLabelType = model(undefined);
2029
+ this.prefix = model(undefined);
2030
+ this.customStyle = model({});
2031
+ }
2032
+ //#endregion
2033
+ //#region BaseComponent implementation
2034
+ fetchClass() {
2035
+ return this.themeService.getClasses({
2036
+ type: this.type(),
2037
+ floatingLabelType: this.floatingLabelType(),
2038
+ size: this.size(),
2039
+ disabled: booleanToFlowbiteBoolean(this.isDisabled()),
2040
+ validate: this.validate(),
2041
+ prefix: this.prefix(),
2042
+ customStyle: this.customStyle(),
2043
+ });
2044
+ }
2045
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: FormFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2046
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.5", type: FormFieldComponent, isStandalone: true, selector: "flowbite-form-field", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: true, isRequired: false, transformFunction: null }, validate: { classPropertyName: "validate", publicName: "validate", isSignal: true, isRequired: false, transformFunction: null }, floatingLabelType: { classPropertyName: "floatingLabelType", publicName: "floatingLabelType", isSignal: true, isRequired: false, transformFunction: null }, prefix: { classPropertyName: "prefix", publicName: "prefix", isSignal: true, isRequired: false, transformFunction: null }, customStyle: { classPropertyName: "customStyle", publicName: "customStyle", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { type: "typeChange", size: "sizeChange", isDisabled: "isDisabledChange", validate: "validateChange", floatingLabelType: "floatingLabelTypeChange", prefix: "prefixChange", customStyle: "customStyleChange" }, usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"floatingLabelType(); else nonFloatingTemplate\">\n <div\n [ngClass]=\"{\n relative: floatingLabelType(),\n 'z-0': floatingLabelType() === 'standard',\n }\">\n <ng-container *ngTemplateOutlet=\"inputTemplate\"></ng-container>\n <ng-container *ngTemplateOutlet=\"labelTemplate\"></ng-container>\n </div>\n <ng-container *ngTemplateOutlet=\"hintTemplate\"></ng-container>\n</ng-container>\n<ng-template #nonFloatingTemplate>\n <ng-container *ngTemplateOutlet=\"labelTemplate\"></ng-container>\n <ng-container *ngIf=\"prefix(); else inputTemplate\">\n <ng-container *ngIf=\"prefix() === 'icon'; else inputWithAddon\">\n <div class=\"relative\">\n <div class=\"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3\">\n <ng-container *ngTemplateOutlet=\"iconTemplate\"></ng-container>\n </div>\n <ng-container *ngTemplateOutlet=\"inputTemplate\"></ng-container>\n </div>\n </ng-container>\n </ng-container>\n <ng-container *ngTemplateOutlet=\"hintTemplate\"></ng-container>\n</ng-template>\n\n<ng-template #inputWithAddon>\n <div class=\"flex\">\n <ng-container *ngTemplateOutlet=\"addonTemplate\"></ng-container>\n <ng-container *ngTemplateOutlet=\"inputTemplate\"></ng-container>\n </div>\n</ng-template>\n\n<ng-template #inputTemplate>\n <ng-content select=\"input[flowbiteInput]\"></ng-content>\n</ng-template>\n<ng-template #labelTemplate>\n <ng-content select=\"label[flowbiteLabel]\"></ng-content>\n</ng-template>\n<ng-template #hintTemplate>\n <ng-content select=\"[flowbiteHelper]\"></ng-content>\n</ng-template>\n<ng-template #iconTemplate>\n <ng-content select=\"[flowbiteIcon]\"></ng-content>\n</ng-template>\n<ng-template #addonTemplate>\n <ng-content select=\"[flowbiteAddon]\"></ng-content>\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
2047
+ }
2048
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: FormFieldComponent, decorators: [{
2049
+ type: Component,
2050
+ args: [{ standalone: true, imports: [NgIf, NgClass, AsyncPipe, NgTemplateOutlet], selector: 'flowbite-form-field', template: "<ng-container *ngIf=\"floatingLabelType(); else nonFloatingTemplate\">\n <div\n [ngClass]=\"{\n relative: floatingLabelType(),\n 'z-0': floatingLabelType() === 'standard',\n }\">\n <ng-container *ngTemplateOutlet=\"inputTemplate\"></ng-container>\n <ng-container *ngTemplateOutlet=\"labelTemplate\"></ng-container>\n </div>\n <ng-container *ngTemplateOutlet=\"hintTemplate\"></ng-container>\n</ng-container>\n<ng-template #nonFloatingTemplate>\n <ng-container *ngTemplateOutlet=\"labelTemplate\"></ng-container>\n <ng-container *ngIf=\"prefix(); else inputTemplate\">\n <ng-container *ngIf=\"prefix() === 'icon'; else inputWithAddon\">\n <div class=\"relative\">\n <div class=\"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3\">\n <ng-container *ngTemplateOutlet=\"iconTemplate\"></ng-container>\n </div>\n <ng-container *ngTemplateOutlet=\"inputTemplate\"></ng-container>\n </div>\n </ng-container>\n </ng-container>\n <ng-container *ngTemplateOutlet=\"hintTemplate\"></ng-container>\n</ng-template>\n\n<ng-template #inputWithAddon>\n <div class=\"flex\">\n <ng-container *ngTemplateOutlet=\"addonTemplate\"></ng-container>\n <ng-container *ngTemplateOutlet=\"inputTemplate\"></ng-container>\n </div>\n</ng-template>\n\n<ng-template #inputTemplate>\n <ng-content select=\"input[flowbiteInput]\"></ng-content>\n</ng-template>\n<ng-template #labelTemplate>\n <ng-content select=\"label[flowbiteLabel]\"></ng-content>\n</ng-template>\n<ng-template #hintTemplate>\n <ng-content select=\"[flowbiteHelper]\"></ng-content>\n</ng-template>\n<ng-template #iconTemplate>\n <ng-content select=\"[flowbiteIcon]\"></ng-content>\n</ng-template>\n<ng-template #addonTemplate>\n <ng-content select=\"[flowbiteAddon]\"></ng-content>\n</ng-template>\n" }]
2051
+ }] });
2052
+
2053
+ class BaseInputDirective {
2054
+ constructor() {
2055
+ this.contentClasses = signal({ rootClass: '' });
2056
+ this.injector = inject(Injector);
2057
+ this.formFieldComponent = inject(FormFieldComponent);
2058
+ }
2059
+ ngOnInit() {
2060
+ effect(() => {
2061
+ this.fetchClass();
2062
+ }, { injector: this.injector, allowSignalWrites: true });
2063
+ }
2064
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: BaseInputDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
2065
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.5", type: BaseInputDirective, isStandalone: true, host: { properties: { "class": "contentClasses()?.rootClass" } }, ngImport: i0 }); }
2066
+ }
2067
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: BaseInputDirective, decorators: [{
2068
+ type: Directive,
2069
+ args: [{
2070
+ standalone: true,
2071
+ // eslint-disable-next-line @angular-eslint/no-host-metadata-property
2072
+ host: { '[class]': 'contentClasses()?.rootClass' },
2073
+ }]
2074
+ }] });
2075
+
2076
+ class AddonDirective extends BaseInputDirective {
2077
+ constructor() {
2078
+ super(...arguments);
2079
+ this.contentClasses = signal(addonDirectiveClassInstance);
2080
+ this.themeService = inject(AddonDirectiveThemeService);
2081
+ //#region properties
2082
+ this.customStyle = input({});
2083
+ }
2084
+ //#endregion
2085
+ //#region BaseInputDirective implementation
2086
+ fetchClass() {
2087
+ const propertyClass = this.themeService.getClasses({
2088
+ customStyle: this.customStyle(),
2089
+ });
2090
+ this.contentClasses.set(propertyClass);
2091
+ }
2092
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: AddonDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
2093
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.5", type: AddonDirective, isStandalone: true, selector: "[flowbiteAddon]", inputs: { customStyle: { classPropertyName: "customStyle", publicName: "customStyle", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0 }); }
2094
+ }
2095
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: AddonDirective, decorators: [{
2096
+ type: Directive,
2097
+ args: [{
2098
+ standalone: true,
2099
+ selector: '[flowbiteAddon]',
2100
+ }]
2101
+ }] });
2102
+
2103
+ const helperDirectiveTheme = createTheme({
2104
+ base: 'mt-2 text-xs text-gray-500 dark:text-gray-400',
2105
+ validation: {
2106
+ success: 'text-green-600 dark:text-green-400',
2107
+ error: 'text-red-600 dark:text-red-400',
2108
+ },
2109
+ });
2110
+ const helperDirectiveClassInstance = {
2111
+ rootClass: '',
2112
+ };
2113
+
2114
+ const FLOWBITE_DIRECTIVE_HELPER_THEME_TOKEN = new InjectionToken('FLOWBITE_DIRECTIVE_HELPER_THEME_TOKEN');
2115
+ class HelperDirectiveThemeService {
2116
+ constructor() {
2117
+ this.baseTheme = inject(FLOWBITE_DIRECTIVE_HELPER_THEME_TOKEN);
2118
+ }
2119
+ getClasses(properties) {
2120
+ const theme = mergeTheme(this.baseTheme, properties.customStyle);
2121
+ const output = {
2122
+ rootClass: twMerge(theme.base, properties.validate && theme.validation[properties.validate]),
2123
+ };
2124
+ return output;
2125
+ }
2126
+ }
2127
+
2128
+ class HelperDirective extends BaseInputDirective {
2129
+ constructor() {
2130
+ super(...arguments);
2131
+ this.contentClasses = signal(helperDirectiveClassInstance);
2132
+ this.themeService = inject(HelperDirectiveThemeService);
2133
+ //#region properties
2134
+ this.customStyle = input({});
2135
+ }
2136
+ //#endregion
2137
+ //#region BaseInputDirective implementation
2138
+ fetchClass() {
2139
+ const propertyClass = this.themeService.getClasses({
2140
+ validate: this.formFieldComponent.validate(),
2141
+ customStyle: this.customStyle(),
2142
+ });
2143
+ this.contentClasses.set(propertyClass);
2144
+ return { rootClass: '' };
2145
+ }
2146
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: HelperDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
2147
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.5", type: HelperDirective, isStandalone: true, selector: "[flowbiteHelper]", inputs: { customStyle: { classPropertyName: "customStyle", publicName: "customStyle", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0 }); }
2148
+ }
2149
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: HelperDirective, decorators: [{
2150
+ type: Directive,
2151
+ args: [{
2152
+ standalone: true,
2153
+ selector: '[flowbiteHelper]',
2154
+ }]
2155
+ }] });
2156
+
2157
+ const iconDirectiveTheme = createTheme({
2158
+ base: 'w-5 h-5 text-gray-500 dark:text-gray-400',
2159
+ });
2160
+ const iconDirectiveClassInstance = {
2161
+ rootClass: '',
2162
+ };
2163
+
2164
+ const FLOWBITE_DIRECTIVE_ICON_THEME_TOKEN = new InjectionToken('FLOWBITE_DIRECTIVE_ICON_THEME_TOKEN');
2165
+ class IconDirectiveThemeService {
2166
+ constructor() {
2167
+ this.baseTheme = inject(FLOWBITE_DIRECTIVE_ICON_THEME_TOKEN);
2168
+ }
2169
+ getClasses(properties) {
2170
+ const theme = mergeTheme(this.baseTheme, properties.customStyle);
2171
+ const output = {
2172
+ rootClass: twMerge(theme.base),
2173
+ };
2174
+ return output;
2175
+ }
2176
+ }
2177
+
2178
+ class IconDirective extends BaseInputDirective {
2179
+ constructor() {
2180
+ super(...arguments);
2181
+ this.contentClasses = signal(iconDirectiveClassInstance);
2182
+ this.themeService = inject(IconDirectiveThemeService);
2183
+ //#region properties
2184
+ this.customStyle = input({});
2185
+ }
2186
+ //#endregion
2187
+ //#region BaseInputDirective implementation
2188
+ fetchClass() {
2189
+ const propertyClass = this.themeService.getClasses({
2190
+ customStyle: this.customStyle(),
2191
+ });
2192
+ this.contentClasses.set(propertyClass);
2193
+ }
2194
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: IconDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
2195
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.5", type: IconDirective, isStandalone: true, selector: "[flowbiteIcon]", inputs: { customStyle: { classPropertyName: "customStyle", publicName: "customStyle", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0 }); }
2196
+ }
2197
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: IconDirective, decorators: [{
2198
+ type: Directive,
2199
+ args: [{
2200
+ standalone: true,
2201
+ selector: '[flowbiteIcon]',
2202
+ }]
2203
+ }] });
2204
+
2205
+ const inputDirectiveTheme = createTheme({
2206
+ base: 'border rounded-lg block w-full focus:outline-none',
2207
+ default: 'focus:ring-blue-500 focus:border-blue-500 dark:focus:ring-blue-500 dark:focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white',
2208
+ disabled: {
2209
+ enabled: 'cursor-not-allowed bg-gray-100 border-gray-300 text-gray-900 dark:text-gray-400 dark:bg-gray-700 dark:border-gray-600 dark:focus:ring-blue-500 dark:focus:border-blue-500 dark:placeholder-gray-400',
2210
+ disabled: '',
2211
+ },
2212
+ prefix: {
2213
+ addon: 'rounded-none rounded-r-lg flex-1 min-w-0',
2214
+ icon: 'pl-10',
2215
+ },
2216
+ size: {
2217
+ sm: 'text-xs p-2',
2218
+ md: 'text-sm p-2.5',
2219
+ lg: 'text-md p-4',
2220
+ },
2221
+ validation: {
2222
+ success: 'text-gray-900 border-green-600 dark:text-white dark:border-green-500 dark:focus:border-green-500 focus:border-green-600 bg-green-50 dark:bg-gray-700',
2223
+ error: 'text-gray-900 border-red-600 dark:text-white dark:border-red-500 dark:focus:border-red-500 focus:border-red-600 bg-red-50 dark:bg-gray-700',
2224
+ },
2225
+ floatingLabel: {
2226
+ standard: {
2227
+ base: 'block w-full text-sm bg-transparent border-0 border-b-2 appearance-none focus:outline-none focus:ring-0 peer',
2228
+ default: 'text-gray-900 border-gray-300 dark:text-white dark:border-gray-600 dark:focus:border-blue-500 focus:border-blue-600',
2229
+ disabled: {
2230
+ enabled: 'text-gray-900 border-gray-300 dark:text-white dark:border-gray-600 dark:focus:border-blue-500 focus:border-blue-600',
2231
+ disabled: '',
2232
+ },
2233
+ size: {
2234
+ sm: 'py-2 px-0',
2235
+ md: 'py-2.5 px-0',
2236
+ lg: '',
2237
+ },
2238
+ validation: {
2239
+ success: 'text-gray-900 border-green-600 dark:text-white dark:border-green-500 dark:focus:border-green-500 focus:border-green-600',
2240
+ error: 'text-gray-900 border-red-600 dark:text-white dark:border-red-500 dark:focus:border-red-500 focus:border-red-600',
2241
+ },
2242
+ },
2243
+ outline: {
2244
+ base: 'block w-full text-sm bg-transparent rounded-lg border-2 appearance-none focus:outline-none focus:ring-0 peer',
2245
+ default: 'text-gray-900 border-gray-300 dark:text-white dark:border-gray-600 dark:focus:border-blue-500 focus:border-blue-600',
2246
+ disabled: {
2247
+ enabled: 'text-gray-900 border-gray-300 dark:text-white dark:border-gray-600 dark:focus:border-blue-500 focus:border-blue-600',
2248
+ disabled: '',
2249
+ },
2250
+ size: {
2251
+ sm: 'px-2.5 pb-1.5 pt-3',
2252
+ md: 'px-2.5 pb-2.5 pt-4',
2253
+ lg: '',
2254
+ },
2255
+ validation: {
2256
+ success: 'text-gray-900 border-green-600 dark:text-white dark:border-green-500 dark:focus:border-green-500 focus:border-green-600',
2257
+ error: 'text-gray-900 border-red-600 dark:text-white dark:border-red-500 dark:focus:border-red-500 focus:border-red-600',
2258
+ },
2259
+ },
2260
+ fill: {
2261
+ base: 'block rounded-t-lg w-full text-sm border-0 border-b-2 appearance-none focus:outline-none focus:ring-0 peer',
2262
+ default: 'text-gray-900 bg-gray-50 dark:bg-gray-700 border-gray-300 dark:text-white dark:border-gray-600 dark:focus:border-blue-500 focus:border-blue-600',
2263
+ disabled: {
2264
+ enabled: 'text-gray-900 bg-gray-50 dark:bg-gray-700 border-gray-300 dark:text-white dark:border-gray-600 dark:focus:border-blue-500 focus:border-blue-600',
2265
+ disabled: '',
2266
+ },
2267
+ size: {
2268
+ sm: 'px-2.5 pb-1.5 pt-4',
2269
+ md: 'px-2.5 pb-2.5 pt-5',
2270
+ lg: '',
2271
+ },
2272
+ validation: {
2273
+ success: 'text-gray-900 bg-gray-50 dark:bg-gray-700 border-green-600 dark:border-green-500 dark:text-white dark:focus:border-green-500 focus:border-green-600',
2274
+ error: 'text-gray-900 bg-gray-50 dark:bg-gray-700 dark:text-white dark:border-red-500 border-red-600 focus:border-red-600 dark:focus-border-red-500',
2275
+ },
2276
+ },
2277
+ },
2278
+ });
2279
+ const inputDirectiveClassInstance = {
2280
+ rootClass: '',
2281
+ };
2282
+
2283
+ const FLOWBITE_DIRECTIVE_INPUT_THEME_TOKEN = new InjectionToken('FLOWBITE_DIRECTIVE_INPUT_THEME_TOKEN');
2284
+ class InputDirectiveThemeService {
2285
+ constructor() {
2286
+ this.baseTheme = inject(FLOWBITE_DIRECTIVE_INPUT_THEME_TOKEN);
2287
+ }
2288
+ getClasses(properties) {
2289
+ const theme = mergeTheme(this.baseTheme, properties.customStyle);
2290
+ const output = {
2291
+ rootClass: twMerge(properties.floatingLabelType && theme.floatingLabel[properties.floatingLabelType].base, properties.floatingLabelType &&
2292
+ properties.validate &&
2293
+ theme.floatingLabel[properties.floatingLabelType].validation[properties.validate], properties.floatingLabelType &&
2294
+ !properties.validate &&
2295
+ theme.floatingLabel[properties.floatingLabelType].disabled[properties.disabled], properties.floatingLabelType &&
2296
+ !properties.validate &&
2297
+ properties.disabled === 'disabled' &&
2298
+ theme.floatingLabel[properties.floatingLabelType].default, properties.floatingLabelType && theme.floatingLabel[properties.floatingLabelType].size[properties.size], !properties.floatingLabelType && theme.base, !properties.floatingLabelType && properties.validate && theme.validation[properties.validate], !properties.floatingLabelType && !properties.validate && theme.disabled[properties.disabled], !properties.floatingLabelType && !properties.validate && properties.disabled === 'disabled' && theme.default, !properties.floatingLabelType && properties.prefix && theme.prefix?.[properties.prefix], !properties.floatingLabelType && theme.size[properties.size]),
2299
+ };
2300
+ return output;
2301
+ }
2302
+ }
2303
+
2304
+ class InputDirective extends BaseInputDirective {
2305
+ constructor() {
2306
+ super(...arguments);
2307
+ this.contentClasses = signal(inputDirectiveClassInstance);
2308
+ this.themeService = inject(InputDirectiveThemeService);
2309
+ //#region properties
2310
+ this.customStyle = input({});
2311
+ }
2312
+ //#endregion
2313
+ //#region BaseInputDirective implementation
2314
+ fetchClass() {
2315
+ const propertyClass = this.themeService.getClasses({
2316
+ disabled: booleanToFlowbiteBoolean(this.formFieldComponent.isDisabled()),
2317
+ size: this.formFieldComponent.size(),
2318
+ validate: this.formFieldComponent.validate(),
2319
+ prefix: this.formFieldComponent.prefix(),
2320
+ floatingLabelType: this.formFieldComponent.floatingLabelType(),
2321
+ customStyle: this.customStyle(),
2322
+ });
2323
+ this.contentClasses.set(propertyClass);
2324
+ }
2325
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: InputDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
2326
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.5", type: InputDirective, isStandalone: true, selector: "input[flowbiteInput]", inputs: { customStyle: { classPropertyName: "customStyle", publicName: "customStyle", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.disabled": "formFieldComponent.isDisabled() || null" } }, usesInheritance: true, ngImport: i0 }); }
2327
+ }
2328
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: InputDirective, decorators: [{
2329
+ type: Directive,
2330
+ args: [{
2331
+ standalone: true,
2332
+ selector: 'input[flowbiteInput]',
2333
+ host: {
2334
+ '[attr.disabled]': 'formFieldComponent.isDisabled() || null',
2335
+ },
2336
+ }]
2337
+ }] });
2338
+
2339
+ const labelDirectiveTheme = createTheme({
2340
+ base: 'block mb-2 text-sm font-medium',
2341
+ default: 'text-gray-900 dark:text-white',
2342
+ validation: {
2343
+ success: 'text-green-700 dark:text-green-500',
2344
+ error: 'text-red-700 dark:text-red-500',
2345
+ },
2346
+ floatingLabel: {
2347
+ standard: {
2348
+ base: 'absolute text-sm duration-300 transform -translate-y-6 scale-75 top-3 -z-10 origin-[0] peer-focus:left-0 peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-6',
2349
+ default: 'text-gray-500 dark:text-gray-400 peer-focus:text-blue-600 peer-focus:dark:text-blue-500',
2350
+ disabled: {
2351
+ enabled: 'text-gray-400 dark:text-gray-500 peer-focus:text-blue-600 peer-focus:dark:text-blue-500',
2352
+ disabled: '',
2353
+ },
2354
+ validation: {
2355
+ success: 'text-green-600 dark:text-green-500',
2356
+ error: 'text-red-600 dark:text-red-500',
2357
+ },
2358
+ },
2359
+ outline: {
2360
+ base: 'absolute text-sm duration-300 transform -translate-y-4 scale-75 top-2 z-10 origin-[0] px-2 peer-focus:px-2 peer-placeholder-shown:scale-100 peer-placeholder-shown:-translate-y-1/2 peer-placeholder-shown:top-1/2 peer-focus:top-2 peer-focus:scale-75 peer-focus:-translate-y-4 left-1',
2361
+ default: 'text-gray-500 dark:text-gray-400 bg-white dark:bg-gray-900 peer-focus:text-blue-600 peer-focus:dark:text-blue-500',
2362
+ disabled: {
2363
+ enabled: 'text-gray-400 dark:text-gray-500 bg-white dark:bg-gray-900 peer-focus:text-blue-600 peer-focus:dark:text-blue-500',
2364
+ disabled: '',
2365
+ },
2366
+ validation: {
2367
+ success: 'text-green-600 dark:text-green-500 bg-white dark:bg-gray-900',
2368
+ error: 'text-red-600 dark:text-red-500 bg-white dark:bg-gray-900',
2369
+ },
2370
+ },
2371
+ fill: {
2372
+ base: 'absolute text-sm duration-300 transform -translate-y-4 scale-75 top-4 z-10 origin-[0] left-2.5 peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-4',
2373
+ default: 'text-gray-500 dark:text-gray-400 peer-focus:text-blue-600 peer-focus:dark:text-blue-500',
2374
+ disabled: {
2375
+ enabled: 'text-gray-400 dark:text-gray-500 peer-focus:text-blue-600 peer-focus:dark:text-blue-500',
2376
+ disabled: '',
2377
+ },
2378
+ validation: {
2379
+ success: 'text-green-600 dark:text-green-500',
2380
+ error: 'text-red-600 dark:text-red-500',
2381
+ },
2382
+ },
2383
+ },
2384
+ });
2385
+ const labelDirectiveClassInstance = {
2386
+ rootClass: '',
2387
+ };
2388
+
2389
+ const FLOWBITE_DIRECTIVE_LABEL_THEME_TOKEN = new InjectionToken('FLOWBITE_DIRECTIVE_LABEL_THEME_TOKEN');
2390
+ class LabelDirectiveThemeService {
2391
+ constructor() {
2392
+ this.baseTheme = inject(FLOWBITE_DIRECTIVE_LABEL_THEME_TOKEN);
2393
+ }
2394
+ getClasses(properties) {
2395
+ const theme = mergeTheme(this.baseTheme, properties.customStyle);
2396
+ const output = {
2397
+ rootClass: twMerge(properties.floatingLabelType && theme.floatingLabel[properties.floatingLabelType].base, properties.floatingLabelType &&
2398
+ properties.validate &&
2399
+ theme.floatingLabel[properties.floatingLabelType].validation[properties.validate], properties.floatingLabelType &&
2400
+ !properties.validate &&
2401
+ theme.floatingLabel[properties.floatingLabelType].default, !properties.floatingLabelType && theme.base, !properties.floatingLabelType && properties.validate && theme.validation[properties.validate], !properties.floatingLabelType && !properties.validate && theme.default),
2402
+ };
2403
+ return output;
2404
+ }
2405
+ }
2406
+
2407
+ class LabelDirective extends BaseInputDirective {
2408
+ constructor() {
2409
+ super(...arguments);
2410
+ this.contentClasses = signal(labelDirectiveClassInstance);
2411
+ this.themeService = inject(LabelDirectiveThemeService);
2412
+ this.for = inject(FormFieldComponent);
2413
+ //#region properties
2414
+ this.customStyle = input({});
2415
+ }
2416
+ //#endregion
2417
+ //#region BaseInputDirective implementation
2418
+ fetchClass() {
2419
+ const propertyClass = this.themeService.getClasses({
2420
+ disabled: booleanToFlowbiteBoolean(this.formFieldComponent.isDisabled()),
2421
+ validate: this.formFieldComponent.validate(),
2422
+ floatingLabelType: this.formFieldComponent.floatingLabelType(),
2423
+ customStyle: this.customStyle(),
2424
+ });
2425
+ this.contentClasses.set(propertyClass);
2426
+ }
2427
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: LabelDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
2428
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.5", type: LabelDirective, isStandalone: true, selector: "label[flowbiteLabel]", inputs: { customStyle: { classPropertyName: "customStyle", publicName: "customStyle", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.for": "for.flowbiteId()" } }, usesInheritance: true, ngImport: i0 }); }
2429
+ }
2430
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: LabelDirective, decorators: [{
2431
+ type: Directive,
2432
+ args: [{
2433
+ standalone: true,
2434
+ selector: 'label[flowbiteLabel]',
2435
+ host: {
2436
+ '[attr.for]': 'for.flowbiteId()',
2437
+ },
2438
+ }]
2439
+ }] });
2440
+
2441
+ const formFieldTheme = createTheme({
2442
+ base: '',
2443
+ });
2444
+ const FormFieldClassInstance = {
2445
+ rootClass: '',
2446
+ };
2447
+
2448
+ const FLOWBITE_INDICATOR_THEME_TOKEN = new InjectionToken('FLOWBITE_INDICATOR_THEME_TOKEN');
2449
+ class IndicatorThemeService {
2450
+ constructor() {
2451
+ this.baseTheme = inject(FLOWBITE_INDICATOR_THEME_TOKEN);
2452
+ }
2453
+ getClasses(properties) {
2454
+ const theme = mergeTheme(this.baseTheme, properties.customStyle);
2455
+ const output = {
2456
+ rootClass: twMerge(theme.root.base, theme.root.hasBorder[properties.hasBorder], theme.root.color[properties.color], theme.root.isDisabled[properties.isDisabled], properties.placement && properties.hasOffset == 'enabled' && theme.root.hasOffset[properties.placement], theme.root.isOutline[properties.isOutline], theme.root.isPill[properties.isPill], properties.placement && 'absolute ' + theme.root.placement[properties.placement], theme.root.isRounded[properties.isRounded], theme.root.size[properties.size]),
2457
+ };
2458
+ return output;
2459
+ }
2460
+ }
2461
+
2462
+ /**
2463
+ * @see https://flowbite.com/docs/components/indicators/
2464
+ */
2465
+ class IndicatorComponent extends BaseComponent {
2466
+ constructor() {
2467
+ super(...arguments);
2468
+ this.themeService = inject(IndicatorThemeService);
2469
+ //#region properties
2470
+ this.isPill = model(false);
2471
+ this.isOutline = model(false);
2472
+ this.isDisabled = model(false);
2473
+ this.hasOffset = model(false);
2474
+ this.isRounded = model(false);
2475
+ this.hasBorder = model(false);
2476
+ this.color = model('primary');
2477
+ this.size = model('md');
2478
+ this.placement = model(undefined);
2479
+ this.customStyle = model({});
2480
+ }
2481
+ //#endregion
2482
+ //#region BaseComponent implementation
2483
+ fetchClass() {
2484
+ return this.themeService.getClasses({
2485
+ hasBorder: booleanToFlowbiteBoolean(this.hasBorder()),
2486
+ color: this.color(),
2487
+ isDisabled: booleanToFlowbiteBoolean(this.isDisabled()),
2488
+ hasOffset: booleanToFlowbiteBoolean(this.hasOffset()),
2489
+ isOutline: booleanToFlowbiteBoolean(this.isOutline()),
2490
+ isPill: booleanToFlowbiteBoolean(this.isPill()),
2491
+ isRounded: booleanToFlowbiteBoolean(this.isRounded()),
2492
+ size: this.size(),
2493
+ placement: this.placement(),
2494
+ customStyle: this.customStyle(),
2495
+ });
2496
+ }
2497
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: IndicatorComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2498
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.5", type: IndicatorComponent, isStandalone: true, selector: "flowbite-indicator", inputs: { isPill: { classPropertyName: "isPill", publicName: "isPill", isSignal: true, isRequired: false, transformFunction: null }, isOutline: { classPropertyName: "isOutline", publicName: "isOutline", isSignal: true, isRequired: false, transformFunction: null }, isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: true, isRequired: false, transformFunction: null }, hasOffset: { classPropertyName: "hasOffset", publicName: "hasOffset", isSignal: true, isRequired: false, transformFunction: null }, isRounded: { classPropertyName: "isRounded", publicName: "isRounded", isSignal: true, isRequired: false, transformFunction: null }, hasBorder: { classPropertyName: "hasBorder", publicName: "hasBorder", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null }, customStyle: { classPropertyName: "customStyle", publicName: "customStyle", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isPill: "isPillChange", isOutline: "isOutlineChange", isDisabled: "isDisabledChange", hasOffset: "hasOffsetChange", isRounded: "isRoundedChange", hasBorder: "hasBorderChange", color: "colorChange", size: "sizeChange", placement: "placementChange", customStyle: "customStyleChange" }, usesInheritance: true, ngImport: i0, template: `<ng-content />`, isInline: true }); }
2499
+ }
2500
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: IndicatorComponent, decorators: [{
2501
+ type: Component,
2502
+ args: [{
2503
+ standalone: true,
2504
+ imports: [NgClass],
2505
+ selector: 'flowbite-indicator',
2506
+ template: `<ng-content />`,
2507
+ }]
2508
+ }] });
2509
+
2510
+ const indicatorTheme = createTheme({
2511
+ root: {
2512
+ base: 'inline-flex items-center justify-center shrink-0 font-bold',
2513
+ hasBorder: {
2514
+ enabled: 'border-2',
2515
+ disabled: '',
2516
+ },
2517
+ color: {
2518
+ dark: 'bg-gray-900 dark:bg-gray-700 border-white dark:border-gray-800 text-white',
2519
+ primary: 'bg-primary-500 border-white dark:border-gray-800 text-white',
2520
+ gray: 'bg-gray-200 border-white dark:border-gray-800 text-gray-900',
2521
+ blue: 'bg-blue-600 border-white dark:border-gray-800 text-white',
2522
+ green: 'bg-green-500 border-white dark:border-gray-800 text-white',
2523
+ red: 'bg-red-500 border-white dark:border-gray-800 text-white',
2524
+ purple: 'bg-purple-500 border-white dark:border-gray-800 text-white',
2525
+ indigo: 'bg-indigo-500 border-white dark:border-gray-800 text-white',
2526
+ yellow: 'bg-yellow-300 border-white dark:border-gray-800 text-gray-900',
2527
+ teal: 'bg-teal-500 border-white dark:border-gray-800 text-white',
2528
+ },
2529
+ isDisabled: {
2530
+ enabled: 'opacity-50',
2531
+ disabled: '',
2532
+ },
2533
+ hasOffset: {
2534
+ 'top-left': '-translate-x-1/3 -translate-y-1/3',
2535
+ 'top-center': '-translate-y-1/3',
2536
+ 'top-right': 'translate-x-1/3 -translate-y-1/3',
2537
+ 'center-left': '-translate-x-1/3',
2538
+ center: '',
2539
+ 'center-right': 'translate-x-1/3',
2540
+ 'bottom-left': '-translate-x-1/3 translate-y-1/3',
2541
+ 'bottom-center': 'translate-y-1/3',
2542
+ 'bottom-right': 'translate-x-1/3 translate-y-1/3',
2543
+ },
2544
+ placement: {
2545
+ 'top-left': 'top-0 left-0',
2546
+ 'top-center': 'top-0 left-1/2 -translate-x-1/2',
2547
+ 'top-right': 'top-0 right-0',
2548
+ 'center-left': 'top-1/2 -translate-y-1/2 left-0',
2549
+ center: 'top-1/2 -translate-y-1/2 left-1/2 -translate-x-1/2',
2550
+ 'center-right': 'top-1/2 -translate-y-1/2 right-0',
2551
+ 'bottom-left': 'bottom-0 left-0',
2552
+ 'bottom-center': 'bottom-0 left-1/2 -translate-x-1/2',
2553
+ 'bottom-right': 'bottom-0 right-0',
2554
+ },
2555
+ isOutline: {
2556
+ enabled: '',
2557
+ disabled: '',
2558
+ },
2559
+ isPill: {
2560
+ enabled: '',
2561
+ disabled: '',
2562
+ },
2563
+ isRounded: {
2564
+ enabled: 'rounded',
2565
+ disabled: 'rounded-full',
2566
+ },
2567
+ size: {
2568
+ xs: 'w-2 h-2 text-xs',
2569
+ sm: 'w-2.5 h-2.5 text-sm',
2570
+ md: 'w-3 h-3 text-sm',
2571
+ lg: 'w-3.5 h-3.5 text-sm',
2572
+ xl: 'w-6 h-6 text-sm',
2573
+ },
2574
+ },
2575
+ });
2576
+
2577
+ const FLOWBITE_MODAL_BODY_THEME_TOKEN = new InjectionToken('FLOWBITE_MODAL_BODY_THEME_TOKEN');
2578
+ class ModalBodyThemeService {
2579
+ constructor() {
2580
+ this.baseTheme = inject(FLOWBITE_MODAL_BODY_THEME_TOKEN);
2581
+ }
2582
+ getClasses(properties) {
2583
+ const theme = mergeTheme(this.baseTheme, properties.customStyle);
2584
+ const output = {
2585
+ rootClass: twMerge(theme.root.base),
2586
+ };
2587
+ return output;
2588
+ }
2589
+ }
2590
+
2591
+ class ModalBodyComponent extends BaseComponent {
2592
+ constructor() {
2593
+ super(...arguments);
2594
+ this.themeService = inject(ModalBodyThemeService);
2595
+ this.modalComponent = inject(ModalComponent);
2596
+ //#region properties
2597
+ this.customStyle = model({});
2598
+ }
2599
+ //#endregion
2600
+ //#region BaseComponent implementation
2601
+ fetchClass() {
2602
+ return this.themeService.getClasses({
2603
+ customStyle: this.customStyle(),
2604
+ });
2605
+ }
2606
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: ModalBodyComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2607
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.5", type: ModalBodyComponent, isStandalone: true, selector: "flowbite-modal-body", inputs: { customStyle: { classPropertyName: "customStyle", publicName: "customStyle", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { customStyle: "customStyleChange" }, usesInheritance: true, ngImport: i0, template: `<ng-content />`, isInline: true }); }
2608
+ }
2609
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: ModalBodyComponent, decorators: [{
2610
+ type: Component,
2611
+ args: [{
2612
+ standalone: true,
2613
+ imports: [NgClass],
2614
+ selector: 'flowbite-modal-body',
2615
+ template: `<ng-content />`,
2616
+ }]
2617
+ }] });
2618
+
2619
+ const FLOWBITE_MODAL_FOOTER_THEME_TOKEN = new InjectionToken('FLOWBITE_MODAL_FOOTER_THEME_TOKEN');
2620
+ class ModalFooterThemeService {
2621
+ constructor() {
2622
+ this.baseTheme = inject(FLOWBITE_MODAL_FOOTER_THEME_TOKEN);
2623
+ }
2624
+ getClasses(properties) {
2625
+ const theme = mergeTheme(this.baseTheme, properties.customStyle);
2626
+ const output = {
2627
+ rootClass: twMerge(theme.root.base),
2628
+ };
2629
+ return output;
2630
+ }
2631
+ }
2632
+
2633
+ class ModalFooterComponent extends BaseComponent {
2634
+ constructor() {
2635
+ super(...arguments);
2636
+ this.themeService = inject(ModalFooterThemeService);
2637
+ this.modalComponent = inject(ModalComponent);
2638
+ //#region properties
2639
+ this.customStyle = model({});
2640
+ }
2641
+ //#endregion
2642
+ //#region BaseComponent implementation
2643
+ fetchClass() {
2644
+ return this.themeService.getClasses({
2645
+ customStyle: this.customStyle(),
2646
+ });
2647
+ }
2648
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: ModalFooterComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2649
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.5", type: ModalFooterComponent, isStandalone: true, selector: "flowbite-modal-footer", inputs: { customStyle: { classPropertyName: "customStyle", publicName: "customStyle", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { customStyle: "customStyleChange" }, usesInheritance: true, ngImport: i0, template: `<ng-content />`, isInline: true }); }
2650
+ }
2651
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: ModalFooterComponent, decorators: [{
2652
+ type: Component,
2653
+ args: [{
2654
+ standalone: true,
2655
+ imports: [NgClass],
2656
+ selector: 'flowbite-modal-footer',
2657
+ template: `<ng-content />`,
2658
+ }]
2659
+ }] });
2660
+
2661
+ const FLOWBITE_MODAL_HEADER_THEME_TOKEN = new InjectionToken('FLOWBITE_MODAL_HEADER_THEME_TOKEN');
2662
+ class ModalHeaderThemeService {
2663
+ constructor() {
2664
+ this.baseTheme = inject(FLOWBITE_MODAL_HEADER_THEME_TOKEN);
2665
+ }
2666
+ getClasses(properties) {
2667
+ const theme = mergeTheme(this.baseTheme, properties.customStyle);
2668
+ const output = {
2669
+ rootClass: twMerge(theme.root.base),
2670
+ modalHeaderTitleClass: twMerge(theme.title.base),
2671
+ modalHeaderButtonClass: twMerge(theme.button.base),
2672
+ };
2673
+ return output;
2674
+ }
2675
+ }
2676
+
2677
+ class ModalHeaderComponent extends BaseComponent {
2678
+ constructor() {
2679
+ super(...arguments);
2680
+ this.stateService = inject(ModalHeaderThemeService);
2681
+ this.modalComponent = inject(ModalComponent);
2682
+ this.iconRegistry = inject(IconRegistry);
2683
+ this.domSanitizer = inject(DomSanitizer);
2684
+ //#region properties
2685
+ this.customStyle = model({});
2686
+ }
2687
+ //#endregion
2688
+ //#region BaseComponent implementation
2689
+ fetchClass() {
2690
+ return this.stateService.getClasses({
2691
+ customStyle: this.customStyle(),
2692
+ });
2693
+ }
2694
+ init() {
2695
+ this.iconRegistry.addRawSvgIconInNamepsace('flowbite-angular', 'close', this.domSanitizer.bypassSecurityTrustHtml(CLOSE_SVG_ICON));
2696
+ }
2697
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: ModalHeaderComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2698
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.5", type: ModalHeaderComponent, isStandalone: true, selector: "flowbite-modal-header", inputs: { customStyle: { classPropertyName: "customStyle", publicName: "customStyle", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { customStyle: "customStyleChange" }, usesInheritance: true, ngImport: i0, template: `
2699
+ <h3 [ngClass]="contentClasses().modalHeaderTitleClass">
2700
+ <ng-content />
2701
+ </h3>
2702
+ <button
2703
+ type="button"
2704
+ [ngClass]="contentClasses().modalHeaderButtonClass"
2705
+ data-modal-hide="medium-modal"
2706
+ (click)="modalComponent.close()">
2707
+ <flowbite-icon
2708
+ svgIcon="flowbite-angular:close"
2709
+ class="w-5 h-5" />
2710
+ <span class="sr-only">Close modal</span>
2711
+ </button>
2712
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: IconComponent, selector: "flowbite-icon", inputs: ["svgIcon"], outputs: ["svgIconChange"] }] }); }
2713
+ }
2714
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: ModalHeaderComponent, decorators: [{
2715
+ type: Component,
2716
+ args: [{
2717
+ standalone: true,
2718
+ imports: [NgClass, IconComponent],
2719
+ selector: 'flowbite-modal-header',
2720
+ template: `
2721
+ <h3 [ngClass]="contentClasses().modalHeaderTitleClass">
2722
+ <ng-content />
2723
+ </h3>
2724
+ <button
2725
+ type="button"
2726
+ [ngClass]="contentClasses().modalHeaderButtonClass"
2727
+ data-modal-hide="medium-modal"
2728
+ (click)="modalComponent.close()">
2729
+ <flowbite-icon
2730
+ svgIcon="flowbite-angular:close"
2731
+ class="w-5 h-5" />
2732
+ <span class="sr-only">Close modal</span>
2733
+ </button>
2734
+ `,
2735
+ }]
2736
+ }] });
2737
+
2738
+ const FLOWBITE_MODAL_THEME_TOKEN = new InjectionToken('FLOWBITE_MODAL_THEME_TOKEN');
2739
+ class ModalThemeService {
2740
+ constructor() {
2741
+ this.baseTheme = inject(FLOWBITE_MODAL_THEME_TOKEN);
2742
+ }
2743
+ getClasses(properties) {
2744
+ const theme = mergeTheme(this.baseTheme, properties.customStyle);
2745
+ const output = {
2746
+ rootClass: twMerge(theme.root.base),
2747
+ modalWrapperClass: twMerge(theme.wrapper.base, theme.wrapper.position[properties.position]),
2748
+ modalContainerClass: twMerge(theme.container.base, theme.container.size[properties.size]),
2749
+ modalContentClass: twMerge(theme.content.base),
2750
+ };
2751
+ return output;
2752
+ }
2753
+ }
2754
+
2755
+ /**
2756
+ * @see https://flowbite.com/docs/components/modal/
2757
+ */
2758
+ class ModalComponent extends BaseComponent {
2759
+ constructor() {
2760
+ super(...arguments);
2761
+ this.destroyed = new Subject();
2762
+ this.themeService = inject(ModalThemeService);
2763
+ this.modalHeaderChild = contentChild(ModalHeaderComponent);
2764
+ this.modalBodyChild = contentChild(ModalBodyComponent);
2765
+ this.modalFooterChild = contentChild(ModalFooterComponent);
2766
+ //#region template properties
2767
+ this.template = viewChild.required('modal', { read: TemplateRef });
2768
+ this.viewContainer = inject(ViewContainerRef);
2769
+ this.router = inject(Router);
2770
+ //#endregion
2771
+ //#region properties
2772
+ this.size = model('md');
2773
+ this.position = model('center');
2774
+ this.isDismissable = model(false);
2775
+ this.isOpen = model(false);
2776
+ this.customStyle = model({});
2777
+ }
2778
+ //#endregion
2779
+ //#region BaseComponent implementation
2780
+ fetchClass() {
2781
+ return this.themeService.getClasses({
2782
+ isOpen: booleanToFlowbiteBoolean(this.isOpen()),
2783
+ size: this.size(),
2784
+ position: this.position(),
2785
+ customStyle: this.customStyle(),
2786
+ });
2787
+ }
2788
+ init() {
2789
+ // close modal if it's not destroyed on route change
2790
+ this.router.events
2791
+ .pipe(takeUntil(this.destroyed), filter(() => this.isOpen()), filter((event) => event instanceof NavigationStart))
2792
+ .subscribe(() => this.close());
2793
+ }
2794
+ verify() {
2795
+ if (this.modalBodyChild() === undefined) {
2796
+ throw new Error('No ModalBodyComponent available');
2797
+ }
2798
+ }
2799
+ //#endregion
2800
+ ngOnDestroy() {
2801
+ this.destroyed.next();
2802
+ this.destroyed.complete();
2803
+ }
2804
+ open() {
2805
+ this.isOpen.set(true);
2806
+ this.changeBackdrop();
2807
+ }
2808
+ close() {
2809
+ this.isOpen.set(false);
2810
+ this.changeBackdrop();
2811
+ }
2812
+ toggle() {
2813
+ this.isOpen.set(!this.isOpen());
2814
+ this.changeBackdrop();
2815
+ }
2816
+ // If isOpen changes, add or remove template
2817
+ changeBackdrop() {
2818
+ if (this.isOpen()) {
2819
+ this.createTemplate();
2820
+ }
2821
+ else {
2822
+ this.destroyTemplate();
2823
+ }
2824
+ }
2825
+ createTemplate() {
2826
+ if (this.embeddedView) {
2827
+ this.destroyTemplate();
2828
+ }
2829
+ this.embeddedView = this.viewContainer.createEmbeddedView(this.template());
2830
+ }
2831
+ destroyTemplate() {
2832
+ this.embeddedView?.destroy();
2833
+ }
2834
+ onKeydownHandler(event) {
2835
+ console.log('hello');
2836
+ if (event.key === 'Escape') {
2837
+ this.close();
2838
+ }
2839
+ }
2840
+ onBackdropClick(event) {
2841
+ if (event.target == event.currentTarget && this.isDismissable()) {
2842
+ this.close();
2843
+ }
2844
+ }
2845
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: ModalComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2846
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.5", type: ModalComponent, isStandalone: true, selector: "flowbite-modal", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, isDismissable: { classPropertyName: "isDismissable", publicName: "isDismissable", isSignal: true, isRequired: false, transformFunction: null }, isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: true, isRequired: false, transformFunction: null }, customStyle: { classPropertyName: "customStyle", publicName: "customStyle", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { size: "sizeChange", position: "positionChange", isDismissable: "isDismissableChange", isOpen: "isOpenChange", customStyle: "customStyleChange" }, host: { attributes: { "tabindex": "-1" }, listeners: { "document:keydown": "onKeydownHandler($event)" } }, queries: [{ propertyName: "modalHeaderChild", first: true, predicate: ModalHeaderComponent, descendants: true, isSignal: true }, { propertyName: "modalBodyChild", first: true, predicate: ModalBodyComponent, descendants: true, isSignal: true }, { propertyName: "modalFooterChild", first: true, predicate: ModalFooterComponent, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "template", first: true, predicate: ["modal"], descendants: true, read: TemplateRef, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
2847
+ <ng-template #modal>
2848
+ <div class="bg-gray-900 bg-opacity-50 dark:bg-opacity-80 fixed inset-0 z-[99]"></div>
2849
+
2850
+ <div
2851
+ [ngClass]="contentClasses().modalWrapperClass"
2852
+ (click)="onBackdropClick($event)">
2853
+ <div [ngClass]="contentClasses().modalContainerClass">
2854
+ <div [ngClass]="contentClasses().modalContentClass">
2855
+ <ng-content />
2856
+ </div>
2857
+ </div>
2858
+ </div>
2859
+ </ng-template>
2860
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
2861
+ }
2862
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: ModalComponent, decorators: [{
2863
+ type: Component,
2864
+ args: [{
2865
+ standalone: true,
2866
+ imports: [NgClass],
2867
+ selector: 'flowbite-modal',
2868
+ template: `
2869
+ <ng-template #modal>
2870
+ <div class="bg-gray-900 bg-opacity-50 dark:bg-opacity-80 fixed inset-0 z-[99]"></div>
2871
+
2872
+ <div
2873
+ [ngClass]="contentClasses().modalWrapperClass"
2874
+ (click)="onBackdropClick($event)">
2875
+ <div [ngClass]="contentClasses().modalContainerClass">
2876
+ <div [ngClass]="contentClasses().modalContentClass">
2877
+ <ng-content />
2878
+ </div>
2879
+ </div>
2880
+ </div>
2881
+ </ng-template>
2882
+ `,
2883
+ host: {
2884
+ tabindex: '-1',
2885
+ '(document:keydown)': 'onKeydownHandler($event)',
2886
+ },
2887
+ }]
2888
+ }] });
2889
+
2890
+ const modalTheme = createTheme({
2891
+ root: {
2892
+ base: '',
2893
+ },
2894
+ wrapper: {
2895
+ base: 'fixed top-0 left-0 right-0 z-[100] w-full p-4 overflow-x-hidden overflow-y-auto md:inset-0 h-[calc(100%-1rem)] md:h-full flex',
2896
+ position: {
2897
+ 'top-left': 'items-start justify-start',
2898
+ 'top-center': 'items-start justify-center',
2899
+ 'top-right': 'items-start justify-end',
2900
+ 'center-left': 'items-center justify-start',
2901
+ center: 'items-center justify-center',
2902
+ 'center-right': 'items-center justify-end',
2903
+ 'bottom-left': 'items-end justify-start',
2904
+ 'bottom-center': 'items-end justify-center',
2905
+ 'bottom-right': 'items-end justify-end',
2906
+ },
2907
+ },
2908
+ container: {
2909
+ base: 'relative w-full h-full md:h-auto',
2910
+ size: {
2911
+ sm: 'max-w-md',
2912
+ md: 'max-w-lg',
2913
+ lg: 'max-w-4xl',
2914
+ xl: 'max-w-7xl',
2915
+ },
2916
+ },
2917
+ content: {
2918
+ base: 'relative bg-white rounded-lg shadow dark:bg-gray-700',
2919
+ },
2920
+ });
2921
+
2922
+ const modalHeaderTheme = createTheme({
2923
+ root: {
2924
+ base: 'flex items-center justify-between p-5 border-b rounded-t dark:border-gray-600',
2925
+ },
2926
+ title: {
2927
+ base: 'text-xl font-medium text-gray-900 dark:text-white',
2928
+ },
2929
+ button: {
2930
+ base: 'text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center dark:hover:bg-gray-600 dark:hover:text-white',
2931
+ },
2932
+ });
2933
+
2934
+ const modalBodyTheme = createTheme({
2935
+ root: {
2936
+ base: 'block p-6 space-y-6',
2937
+ },
2938
+ });
2939
+
2940
+ const modalFooterTheme = createTheme({
2941
+ root: {
2942
+ base: 'flex items-center p-6 space-x-2 border-t border-gray-200 rounded-b dark:border-gray-600',
2943
+ },
2944
+ });
2945
+
2946
+ const FLOWBITE_NAVBAR_BRAND_THEME_TOKEN = new InjectionToken('FLOWBITE_NAVBAR_BRAND_THEME_TOKEN');
2947
+ class NavbarBrandThemeService {
2948
+ constructor() {
2949
+ this.baseTheme = inject(FLOWBITE_NAVBAR_BRAND_THEME_TOKEN);
2950
+ }
2951
+ getClasses(properties) {
2952
+ const theme = mergeTheme(this.baseTheme, properties.customStyle);
2953
+ const output = {
2954
+ rootClass: twMerge(theme.root.base),
2955
+ };
2956
+ return output;
2957
+ }
2958
+ }
2959
+
2960
+ class NavbarBrandComponent extends BaseComponent {
2961
+ constructor() {
2962
+ super(...arguments);
2963
+ this.themeService = inject(NavbarBrandThemeService);
2964
+ this.navbarComponent = inject(NavbarComponent);
2965
+ //#region properties
2966
+ this.customStyle = model({});
2967
+ }
2968
+ //#endregion
2969
+ //#region BaseComponent implementation
2970
+ fetchClass() {
2971
+ return this.themeService.getClasses({
2972
+ customStyle: this.customStyle(),
2973
+ });
2974
+ }
2975
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: NavbarBrandComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2976
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.5", type: NavbarBrandComponent, isStandalone: true, selector: "flowbite-navbar-brand", inputs: { customStyle: { classPropertyName: "customStyle", publicName: "customStyle", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { customStyle: "customStyleChange" }, usesInheritance: true, ngImport: i0, template: `<ng-content />`, isInline: true }); }
2977
+ }
2978
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: NavbarBrandComponent, decorators: [{
2979
+ type: Component,
2980
+ args: [{
2981
+ selector: 'flowbite-navbar-brand',
2982
+ standalone: true,
2983
+ imports: [NgClass],
2984
+ template: `<ng-content />`,
2985
+ }]
2986
+ }] });
2987
+
2988
+ const FLOWBITE_NAVBAR_CONTENT_THEME_TOKEN = new InjectionToken('FLOWBITE_NAVBAR_CONTENT_THEME_TOKEN');
2989
+ class NavbarContentThemeService {
2990
+ constructor() {
2991
+ this.baseTheme = inject(FLOWBITE_NAVBAR_CONTENT_THEME_TOKEN);
2992
+ }
2993
+ getClasses(properties) {
2994
+ const theme = mergeTheme(this.baseTheme, properties.customStyle);
2995
+ const output = {
2996
+ rootClass: twMerge(theme.root.base, theme.root.isOpen[properties.isOpen]),
2997
+ navbarContentListClass: twMerge(theme.list.base),
2998
+ };
2999
+ return output;
3000
+ }
3001
+ }
3002
+
3003
+ class NavbarContentComponent extends BaseComponent {
3004
+ constructor() {
3005
+ super(...arguments);
3006
+ this.themeService = inject(NavbarContentThemeService);
3007
+ this.navbarComponent = model(inject(NavbarComponent));
3008
+ //#region properties
3009
+ this.color = model(this.navbarComponent().color());
3010
+ this.customStyle = model({});
3011
+ }
3012
+ //#endregion
3013
+ //#region BaseComponent implementation
3014
+ fetchClass() {
3015
+ return this.themeService.getClasses({
3016
+ isOpen: booleanToFlowbiteBoolean(this.navbarComponent().isOpen()),
3017
+ customStyle: this.customStyle(),
3018
+ });
3019
+ }
3020
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: NavbarContentComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3021
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.5", type: NavbarContentComponent, isStandalone: true, selector: "flowbite-navbar-content", inputs: { navbarComponent: { classPropertyName: "navbarComponent", publicName: "navbarComponent", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, customStyle: { classPropertyName: "customStyle", publicName: "customStyle", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { navbarComponent: "navbarComponentChange", color: "colorChange", customStyle: "customStyleChange" }, usesInheritance: true, ngImport: i0, template: `
3022
+ <div [ngClass]="contentClasses().navbarContentListClass">
3023
+ <ng-content />
3024
+ </div>
3025
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
3026
+ }
3027
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: NavbarContentComponent, decorators: [{
3028
+ type: Component,
3029
+ args: [{
3030
+ selector: 'flowbite-navbar-content',
3031
+ standalone: true,
3032
+ imports: [NgClass],
3033
+ template: `
3034
+ <div [ngClass]="contentClasses().navbarContentListClass">
3035
+ <ng-content />
3036
+ </div>
3037
+ `,
3038
+ }]
3039
+ }] });
3040
+
3041
+ const FLOWBITE_NAVBAR_TOGGLE_THEME_TOKEN = new InjectionToken('FLOWBITE_NAVBAR_TOGGLE_THEME_TOKEN');
3042
+ class NavbarToggleThemeService {
3043
+ constructor() {
3044
+ this.baseTheme = inject(FLOWBITE_NAVBAR_TOGGLE_THEME_TOKEN);
3045
+ }
3046
+ getClasses(properties) {
3047
+ const theme = mergeTheme(this.baseTheme, properties.customStyle);
3048
+ const output = {
3049
+ rootClass: twMerge(theme.root.base),
3050
+ };
3051
+ return output;
3052
+ }
3053
+ }
3054
+
3055
+ class NavbarToggleComponent extends BaseComponent {
3056
+ constructor() {
3057
+ super(...arguments);
3058
+ this.themeService = inject(NavbarToggleThemeService);
3059
+ this.navbarComponent = model(inject(NavbarComponent));
3060
+ this.iconRegistry = inject(IconRegistry);
3061
+ this.domSanitizer = inject(DomSanitizer);
3062
+ //#region properties
3063
+ this.customStyle = model({});
3064
+ }
3065
+ //#endregion
3066
+ //#region BaseComponent implementation
3067
+ fetchClass() {
3068
+ return this.themeService.getClasses({
3069
+ customStyle: this.customStyle(),
3070
+ });
3071
+ }
3072
+ init() {
3073
+ this.iconRegistry.addRawSvgIconInNamepsace('flowbite-angular', 'bars', this.domSanitizer.bypassSecurityTrustHtml(BARS_SVG_ICON));
3074
+ }
3075
+ //#endregion
3076
+ onClick() {
3077
+ const isCollapsed = this.navbarComponent().isOpen();
3078
+ this.navbarComponent().isOpen.set(!isCollapsed);
3079
+ }
3080
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: NavbarToggleComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3081
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.5", type: NavbarToggleComponent, isStandalone: true, selector: "flowbite-navbar-toggle", inputs: { navbarComponent: { classPropertyName: "navbarComponent", publicName: "navbarComponent", isSignal: true, isRequired: false, transformFunction: null }, customStyle: { classPropertyName: "customStyle", publicName: "customStyle", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { navbarComponent: "navbarComponentChange", customStyle: "customStyleChange" }, host: { listeners: { "click": "onClick()" } }, usesInheritance: true, ngImport: i0, template: `
3082
+ <flowbite-icon
3083
+ svgIcon="flowbite-angular:bars"
3084
+ class="w-5 h-5" />
3085
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: IconComponent, selector: "flowbite-icon", inputs: ["svgIcon"], outputs: ["svgIconChange"] }] }); }
3086
+ }
3087
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: NavbarToggleComponent, decorators: [{
3088
+ type: Component,
3089
+ args: [{
3090
+ selector: 'flowbite-navbar-toggle',
3091
+ standalone: true,
3092
+ imports: [CommonModule, IconComponent],
3093
+ template: `
3094
+ <flowbite-icon
3095
+ svgIcon="flowbite-angular:bars"
3096
+ class="w-5 h-5" />
3097
+ `,
3098
+ host: {
3099
+ '(click)': 'onClick()',
3100
+ },
3101
+ }]
3102
+ }] });
3103
+
3104
+ const FLOWBITE_NAVBAR_THEME_TOKEN = new InjectionToken('FLOWBITE_NAVBAR_THEME_TOKEN');
3105
+ class NavbarThemeService {
3106
+ constructor() {
3107
+ this.baseTheme = inject(FLOWBITE_NAVBAR_THEME_TOKEN);
3108
+ }
3109
+ getClasses(properties) {
3110
+ const theme = mergeTheme(this.baseTheme, properties.customStyle);
3111
+ const output = {
3112
+ rootClass: twMerge(theme.root.base, theme.root.color['gray'], theme.root.isRounded[properties.isRounded], theme.root.hasBorder[properties.hasBorder], theme.root.isFixed[properties.isFixed]),
3113
+ };
3114
+ return output;
3115
+ }
3116
+ }
3117
+
3118
+ /**
3119
+ * @see https://flowbite.com/docs/components/navbar/
3120
+ */
3121
+ class NavbarComponent extends BaseComponent {
3122
+ constructor() {
3123
+ super(...arguments);
3124
+ this.themeService = inject(NavbarThemeService);
3125
+ this.navbarBrandChild = contentChild(NavbarBrandComponent);
3126
+ this.navbarToggleChild = contentChild(NavbarToggleComponent);
3127
+ this.navbarContentChild = contentChild(NavbarContentComponent);
3128
+ //#region properties
3129
+ this.color = model('primary');
3130
+ this.isOpen = model(false);
3131
+ this.isRounded = model(false);
3132
+ this.hasBorder = model(false);
3133
+ this.isFixed = model(false);
3134
+ this.customStyle = model({});
3135
+ }
3136
+ //#endregion
3137
+ //#region BaseComponent implementation
3138
+ fetchClass() {
3139
+ return this.themeService.getClasses({
3140
+ hasBorder: booleanToFlowbiteBoolean(this.isRounded()),
3141
+ isRounded: booleanToFlowbiteBoolean(this.hasBorder()),
3142
+ isFixed: booleanToFlowbiteBoolean(this.isFixed()),
3143
+ customStyle: this.customStyle(),
3144
+ });
3145
+ }
3146
+ verify() {
3147
+ if (this.navbarContentChild() === undefined) {
3148
+ throw new Error('No NavbarContentComponent available');
3149
+ }
3150
+ }
3151
+ //#endregion
3152
+ toggleVisibility(isOpen) {
3153
+ if (isOpen === undefined) {
3154
+ isOpen = untracked(() => !this.isOpen());
3155
+ }
3156
+ this.isOpen.set(isOpen);
3157
+ }
3158
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: NavbarComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3159
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.5", type: NavbarComponent, isStandalone: true, selector: "flowbite-navbar", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: true, isRequired: false, transformFunction: null }, isRounded: { classPropertyName: "isRounded", publicName: "isRounded", isSignal: true, isRequired: false, transformFunction: null }, hasBorder: { classPropertyName: "hasBorder", publicName: "hasBorder", isSignal: true, isRequired: false, transformFunction: null }, isFixed: { classPropertyName: "isFixed", publicName: "isFixed", isSignal: true, isRequired: false, transformFunction: null }, customStyle: { classPropertyName: "customStyle", publicName: "customStyle", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { color: "colorChange", isOpen: "isOpenChange", isRounded: "isRoundedChange", hasBorder: "hasBorderChange", isFixed: "isFixedChange", customStyle: "customStyleChange" }, queries: [{ propertyName: "navbarBrandChild", first: true, predicate: NavbarBrandComponent, descendants: true, isSignal: true }, { propertyName: "navbarToggleChild", first: true, predicate: NavbarToggleComponent, descendants: true, isSignal: true }, { propertyName: "navbarContentChild", first: true, predicate: NavbarContentComponent, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `<ng-content />`, isInline: true }); }
3160
+ }
3161
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: NavbarComponent, decorators: [{
3162
+ type: Component,
3163
+ args: [{
3164
+ standalone: true,
3165
+ imports: [NgClass],
3166
+ selector: 'flowbite-navbar',
3167
+ template: `<ng-content />`,
3168
+ }]
3169
+ }] });
3170
+
3171
+ const navbarTheme = createTheme({
3172
+ root: {
3173
+ base: 'flex flex-wrap items-center justify-between p-4',
3174
+ color: {
3175
+ primary: 'bg-primary-200 dark:bg-primary-800 border-primary-200 dark:border-primary-700',
3176
+ gray: 'bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700',
3177
+ },
3178
+ isRounded: {
3179
+ enabled: 'rounded',
3180
+ disabled: '',
3181
+ },
3182
+ hasBorder: {
3183
+ enabled: 'border',
3184
+ disabled: '',
3185
+ },
3186
+ isFixed: {
3187
+ enabled: 'border-b',
3188
+ disabled: '',
3189
+ },
3190
+ },
3191
+ });
3192
+
3193
+ const navbarBrandTheme = createTheme({
3194
+ root: {
3195
+ base: 'cursor-pointer flex items-center space-x-3 rtl:space-x-reverse',
3196
+ },
3197
+ });
3198
+
3199
+ const navbarContentTheme = createTheme({
3200
+ root: {
3201
+ base: 'w-full md:block md:w-auto order-last md:order-none',
3202
+ isOpen: {
3203
+ enabled: '',
3204
+ disabled: 'hidden',
3205
+ },
3206
+ },
3207
+ list: {
3208
+ base: 'font-medium flex flex-col p-4 md:p-0 mt-4 items-center border border-gray-100 rounded-lg bg-gray-50 md:flex-row md:space-x-8 rtl:space-x-reverse md:mt-0 md:border-0 md:bg-white dark:bg-gray-900 md:dark:bg-gray-800 dark:border-gray-700',
3209
+ },
3210
+ });
3211
+
3212
+ /**
3213
+ * Wrapping directive over RouterLinkActive.
3214
+ *
3215
+ * @usageNotes
3216
+ * It provides a clean way to have 'isActive' data with signal base value.
3217
+ *
3218
+ * @see `RouterLinkActive`
3219
+ */
3220
+ class FlowbiteRouterLinkActiveDirective {
3221
+ get isActive() {
3222
+ return this._isActive.asReadonly();
3223
+ }
3224
+ /**
3225
+ * Set the RouterLinkActive's ariaCurrentWhenActive to the value passed to the component (via this Directive).
3226
+ */
3227
+ constructor() {
3228
+ this.ariaCurrentValue = true;
3229
+ this.routerLinkActive = inject(RouterLinkActive);
3230
+ this._isActive = signal(this.routerLinkActive.isActive);
3231
+ this.routerLinkActive.ariaCurrentWhenActive = this.ariaCurrentValue;
3232
+ }
3233
+ onIsActiveChange() {
3234
+ this._isActive.set(this.routerLinkActive.isActive);
3235
+ }
3236
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: FlowbiteRouterLinkActiveDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
3237
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.5", type: FlowbiteRouterLinkActiveDirective, isStandalone: true, selector: "[flowbiteRouterLinkActive]", host: { attributes: { "isActiveChange": "onIsActiveChange" } }, hostDirectives: [{ directive: i1.RouterLinkActive, inputs: ["routerLinkActiveOptions", "routerLinkActiveOptions", "ariaCurrentWhenActive", "ariaCurrentWhenActive", "routerLinkActive", "routerLinkActive"], outputs: ["isActiveChange", "isActiveChange"] }], ngImport: i0 }); }
3238
+ }
3239
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: FlowbiteRouterLinkActiveDirective, decorators: [{
3240
+ type: Directive,
3241
+ args: [{
3242
+ standalone: true,
3243
+ selector: '[flowbiteRouterLinkActive]',
3244
+ host: {
3245
+ isActiveChange: 'onIsActiveChange',
3246
+ },
3247
+ hostDirectives: [
3248
+ {
3249
+ directive: RouterLinkActive,
3250
+ inputs: routerLinkActiveInputs,
3251
+ outputs: routerLinkActiveOutputs,
3252
+ },
3253
+ ],
3254
+ }]
3255
+ }], ctorParameters: () => [] });
3256
+
3257
+ const FLOWBITE_NAVBAR_ITEM_THEME_TOKEN = new InjectionToken('FLOWBITE_NAVBAR_ITEM_THEME_TOKEN');
3258
+ class NavbarItemThemeService {
3259
+ constructor() {
3260
+ this.baseTheme = inject(FLOWBITE_NAVBAR_ITEM_THEME_TOKEN);
3261
+ }
3262
+ getClasses(properties) {
3263
+ const theme = mergeTheme(this.baseTheme, properties.customStyle);
3264
+ const output = {
3265
+ rootClass: twMerge(theme.root.base, theme.root.color[properties.color]),
3266
+ };
3267
+ return output;
3268
+ }
3269
+ }
3270
+
3271
+ class NavbarItemComponent extends BaseComponent {
3272
+ constructor() {
3273
+ super(...arguments);
3274
+ this.flowbiteRouterLink = inject(FlowbiteRouterLinkDirective, { optional: true });
3275
+ this.flowbiteRouterLinkActive = inject(FlowbiteRouterLinkActiveDirective, { optional: true });
3276
+ this.themeService = inject(NavbarItemThemeService);
3277
+ this.navbarContentComponent = inject(NavbarContentComponent);
3278
+ //#region properties
3279
+ this.color = model(this.navbarContentComponent.color());
3280
+ this.customStyle = model({});
3281
+ }
3282
+ //#endregion
3283
+ //#region BaseComponent implementation
3284
+ fetchClass() {
3285
+ return this.themeService.getClasses({
3286
+ color: this.color(),
3287
+ customStyle: this.customStyle(),
3288
+ });
3289
+ }
3290
+ //#endregion
3291
+ onClick() {
3292
+ this.navbarContentComponent.navbarComponent().toggleVisibility(false);
3293
+ }
3294
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: NavbarItemComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3295
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.5", type: NavbarItemComponent, isStandalone: true, selector: "flowbite-navbar-item", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, customStyle: { classPropertyName: "customStyle", publicName: "customStyle", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { color: "colorChange", customStyle: "customStyleChange" }, host: { listeners: { "click": "onClick()" } }, usesInheritance: true, ngImport: i0, template: `<ng-content />`, isInline: true }); }
3296
+ }
3297
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: NavbarItemComponent, decorators: [{
3298
+ type: Component,
3299
+ args: [{
3300
+ selector: 'flowbite-navbar-item',
3301
+ standalone: true,
3302
+ imports: [NgClass],
3303
+ template: `<ng-content />`,
3304
+ host: {
3305
+ '(click)': 'onClick()',
3306
+ },
3307
+ }]
3308
+ }] });
3309
+
3310
+ const navbarItemTheme = createTheme({
3311
+ root: {
3312
+ base: 'cursor-pointer block py-2 px-3 rounded text-sm text-gray-900 dark:text-white hover:bg-gray-100 dark:hover:bg-gray-700 md:hover:bg-transparent md:border-0 md:p-0 md:dark:hover:bg-transparent',
3313
+ color: {
3314
+ primary: 'md:hover:text-primary-700 md:dark:hover:text-primary-500 aria-current:text-primary-500 dark:aria-current:text-primary-300',
3315
+ gray: 'md:hover:text-gray-700 md:dark:hover:text-gray-500 aria-current:text-gray-500 dark:aria-current:text-gray-300',
3316
+ },
3317
+ },
3318
+ });
3319
+
3320
+ const navbarToogleTheme = createTheme({
3321
+ root: {
3322
+ base: 'cursor-pointer inline-flex items-center p-2 w-10 h-10 justify-center text-sm text-gray-500 rounded-lg md:hidden hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-gray-200 dark:text-gray-400 dark:hover:bg-gray-700 dark:focus:ring-gray-600',
3323
+ },
3324
+ });
3325
+
3326
+ const FLOWBITE_NAVBAR_ICON_BUTTON_THEME_TOKEN = new InjectionToken('FLOWBITE_NAVBAR_TOGGLE_THEME_TOKEN');
3327
+ class NavbarIconButtonThemeService {
3328
+ constructor() {
3329
+ this.baseTheme = inject(FLOWBITE_NAVBAR_ICON_BUTTON_THEME_TOKEN);
3330
+ }
3331
+ getClasses(properties) {
3332
+ const theme = mergeTheme(this.baseTheme, properties.customStyle);
3333
+ const output = {
3334
+ rootClass: twMerge(theme.root.base, theme.root.color[properties.color]),
3335
+ };
3336
+ return output;
3337
+ }
3338
+ }
3339
+
3340
+ class NavbarIconButtonComponent extends BaseComponent {
3341
+ constructor() {
3342
+ super(...arguments);
3343
+ this.themeService = inject(NavbarIconButtonThemeService);
3344
+ this.navbarComponent = inject(NavbarComponent, { optional: true });
3345
+ this.navbarContentComponent = inject(NavbarContentComponent, { optional: true });
3346
+ //#region properties
3347
+ this.color = model(this.navbarContentComponent?.color() || this.navbarComponent.color());
3348
+ this.customStyle = model({});
3349
+ }
3350
+ //#endregion
3351
+ //#region BaseComponent implementation
3352
+ fetchClass() {
3353
+ return this.themeService.getClasses({
3354
+ color: this.color(),
3355
+ customStyle: this.customStyle(),
3356
+ });
3357
+ }
3358
+ verify() {
3359
+ if (this.navbarComponent === null && this.navbarContentComponent === null) {
3360
+ throw new Error('No NavbarComponent/NavbarContentComponent available');
3361
+ }
3362
+ }
3363
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: NavbarIconButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3364
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.5", type: NavbarIconButtonComponent, isStandalone: true, selector: "flowbite-navbar-icon-button", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, customStyle: { classPropertyName: "customStyle", publicName: "customStyle", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { color: "colorChange", customStyle: "customStyleChange" }, usesInheritance: true, ngImport: i0, template: `<ng-content />`, isInline: true }); }
3365
+ }
3366
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: NavbarIconButtonComponent, decorators: [{
3367
+ type: Component,
3368
+ args: [{
3369
+ selector: 'flowbite-navbar-icon-button',
3370
+ standalone: true,
3371
+ imports: [],
3372
+ template: `<ng-content />`,
3373
+ }]
3374
+ }] });
3375
+
3376
+ const navbarIconButtonTheme = createTheme({
3377
+ root: {
3378
+ base: 'cursor-pointer rounded-lg p-2.5 text-sm text-gray-500 hover:bg-gray-100 focus:outline-none focus:ring-4 focus:ring-gray-200 dark:text-gray-400 dark:hover:bg-gray-700 dark:focus:ring-gray-700',
3379
+ color: {
3380
+ primary: 'text-primary-500 dark:text-primary-300',
3381
+ gray: 'text-gray-500 dark:text-gray-400',
3382
+ blue: 'text-blue-500 dark:text-blue-300',
3383
+ red: 'text-red-500 dark:text-red-300',
3384
+ green: 'text-green-500 dark:text-green-300',
3385
+ yellow: 'text-yellow-500 dark:text-yellow-300',
3386
+ },
3387
+ },
3388
+ });
3389
+
3390
+ const FLOWBITE_SCROLL_TOP_THEME_TOKEN = new InjectionToken('FLOWBITE_SCROLL_TOP_THEME_TOKEN');
3391
+ class ScrollTopThemeService {
3392
+ constructor() {
3393
+ this.baseTheme = inject(FLOWBITE_SCROLL_TOP_THEME_TOKEN);
3394
+ }
3395
+ getClasses(properties) {
3396
+ const theme = mergeTheme(this.baseTheme, properties.customStyle);
3397
+ const output = {
3398
+ rootClass: twMerge(theme.root.base, theme.root.color[properties.color], theme.root.position[properties.position]),
3399
+ };
3400
+ return output;
3401
+ }
3402
+ }
3403
+
3404
+ class ScrollTopComponent extends BaseComponent {
3405
+ constructor() {
3406
+ super(...arguments);
3407
+ this.themeService = inject(ScrollTopThemeService);
3408
+ this.iconRegistry = inject(IconRegistry);
3409
+ this.domSanitizer = inject(DomSanitizer);
3410
+ //#region properties
3411
+ this.color = model('primary');
3412
+ this.position = model('bottom-right');
3413
+ this.customStyle = model({});
3414
+ }
3415
+ //#endregion
3416
+ //#region BaseComponent implemenation
3417
+ fetchClass() {
3418
+ return this.themeService.getClasses({
3419
+ color: this.color(),
3420
+ position: this.position(),
3421
+ customStyle: this.customStyle(),
3422
+ });
3423
+ }
3424
+ init() {
3425
+ this.iconRegistry.addRawSvgIconInNamepsace('flowbite-angular', 'chevron-up', this.domSanitizer.bypassSecurityTrustHtml(CHEVRON_UP_SVG_ICON));
3426
+ }
3427
+ //#endregion
3428
+ onClick() {
3429
+ window.scrollTo(window.scrollX, 0);
3430
+ }
3431
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: ScrollTopComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3432
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.5", type: ScrollTopComponent, isStandalone: true, selector: "flowbite-scroll-top", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, customStyle: { classPropertyName: "customStyle", publicName: "customStyle", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { color: "colorChange", position: "positionChange", customStyle: "customStyleChange" }, host: { listeners: { "click": "onClick()" } }, usesInheritance: true, ngImport: i0, template: `<flowbite-icon
3433
+ svgIcon="flowbite-angular:chevron-up"
3434
+ class="w-5 h-5" />`, isInline: true, dependencies: [{ kind: "component", type: IconComponent, selector: "flowbite-icon", inputs: ["svgIcon"], outputs: ["svgIconChange"] }] }); }
3435
+ }
3436
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: ScrollTopComponent, decorators: [{
3437
+ type: Component,
3438
+ args: [{
3439
+ selector: 'flowbite-scroll-top',
3440
+ standalone: true,
3441
+ imports: [IconComponent],
3442
+ template: `<flowbite-icon
3443
+ svgIcon="flowbite-angular:chevron-up"
3444
+ class="w-5 h-5" />`,
3445
+ host: {
3446
+ '(click)': 'onClick()',
3447
+ },
3448
+ }]
3449
+ }] });
3450
+
3451
+ const scrollTopTheme = createTheme({
3452
+ root: {
3453
+ base: 'cursor-pointer fixed flex flex-row place-items-center p-2 rounded-lg',
3454
+ color: {
3455
+ primary: 'bg-primary-100',
3456
+ dark: 'bg-gray-100 dark:bg-gray-800 dark:text-white',
3457
+ blue: 'bg-blue-100',
3458
+ gray: 'bg-gray-100',
3459
+ green: 'bg-green-100',
3460
+ lime: 'bg-lime-100',
3461
+ purple: 'bg-purple-100',
3462
+ red: 'bg-red-100',
3463
+ },
3464
+ position: {
3465
+ 'bottom-center': 'bottom-3 left-1/2 right-1/2',
3466
+ 'bottom-left': 'bottom-3 left-3',
3467
+ 'bottom-right': 'bottom-3 right-3',
3468
+ 'center-left': 'left-3 top-1/2 bottom-1/2',
3469
+ 'center-right': 'right-3 top-1/2 bottom-1/2',
3470
+ 'top-center': 'top-3 left-1/2 right-1/2',
3471
+ 'top-left': 'top-3 left-3',
3472
+ 'top-right': 'top-3 right-3',
3473
+ },
3474
+ },
3475
+ });
3476
+
3477
+ const FLOWBITE_SIDEBAR_ITEM_GROUP_THEME_TOKEN = new InjectionToken('FLOWBITE_SIDEBAR_ITEM_GROUP_THEME_TOKEN');
3478
+ class SidebarItemGroupThemeService {
3479
+ constructor() {
3480
+ this.baseTheme = inject(FLOWBITE_SIDEBAR_ITEM_GROUP_THEME_TOKEN);
3481
+ }
3482
+ getClasses(properties) {
3483
+ const theme = mergeTheme(this.baseTheme, properties.customStyle);
3484
+ const output = {
3485
+ rootClass: twMerge(theme.root.base),
3486
+ spanClass: twMerge(theme.spanText.base, theme.spanText.color[properties.color]),
3487
+ };
3488
+ return output;
3489
+ }
3490
+ }
3491
+
3492
+ /**
3493
+ * Sanitize a string as trusted HTML.
3494
+ *
3495
+ * @see `DomSanitizer`
3496
+ */
3497
+ class SanitizeHtmlPipe {
3498
+ constructor() {
3499
+ this._sanitizer = inject(DomSanitizer);
3500
+ }
3501
+ /**
3502
+ * Return the result of 'bypassSecurityTrustHtml' function of DomSanitizer for the parameter.
3503
+ *
3504
+ * @param v The string to be transformed.
3505
+ * @returns The SfeHtml from the DomSanitizer.
3506
+ */
3507
+ transform(v) {
3508
+ return this._sanitizer.bypassSecurityTrustHtml(v);
3509
+ }
3510
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SanitizeHtmlPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
3511
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.5", ngImport: i0, type: SanitizeHtmlPipe, isStandalone: true, name: "sanitizeHtml" }); }
3512
+ }
3513
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SanitizeHtmlPipe, decorators: [{
3514
+ type: Pipe,
3515
+ args: [{
3516
+ standalone: true,
3517
+ name: 'sanitizeHtml',
3518
+ }]
3519
+ }] });
3520
+
3521
+ const FLOWBITE_SIDEBAR_ITEM_THEME_TOKEN = new InjectionToken('FLOWBITE_SIDEBAR_ITEM_THEME_TOKEN');
3522
+ class SidebarItemThemeService {
3523
+ constructor() {
3524
+ this.baseTheme = inject(FLOWBITE_SIDEBAR_ITEM_THEME_TOKEN);
3525
+ }
3526
+ getClasses(properties) {
3527
+ const theme = mergeTheme(this.baseTheme, properties.customStyle);
3528
+ const output = {
3529
+ rootClass: twMerge(theme.root.base, theme.root.color[properties.color]),
3530
+ sidebarIconClass: twMerge(theme.icon.base),
3531
+ };
3532
+ return output;
3533
+ }
3534
+ }
3535
+
3536
+ class SidebarItemComponent extends BaseComponent {
3537
+ constructor() {
3538
+ super(...arguments);
3539
+ this.flowbiteRouterLink = inject(FlowbiteRouterLinkDirective, { optional: true });
3540
+ this.flowbiteRouterLinkActive = inject(FlowbiteRouterLinkActiveDirective, { optional: true });
3541
+ this.themeService = inject(SidebarItemThemeService);
3542
+ this.sidebarItemGroupComponent = inject(SidebarItemGroupComponent, {
3543
+ optional: true,
3544
+ });
3545
+ this.sidebarMenuComponent = inject(SidebarMenuComponent);
3546
+ //#region properties
3547
+ this.icon = model(undefined);
3548
+ this.color = model((this.sidebarItemGroupComponent ?? this.sidebarMenuComponent).color());
3549
+ this.label = model(undefined);
3550
+ this.customStyle = model({});
3551
+ }
3552
+ //#endregion
3553
+ //#region BaseComponent implementation
3554
+ fetchClass() {
3555
+ return this.themeService.getClasses({
3556
+ icon: this.icon(),
3557
+ color: this.color(),
3558
+ label: this.label(),
3559
+ customStyle: this.customStyle(),
3560
+ });
3561
+ }
3562
+ verify() {
3563
+ if (this.sidebarMenuComponent === undefined && this.sidebarItemGroupComponent === undefined) {
3564
+ throw new Error('No SidebarMenuComponent/SidebarItemGroupComponent available');
3565
+ }
3566
+ }
3567
+ //#endregion
3568
+ onClick() {
3569
+ (this.sidebarMenuComponent || this.sidebarItemGroupComponent?.sidebarMenuComponent)?.closeAll();
3570
+ (this.sidebarMenuComponent || this.sidebarItemGroupComponent?.sidebarMenuComponent)?.sidebarComponent.toggleVisibility(false);
3571
+ }
3572
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SidebarItemComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3573
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.5", type: SidebarItemComponent, isStandalone: true, selector: "flowbite-sidebar-item", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, customStyle: { classPropertyName: "customStyle", publicName: "customStyle", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { icon: "iconChange", color: "colorChange", label: "labelChange", customStyle: "customStyleChange" }, host: { listeners: { "click": "onClick()" } }, usesInheritance: true, ngImport: i0, template: `
3574
+ <span
3575
+ class="flex-shrink-0"
3576
+ [innerHTML]="icon()! | sanitizeHtml"
3577
+ *ngIf="icon()"></span>
3578
+ <span
3579
+ [ngClass]="contentClasses().sidebarIconClass"
3580
+ [class.ml-3]="icon()">
3581
+ <ng-content />
3582
+ </span>
3583
+ <flowbite-badge *ngIf="label()">{{ label() }}</flowbite-badge>
3584
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: SanitizeHtmlPipe, name: "sanitizeHtml" }, { kind: "component", type: BadgeComponent, selector: "flowbite-badge", inputs: ["color", "size", "isIconOnly", "isPill", "customStyle"], outputs: ["colorChange", "sizeChange", "isIconOnlyChange", "isPillChange", "customStyleChange"] }] }); }
3585
+ }
3586
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SidebarItemComponent, decorators: [{
3587
+ type: Component,
3588
+ args: [{
3589
+ standalone: true,
3590
+ imports: [NgIf, NgClass, SanitizeHtmlPipe, BadgeComponent],
3591
+ selector: 'flowbite-sidebar-item',
3592
+ template: `
3593
+ <span
3594
+ class="flex-shrink-0"
3595
+ [innerHTML]="icon()! | sanitizeHtml"
3596
+ *ngIf="icon()"></span>
3597
+ <span
3598
+ [ngClass]="contentClasses().sidebarIconClass"
3599
+ [class.ml-3]="icon()">
3600
+ <ng-content />
3601
+ </span>
3602
+ <flowbite-badge *ngIf="label()">{{ label() }}</flowbite-badge>
3603
+ `,
3604
+ host: {
3605
+ '(click)': 'onClick()',
3606
+ },
3607
+ }]
3608
+ }] });
3609
+
3610
+ class SidebarItemGroupComponent extends BaseComponent {
3611
+ constructor() {
3612
+ super(...arguments);
3613
+ this.themeService = inject(SidebarItemGroupThemeService);
3614
+ this.iconRegistry = inject(IconRegistry);
3615
+ this.domSanitizer = inject(DomSanitizer);
3616
+ this.sidebarMenuComponent = inject(SidebarMenuComponent);
3617
+ this.sidebarItemChildren = contentChildren(SidebarItemComponent);
3618
+ //#region properties
3619
+ this.isOpen = model(this.sidebarItemChildren().some((x) => x.flowbiteRouterLinkActive?.isActive() ?? false));
3620
+ this.color = model(this.sidebarMenuComponent.color());
3621
+ this.title = model.required();
3622
+ this.customStyle = model({});
3623
+ }
3624
+ //#endregion
3625
+ //#region BaseComponent implementation
3626
+ fetchClass() {
3627
+ return this.themeService.getClasses({
3628
+ color: this.color(),
3629
+ customStyle: this.customStyle(),
3630
+ });
3631
+ }
3632
+ verify() {
3633
+ if (this.sidebarItemChildren().length === 0) {
3634
+ throw new Error('No SidebarItemComponent available');
3635
+ }
3636
+ }
3637
+ init() {
3638
+ this.iconRegistry.addRawSvgIconInNamepsace('flowbite-angular', 'chevron-down', this.domSanitizer.bypassSecurityTrustHtml(CHEVRON_DOWN_SVG_ICON));
3639
+ }
3640
+ //#endregion
3641
+ onSpanClick() {
3642
+ this.toggleVisibility();
3643
+ }
3644
+ toggleVisibility(isOpen) {
3645
+ if (isOpen === undefined) {
3646
+ isOpen = untracked(() => !this.isOpen());
3647
+ }
3648
+ this.isOpen.set(isOpen);
3649
+ }
3650
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SidebarItemGroupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3651
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.5", type: SidebarItemGroupComponent, isStandalone: true, selector: "flowbite-sidebar-item-group", inputs: { isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, customStyle: { classPropertyName: "customStyle", publicName: "customStyle", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isOpen: "isOpenChange", color: "colorChange", title: "titleChange", customStyle: "customStyleChange" }, queries: [{ propertyName: "sidebarItemChildren", predicate: SidebarItemComponent, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
3652
+ <span
3653
+ [class]="contentClasses().spanClass"
3654
+ (click)="onSpanClick()">
3655
+ <h4>{{ title() }}</h4>
3656
+ <flowbite-icon
3657
+ svgIcon="flowbite-angular:chevron-down"
3658
+ class="h-6 w-6 shrink-0 duration-200"
3659
+ [class.rotate-180]="!isOpen()" />
3660
+ </span>
3661
+ <ng-content *ngIf="isOpen()" />
3662
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: IconComponent, selector: "flowbite-icon", inputs: ["svgIcon"], outputs: ["svgIconChange"] }] }); }
3663
+ }
3664
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SidebarItemGroupComponent, decorators: [{
3665
+ type: Component,
3666
+ args: [{
3667
+ standalone: true,
3668
+ imports: [NgClass, NgIf, IconComponent],
3669
+ selector: 'flowbite-sidebar-item-group',
3670
+ template: `
3671
+ <span
3672
+ [class]="contentClasses().spanClass"
3673
+ (click)="onSpanClick()">
3674
+ <h4>{{ title() }}</h4>
3675
+ <flowbite-icon
3676
+ svgIcon="flowbite-angular:chevron-down"
3677
+ class="h-6 w-6 shrink-0 duration-200"
3678
+ [class.rotate-180]="!isOpen()" />
3679
+ </span>
3680
+ <ng-content *ngIf="isOpen()" />
3681
+ `,
3682
+ }]
3683
+ }] });
3684
+
3685
+ const FLOWBITE_SIDEBAR_MENU_THEME_TOKEN = new InjectionToken('FLOWBITE_SIDEBAR_MENU_THEME_TOKEN');
3686
+ class SidebarMenuThemeService {
3687
+ constructor() {
3688
+ this.baseTheme = inject(FLOWBITE_SIDEBAR_MENU_THEME_TOKEN);
3689
+ }
3690
+ getClasses(properties) {
3691
+ const theme = mergeTheme(this.baseTheme, properties.customStyle);
3692
+ const output = {
3693
+ rootClass: twMerge(theme.root.base, theme.root.isOpen[properties.isOpen], properties.isOpen === 'enabled' && theme.root.displayMode[properties.displayMode], theme.root.color[properties.color]),
3694
+ };
3695
+ return output;
3696
+ }
3697
+ }
3698
+
3699
+ class SidebarMenuComponent extends BaseComponent {
3700
+ constructor() {
3701
+ super(...arguments);
3702
+ this.themeService = inject(SidebarMenuThemeService);
3703
+ this.sidebarComponent = inject(SidebarComponent);
3704
+ this.sidebarItemGroupChildren = contentChildren(SidebarItemGroupComponent);
3705
+ this.sidebarItemChildren = contentChildren(SidebarItemComponent);
3706
+ //#region properties
3707
+ this.color = model(this.sidebarComponent.color());
3708
+ this.customStyle = model({});
3709
+ }
3710
+ //#endregion
3711
+ fetchClass() {
3712
+ return this.themeService.getClasses({
3713
+ isOpen: booleanToFlowbiteBoolean(this.sidebarComponent.isOpen()),
3714
+ color: this.color(),
3715
+ displayMode: this.sidebarComponent.displayMode(),
3716
+ customStyle: this.customStyle(),
3717
+ });
3718
+ }
3719
+ verify() {
3720
+ if (this.sidebarItemChildren().length === 0 && this.sidebarItemGroupChildren().length === 0) {
3721
+ throw new Error('No SidebarItemComponent/SidebarItemGroupComponent available');
3722
+ }
3723
+ }
3724
+ closeAll() {
3725
+ this.sidebarItemGroupChildren().forEach((x) => x.toggleVisibility(false));
3726
+ }
3727
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SidebarMenuComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3728
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.5", type: SidebarMenuComponent, isStandalone: true, selector: "flowbite-sidebar-menu", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, customStyle: { classPropertyName: "customStyle", publicName: "customStyle", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { color: "colorChange", customStyle: "customStyleChange" }, queries: [{ propertyName: "sidebarItemGroupChildren", predicate: SidebarItemGroupComponent, isSignal: true }, { propertyName: "sidebarItemChildren", predicate: SidebarItemComponent, isSignal: true }], usesInheritance: true, ngImport: i0, template: '<ng-content />', isInline: true }); }
3729
+ }
3730
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SidebarMenuComponent, decorators: [{
3731
+ type: Component,
3732
+ args: [{
3733
+ standalone: true,
3734
+ imports: [],
3735
+ selector: 'flowbite-sidebar-menu',
3736
+ template: '<ng-content />',
3737
+ }]
3738
+ }] });
3739
+
3740
+ const FLOWBITE_SIDEBAR_PAGE_CONTENT_THEME_TOKEN = new InjectionToken('FLOWBITE_SIDEBAR_PAGE_CONTENT_THEME_TOKEN');
3741
+ class SidebarPageContentThemeService {
3742
+ constructor() {
3743
+ this.baseTheme = inject(FLOWBITE_SIDEBAR_PAGE_CONTENT_THEME_TOKEN);
3744
+ }
3745
+ getClasses(properties) {
3746
+ const theme = mergeTheme(this.baseTheme, properties.customStyle);
3747
+ const output = {
3748
+ rootClass: twMerge(theme.root.base, properties.isOpen === 'enabled' && theme.root.displayMode[properties.displayMode]),
3749
+ };
3750
+ return output;
3751
+ }
3752
+ }
3753
+
3754
+ class SidebarPageContentComponent extends BaseComponent {
3755
+ constructor() {
3756
+ super(...arguments);
3757
+ this.themeService = inject(SidebarPageContentThemeService);
3758
+ this.sidebarComponent = inject(SidebarComponent);
3759
+ //#region properties
3760
+ this.customStyle = model({});
3761
+ }
3762
+ //endregion
3763
+ //region BaseComponent implementation
3764
+ fetchClass() {
3765
+ return this.themeService.getClasses({
3766
+ isOpen: booleanToFlowbiteBoolean(this.sidebarComponent.isOpen()),
3767
+ displayMode: this.sidebarComponent.displayMode(),
3768
+ customStyle: this.customStyle(),
3769
+ });
3770
+ }
3771
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SidebarPageContentComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3772
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.5", type: SidebarPageContentComponent, isStandalone: true, selector: "flowbite-sidebar-page-content", inputs: { customStyle: { classPropertyName: "customStyle", publicName: "customStyle", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { customStyle: "customStyleChange" }, usesInheritance: true, ngImport: i0, template: `<ng-content />`, isInline: true }); }
3773
+ }
3774
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SidebarPageContentComponent, decorators: [{
3775
+ type: Component,
3776
+ args: [{
3777
+ standalone: true,
3778
+ imports: [],
3779
+ selector: 'flowbite-sidebar-page-content',
3780
+ template: `<ng-content />`,
3781
+ }]
3782
+ }] });
3783
+
3784
+ const FLOWBITE_SIDEBAR_THEME_TOKEN = new InjectionToken('FLOWBITE_SIDEBAR_THEME_TOKEN');
3785
+ class SidebarThemeService {
3786
+ constructor() {
3787
+ this.baseTheme = inject(FLOWBITE_SIDEBAR_THEME_TOKEN);
3788
+ }
3789
+ getClasses(properties) {
3790
+ const theme = mergeTheme(this.baseTheme, properties.customStyle);
3791
+ const output = {
3792
+ rootClass: twMerge(theme.root.base, theme.root.isRounded[properties.isRounded]),
3793
+ };
3794
+ return output;
3795
+ }
3796
+ }
3797
+
3798
+ /**
3799
+ * @see https://flowbite.com/docs/components/sidebar/
3800
+ */
3801
+ class SidebarComponent extends BaseComponent {
3802
+ constructor() {
3803
+ super(...arguments);
3804
+ this.themeService = inject(SidebarThemeService);
3805
+ this.sidebarMenuChild = contentChild(SidebarMenuComponent);
3806
+ this.sidebarPageContentChild = contentChild(SidebarPageContentComponent);
3807
+ //#region properties
3808
+ this.color = model('primary');
3809
+ this.displayMode = model('push');
3810
+ this.isOpen = model(false);
3811
+ this.isRounded = model(false);
3812
+ this.customStyle = model({});
3813
+ }
3814
+ //#endregion
3815
+ //#region BaseComponent implementation
3816
+ fetchClass() {
3817
+ return this.themeService.getClasses({
3818
+ displayMode: this.displayMode(),
3819
+ isRounded: booleanToFlowbiteBoolean(this.isRounded()),
3820
+ customStyle: this.customStyle(),
3821
+ });
3822
+ }
3823
+ verify() {
3824
+ if (this.sidebarMenuChild() === undefined) {
3825
+ throw new Error('No SidebarMenuComponent available');
3826
+ }
3827
+ if (this.sidebarPageContentChild() === undefined) {
3828
+ throw new Error('No SidebarPageContentComponent available');
3829
+ }
3830
+ }
3831
+ //#endregion
3832
+ toggleVisibility(isOpen) {
3833
+ if (isOpen === undefined) {
3834
+ isOpen = untracked(() => !this.isOpen());
3835
+ }
3836
+ this.isOpen.set(isOpen);
3837
+ }
3838
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SidebarComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3839
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.5", type: SidebarComponent, isStandalone: true, selector: "flowbite-sidebar", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, displayMode: { classPropertyName: "displayMode", publicName: "displayMode", isSignal: true, isRequired: false, transformFunction: null }, isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: true, isRequired: false, transformFunction: null }, isRounded: { classPropertyName: "isRounded", publicName: "isRounded", isSignal: true, isRequired: false, transformFunction: null }, customStyle: { classPropertyName: "customStyle", publicName: "customStyle", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { color: "colorChange", displayMode: "displayModeChange", isOpen: "isOpenChange", isRounded: "isRoundedChange", customStyle: "customStyleChange" }, queries: [{ propertyName: "sidebarMenuChild", first: true, predicate: SidebarMenuComponent, descendants: true, isSignal: true }, { propertyName: "sidebarPageContentChild", first: true, predicate: SidebarPageContentComponent, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `<ng-content />`, isInline: true }); }
3840
+ }
3841
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SidebarComponent, decorators: [{
3842
+ type: Component,
3843
+ args: [{
3844
+ standalone: true,
3845
+ imports: [NgClass],
3846
+ selector: 'flowbite-sidebar',
3847
+ template: `<ng-content />`,
3848
+ }]
3849
+ }] });
3850
+
3851
+ const sidebarTheme = createTheme({
3852
+ root: {
3853
+ base: 'flex flex-row min-h-full',
3854
+ isRounded: {
3855
+ enabled: 'rounded',
3856
+ disabled: '',
3857
+ },
3858
+ },
3859
+ });
3860
+
3861
+ const sidebarItemTheme = createTheme({
3862
+ root: {
3863
+ base: 'group flex cursor-pointer items-center rounded-lg p-2 text-base font-normal text-gray-900 dark:text-white',
3864
+ color: {
3865
+ primary: 'aria-current:text-primary-500 dark:aria-current:text-primary-300 hover:bg-primary-200/35 dark:hover:bg-primary-700/35',
3866
+ dark: 'aria-current:text-gray-500 dark:aria-current:text-gray-300 hover:bg-gray-200/35 dark:hover:bg-gray-700/35',
3867
+ blue: 'aria-current:text-blue-500 dark:aria-current:text-blue-300 hover:bg-blue-200/35 dark:hover:bg-blue-700/35',
3868
+ red: 'aria-current:text-red-500 dark:aria-current:text-red-300 hover:bg-red-200/35 dark:hover:bg-red-700/35',
3869
+ green: 'aria-current:text-green-500 dark:aria-current:text-green-300 hover:bg-green-200/35 dark:hover:bg-green-700/35',
3870
+ yellow: 'aria-current:text-yellow-500 dark:aria-current:text-yellow-300 hover:bg-yellow-200/35 dark:hover:bg-yellow-700/35',
3871
+ },
3872
+ },
3873
+ icon: {
3874
+ base: 'flex-1 whitespace-nowrap',
3875
+ },
3876
+ });
3877
+
3878
+ const sidebarItemGroupTheme = createTheme({
3879
+ root: {
3880
+ base: 'flex flex-col py-2 font-semibold cursor-pointer',
3881
+ },
3882
+ spanText: {
3883
+ base: 'flex flex-row justify-between m-2',
3884
+ color: {
3885
+ primary: 'text-primary-600',
3886
+ dark: 'text-gray-600',
3887
+ blue: 'text-blue-600',
3888
+ red: 'text-red-600',
3889
+ green: 'text-green-600',
3890
+ yellow: 'text-yellow-600',
3891
+ },
3892
+ },
3893
+ });
3894
+
3895
+ const FLOWBITE_SIDEBAR_TOGGLE_THEME_TOKEN = new InjectionToken('FLOWBITE_TOGGLE_SIDEBAR_THEME_TOKEN');
3896
+ class SidebarToggleThemeService {
3897
+ constructor() {
3898
+ this.baseTheme = inject(FLOWBITE_SIDEBAR_TOGGLE_THEME_TOKEN);
3899
+ }
3900
+ getClasses(properties) {
3901
+ const theme = mergeTheme(this.baseTheme, properties.customStyle);
3902
+ const output = {
3903
+ rootClass: twMerge(theme.root.base, theme.root.color[properties.color], theme.root.size[properties.color]),
3904
+ };
3905
+ return output;
3906
+ }
3907
+ }
3908
+
3909
+ class SidebarToggleComponent extends BaseComponent {
3910
+ constructor() {
3911
+ super(...arguments);
3912
+ this.themeService = inject(SidebarToggleThemeService);
3913
+ this.iconRegistry = inject(IconRegistry);
3914
+ this.domSanitizer = inject(DomSanitizer);
3915
+ this.sidebarComponent = model(inject(SidebarComponent));
3916
+ //#region properties
3917
+ this.color = model('primary');
3918
+ this.size = model('sm');
3919
+ this.customStyle = model({});
3920
+ }
3921
+ //#endregion
3922
+ //#region BaseComponent implementation
3923
+ fetchClass() {
3924
+ return this.themeService.getClasses({
3925
+ color: this.color(),
3926
+ size: this.size(),
3927
+ customStyle: this.customStyle(),
3928
+ });
3929
+ }
3930
+ init() {
3931
+ this.iconRegistry.addRawSvgIconInNamepsace('flowbite-angular', 'tabs', this.domSanitizer.bypassSecurityTrustHtml(BARS_SVG_ICON));
3932
+ }
3933
+ //#endregion
3934
+ onClick() {
3935
+ const isOpen = this.sidebarComponent().isOpen();
3936
+ this.sidebarComponent().isOpen.set(!isOpen);
3937
+ }
3938
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SidebarToggleComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3939
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.5", type: SidebarToggleComponent, isStandalone: true, selector: "flowbite-sidebar-toggle", inputs: { sidebarComponent: { classPropertyName: "sidebarComponent", publicName: "sidebarComponent", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, customStyle: { classPropertyName: "customStyle", publicName: "customStyle", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sidebarComponent: "sidebarComponentChange", color: "colorChange", size: "sizeChange", customStyle: "customStyleChange" }, host: { listeners: { "click": "onClick()" } }, usesInheritance: true, ngImport: i0, template: `<flowbite-icon svgIcon="flowbite-angular:bars" />`, isInline: true, dependencies: [{ kind: "component", type: IconComponent, selector: "flowbite-icon", inputs: ["svgIcon"], outputs: ["svgIconChange"] }] }); }
3940
+ }
3941
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SidebarToggleComponent, decorators: [{
3942
+ type: Component,
3943
+ args: [{
3944
+ standalone: true,
3945
+ imports: [IconComponent],
3946
+ selector: 'flowbite-sidebar-toggle',
3947
+ template: `<flowbite-icon svgIcon="flowbite-angular:bars" />`,
3948
+ host: {
3949
+ '(click)': 'onClick()',
3950
+ },
3951
+ }]
3952
+ }] });
3953
+
3954
+ const sidebarToggleTheme = createTheme({
3955
+ root: {
3956
+ base: 'cursor-pointer inline-flex items-center p-2 justify-center rounded-lg focus:outline-none focus:ring-2',
3957
+ color: {
3958
+ primary: 'text-primary-500 dark:text-primary-400 hover:bg-primary-100 dark:hover:bg-gray-700 focus:ring-primary-200 dark:focus:ring-primary-600',
3959
+ dark: 'text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 focus:ring-gray-200 dark:focus:ring-gray-600',
3960
+ blue: 'text-blue-500 dark:text-blue-400 hover:bg-blue-100 dark:hover:bg-blue-700 focus:ring-blue-200 dark:focus:ring-blue-600',
3961
+ red: 'text-red-500 dark:text-red-400 hover:bg-red-100 dark:hover:bg-red-700 focus:ring-red-200 dark:focus:ring-red-600',
3962
+ green: 'text-green-500 dark:text-green-400 hover:bg-green-100 dark:hover:bg-green-700 focus:ring-green-200 dark:focus:ring-green-600',
3963
+ yellow: 'text-yellow-500 dark:text-yellow-400 hover:bg-yellow-100 dark:hover:bg-yellow-700 focus:ring-yellow-200 dark:focus:ring-yellow-600',
3964
+ },
3965
+ size: {
3966
+ sm: 'text-sm',
3967
+ },
3968
+ },
3969
+ });
3970
+
3971
+ const sidebarPageContentTheme = createTheme({
3972
+ root: {
3973
+ base: 'flex flex-1',
3974
+ displayMode: {
3975
+ push: '',
3976
+ over: '',
3977
+ backdrop: 'sticky left-0 right-0 z-30 bg-gray-500 bg-opacity-50 blur-md',
3978
+ },
3979
+ },
3980
+ });
3981
+
3982
+ const sidebarMenuTheme = createTheme({
3983
+ root: {
3984
+ base: 'flex-col min-h-full overflow-y-auto shrink-0 pr-1 border-r bg-white dark:bg-gray-800',
3985
+ displayMode: {
3986
+ push: '',
3987
+ over: 'sticky top-0 z-50',
3988
+ backdrop: 'sticky top-0 z-50',
3989
+ },
3990
+ isOpen: {
3991
+ enabled: 'flex',
3992
+ disabled: 'hidden',
3993
+ },
3994
+ color: {
3995
+ primary: 'border-primary-200 dark:border-primary-700',
3996
+ dark: 'border-gray-200 dark:border-gray-800',
3997
+ blue: 'border-blue-200 dark:border-blue-700',
3998
+ red: 'border-red-200 dark:border-red-700',
3999
+ green: 'border-green-200 dark:border-green-700',
4000
+ yellow: 'border-yellow-200 dark:border-yellow-700',
4001
+ },
4002
+ },
4003
+ });
4004
+
4005
+ /**
4006
+ * This function define base implementation of injected services and value used all over flowbite-angular library.
4007
+ *
4008
+ * @returns Return the configuration for flowbite-angular ThemeServices, themeProviders and settingsProviders.
4009
+ *
4010
+ * @see `EnvironmentProviders`
4011
+ */
4012
+ function initFlowbite() {
4013
+ const serviceProviders = makeEnvironmentProviders([
4014
+ {
4015
+ provide: AccordionContentThemeService,
4016
+ useClass: AccordionContentThemeService,
4017
+ },
4018
+ {
4019
+ provide: AccordionPanelThemeService,
4020
+ useClass: AccordionPanelThemeService,
4021
+ },
4022
+ {
4023
+ provide: AccordionTitleThemeService,
4024
+ useClass: AccordionTitleThemeService,
4025
+ },
4026
+ {
4027
+ provide: AccordionThemeService,
4028
+ useClass: AccordionThemeService,
4029
+ },
4030
+ {
4031
+ provide: AlertThemeService,
4032
+ useClass: AlertThemeService,
4033
+ },
4034
+ {
4035
+ provide: BadgeThemeService,
4036
+ useClass: BadgeThemeService,
4037
+ },
4038
+ {
4039
+ provide: BreadcrumbItemThemeService,
4040
+ useClass: BreadcrumbItemThemeService,
4041
+ },
4042
+ {
4043
+ provide: BreadcrumbThemeService,
4044
+ useClass: BreadcrumbThemeService,
4045
+ },
4046
+ {
4047
+ provide: ButtonThemeService,
4048
+ useClass: ButtonThemeService,
4049
+ },
4050
+ {
4051
+ provide: DarkThemeToggleThemeService,
4052
+ useClass: DarkThemeToggleThemeService,
4053
+ },
4054
+ {
4055
+ provide: DropdownDividerThemeService,
4056
+ useClass: DropdownDividerThemeService,
4057
+ },
4058
+ {
4059
+ provide: DropdownHeaderThemeService,
4060
+ useClass: DropdownHeaderThemeService,
4061
+ },
4062
+ {
4063
+ provide: DropdownItemThemeService,
4064
+ useClass: DropdownItemThemeService,
4065
+ },
4066
+ {
4067
+ provide: DropdownThemeService,
4068
+ useClass: DropdownThemeService,
4069
+ },
4070
+ {
4071
+ provide: FormFieldThemeService,
4072
+ useClass: FormFieldThemeService,
4073
+ },
4074
+ {
4075
+ provide: IndicatorThemeService,
4076
+ useClass: IndicatorThemeService,
4077
+ },
4078
+ {
4079
+ provide: ModalBodyThemeService,
4080
+ useClass: ModalBodyThemeService,
4081
+ },
4082
+ {
4083
+ provide: ModalFooterThemeService,
4084
+ useClass: ModalFooterThemeService,
4085
+ },
4086
+ {
4087
+ provide: ModalHeaderThemeService,
4088
+ useClass: ModalHeaderThemeService,
4089
+ },
4090
+ {
4091
+ provide: ModalThemeService,
4092
+ useClass: ModalThemeService,
4093
+ },
4094
+ {
4095
+ provide: NavbarBrandThemeService,
4096
+ useClass: NavbarBrandThemeService,
4097
+ },
4098
+ {
4099
+ provide: NavbarContentThemeService,
4100
+ useClass: NavbarContentThemeService,
4101
+ },
4102
+ {
4103
+ provide: NavbarItemThemeService,
4104
+ useClass: NavbarItemThemeService,
4105
+ },
4106
+ {
4107
+ provide: NavbarToggleThemeService,
4108
+ useClass: NavbarToggleThemeService,
4109
+ },
4110
+ {
4111
+ provide: NavbarIconButtonThemeService,
4112
+ useClass: NavbarIconButtonThemeService,
4113
+ },
4114
+ {
4115
+ provide: NavbarThemeService,
4116
+ useClass: NavbarThemeService,
4117
+ },
4118
+ {
4119
+ provide: ScrollTopThemeService,
4120
+ useClass: ScrollTopThemeService,
4121
+ },
4122
+ {
4123
+ provide: SidebarItemGroupThemeService,
4124
+ useClass: SidebarItemGroupThemeService,
4125
+ },
4126
+ {
4127
+ provide: SidebarItemThemeService,
4128
+ useClass: SidebarItemThemeService,
4129
+ },
4130
+ {
4131
+ provide: SidebarMenuThemeService,
4132
+ useClass: SidebarMenuThemeService,
4133
+ },
4134
+ {
4135
+ provide: SidebarPageContentThemeService,
4136
+ useClass: SidebarPageContentThemeService,
4137
+ },
4138
+ {
4139
+ provide: SidebarToggleThemeService,
4140
+ useClass: SidebarToggleThemeService,
4141
+ },
4142
+ {
4143
+ provide: SidebarThemeService,
4144
+ useClass: SidebarThemeService,
4145
+ },
4146
+ {
4147
+ provide: IconDirectiveThemeService,
4148
+ useClass: IconDirectiveThemeService,
4149
+ },
4150
+ {
4151
+ provide: AddonDirectiveThemeService,
4152
+ useClass: AddonDirectiveThemeService,
4153
+ },
4154
+ {
4155
+ provide: InputDirectiveThemeService,
4156
+ useClass: InputDirectiveThemeService,
4157
+ },
4158
+ {
4159
+ provide: LabelDirectiveThemeService,
4160
+ useClass: LabelDirectiveThemeService,
4161
+ },
4162
+ {
4163
+ provide: HelperDirectiveThemeService,
4164
+ useClass: HelperDirectiveThemeService,
4165
+ },
4166
+ ]);
4167
+ const themeProviders = makeEnvironmentProviders([
4168
+ {
4169
+ provide: FLOWBITE_ACCORDION_CONTENT_THEME_TOKEN,
4170
+ useValue: accordionContentTheme,
4171
+ },
4172
+ {
4173
+ provide: FLOWBITE_ACCORDION_PANEL_THEME_TOKEN,
4174
+ useValue: accordionPanelTheme,
4175
+ },
4176
+ {
4177
+ provide: FLOWBITE_ACCORDION_TITLE_THEME_TOKEN,
4178
+ useValue: accordionTitleTheme,
4179
+ },
4180
+ { provide: FLOWBITE_ACCORDION_THEME_TOKEN, useValue: accordionTheme },
4181
+ {
4182
+ provide: FLOWBITE_ALERT_THEME_TOKEN,
4183
+ useValue: alertTheme,
4184
+ },
4185
+ {
4186
+ provide: FLOWBITE_BADGE_THEME_TOKEN,
4187
+ useValue: badgeTheme,
4188
+ },
4189
+ {
4190
+ provide: FLOWBITE_BREADCRUMB_ITEM_THEME_TOKEN,
4191
+ useValue: breadcrumbItemTheme,
4192
+ },
4193
+ {
4194
+ provide: FLOWBITE_BREADCRUMB_THEME_TOKEN,
4195
+ useValue: breadcrumbTheme,
4196
+ },
4197
+ {
4198
+ provide: FLOWBITE_BUTTON_THEME_TOKEN,
4199
+ useValue: buttonTheme,
4200
+ },
4201
+ {
4202
+ provide: FLOWBITE_DARK_THEME_TOGGLE_THEME_TOKEN,
4203
+ useValue: darkThemeToggleTheme,
4204
+ },
4205
+ {
4206
+ provide: FLOWBITE_DROPDOWN_DIVIDER_THEME_TOKEN,
4207
+ useValue: dropdownDividerTheme,
4208
+ },
4209
+ {
4210
+ provide: FLOWBITE_DROPDOWN_HEADER_THEME_TOKEN,
4211
+ useValue: dropdownHeaderTheme,
4212
+ },
4213
+ {
4214
+ provide: FLOWBITE_DROPDOWN_ITEM_THEME_TOKEN,
4215
+ useValue: dropdownItemTheme,
4216
+ },
4217
+ {
4218
+ provide: FLOWBITE_DROPDOWN_THEME_TOKEN,
4219
+ useValue: dropdownTheme,
4220
+ },
4221
+ {
4222
+ provide: FLOWBITE_FORM_FIELD_THEME_TOKEN,
4223
+ useValue: formFieldTheme,
4224
+ },
4225
+ {
4226
+ provide: FLOWBITE_INDICATOR_THEME_TOKEN,
4227
+ useValue: indicatorTheme,
4228
+ },
4229
+ {
4230
+ provide: FLOWBITE_MODAL_BODY_THEME_TOKEN,
4231
+ useValue: modalBodyTheme,
4232
+ },
4233
+ {
4234
+ provide: FLOWBITE_MODAL_FOOTER_THEME_TOKEN,
4235
+ useValue: modalFooterTheme,
4236
+ },
4237
+ {
4238
+ provide: FLOWBITE_MODAL_HEADER_THEME_TOKEN,
4239
+ useValue: modalHeaderTheme,
4240
+ },
4241
+ {
4242
+ provide: FLOWBITE_MODAL_THEME_TOKEN,
4243
+ useValue: modalTheme,
4244
+ },
4245
+ {
4246
+ provide: FLOWBITE_NAVBAR_BRAND_THEME_TOKEN,
4247
+ useValue: navbarBrandTheme,
4248
+ },
4249
+ {
4250
+ provide: FLOWBITE_NAVBAR_CONTENT_THEME_TOKEN,
4251
+ useValue: navbarContentTheme,
4252
+ },
4253
+ {
4254
+ provide: FLOWBITE_NAVBAR_ITEM_THEME_TOKEN,
4255
+ useValue: navbarItemTheme,
4256
+ },
4257
+ {
4258
+ provide: FLOWBITE_NAVBAR_TOGGLE_THEME_TOKEN,
4259
+ useValue: navbarToogleTheme,
4260
+ },
4261
+ {
4262
+ provide: FLOWBITE_NAVBAR_ICON_BUTTON_THEME_TOKEN,
4263
+ useValue: navbarIconButtonTheme,
4264
+ },
4265
+ {
4266
+ provide: FLOWBITE_NAVBAR_THEME_TOKEN,
4267
+ useValue: navbarTheme,
4268
+ },
4269
+ {
4270
+ provide: FLOWBITE_SCROLL_TOP_THEME_TOKEN,
4271
+ useValue: scrollTopTheme,
4272
+ },
4273
+ {
4274
+ provide: FLOWBITE_SIDEBAR_ITEM_GROUP_THEME_TOKEN,
4275
+ useValue: sidebarItemGroupTheme,
4276
+ },
4277
+ {
4278
+ provide: FLOWBITE_SIDEBAR_ITEM_THEME_TOKEN,
4279
+ useValue: sidebarItemTheme,
4280
+ },
4281
+ {
4282
+ provide: FLOWBITE_SIDEBAR_MENU_THEME_TOKEN,
4283
+ useValue: sidebarMenuTheme,
4284
+ },
4285
+ {
4286
+ provide: FLOWBITE_SIDEBAR_PAGE_CONTENT_THEME_TOKEN,
4287
+ useValue: sidebarPageContentTheme,
4288
+ },
4289
+ {
4290
+ provide: FLOWBITE_SIDEBAR_TOGGLE_THEME_TOKEN,
4291
+ useValue: sidebarToggleTheme,
4292
+ },
4293
+ {
4294
+ provide: FLOWBITE_SIDEBAR_THEME_TOKEN,
4295
+ useValue: sidebarTheme,
4296
+ },
4297
+ {
4298
+ provide: FLOWBITE_DIRECTIVE_ADDON_THEME_TOKEN,
4299
+ useValue: addonDirectiveTheme,
4300
+ },
4301
+ {
4302
+ provide: FLOWBITE_DIRECTIVE_HELPER_THEME_TOKEN,
4303
+ useValue: helperDirectiveTheme,
4304
+ },
4305
+ {
4306
+ provide: FLOWBITE_DIRECTIVE_LABEL_THEME_TOKEN,
4307
+ useValue: labelDirectiveTheme,
4308
+ },
4309
+ {
4310
+ provide: FLOWBITE_DIRECTIVE_ICON_THEME_TOKEN,
4311
+ useValue: iconDirectiveTheme,
4312
+ },
4313
+ {
4314
+ provide: FLOWBITE_DIRECTIVE_INPUT_THEME_TOKEN,
4315
+ useValue: inputDirectiveTheme,
4316
+ },
4317
+ ]);
4318
+ return makeEnvironmentProviders([serviceProviders, themeProviders]);
4319
+ }
4320
+
4321
+ /**
4322
+ * Generated bundle index. Do not edit.
4323
+ */
4324
+
4325
+ export { AccordionComponent, AccordionContentComponent, AccordionContentThemeService, AccordionPanelComponent, AccordionPanelThemeService, AccordionThemeService, AccordionTitleComponent, AccordionTitleThemeService, AddonDirective, AddonDirectiveThemeService, AlertComponent, AlertThemeService, BadgeComponent, BadgeThemeService, BaseComponent, BaseInputDirective, BreadcrumbComponent, BreadcrumbItemComponent, BreadcrumbItemThemeService, BreadcrumbThemeService, ButtonComponent, ButtonThemeService, DarkThemeToggleComponent, DarkThemeToggleThemeService, DropdownComponent, DropdownDividerComponent, DropdownDividerThemeService, DropdownHeaderComponent, DropdownHeaderThemeService, DropdownItemComponent, DropdownItemThemeService, DropdownThemeService, FLOWBITE_ACCORDION_CONTENT_THEME_TOKEN, FLOWBITE_ACCORDION_PANEL_THEME_TOKEN, FLOWBITE_ACCORDION_THEME_TOKEN, FLOWBITE_ACCORDION_TITLE_THEME_TOKEN, FLOWBITE_ALERT_THEME_TOKEN, FLOWBITE_BADGE_THEME_TOKEN, FLOWBITE_BREADCRUMB_ITEM_THEME_TOKEN, FLOWBITE_BREADCRUMB_THEME_TOKEN, FLOWBITE_BUTTON_THEME_TOKEN, FLOWBITE_DARK_THEME_TOGGLE_THEME_TOKEN, FLOWBITE_DIRECTIVE_ADDON_THEME_TOKEN, FLOWBITE_DIRECTIVE_HELPER_THEME_TOKEN, FLOWBITE_DIRECTIVE_ICON_THEME_TOKEN, FLOWBITE_DIRECTIVE_INPUT_THEME_TOKEN, FLOWBITE_DIRECTIVE_LABEL_THEME_TOKEN, FLOWBITE_DROPDOWN_DIVIDER_THEME_TOKEN, FLOWBITE_DROPDOWN_HEADER_THEME_TOKEN, FLOWBITE_DROPDOWN_ITEM_THEME_TOKEN, FLOWBITE_DROPDOWN_THEME_TOKEN, FLOWBITE_FORM_FIELD_THEME_TOKEN, FLOWBITE_INDICATOR_THEME_TOKEN, FLOWBITE_MODAL_BODY_THEME_TOKEN, FLOWBITE_MODAL_FOOTER_THEME_TOKEN, FLOWBITE_MODAL_HEADER_THEME_TOKEN, FLOWBITE_MODAL_THEME_TOKEN, FLOWBITE_NAVBAR_BRAND_THEME_TOKEN, FLOWBITE_NAVBAR_CONTENT_THEME_TOKEN, FLOWBITE_NAVBAR_ICON_BUTTON_THEME_TOKEN, FLOWBITE_NAVBAR_ITEM_THEME_TOKEN, FLOWBITE_NAVBAR_THEME_TOKEN, FLOWBITE_NAVBAR_TOGGLE_THEME_TOKEN, FLOWBITE_SCROLL_TOP_THEME_TOKEN, FLOWBITE_SIDEBAR_ITEM_GROUP_THEME_TOKEN, FLOWBITE_SIDEBAR_ITEM_THEME_TOKEN, FLOWBITE_SIDEBAR_MENU_THEME_TOKEN, FLOWBITE_SIDEBAR_PAGE_CONTENT_THEME_TOKEN, FLOWBITE_SIDEBAR_THEME_TOKEN, FLOWBITE_SIDEBAR_TOGGLE_THEME_TOKEN, FlowbiteRouterLinkActiveDirective, FlowbiteRouterLinkDirective, FlowbiteThemeService, FormFieldClassInstance, FormFieldComponent, FormFieldThemeService, GlobalSignalStoreService, Guid, HelperDirective, HelperDirectiveThemeService, IconComponent, IconDirective, IconDirectiveThemeService, IconRegistry, IndicatorComponent, IndicatorThemeService, InputDirective, InputDirectiveThemeService, LabelDirective, LabelDirectiveThemeService, ModalBodyComponent, ModalBodyThemeService, ModalComponent, ModalFooterComponent, ModalFooterThemeService, ModalHeaderComponent, ModalHeaderThemeService, ModalThemeService, NavbarBrandComponent, NavbarBrandThemeService, NavbarComponent, NavbarContentComponent, NavbarContentThemeService, NavbarIconButtonComponent, NavbarIconButtonThemeService, NavbarItemComponent, NavbarItemThemeService, NavbarThemeService, NavbarToggleComponent, NavbarToggleThemeService, SanitizeHtmlPipe, ScrollTopComponent, ScrollTopThemeService, SidebarComponent, SidebarItemComponent, SidebarItemGroupComponent, SidebarItemGroupThemeService, SidebarItemThemeService, SidebarMenuComponent, SidebarMenuThemeService, SidebarPageContentComponent, SidebarPageContentThemeService, SidebarThemeService, SidebarToggleComponent, SidebarToggleThemeService, SignalStoreService, SvgIconConfig, accordionContentTheme, accordionPanelTheme, accordionTheme, accordionTitleTheme, addonDirectiveClassInstance, addonDirectiveTheme, alertTheme, badgeTheme, breadcrumbItemTheme, breadcrumbTheme, buttonTheme, cloneDeep, createClass, createTheme, darkThemeToggleTheme, dropdownDividerTheme, dropdownHeaderTheme, dropdownItemTheme, dropdownTheme, formFieldTheme, generateId, getSvgIconFailedToSanitizeRawError, getSvgIconFailedToSanitizeUrlError, getSvgIconFromNamedError, getSvgIconNoHttpClientProvidedError, helperDirectiveClassInstance, helperDirectiveTheme, iconDirectiveClassInstance, iconDirectiveTheme, indicatorTheme, initFlowbite, inputDirectiveClassInstance, inputDirectiveTheme, isObject, labelDirectiveClassInstance, labelDirectiveTheme, mergeTheme, modalBodyTheme, modalFooterTheme, modalHeaderTheme, modalTheme, navbarBrandTheme, navbarContentTheme, navbarIconButtonTheme, navbarItemTheme, navbarTheme, navbarToogleTheme, scrollTopTheme, sidebarItemGroupTheme, sidebarItemTheme, sidebarMenuTheme, sidebarPageContentTheme, sidebarTheme, sidebarToggleTheme, themeToString, trustedHTMLFromString };
4326
+ //# sourceMappingURL=flowbite-angular.mjs.map