flowbite-angular 1.3.0 → 20.0.2

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 (309) hide show
  1. package/README.md +30 -39
  2. package/accordion/index.d.ts +569 -16
  3. package/alert/index.d.ts +602 -4
  4. package/badge/index.d.ts +636 -4
  5. package/breadcrumb/index.d.ts +452 -8
  6. package/button/index.d.ts +335 -4
  7. package/button-group/README.md +4 -0
  8. package/button-group/index.d.ts +85 -0
  9. package/{core → card}/README.md +2 -2
  10. package/card/index.d.ts +640 -0
  11. package/{accordion → clipboard}/README.md +2 -2
  12. package/clipboard/index.d.ts +103 -0
  13. package/dropdown/index.d.ts +536 -16
  14. package/fesm2022/flowbite-angular-accordion.mjs +339 -479
  15. package/fesm2022/flowbite-angular-accordion.mjs.map +1 -1
  16. package/fesm2022/flowbite-angular-alert.mjs +308 -240
  17. package/fesm2022/flowbite-angular-alert.mjs.map +1 -1
  18. package/fesm2022/flowbite-angular-badge.mjs +332 -238
  19. package/fesm2022/flowbite-angular-badge.mjs.map +1 -1
  20. package/fesm2022/flowbite-angular-breadcrumb.mjs +262 -191
  21. package/fesm2022/flowbite-angular-breadcrumb.mjs.map +1 -1
  22. package/fesm2022/flowbite-angular-button-group.mjs +86 -0
  23. package/fesm2022/flowbite-angular-button-group.mjs.map +1 -0
  24. package/fesm2022/flowbite-angular-button.mjs +189 -270
  25. package/fesm2022/flowbite-angular-button.mjs.map +1 -1
  26. package/fesm2022/flowbite-angular-card.mjs +344 -0
  27. package/fesm2022/flowbite-angular-card.mjs.map +1 -0
  28. package/fesm2022/flowbite-angular-clipboard.mjs +174 -0
  29. package/fesm2022/flowbite-angular-clipboard.mjs.map +1 -0
  30. package/fesm2022/flowbite-angular-dropdown.mjs +272 -459
  31. package/fesm2022/flowbite-angular-dropdown.mjs.map +1 -1
  32. package/fesm2022/flowbite-angular-form.mjs +444 -0
  33. package/fesm2022/flowbite-angular-form.mjs.map +1 -0
  34. package/fesm2022/flowbite-angular-icon-brand.mjs +71 -0
  35. package/fesm2022/flowbite-angular-icon-brand.mjs.map +1 -0
  36. package/fesm2022/flowbite-angular-icon-outline-arrows.mjs +51 -0
  37. package/fesm2022/flowbite-angular-icon-outline-arrows.mjs.map +1 -0
  38. package/fesm2022/flowbite-angular-icon-outline-e-commerce.mjs +23 -0
  39. package/fesm2022/flowbite-angular-icon-outline-e-commerce.mjs.map +1 -0
  40. package/fesm2022/flowbite-angular-icon-outline-emoji.mjs +13 -0
  41. package/fesm2022/flowbite-angular-icon-outline-emoji.mjs.map +1 -0
  42. package/fesm2022/flowbite-angular-icon-outline-files-folders.mjs +42 -0
  43. package/fesm2022/flowbite-angular-icon-outline-files-folders.mjs.map +1 -0
  44. package/fesm2022/flowbite-angular-icon-outline-general.mjs +145 -0
  45. package/fesm2022/flowbite-angular-icon-outline-general.mjs.map +1 -0
  46. package/fesm2022/flowbite-angular-icon-outline-media.mjs +25 -0
  47. package/fesm2022/flowbite-angular-icon-outline-media.mjs.map +1 -0
  48. package/fesm2022/flowbite-angular-icon-outline-text.mjs +20 -0
  49. package/fesm2022/flowbite-angular-icon-outline-text.mjs.map +1 -0
  50. package/fesm2022/flowbite-angular-icon-outline-user.mjs +17 -0
  51. package/fesm2022/flowbite-angular-icon-outline-user.mjs.map +1 -0
  52. package/fesm2022/flowbite-angular-icon-outline-weather.mjs +9 -0
  53. package/fesm2022/flowbite-angular-icon-outline-weather.mjs.map +1 -0
  54. package/fesm2022/flowbite-angular-icon-outline.mjs +6 -0
  55. package/fesm2022/flowbite-angular-icon-outline.mjs.map +1 -0
  56. package/fesm2022/flowbite-angular-icon-solid-arrows.mjs +17 -0
  57. package/fesm2022/flowbite-angular-icon-solid-arrows.mjs.map +1 -0
  58. package/fesm2022/flowbite-angular-icon-solid-brands.mjs +33 -0
  59. package/fesm2022/flowbite-angular-icon-solid-brands.mjs.map +1 -0
  60. package/fesm2022/flowbite-angular-icon-solid-e-commerce.mjs +21 -0
  61. package/fesm2022/flowbite-angular-icon-solid-e-commerce.mjs.map +1 -0
  62. package/fesm2022/flowbite-angular-icon-solid-emoji.mjs +13 -0
  63. package/fesm2022/flowbite-angular-icon-solid-emoji.mjs.map +1 -0
  64. package/fesm2022/flowbite-angular-icon-solid-files-folder.mjs +42 -0
  65. package/fesm2022/flowbite-angular-icon-solid-files-folder.mjs.map +1 -0
  66. package/fesm2022/flowbite-angular-icon-solid-general.mjs +123 -0
  67. package/fesm2022/flowbite-angular-icon-solid-general.mjs.map +1 -0
  68. package/fesm2022/flowbite-angular-icon-solid-media.mjs +24 -0
  69. package/fesm2022/flowbite-angular-icon-solid-media.mjs.map +1 -0
  70. package/fesm2022/flowbite-angular-icon-solid-text.mjs +11 -0
  71. package/fesm2022/flowbite-angular-icon-solid-text.mjs.map +1 -0
  72. package/fesm2022/flowbite-angular-icon-solid-user.mjs +17 -0
  73. package/fesm2022/flowbite-angular-icon-solid-user.mjs.map +1 -0
  74. package/fesm2022/flowbite-angular-icon-solid-weather.mjs +9 -0
  75. package/fesm2022/flowbite-angular-icon-solid-weather.mjs.map +1 -0
  76. package/fesm2022/flowbite-angular-icon-solid.mjs +6 -0
  77. package/fesm2022/flowbite-angular-icon-solid.mjs.map +1 -0
  78. package/fesm2022/flowbite-angular-icon.mjs +318 -219
  79. package/fesm2022/flowbite-angular-icon.mjs.map +1 -1
  80. package/fesm2022/flowbite-angular-indicator.mjs +119 -231
  81. package/fesm2022/flowbite-angular-indicator.mjs.map +1 -1
  82. package/fesm2022/flowbite-angular-modal.mjs +337 -486
  83. package/fesm2022/flowbite-angular-modal.mjs.map +1 -1
  84. package/fesm2022/flowbite-angular-navbar.mjs +600 -604
  85. package/fesm2022/flowbite-angular-navbar.mjs.map +1 -1
  86. package/fesm2022/flowbite-angular-pagination.mjs +994 -0
  87. package/fesm2022/flowbite-angular-pagination.mjs.map +1 -0
  88. package/fesm2022/flowbite-angular-sidebar.mjs +400 -776
  89. package/fesm2022/flowbite-angular-sidebar.mjs.map +1 -1
  90. package/fesm2022/flowbite-angular-tab.mjs +465 -0
  91. package/fesm2022/flowbite-angular-tab.mjs.map +1 -0
  92. package/fesm2022/flowbite-angular-theme-toggle.mjs +263 -0
  93. package/fesm2022/flowbite-angular-theme-toggle.mjs.map +1 -0
  94. package/fesm2022/flowbite-angular-tooltip.mjs +117 -0
  95. package/fesm2022/flowbite-angular-tooltip.mjs.map +1 -0
  96. package/fesm2022/flowbite-angular.mjs +53 -66
  97. package/fesm2022/flowbite-angular.mjs.map +1 -1
  98. package/flowbite-angular.css +2 -0
  99. package/{alert → form}/README.md +2 -2
  100. package/form/index.d.ts +684 -0
  101. package/{breadcrumb → icon/brand}/README.md +2 -2
  102. package/icon/brand/index.d.ts +66 -0
  103. package/icon/index.d.ts +322 -5
  104. package/icon/outline/README.md +4 -0
  105. package/icon/outline/arrows/index.d.ts +46 -0
  106. package/icon/outline/e-commerce/index.d.ts +18 -0
  107. package/icon/outline/emoji/index.d.ts +8 -0
  108. package/icon/outline/files-folders/index.d.ts +37 -0
  109. package/icon/outline/general/index.d.ts +140 -0
  110. package/icon/outline/index.d.ts +2 -0
  111. package/icon/outline/media/index.d.ts +20 -0
  112. package/icon/outline/text/index.d.ts +15 -0
  113. package/icon/outline/user/index.d.ts +12 -0
  114. package/icon/outline/weather/index.d.ts +4 -0
  115. package/icon/solid/README.md +4 -0
  116. package/icon/solid/arrows/index.d.ts +12 -0
  117. package/icon/solid/brands/index.d.ts +28 -0
  118. package/icon/solid/e-commerce/index.d.ts +16 -0
  119. package/icon/solid/emoji/index.d.ts +8 -0
  120. package/icon/solid/files-folder/index.d.ts +37 -0
  121. package/icon/solid/general/index.d.ts +118 -0
  122. package/icon/solid/index.d.ts +2 -0
  123. package/icon/solid/media/index.d.ts +19 -0
  124. package/icon/solid/text/index.d.ts +6 -0
  125. package/icon/solid/user/index.d.ts +12 -0
  126. package/icon/solid/weather/index.d.ts +4 -0
  127. package/index.d.ts +126 -3
  128. package/indicator/index.d.ts +242 -4
  129. package/modal/index.d.ts +458 -16
  130. package/navbar/index.d.ts +1467 -24
  131. package/package.json +133 -38
  132. package/pagination/README.md +4 -0
  133. package/pagination/index.d.ts +1135 -0
  134. package/sidebar/index.d.ts +880 -24
  135. package/styles/flowbite-angular.css +8 -0
  136. package/styles/part/animation.css +0 -0
  137. package/styles/part/color.css +125 -0
  138. package/styles/part/font-size.css +67 -0
  139. package/styles/part/rounded.css +11 -0
  140. package/styles/part/shadow.css +9 -0
  141. package/styles/part/spacing.css +38 -0
  142. package/{badge → tab}/README.md +2 -2
  143. package/tab/index.d.ts +791 -0
  144. package/theme-toggle/README.md +4 -0
  145. package/theme-toggle/index.d.ts +342 -0
  146. package/{button → tooltip}/README.md +2 -2
  147. package/tooltip/index.d.ts +158 -0
  148. package/accordion/accordion-content.component.d.ts +0 -69
  149. package/accordion/accordion-content.theme.d.ts +0 -28
  150. package/accordion/accordion-content.theme.service.d.ts +0 -19
  151. package/accordion/accordion-panel.component.d.ts +0 -67
  152. package/accordion/accordion-panel.theme.d.ts +0 -23
  153. package/accordion/accordion-panel.theme.service.d.ts +0 -20
  154. package/accordion/accordion-title.component.d.ts +0 -106
  155. package/accordion/accordion-title.theme.d.ts +0 -35
  156. package/accordion/accordion-title.theme.service.d.ts +0 -19
  157. package/accordion/accordion.component.d.ts +0 -61
  158. package/accordion/accordion.theme.d.ts +0 -29
  159. package/accordion/accordion.theme.service.d.ts +0 -19
  160. package/alert/alert.component.d.ts +0 -150
  161. package/alert/alert.theme.d.ts +0 -39
  162. package/alert/alert.theme.service.d.ts +0 -19
  163. package/badge/badge.component.d.ts +0 -196
  164. package/badge/badge.theme.d.ts +0 -53
  165. package/badge/badge.theme.service.d.ts +0 -19
  166. package/base-component.directive.d.ts +0 -51
  167. package/breadcrumb/breadcrumb-item.component.d.ts +0 -84
  168. package/breadcrumb/breadcrumb-item.theme.d.ts +0 -33
  169. package/breadcrumb/breadcrumb-item.theme.service.d.ts +0 -19
  170. package/breadcrumb/breadcrumb.component.d.ts +0 -43
  171. package/breadcrumb/breadcrumb.theme.d.ts +0 -29
  172. package/breadcrumb/breadcrumb.theme.service.d.ts +0 -19
  173. package/button/button.component.d.ts +0 -250
  174. package/button/button.theme.d.ts +0 -79
  175. package/button/button.theme.service.d.ts +0 -19
  176. package/core/flowbite.theme.init.d.ts +0 -9
  177. package/core/index.d.ts +0 -1
  178. package/dark-theme-toggle/README.md +0 -4
  179. package/dark-theme-toggle/dark-theme-toggle.component.d.ts +0 -51
  180. package/dark-theme-toggle/dark-theme-toggle.theme.d.ts +0 -23
  181. package/dark-theme-toggle/dark-theme-toggle.theme.service.d.ts +0 -19
  182. package/dark-theme-toggle/index.d.ts +0 -3
  183. package/dropdown/README.md +0 -4
  184. package/dropdown/dropdown-divider.component.d.ts +0 -36
  185. package/dropdown/dropdown-divider.theme.d.ts +0 -23
  186. package/dropdown/dropdown-divider.theme.service.d.ts +0 -19
  187. package/dropdown/dropdown-header.component.d.ts +0 -42
  188. package/dropdown/dropdown-header.theme.d.ts +0 -28
  189. package/dropdown/dropdown-header.theme.service.d.ts +0 -19
  190. package/dropdown/dropdown-item.component.d.ts +0 -36
  191. package/dropdown/dropdown-item.theme.d.ts +0 -23
  192. package/dropdown/dropdown-item.theme.service.d.ts +0 -19
  193. package/dropdown/dropdown.component.d.ts +0 -136
  194. package/dropdown/dropdown.theme.d.ts +0 -56
  195. package/dropdown/dropdown.theme.service.d.ts +0 -19
  196. package/fesm2022/flowbite-angular-core.mjs +0 -322
  197. package/fesm2022/flowbite-angular-core.mjs.map +0 -1
  198. package/fesm2022/flowbite-angular-dark-theme-toggle.mjs +0 -139
  199. package/fesm2022/flowbite-angular-dark-theme-toggle.mjs.map +0 -1
  200. package/fesm2022/flowbite-angular-router-link-active.mjs +0 -68
  201. package/fesm2022/flowbite-angular-router-link-active.mjs.map +0 -1
  202. package/fesm2022/flowbite-angular-router-link.mjs +0 -73
  203. package/fesm2022/flowbite-angular-router-link.mjs.map +0 -1
  204. package/fesm2022/flowbite-angular-sanitize-html.mjs +0 -39
  205. package/fesm2022/flowbite-angular-sanitize-html.mjs.map +0 -1
  206. package/fesm2022/flowbite-angular-scroll-top.mjs +0 -193
  207. package/fesm2022/flowbite-angular-scroll-top.mjs.map +0 -1
  208. package/fesm2022/flowbite-angular-theme.mjs +0 -78
  209. package/fesm2022/flowbite-angular-theme.mjs.map +0 -1
  210. package/fesm2022/flowbite-angular-utils.mjs +0 -210
  211. package/fesm2022/flowbite-angular-utils.mjs.map +0 -1
  212. package/flowbite.theme.service.d.ts +0 -12
  213. package/icon/icon-registry.d.ts +0 -45
  214. package/icon/icon.component.d.ts +0 -22
  215. package/icon/trusted-types.d.ts +0 -15
  216. package/indicator/indicators.component.d.ts +0 -224
  217. package/indicator/indicators.theme.d.ts +0 -59
  218. package/indicator/indicators.theme.service.d.ts +0 -19
  219. package/modal/modal-body.component.d.ts +0 -36
  220. package/modal/modal-body.theme.d.ts +0 -23
  221. package/modal/modal-body.theme.service.d.ts +0 -19
  222. package/modal/modal-footer.component.d.ts +0 -36
  223. package/modal/modal-footer.theme.d.ts +0 -23
  224. package/modal/modal-footer.theme.service.d.ts +0 -19
  225. package/modal/modal-header.component.d.ts +0 -60
  226. package/modal/modal-header.theme.d.ts +0 -32
  227. package/modal/modal-header.theme.service.d.ts +0 -19
  228. package/modal/modal.component.d.ts +0 -146
  229. package/modal/modal.theme.d.ts +0 -35
  230. package/modal/modal.theme.service.d.ts +0 -19
  231. package/navbar/navbar-brand.component.d.ts +0 -36
  232. package/navbar/navbar-brand.theme.d.ts +0 -23
  233. package/navbar/navbar-brand.theme.service.d.ts +0 -19
  234. package/navbar/navbar-content.component.d.ts +0 -50
  235. package/navbar/navbar-content.theme.d.ts +0 -28
  236. package/navbar/navbar-content.theme.service.d.ts +0 -19
  237. package/navbar/navbar-icon-button.component.d.ts +0 -59
  238. package/navbar/navbar-icon-button.theme.d.ts +0 -26
  239. package/navbar/navbar-icon-button.theme.service.d.ts +0 -19
  240. package/navbar/navbar-item.component.d.ts +0 -67
  241. package/navbar/navbar-item.theme.d.ts +0 -26
  242. package/navbar/navbar-item.theme.service.d.ts +0 -19
  243. package/navbar/navbar-toggle.component.d.ts +0 -51
  244. package/navbar/navbar-toggle.theme.d.ts +0 -23
  245. package/navbar/navbar-toggle.theme.service.d.ts +0 -19
  246. package/navbar/navbar.component.d.ts +0 -121
  247. package/navbar/navbar.theme.d.ts +0 -21
  248. package/navbar/navbar.theme.service.d.ts +0 -19
  249. package/router-link/README.md +0 -4
  250. package/router-link/flowbite-router-link.directive.d.ts +0 -28
  251. package/router-link/index.d.ts +0 -1
  252. package/router-link-active/README.md +0 -4
  253. package/router-link-active/flowbite-router-link-active.directive.d.ts +0 -37
  254. package/router-link-active/index.d.ts +0 -1
  255. package/sanitize-html/README.md +0 -4
  256. package/sanitize-html/index.d.ts +0 -1
  257. package/sanitize-html/sanitize-html.pipe.d.ts +0 -20
  258. package/scroll-top/README.md +0 -4
  259. package/scroll-top/index.d.ts +0 -4
  260. package/scroll-top/scroll-top.component.d.ts +0 -114
  261. package/scroll-top/scroll-top.theme.d.ts +0 -39
  262. package/scroll-top/scroll-top.theme.service.d.ts +0 -19
  263. package/sidebar/sidebar-item-group.component.d.ts +0 -100
  264. package/sidebar/sidebar-item-group.theme.d.ts +0 -31
  265. package/sidebar/sidebar-item-group.theme.service.d.ts +0 -19
  266. package/sidebar/sidebar-item.component.d.ts +0 -101
  267. package/sidebar/sidebar-item.theme.d.ts +0 -33
  268. package/sidebar/sidebar-item.theme.service.d.ts +0 -19
  269. package/sidebar/sidebar-menu.component.d.ts +0 -93
  270. package/sidebar/sidebar-menu.theme.d.ts +0 -30
  271. package/sidebar/sidebar-menu.theme.service.d.ts +0 -19
  272. package/sidebar/sidebar-page-content.component.d.ts +0 -46
  273. package/sidebar/sidebar-page-content.theme.d.ts +0 -27
  274. package/sidebar/sidebar-page-content.theme.service.d.ts +0 -19
  275. package/sidebar/sidebar-toggle.component.d.ts +0 -95
  276. package/sidebar/sidebar-toggle.theme.d.ts +0 -34
  277. package/sidebar/sidebar-toggle.theme.service.d.ts +0 -19
  278. package/sidebar/sidebar.component.d.ts +0 -84
  279. package/sidebar/sidebar.theme.d.ts +0 -22
  280. package/sidebar/sidebar.theme.service.d.ts +0 -19
  281. package/tailwind.config.js +0 -303
  282. package/theme/README.md +0 -4
  283. package/theme/flowbite-theme.directive.d.ts +0 -36
  284. package/theme/index.d.ts +0 -1
  285. package/type-definitions/colors/flowbite.colors.d.ts +0 -19
  286. package/type-definitions/colors/flowbite.gradient-colors.d.ts +0 -11
  287. package/type-definitions/colors/flowbite.gradient-duo-tone-colors.d.ts +0 -12
  288. package/type-definitions/colors/index.d.ts +0 -3
  289. package/type-definitions/flowbite.boolean.d.ts +0 -14
  290. package/type-definitions/flowbite.class.d.ts +0 -6
  291. package/type-definitions/flowbite.combination.d.ts +0 -8
  292. package/type-definitions/flowbite.content-positions.d.ts +0 -6
  293. package/type-definitions/flowbite.deep-partial.d.ts +0 -6
  294. package/type-definitions/flowbite.heading-levels.d.ts +0 -4
  295. package/type-definitions/flowbite.positions.d.ts +0 -14
  296. package/type-definitions/flowbite.router-link-parameter.d.ts +0 -5
  297. package/type-definitions/flowbite.sizes.d.ts +0 -10
  298. package/type-definitions/flowbite.themes.d.ts +0 -4
  299. package/type-definitions/index.d.ts +0 -12
  300. package/utils/README.md +0 -4
  301. package/utils/icon.list.d.ts +0 -7
  302. package/utils/id.generator.d.ts +0 -59
  303. package/utils/index.d.ts +0 -8
  304. package/utils/theme/clone-deep.d.ts +0 -7
  305. package/utils/theme/create-class.d.ts +0 -7
  306. package/utils/theme/create-theme.d.ts +0 -7
  307. package/utils/theme/is-object.d.ts +0 -7
  308. package/utils/theme/merge-theme.d.ts +0 -8
  309. package/utils/theme/to-string.d.ts +0 -7
@@ -1,139 +0,0 @@
1
- import { mergeTheme, SUN_SVG_ICON, MOON_SVG_ICON, createTheme } from 'flowbite-angular/utils';
2
- import * as i0 from '@angular/core';
3
- import { InjectionToken, inject, Injectable, makeEnvironmentProviders, model, Component, ViewEncapsulation, ChangeDetectionStrategy } from '@angular/core';
4
- import { twMerge } from 'tailwind-merge';
5
- import { BaseComponent } from 'flowbite-angular';
6
- import { IconRegistry, IconComponent } from 'flowbite-angular/icon';
7
- import { FlowbiteThemeDirective } from 'flowbite-angular/theme';
8
- import { DomSanitizer } from '@angular/platform-browser';
9
-
10
- /**
11
- * `InjectionToken` used to import `DarkThemeToggleTheme` value
12
- *
13
- * @example
14
- * ```
15
- * var theme = inject(FLOWBITE_DARK_THEME_TOGGLE_THEME_TOKEN)
16
- * ```
17
- */
18
- const FLOWBITE_DARK_THEME_TOGGLE_THEME_TOKEN = new InjectionToken('FLOWBITE_DARK_THEME_TOGGLE_THEME_TOKEN');
19
- class DarkThemeToggleThemeService {
20
- constructor() {
21
- this.baseTheme = inject(FLOWBITE_DARK_THEME_TOGGLE_THEME_TOKEN);
22
- }
23
- getClasses(properties) {
24
- const theme = mergeTheme(this.baseTheme, properties.customStyle);
25
- const output = {
26
- rootClass: twMerge(theme.root.base),
27
- };
28
- return output;
29
- }
30
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: DarkThemeToggleThemeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
31
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: DarkThemeToggleThemeService, providedIn: 'root' }); }
32
- }
33
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: DarkThemeToggleThemeService, decorators: [{
34
- type: Injectable,
35
- args: [{
36
- providedIn: 'root',
37
- }]
38
- }] });
39
-
40
- const FLOWBITE_DARK_THEME_TOGGLE_CUSTOM_STYLE_DEFAULT_VALUE = new InjectionToken('FLOWBITE_DARK_THEME_TOGGLE_CUSTOM_STYLE_DEFAULT_VALUE');
41
- const darkThemeToggleDefaultValueProvider = makeEnvironmentProviders([
42
- {
43
- provide: FLOWBITE_DARK_THEME_TOGGLE_CUSTOM_STYLE_DEFAULT_VALUE,
44
- useValue: {},
45
- },
46
- ]);
47
- /**
48
- * Use to toggle light/dark mode accross the site
49
- */
50
- class DarkThemeToggleComponent extends BaseComponent {
51
- constructor() {
52
- super(...arguments);
53
- /**
54
- * Service injected used to generate class
55
- */
56
- this.themeService = inject(DarkThemeToggleThemeService);
57
- /**
58
- * `IconRegistry` service
59
- */
60
- this.iconRegistry = inject(IconRegistry);
61
- /**
62
- * `DomSanitizer` service
63
- */
64
- this.domSanitizer = inject(DomSanitizer);
65
- /**
66
- * `FlowbiteThemeDirective` directive
67
- */
68
- this.themeDirective = inject(FlowbiteThemeDirective);
69
- //#region properties
70
- /**
71
- * Set the custom style for this dark-theme-toggle
72
- */
73
- this.customStyle = model(inject(FLOWBITE_DARK_THEME_TOGGLE_CUSTOM_STYLE_DEFAULT_VALUE));
74
- }
75
- //#endregion
76
- //#region BaseComponent implementation
77
- fetchClass() {
78
- return this.themeService.getClasses({
79
- customStyle: this.customStyle(),
80
- });
81
- }
82
- init() {
83
- this.iconRegistry.addRawSvgIconInNamepsace('flowbite-angular', 'sun', this.domSanitizer.bypassSecurityTrustHtml(SUN_SVG_ICON));
84
- this.iconRegistry.addRawSvgIconInNamepsace('flowbite-angular', 'moon', this.domSanitizer.bypassSecurityTrustHtml(MOON_SVG_ICON));
85
- }
86
- //#endregion
87
- /**
88
- * Toggle between dark and light mode
89
- */
90
- onClick() {
91
- this.themeDirective.toggleTheme();
92
- }
93
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: DarkThemeToggleComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
94
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.0.4", 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: `
95
- <flowbite-icon
96
- svgIcon="flowbite-angular:moon"
97
- class="h-5 w-5 block dark:hidden" />
98
- <flowbite-icon
99
- svgIcon="flowbite-angular:sun"
100
- class="h-5 w-5 hidden dark:block" />
101
- `, isInline: true, dependencies: [{ kind: "component", type: IconComponent, selector: "flowbite-icon", inputs: ["svgIcon"], outputs: ["svgIconChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
102
- }
103
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: DarkThemeToggleComponent, decorators: [{
104
- type: Component,
105
- args: [{
106
- standalone: true,
107
- imports: [IconComponent],
108
- selector: 'flowbite-dark-theme-toggle',
109
- template: `
110
- <flowbite-icon
111
- svgIcon="flowbite-angular:moon"
112
- class="h-5 w-5 block dark:hidden" />
113
- <flowbite-icon
114
- svgIcon="flowbite-angular:sun"
115
- class="h-5 w-5 hidden dark:block" />
116
- `,
117
- host: {
118
- '(click)': 'onClick()',
119
- },
120
- encapsulation: ViewEncapsulation.None,
121
- changeDetection: ChangeDetectionStrategy.OnPush,
122
- }]
123
- }] });
124
-
125
- /**
126
- * Default theme for `DarkThemeToggleComponent`
127
- */
128
- const darkThemeToggleTheme = createTheme({
129
- root: {
130
- 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',
131
- },
132
- });
133
-
134
- /**
135
- * Generated bundle index. Do not edit.
136
- */
137
-
138
- export { DarkThemeToggleComponent, DarkThemeToggleThemeService, FLOWBITE_DARK_THEME_TOGGLE_CUSTOM_STYLE_DEFAULT_VALUE, FLOWBITE_DARK_THEME_TOGGLE_THEME_TOKEN, darkThemeToggleDefaultValueProvider, darkThemeToggleTheme };
139
- //# sourceMappingURL=flowbite-angular-dark-theme-toggle.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"flowbite-angular-dark-theme-toggle.mjs","sources":["../../../../libs/flowbite-angular/dark-theme-toggle/dark-theme-toggle.theme.service.ts","../../../../libs/flowbite-angular/dark-theme-toggle/dark-theme-toggle.component.ts","../../../../libs/flowbite-angular/dark-theme-toggle/dark-theme-toggle.theme.ts","../../../../libs/flowbite-angular/dark-theme-toggle/flowbite-angular-dark-theme-toggle.ts"],"sourcesContent":["import type {\n DarkThemeToggleClass,\n DarkThemeToggleProperties,\n DarkThemeToggleTheme,\n} from './dark-theme-toggle.theme';\n\nimport type { FlowbiteThemeService } from 'flowbite-angular';\nimport { mergeTheme } from 'flowbite-angular/utils';\n\nimport { inject, Injectable, InjectionToken } from '@angular/core';\nimport { twMerge } from 'tailwind-merge';\n\n/**\n * `InjectionToken` used to import `DarkThemeToggleTheme` value\n *\n * @example\n * ```\n * var theme = inject(FLOWBITE_DARK_THEME_TOGGLE_THEME_TOKEN)\n * ```\n */\nexport const FLOWBITE_DARK_THEME_TOGGLE_THEME_TOKEN = new InjectionToken<DarkThemeToggleTheme>(\n 'FLOWBITE_DARK_THEME_TOGGLE_THEME_TOKEN'\n);\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DarkThemeToggleThemeService\n implements FlowbiteThemeService<DarkThemeToggleProperties>\n{\n private readonly baseTheme = inject(FLOWBITE_DARK_THEME_TOGGLE_THEME_TOKEN);\n\n public getClasses(properties: DarkThemeToggleProperties): DarkThemeToggleClass {\n const theme: DarkThemeToggleTheme = mergeTheme(this.baseTheme, properties.customStyle);\n\n const output: DarkThemeToggleClass = {\n rootClass: twMerge(theme.root.base),\n };\n\n return output;\n }\n}\n","import type { DarkThemeToggleClass, DarkThemeToggleTheme } from './dark-theme-toggle.theme';\nimport { DarkThemeToggleThemeService } from './dark-theme-toggle.theme.service';\n\nimport type { DeepPartial } from 'flowbite-angular';\nimport { BaseComponent } from 'flowbite-angular';\nimport { IconComponent, IconRegistry } from 'flowbite-angular/icon';\nimport { FlowbiteThemeDirective } from 'flowbite-angular/theme';\nimport { MOON_SVG_ICON, SUN_SVG_ICON } from 'flowbite-angular/utils';\n\nimport {\n ChangeDetectionStrategy,\n Component,\n inject,\n InjectionToken,\n makeEnvironmentProviders,\n model,\n ViewEncapsulation,\n} from '@angular/core';\nimport { DomSanitizer } from '@angular/platform-browser';\n\nexport const FLOWBITE_DARK_THEME_TOGGLE_CUSTOM_STYLE_DEFAULT_VALUE = new InjectionToken<\n DeepPartial<DarkThemeToggleTheme>\n>('FLOWBITE_DARK_THEME_TOGGLE_CUSTOM_STYLE_DEFAULT_VALUE');\n\nexport const darkThemeToggleDefaultValueProvider = makeEnvironmentProviders([\n {\n provide: FLOWBITE_DARK_THEME_TOGGLE_CUSTOM_STYLE_DEFAULT_VALUE,\n useValue: {},\n },\n]);\n\n/**\n * Use to toggle light/dark mode accross the site\n */\n@Component({\n standalone: true,\n imports: [IconComponent],\n selector: 'flowbite-dark-theme-toggle',\n template: `\n <flowbite-icon\n svgIcon=\"flowbite-angular:moon\"\n class=\"h-5 w-5 block dark:hidden\" />\n <flowbite-icon\n svgIcon=\"flowbite-angular:sun\"\n class=\"h-5 w-5 hidden dark:block\" />\n `,\n host: {\n '(click)': 'onClick()',\n },\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DarkThemeToggleComponent extends BaseComponent<DarkThemeToggleClass> {\n /**\n * Service injected used to generate class\n */\n public readonly themeService = inject(DarkThemeToggleThemeService);\n /**\n * `IconRegistry` service\n */\n public readonly iconRegistry = inject(IconRegistry);\n /**\n * `DomSanitizer` service\n */\n public readonly domSanitizer = inject(DomSanitizer);\n /**\n * `FlowbiteThemeDirective` directive\n */\n public readonly themeDirective = inject(FlowbiteThemeDirective);\n\n //#region properties\n /**\n * Set the custom style for this dark-theme-toggle\n */\n public customStyle = model(inject(FLOWBITE_DARK_THEME_TOGGLE_CUSTOM_STYLE_DEFAULT_VALUE));\n //#endregion\n\n //#region BaseComponent implementation\n public override fetchClass(): DarkThemeToggleClass {\n return this.themeService.getClasses({\n customStyle: this.customStyle(),\n });\n }\n\n public override init(): void {\n this.iconRegistry.addRawSvgIconInNamepsace(\n 'flowbite-angular',\n 'sun',\n this.domSanitizer.bypassSecurityTrustHtml(SUN_SVG_ICON)\n );\n this.iconRegistry.addRawSvgIconInNamepsace(\n 'flowbite-angular',\n 'moon',\n this.domSanitizer.bypassSecurityTrustHtml(MOON_SVG_ICON)\n );\n }\n //#endregion\n\n /**\n * Toggle between dark and light mode\n */\n public onClick() {\n this.themeDirective.toggleTheme();\n }\n}\n","import type { DeepPartial, FlowbiteClass } from 'flowbite-angular';\nimport { createTheme } from 'flowbite-angular/utils';\n\n/**\n * Required properties for the class generation of `DarkThemeToggleComponent`\n */\nexport interface DarkThemeToggleProperties {\n customStyle: DeepPartial<DarkThemeToggleTheme>;\n}\n\n/**\n * Theme definition for `DarkThemeToggleComponent`\n */\nexport interface DarkThemeToggleTheme {\n root: {\n base: string;\n };\n}\n\n/**\n * Default theme for `DarkThemeToggleComponent`\n */\nexport const darkThemeToggleTheme: DarkThemeToggleTheme = createTheme({\n root: {\n 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',\n },\n});\n\n/**\n * Generated class definition for `DarkThemeToggleComponent`\n */\nexport type DarkThemeToggleClass = FlowbiteClass;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAYA;;;;;;;AAOG;MACU,sCAAsC,GAAG,IAAI,cAAc,CACtE,wCAAwC;MAM7B,2BAA2B,CAAA;AAHxC,IAAA,WAAA,GAAA;AAMmB,QAAA,IAAA,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A,EAAA,EAAA,OAAA,EAAA,WAAA,EAAA,EAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA;;;;;;;AAOT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EATS,aAAa,EAAA,QAAA,EAAA,eAAA,EAAA,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA,OAAA,EAAA,CAAA,eAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FAgBZ,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAlBpC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,UAAU,EAAE,IAAI;oBAChB,OAAO,EAAE,CAAC,aAAa,CAAC;AACxB,oBAAA,QAAQ,EAAE,4BAA4B;AACtC,oBAAA,QAAQ,EAAE;;;;;;;AAOT,EAAA,CAAA;AACD,oBAAA,IAAI,EAAE;AACJ,wBAAA,SAAS,EAAE,WAAW;AACvB,qBAAA;oBACD,aAAa,EAAE,iBAAiB,CAAC,IAAI;oBACrC,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAChD,iBAAA;;;AChCD;;AAEG;AACI,MAAM,oBAAoB,GAAyB,WAAW,CAAC;AACpE,IAAA,IAAI,EAAE;AACJ,QAAA,IAAI,EAAE,gMAAgM;AACvM,KAAA;AACF,CAAA;;AC1BD;;AAEG;;;;"}
@@ -1,68 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { inject, signal, Directive } from '@angular/core';
3
- import * as i1 from '@angular/router';
4
- import { RouterLinkActive } from '@angular/router';
5
-
6
- /**
7
- * Wrapping directive over RouterLinkActive.
8
- *
9
- * @usageNotes
10
- * It provides a clean way to have 'isActive' data with signal base value.
11
- *
12
- * @see `RouterLinkActive`
13
- */
14
- class FlowbiteRouterLinkActiveDirective {
15
- /**
16
- * Getter for _isActive
17
- */
18
- get isActive() {
19
- return this._isActive.asReadonly();
20
- }
21
- /**
22
- * Set the RouterLinkActive's ariaCurrentWhenActive to the value passed to the component (via this Directive).
23
- */
24
- constructor() {
25
- this.ariaCurrentValue = true;
26
- /**
27
- * `RouterLinkActive` directive
28
- */
29
- this.routerLinkActive = inject(RouterLinkActive);
30
- /**
31
- * Updated value when the user is on the same page as routerLinkActive value
32
- */
33
- this._isActive = signal(this.routerLinkActive.isActive);
34
- this.routerLinkActive.ariaCurrentWhenActive = this.ariaCurrentValue;
35
- }
36
- /**
37
- * Update _isActive when `RouterLinkActive`'s isActive update
38
- */
39
- onIsActiveChange() {
40
- this._isActive.set(this.routerLinkActive.isActive);
41
- }
42
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: FlowbiteRouterLinkActiveDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
43
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.4", 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 }); }
44
- }
45
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: FlowbiteRouterLinkActiveDirective, decorators: [{
46
- type: Directive,
47
- args: [{
48
- standalone: true,
49
- selector: '[flowbiteRouterLinkActive]',
50
- host: {
51
- isActiveChange: 'onIsActiveChange',
52
- },
53
- hostDirectives: [
54
- {
55
- directive: RouterLinkActive,
56
- inputs: ['routerLinkActiveOptions', 'ariaCurrentWhenActive', 'routerLinkActive'],
57
- outputs: ['isActiveChange'],
58
- },
59
- ],
60
- }]
61
- }], ctorParameters: () => [] });
62
-
63
- /**
64
- * Generated bundle index. Do not edit.
65
- */
66
-
67
- export { FlowbiteRouterLinkActiveDirective };
68
- //# sourceMappingURL=flowbite-angular-router-link-active.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"flowbite-angular-router-link-active.mjs","sources":["../../../../libs/flowbite-angular/router-link-active/flowbite-router-link-active.directive.ts","../../../../libs/flowbite-angular/router-link-active/flowbite-angular-router-link-active.ts"],"sourcesContent":["import type { Signal } from '@angular/core';\nimport { Directive, inject, signal } from '@angular/core';\nimport { RouterLinkActive } from '@angular/router';\n\n/**\n * Wrapping directive over RouterLinkActive.\n *\n * @usageNotes\n * It provides a clean way to have 'isActive' data with signal base value.\n *\n * @see `RouterLinkActive`\n */\n@Directive({\n standalone: true,\n selector: '[flowbiteRouterLinkActive]',\n host: {\n isActiveChange: 'onIsActiveChange',\n },\n hostDirectives: [\n {\n directive: RouterLinkActive,\n inputs: ['routerLinkActiveOptions', 'ariaCurrentWhenActive', 'routerLinkActive'],\n outputs: ['isActiveChange'],\n },\n ],\n})\nexport class FlowbiteRouterLinkActiveDirective {\n private readonly ariaCurrentValue: boolean = true;\n\n /**\n * `RouterLinkActive` directive\n */\n public routerLinkActive = inject(RouterLinkActive);\n\n /**\n * Updated value when the user is on the same page as routerLinkActive value\n */\n private _isActive = signal<boolean>(this.routerLinkActive.isActive);\n\n /**\n * Getter for _isActive\n */\n public get isActive(): Signal<boolean> {\n return this._isActive.asReadonly();\n }\n\n /**\n * Set the RouterLinkActive's ariaCurrentWhenActive to the value passed to the component (via this Directive).\n */\n constructor() {\n this.routerLinkActive.ariaCurrentWhenActive = this.ariaCurrentValue;\n }\n\n /**\n * Update _isActive when `RouterLinkActive`'s isActive update\n */\n public onIsActiveChange(): void {\n this._isActive.set(this.routerLinkActive.isActive);\n }\n}\n","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AAA,CAAA;AACT,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,4BAA4B;AACtC,oBAAA,IAAI,EAAE;AACJ,wBAAA,cAAc,EAAE,kBAAkB;AACnC,qBAAA;AACD,oBAAA,cAAc,EAAE;AACd,wBAAA;AACE,4BAAA,SAAS,EAAE,gBAAgB;AAC3B,4BAAA,MAAM,EAAE,CAAC,yBAAyB,EAAE,uBAAuB,EAAE,kBAAkB,CAAC;4BAChF,OAAO,EAAE,CAAC,gBAAgB,CAAC;AAC5B,yBAAA;AACF,qBAAA;AACF,iBAAA;;;ACzBD;;AAEG;;;;"}
@@ -1,73 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { inject, model, Directive } from '@angular/core';
3
- import * as i1 from '@angular/router';
4
- import { Router, RouterLink } from '@angular/router';
5
-
6
- /**
7
- * Wrapping directive over RouterLink.
8
- *
9
- * @see `RouterLink`
10
- */
11
- class FlowbiteRouterLinkDirective {
12
- constructor() {
13
- /**
14
- * `Router` service
15
- */
16
- this.router = inject(Router);
17
- /**
18
- * `RouterLink` directive
19
- */
20
- this.routerLink = inject(RouterLink);
21
- /**
22
- * @todo Verify utility
23
- */
24
- this.href = model();
25
- }
26
- /**
27
- * @todo Verify utility
28
- */
29
- onClick() {
30
- const hrefValue = this.href();
31
- if (hrefValue) {
32
- this.router.navigateByUrl(hrefValue);
33
- }
34
- }
35
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: FlowbiteRouterLinkDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
36
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.4", 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 }); }
37
- }
38
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: FlowbiteRouterLinkDirective, decorators: [{
39
- type: Directive,
40
- args: [{
41
- standalone: true,
42
- selector: '[flowbiteRouterLink]',
43
- host: {
44
- '(click)': 'onClick()',
45
- },
46
- hostDirectives: [
47
- {
48
- directive: RouterLink,
49
- inputs: [
50
- 'target',
51
- 'queryParams',
52
- 'fragment',
53
- 'queryParamsHandling',
54
- 'state',
55
- 'info',
56
- 'relativeTo',
57
- 'preserveFragment',
58
- 'skipLocationChange',
59
- 'replaceUrl',
60
- 'routerLink',
61
- ],
62
- outputs: [],
63
- },
64
- ],
65
- }]
66
- }] });
67
-
68
- /**
69
- * Generated bundle index. Do not edit.
70
- */
71
-
72
- export { FlowbiteRouterLinkDirective };
73
- //# sourceMappingURL=flowbite-angular-router-link.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"flowbite-angular-router-link.mjs","sources":["../../../../libs/flowbite-angular/router-link/flowbite-router-link.directive.ts","../../../../libs/flowbite-angular/router-link/flowbite-angular-router-link.ts"],"sourcesContent":["import { Directive, inject, model } from '@angular/core';\nimport { Router, RouterLink } from '@angular/router';\n\n/**\n * Wrapping directive over RouterLink.\n *\n * @see `RouterLink`\n */\n@Directive({\n standalone: true,\n selector: '[flowbiteRouterLink]',\n host: {\n '(click)': 'onClick()',\n },\n hostDirectives: [\n {\n directive: RouterLink,\n inputs: [\n 'target',\n 'queryParams',\n 'fragment',\n 'queryParamsHandling',\n 'state',\n 'info',\n 'relativeTo',\n 'preserveFragment',\n 'skipLocationChange',\n 'replaceUrl',\n 'routerLink',\n ],\n outputs: [],\n },\n ],\n})\nexport class FlowbiteRouterLinkDirective {\n /**\n * `Router` service\n */\n public readonly router = inject(Router);\n /**\n * `RouterLink` directive\n */\n public readonly routerLink = inject(RouterLink);\n\n /**\n * @todo Verify utility\n */\n public href = model<string>();\n\n /**\n * @todo Verify utility\n */\n onClick() {\n const hrefValue = this.href();\n\n if (hrefValue) {\n this.router.navigateByUrl(hrefValue);\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAGA;;;;AAIG;MA2BU,2BAA2B,CAAA;AA1BxC,IAAA,WAAA,GAAA;AA2BE;;AAEG;AACa,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AACvC;;AAEG;AACa,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAE/C;;AAEG;QACI,IAAI,CAAA,IAAA,GAAG,KAAK,EAAU;AAY9B;AAVC;;AAEG;IACH,OAAO,GAAA;AACL,QAAA,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,EAAE;QAE7B,IAAI,SAAS,EAAE;AACb,YAAA,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,SAAS,CAAC;;;8GAtB7B,2BAA2B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAA3B,2BAA2B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,sBAAA,EAAA,MAAA,EAAA,EAAA,IAAA,EAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,IAAA,EAAA,YAAA,EAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,OAAA,EAAA,WAAA,EAAA,EAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAA,EAAA,CAAA,UAAA,EAAA,MAAA,EAAA,CAAA,QAAA,EAAA,QAAA,EAAA,aAAA,EAAA,aAAA,EAAA,UAAA,EAAA,UAAA,EAAA,qBAAA,EAAA,qBAAA,EAAA,OAAA,EAAA,OAAA,EAAA,MAAA,EAAA,MAAA,EAAA,YAAA,EAAA,YAAA,EAAA,kBAAA,EAAA,kBAAA,EAAA,oBAAA,EAAA,oBAAA,EAAA,YAAA,EAAA,YAAA,EAAA,YAAA,EAAA,YAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAA3B,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBA1BvC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,sBAAsB;AAChC,oBAAA,IAAI,EAAE;AACJ,wBAAA,SAAS,EAAE,WAAW;AACvB,qBAAA;AACD,oBAAA,cAAc,EAAE;AACd,wBAAA;AACE,4BAAA,SAAS,EAAE,UAAU;AACrB,4BAAA,MAAM,EAAE;gCACN,QAAQ;gCACR,aAAa;gCACb,UAAU;gCACV,qBAAqB;gCACrB,OAAO;gCACP,MAAM;gCACN,YAAY;gCACZ,kBAAkB;gCAClB,oBAAoB;gCACpB,YAAY;gCACZ,YAAY;AACb,6BAAA;AACD,4BAAA,OAAO,EAAE,EAAE;AACZ,yBAAA;AACF,qBAAA;AACF,iBAAA;;;ACjCD;;AAEG;;;;"}
@@ -1,39 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { inject, Pipe } from '@angular/core';
3
- import { DomSanitizer } from '@angular/platform-browser';
4
-
5
- /**
6
- * Sanitize a string as trusted HTML.
7
- *
8
- * @see `DomSanitizer`
9
- */
10
- class SanitizeHtmlPipe {
11
- constructor() {
12
- this._sanitizer = inject(DomSanitizer);
13
- }
14
- /**
15
- * Return the result of `bypassSecurityTrustHtml` function of DomSanitizer for the parameter.
16
- *
17
- * @param v The string to be transformed.
18
- * @returns The SafeHtml from the DomSanitizer.
19
- */
20
- transform(v) {
21
- return this._sanitizer.bypassSecurityTrustHtml(v);
22
- }
23
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: SanitizeHtmlPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
24
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.4", ngImport: i0, type: SanitizeHtmlPipe, isStandalone: true, name: "sanitizeHtml" }); }
25
- }
26
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: SanitizeHtmlPipe, decorators: [{
27
- type: Pipe,
28
- args: [{
29
- standalone: true,
30
- name: 'sanitizeHtml',
31
- }]
32
- }] });
33
-
34
- /**
35
- * Generated bundle index. Do not edit.
36
- */
37
-
38
- export { SanitizeHtmlPipe };
39
- //# sourceMappingURL=flowbite-angular-sanitize-html.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"flowbite-angular-sanitize-html.mjs","sources":["../../../../libs/flowbite-angular/sanitize-html/sanitize-html.pipe.ts","../../../../libs/flowbite-angular/sanitize-html/flowbite-angular-sanitize-html.ts"],"sourcesContent":["import type { PipeTransform } from '@angular/core';\nimport { inject, Pipe } from '@angular/core';\nimport type { SafeHtml } from '@angular/platform-browser';\nimport { DomSanitizer } from '@angular/platform-browser';\n\n/**\n * Sanitize a string as trusted HTML.\n *\n * @see `DomSanitizer`\n */\n@Pipe({\n standalone: true,\n name: 'sanitizeHtml',\n})\nexport class SanitizeHtmlPipe implements PipeTransform {\n private _sanitizer = inject(DomSanitizer);\n\n /**\n * Return the result of `bypassSecurityTrustHtml` function of DomSanitizer for the parameter.\n *\n * @param v The string to be transformed.\n * @returns The SafeHtml from the DomSanitizer.\n */\n transform(v: string): SafeHtml {\n return this._sanitizer.bypassSecurityTrustHtml(v);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAKA;;;;AAIG;MAKU,gBAAgB,CAAA;AAJ7B,IAAA,WAAA,GAAA;AAKU,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,YAAY,CAAC;AAW1C;AATC;;;;;AAKG;AACH,IAAA,SAAS,CAAC,CAAS,EAAA;QACjB,OAAO,IAAI,CAAC,UAAU,CAAC,uBAAuB,CAAC,CAAC,CAAC;;8GAVxC,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;4GAAhB,gBAAgB,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,cAAA,EAAA,CAAA,CAAA;;2FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAJ5B,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACJ,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,IAAI,EAAE,cAAc;AACrB,iBAAA;;;ACbD;;AAEG;;;;"}
@@ -1,193 +0,0 @@
1
- import { mergeTheme, CHEVRON_UP_SVG_ICON, createTheme } from 'flowbite-angular/utils';
2
- import * as i0 from '@angular/core';
3
- import { InjectionToken, inject, Injectable, makeEnvironmentProviders, model, Component, ViewEncapsulation, ChangeDetectionStrategy } from '@angular/core';
4
- import { twMerge } from 'tailwind-merge';
5
- import { BaseComponent } from 'flowbite-angular';
6
- import { IconRegistry, IconComponent } from 'flowbite-angular/icon';
7
- import { NgTemplateOutlet } from '@angular/common';
8
- import { DomSanitizer } from '@angular/platform-browser';
9
-
10
- /**
11
- * `InjectionToken` used to import `ScrollTopTheme` value
12
- *
13
- * @example
14
- * ```
15
- * var theme = inject(FLOWBITE_SCROLL_TOP_THEME_TOKEN)
16
- * ```
17
- */
18
- const FLOWBITE_SCROLL_TOP_THEME_TOKEN = new InjectionToken('FLOWBITE_SCROLL_TOP_THEME_TOKEN');
19
- class ScrollTopThemeService {
20
- constructor() {
21
- this.baseTheme = inject(FLOWBITE_SCROLL_TOP_THEME_TOKEN);
22
- }
23
- getClasses(properties) {
24
- const theme = mergeTheme(this.baseTheme, properties.customStyle);
25
- const output = {
26
- rootClass: twMerge(theme.root.base, theme.root.color[properties.color], theme.root.position[properties.position]),
27
- };
28
- return output;
29
- }
30
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: ScrollTopThemeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
31
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: ScrollTopThemeService, providedIn: 'root' }); }
32
- }
33
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: ScrollTopThemeService, decorators: [{
34
- type: Injectable,
35
- args: [{
36
- providedIn: 'root',
37
- }]
38
- }] });
39
-
40
- const FLOWBITE_SCROLL_TOP_COLOR_DEFAULT_VALUE = new InjectionToken('FLOWBITE_SCROLL_TOP_COLOR_DEFAULT_VALUE');
41
- const FLOWBITE_SCROLL_TOP_POSITION_DEFAULT_VALUE = new InjectionToken('FLOWBITE_SCROLL_TOP_POSITION_DEFAULT_VALUE');
42
- const FLOWBITE_SCROLL_TOP_ICON_DEFAULT_VALUE = new InjectionToken('FLOWBITE_SCROLL_TOP_ICON_DEFAULT_VALUE');
43
- const FLOWBITE_SCROLL_TOP_CUSTOM_STYLE_DEFAULT_VALUE = new InjectionToken('FLOWBITE_SCROLL_TOP_CUSTOM_STYLE_DEFAULT_VALUE');
44
- const scrollTopDefaultValueProvider = makeEnvironmentProviders([
45
- {
46
- provide: FLOWBITE_SCROLL_TOP_COLOR_DEFAULT_VALUE,
47
- useValue: 'primary',
48
- },
49
- {
50
- provide: FLOWBITE_SCROLL_TOP_POSITION_DEFAULT_VALUE,
51
- useValue: 'bottom-right',
52
- },
53
- {
54
- provide: FLOWBITE_SCROLL_TOP_ICON_DEFAULT_VALUE,
55
- useValue: undefined,
56
- },
57
- {
58
- provide: FLOWBITE_SCROLL_TOP_CUSTOM_STYLE_DEFAULT_VALUE,
59
- useValue: {},
60
- },
61
- ]);
62
- /**
63
- * Provide a way to go at the top of the page via a button
64
- */
65
- class ScrollTopComponent extends BaseComponent {
66
- constructor() {
67
- super(...arguments);
68
- /**
69
- * Service injected used to generate class
70
- */
71
- this.themeService = inject(ScrollTopThemeService);
72
- /**
73
- * `IconRegistry` service
74
- */
75
- this.iconRegistry = inject(IconRegistry);
76
- /**
77
- * `DomSanitizer` service
78
- */
79
- this.domSanitizer = inject(DomSanitizer);
80
- //#region properties
81
- /**
82
- * Set the scroll top color
83
- *
84
- * @default primary
85
- */
86
- this.color = model(inject(FLOWBITE_SCROLL_TOP_COLOR_DEFAULT_VALUE));
87
- /**
88
- * Set the scroll top position
89
- *
90
- * @default bottom-right
91
- */
92
- this.position = model(inject(FLOWBITE_SCROLL_TOP_POSITION_DEFAULT_VALUE));
93
- /**
94
- * Set the scroll top icon
95
- *
96
- * @default undefined
97
- */
98
- this.icon = model(inject(FLOWBITE_SCROLL_TOP_ICON_DEFAULT_VALUE));
99
- /**
100
- * Set the custom style for this scroll top
101
- *
102
- * @default {}
103
- */
104
- this.customStyle = model(inject(FLOWBITE_SCROLL_TOP_CUSTOM_STYLE_DEFAULT_VALUE));
105
- }
106
- //#endregion
107
- //#region BaseComponent implemenation
108
- fetchClass() {
109
- return this.themeService.getClasses({
110
- color: this.color(),
111
- position: this.position(),
112
- customStyle: this.customStyle(),
113
- });
114
- }
115
- init() {
116
- this.iconRegistry.addRawSvgIconInNamepsace('flowbite-angular', 'chevron-up', this.domSanitizer.bypassSecurityTrustHtml(CHEVRON_UP_SVG_ICON));
117
- }
118
- //#endregion
119
- /**
120
- * Navigate to the top of the page
121
- */
122
- onClick() {
123
- window.scrollTo(window.scrollX, 0);
124
- }
125
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: ScrollTopComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
126
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.4", 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 }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, customStyle: { classPropertyName: "customStyle", publicName: "customStyle", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { color: "colorChange", position: "positionChange", icon: "iconChange", customStyle: "customStyleChange" }, host: { listeners: { "click": "onClick()" } }, usesInheritance: true, ngImport: i0, template: `
127
- @if (icon()) {
128
- <ng-container [ngTemplateOutlet]="icon()!" />
129
- } @else {
130
- <flowbite-icon
131
- svgIcon="flowbite-angular:chevron-up"
132
- class="w-5 h-5" />
133
- }
134
- `, isInline: true, dependencies: [{ kind: "component", type: IconComponent, selector: "flowbite-icon", inputs: ["svgIcon"], outputs: ["svgIconChange"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
135
- }
136
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: ScrollTopComponent, decorators: [{
137
- type: Component,
138
- args: [{
139
- standalone: true,
140
- selector: 'flowbite-scroll-top',
141
- imports: [IconComponent, NgTemplateOutlet],
142
- template: `
143
- @if (icon()) {
144
- <ng-container [ngTemplateOutlet]="icon()!" />
145
- } @else {
146
- <flowbite-icon
147
- svgIcon="flowbite-angular:chevron-up"
148
- class="w-5 h-5" />
149
- }
150
- `,
151
- host: {
152
- '(click)': 'onClick()',
153
- },
154
- encapsulation: ViewEncapsulation.None,
155
- changeDetection: ChangeDetectionStrategy.OnPush,
156
- }]
157
- }] });
158
-
159
- /**
160
- * Default theme for `ScrollTopComponent`
161
- */
162
- const scrollTopTheme = createTheme({
163
- root: {
164
- base: 'cursor-pointer fixed flex flex-row place-items-center p-2 rounded-lg',
165
- color: {
166
- primary: 'bg-primary-100',
167
- dark: 'bg-gray-100 dark:bg-gray-800 dark:text-white',
168
- blue: 'bg-blue-100',
169
- gray: 'bg-gray-100',
170
- green: 'bg-green-100',
171
- lime: 'bg-lime-100',
172
- purple: 'bg-purple-100',
173
- red: 'bg-red-100',
174
- },
175
- position: {
176
- 'bottom-center': 'bottom-3 left-1/2 right-1/2',
177
- 'bottom-left': 'bottom-3 left-3',
178
- 'bottom-right': 'bottom-3 right-3',
179
- 'center-left': 'left-3 top-1/2 bottom-1/2',
180
- 'center-right': 'right-3 top-1/2 bottom-1/2',
181
- 'top-center': 'top-3 left-1/2 right-1/2',
182
- 'top-left': 'top-3 left-3',
183
- 'top-right': 'top-3 right-3',
184
- },
185
- },
186
- });
187
-
188
- /**
189
- * Generated bundle index. Do not edit.
190
- */
191
-
192
- export { FLOWBITE_SCROLL_TOP_COLOR_DEFAULT_VALUE, FLOWBITE_SCROLL_TOP_CUSTOM_STYLE_DEFAULT_VALUE, FLOWBITE_SCROLL_TOP_POSITION_DEFAULT_VALUE, FLOWBITE_SCROLL_TOP_THEME_TOKEN, ScrollTopComponent, ScrollTopThemeService, scrollTopDefaultValueProvider, scrollTopTheme };
193
- //# sourceMappingURL=flowbite-angular-scroll-top.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"flowbite-angular-scroll-top.mjs","sources":["../../../../libs/flowbite-angular/scroll-top/scroll-top.theme.service.ts","../../../../libs/flowbite-angular/scroll-top/scroll-top.component.ts","../../../../libs/flowbite-angular/scroll-top/scroll-top.theme.ts","../../../../libs/flowbite-angular/scroll-top/flowbite-angular-scroll-top.ts"],"sourcesContent":["import type { ScrollTopClass, ScrollTopProperties, ScrollTopTheme } from './scroll-top.theme';\n\nimport type { FlowbiteThemeService } from 'flowbite-angular';\nimport { mergeTheme } from 'flowbite-angular/utils';\n\nimport { inject, Injectable, InjectionToken } from '@angular/core';\nimport { twMerge } from 'tailwind-merge';\n\n/**\n * `InjectionToken` used to import `ScrollTopTheme` value\n *\n * @example\n * ```\n * var theme = inject(FLOWBITE_SCROLL_TOP_THEME_TOKEN)\n * ```\n */\nexport const FLOWBITE_SCROLL_TOP_THEME_TOKEN = new InjectionToken<ScrollTopTheme>(\n 'FLOWBITE_SCROLL_TOP_THEME_TOKEN'\n);\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ScrollTopThemeService implements FlowbiteThemeService<ScrollTopProperties> {\n private readonly baseTheme = inject(FLOWBITE_SCROLL_TOP_THEME_TOKEN);\n\n public getClasses(properties: ScrollTopProperties): ScrollTopClass {\n const theme: ScrollTopTheme = mergeTheme(this.baseTheme, properties.customStyle);\n\n const output: ScrollTopClass = {\n rootClass: twMerge(\n theme.root.base,\n theme.root.color[properties.color],\n theme.root.position[properties.position]\n ),\n };\n\n return output;\n }\n}\n","import type {\n ScrollTopClass,\n ScrollTopColors,\n ScrollTopPositions,\n ScrollTopTheme,\n} from './scroll-top.theme';\nimport { ScrollTopThemeService } from './scroll-top.theme.service';\n\nimport type { DeepPartial } from 'flowbite-angular';\nimport { BaseComponent } from 'flowbite-angular';\nimport { IconComponent, IconRegistry } from 'flowbite-angular/icon';\nimport { CHEVRON_UP_SVG_ICON } from 'flowbite-angular/utils';\n\nimport { NgTemplateOutlet } from '@angular/common';\nimport type { OnInit, TemplateRef } from '@angular/core';\nimport {\n ChangeDetectionStrategy,\n Component,\n inject,\n InjectionToken,\n makeEnvironmentProviders,\n model,\n ViewEncapsulation,\n} from '@angular/core';\nimport { DomSanitizer } from '@angular/platform-browser';\n\nexport const FLOWBITE_SCROLL_TOP_COLOR_DEFAULT_VALUE = new InjectionToken<keyof ScrollTopColors>(\n 'FLOWBITE_SCROLL_TOP_COLOR_DEFAULT_VALUE'\n);\n\nexport const FLOWBITE_SCROLL_TOP_POSITION_DEFAULT_VALUE = new InjectionToken<\n keyof ScrollTopPositions\n>('FLOWBITE_SCROLL_TOP_POSITION_DEFAULT_VALUE');\n\nexport const FLOWBITE_SCROLL_TOP_ICON_DEFAULT_VALUE = new InjectionToken<\n TemplateRef<unknown> | undefined\n>('FLOWBITE_SCROLL_TOP_ICON_DEFAULT_VALUE');\n\nexport const FLOWBITE_SCROLL_TOP_CUSTOM_STYLE_DEFAULT_VALUE = new InjectionToken<\n DeepPartial<ScrollTopTheme>\n>('FLOWBITE_SCROLL_TOP_CUSTOM_STYLE_DEFAULT_VALUE');\n\nexport const scrollTopDefaultValueProvider = makeEnvironmentProviders([\n {\n provide: FLOWBITE_SCROLL_TOP_COLOR_DEFAULT_VALUE,\n useValue: 'primary',\n },\n {\n provide: FLOWBITE_SCROLL_TOP_POSITION_DEFAULT_VALUE,\n useValue: 'bottom-right',\n },\n {\n provide: FLOWBITE_SCROLL_TOP_ICON_DEFAULT_VALUE,\n useValue: undefined,\n },\n {\n provide: FLOWBITE_SCROLL_TOP_CUSTOM_STYLE_DEFAULT_VALUE,\n useValue: {},\n },\n]);\n\n/**\n * Provide a way to go at the top of the page via a button\n */\n@Component({\n standalone: true,\n selector: 'flowbite-scroll-top',\n imports: [IconComponent, NgTemplateOutlet],\n template: `\n @if (icon()) {\n <ng-container [ngTemplateOutlet]=\"icon()!\" />\n } @else {\n <flowbite-icon\n svgIcon=\"flowbite-angular:chevron-up\"\n class=\"w-5 h-5\" />\n }\n `,\n host: {\n '(click)': 'onClick()',\n },\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ScrollTopComponent extends BaseComponent<ScrollTopClass> implements OnInit {\n /**\n * Service injected used to generate class\n */\n public readonly themeService = inject(ScrollTopThemeService);\n /**\n * `IconRegistry` service\n */\n public readonly iconRegistry = inject(IconRegistry);\n /**\n * `DomSanitizer` service\n */\n public readonly domSanitizer = inject(DomSanitizer);\n\n //#region properties\n /**\n * Set the scroll top color\n *\n * @default primary\n */\n public color = model(inject(FLOWBITE_SCROLL_TOP_COLOR_DEFAULT_VALUE));\n /**\n * Set the scroll top position\n *\n * @default bottom-right\n */\n public position = model(inject(FLOWBITE_SCROLL_TOP_POSITION_DEFAULT_VALUE));\n /**\n * Set the scroll top icon\n *\n * @default undefined\n */\n public icon = model(inject(FLOWBITE_SCROLL_TOP_ICON_DEFAULT_VALUE));\n /**\n * Set the custom style for this scroll top\n *\n * @default {}\n */\n public customStyle = model(inject(FLOWBITE_SCROLL_TOP_CUSTOM_STYLE_DEFAULT_VALUE));\n //#endregion\n\n //#region BaseComponent implemenation\n public override fetchClass(): ScrollTopClass {\n return this.themeService.getClasses({\n color: this.color(),\n position: this.position(),\n customStyle: this.customStyle(),\n });\n }\n\n public override init(): void {\n this.iconRegistry.addRawSvgIconInNamepsace(\n 'flowbite-angular',\n 'chevron-up',\n this.domSanitizer.bypassSecurityTrustHtml(CHEVRON_UP_SVG_ICON)\n );\n }\n //#endregion\n\n /**\n * Navigate to the top of the page\n */\n public onClick(): void {\n window.scrollTo(window.scrollX, 0);\n }\n}\n","import type {\n DeepPartial,\n FlowbiteClass,\n FlowbiteColors,\n FlowbitePositions,\n} from 'flowbite-angular';\nimport { createTheme } from 'flowbite-angular/utils';\n\n//#region region Component theme option\n/**\n * Available colors for `ScrollTopComponent`\n */\nexport interface ScrollTopColors\n extends Pick<\n FlowbiteColors,\n 'primary' | 'dark' | 'blue' | 'gray' | 'green' | 'lime' | 'purple' | 'red'\n > {\n [key: string]: string;\n}\n\n/**\n * Available positions for `ScrollTopComponent`\n */\nexport interface ScrollTopPositions extends Omit<FlowbitePositions, 'center'> {\n [key: string]: string;\n}\n//#endregion\n\n/**\n * Required properties for the class generation for `ScrollTopComponent`\n */\nexport interface ScrollTopProperties {\n color: keyof ScrollTopColors;\n position: keyof ScrollTopPositions;\n customStyle: DeepPartial<ScrollTopTheme>;\n}\n\n/**\n * Theme definition for `ScrollTopComponent`\n */\nexport interface ScrollTopTheme {\n root: {\n base: string;\n color: ScrollTopColors;\n position: ScrollTopPositions;\n };\n}\n\n/**\n * Default theme for `ScrollTopComponent`\n */\nexport const scrollTopTheme: ScrollTopTheme = createTheme({\n root: {\n base: 'cursor-pointer fixed flex flex-row place-items-center p-2 rounded-lg',\n color: {\n primary: 'bg-primary-100',\n dark: 'bg-gray-100 dark:bg-gray-800 dark:text-white',\n blue: 'bg-blue-100',\n gray: 'bg-gray-100',\n green: 'bg-green-100',\n lime: 'bg-lime-100',\n purple: 'bg-purple-100',\n red: 'bg-red-100',\n },\n position: {\n 'bottom-center': 'bottom-3 left-1/2 right-1/2',\n 'bottom-left': 'bottom-3 left-3',\n 'bottom-right': 'bottom-3 right-3',\n 'center-left': 'left-3 top-1/2 bottom-1/2',\n 'center-right': 'right-3 top-1/2 bottom-1/2',\n 'top-center': 'top-3 left-1/2 right-1/2',\n 'top-left': 'top-3 left-3',\n 'top-right': 'top-3 right-3',\n },\n },\n});\n\n/**\n * Generated class definition for `ScrollTopComponent`\n */\nexport type ScrollTopClass = FlowbiteClass;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAQA;;;;;;;AAOG;MACU,+BAA+B,GAAG,IAAI,cAAc,CAC/D,iCAAiC;MAMtB,qBAAqB,CAAA;AAHlC,IAAA,WAAA,GAAA;AAImB,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,+BAA+B,CAAC;AAerE;AAbQ,IAAA,UAAU,CAAC,UAA+B,EAAA;AAC/C,QAAA,MAAM,KAAK,GAAmB,UAAU,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,WAAW,CAAC;AAEhF,QAAA,MAAM,MAAM,GAAmB;AAC7B,YAAA,SAAS,EAA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