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