flowbite-angular 1.2.0 → 20.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -39
- package/accordion/index.d.ts +569 -16
- package/alert/index.d.ts +602 -4
- package/badge/index.d.ts +636 -4
- package/breadcrumb/index.d.ts +452 -8
- package/button/index.d.ts +335 -4
- package/button-group/README.md +4 -0
- package/button-group/index.d.ts +85 -0
- package/{core → card}/README.md +2 -2
- package/card/index.d.ts +640 -0
- package/{accordion → clipboard}/README.md +2 -2
- package/clipboard/index.d.ts +103 -0
- package/dropdown/index.d.ts +536 -16
- package/fesm2022/flowbite-angular-accordion.mjs +340 -479
- package/fesm2022/flowbite-angular-accordion.mjs.map +1 -1
- package/fesm2022/flowbite-angular-alert.mjs +309 -240
- package/fesm2022/flowbite-angular-alert.mjs.map +1 -1
- package/fesm2022/flowbite-angular-badge.mjs +334 -136
- package/fesm2022/flowbite-angular-badge.mjs.map +1 -1
- package/fesm2022/flowbite-angular-breadcrumb.mjs +263 -191
- package/fesm2022/flowbite-angular-breadcrumb.mjs.map +1 -1
- package/fesm2022/flowbite-angular-button-group.mjs +86 -0
- package/fesm2022/flowbite-angular-button-group.mjs.map +1 -0
- package/fesm2022/flowbite-angular-button.mjs +190 -270
- package/fesm2022/flowbite-angular-button.mjs.map +1 -1
- package/fesm2022/flowbite-angular-card.mjs +344 -0
- package/fesm2022/flowbite-angular-card.mjs.map +1 -0
- package/fesm2022/flowbite-angular-clipboard.mjs +174 -0
- package/fesm2022/flowbite-angular-clipboard.mjs.map +1 -0
- package/fesm2022/flowbite-angular-dropdown.mjs +273 -459
- package/fesm2022/flowbite-angular-dropdown.mjs.map +1 -1
- package/fesm2022/flowbite-angular-form.mjs +444 -0
- package/fesm2022/flowbite-angular-form.mjs.map +1 -0
- package/fesm2022/flowbite-angular-icon-brand.mjs +71 -0
- package/fesm2022/flowbite-angular-icon-brand.mjs.map +1 -0
- package/fesm2022/flowbite-angular-icon-outline-arrows.mjs +51 -0
- package/fesm2022/flowbite-angular-icon-outline-arrows.mjs.map +1 -0
- package/fesm2022/flowbite-angular-icon-outline-e-commerce.mjs +23 -0
- package/fesm2022/flowbite-angular-icon-outline-e-commerce.mjs.map +1 -0
- package/fesm2022/flowbite-angular-icon-outline-emoji.mjs +13 -0
- package/fesm2022/flowbite-angular-icon-outline-emoji.mjs.map +1 -0
- package/fesm2022/flowbite-angular-icon-outline-files-folders.mjs +42 -0
- package/fesm2022/flowbite-angular-icon-outline-files-folders.mjs.map +1 -0
- package/fesm2022/flowbite-angular-icon-outline-general.mjs +145 -0
- package/fesm2022/flowbite-angular-icon-outline-general.mjs.map +1 -0
- package/fesm2022/flowbite-angular-icon-outline-media.mjs +25 -0
- package/fesm2022/flowbite-angular-icon-outline-media.mjs.map +1 -0
- package/fesm2022/flowbite-angular-icon-outline-text.mjs +20 -0
- package/fesm2022/flowbite-angular-icon-outline-text.mjs.map +1 -0
- package/fesm2022/flowbite-angular-icon-outline-user.mjs +17 -0
- package/fesm2022/flowbite-angular-icon-outline-user.mjs.map +1 -0
- package/fesm2022/flowbite-angular-icon-outline-weather.mjs +9 -0
- package/fesm2022/flowbite-angular-icon-outline-weather.mjs.map +1 -0
- package/fesm2022/flowbite-angular-icon-outline.mjs +6 -0
- package/fesm2022/flowbite-angular-icon-outline.mjs.map +1 -0
- package/fesm2022/flowbite-angular-icon-solid-arrows.mjs +17 -0
- package/fesm2022/flowbite-angular-icon-solid-arrows.mjs.map +1 -0
- package/fesm2022/flowbite-angular-icon-solid-brands.mjs +33 -0
- package/fesm2022/flowbite-angular-icon-solid-brands.mjs.map +1 -0
- package/fesm2022/flowbite-angular-icon-solid-e-commerce.mjs +21 -0
- package/fesm2022/flowbite-angular-icon-solid-e-commerce.mjs.map +1 -0
- package/fesm2022/flowbite-angular-icon-solid-emoji.mjs +13 -0
- package/fesm2022/flowbite-angular-icon-solid-emoji.mjs.map +1 -0
- package/fesm2022/flowbite-angular-icon-solid-files-folder.mjs +42 -0
- package/fesm2022/flowbite-angular-icon-solid-files-folder.mjs.map +1 -0
- package/fesm2022/flowbite-angular-icon-solid-general.mjs +123 -0
- package/fesm2022/flowbite-angular-icon-solid-general.mjs.map +1 -0
- package/fesm2022/flowbite-angular-icon-solid-media.mjs +24 -0
- package/fesm2022/flowbite-angular-icon-solid-media.mjs.map +1 -0
- package/fesm2022/flowbite-angular-icon-solid-text.mjs +11 -0
- package/fesm2022/flowbite-angular-icon-solid-text.mjs.map +1 -0
- package/fesm2022/flowbite-angular-icon-solid-user.mjs +17 -0
- package/fesm2022/flowbite-angular-icon-solid-user.mjs.map +1 -0
- package/fesm2022/flowbite-angular-icon-solid-weather.mjs +9 -0
- package/fesm2022/flowbite-angular-icon-solid-weather.mjs.map +1 -0
- package/fesm2022/flowbite-angular-icon-solid.mjs +6 -0
- package/fesm2022/flowbite-angular-icon-solid.mjs.map +1 -0
- package/fesm2022/flowbite-angular-icon.mjs +318 -219
- package/fesm2022/flowbite-angular-icon.mjs.map +1 -1
- package/fesm2022/flowbite-angular-indicator.mjs +119 -231
- package/fesm2022/flowbite-angular-indicator.mjs.map +1 -1
- package/fesm2022/flowbite-angular-modal.mjs +338 -486
- package/fesm2022/flowbite-angular-modal.mjs.map +1 -1
- package/fesm2022/flowbite-angular-navbar.mjs +601 -604
- package/fesm2022/flowbite-angular-navbar.mjs.map +1 -1
- package/fesm2022/flowbite-angular-pagination.mjs +994 -0
- package/fesm2022/flowbite-angular-pagination.mjs.map +1 -0
- package/fesm2022/flowbite-angular-sidebar.mjs +403 -776
- package/fesm2022/flowbite-angular-sidebar.mjs.map +1 -1
- package/fesm2022/flowbite-angular-tab.mjs +465 -0
- package/fesm2022/flowbite-angular-tab.mjs.map +1 -0
- package/fesm2022/flowbite-angular-theme-toggle.mjs +263 -0
- package/fesm2022/flowbite-angular-theme-toggle.mjs.map +1 -0
- package/fesm2022/flowbite-angular-tooltip.mjs +117 -0
- package/fesm2022/flowbite-angular-tooltip.mjs.map +1 -0
- package/fesm2022/flowbite-angular.mjs +53 -66
- package/fesm2022/flowbite-angular.mjs.map +1 -1
- package/{alert → form}/README.md +2 -2
- package/form/index.d.ts +684 -0
- package/{breadcrumb → icon/brand}/README.md +2 -2
- package/icon/brand/index.d.ts +66 -0
- package/icon/index.d.ts +322 -5
- package/icon/outline/README.md +4 -0
- package/icon/outline/arrows/index.d.ts +46 -0
- package/icon/outline/e-commerce/index.d.ts +18 -0
- package/icon/outline/emoji/index.d.ts +8 -0
- package/icon/outline/files-folders/index.d.ts +37 -0
- package/icon/outline/general/index.d.ts +140 -0
- package/icon/outline/index.d.ts +2 -0
- package/icon/outline/media/index.d.ts +20 -0
- package/icon/outline/text/index.d.ts +15 -0
- package/icon/outline/user/index.d.ts +12 -0
- package/icon/outline/weather/index.d.ts +4 -0
- package/icon/solid/README.md +4 -0
- package/icon/solid/arrows/index.d.ts +12 -0
- package/icon/solid/brands/index.d.ts +28 -0
- package/icon/solid/e-commerce/index.d.ts +16 -0
- package/icon/solid/emoji/index.d.ts +8 -0
- package/icon/solid/files-folder/index.d.ts +37 -0
- package/icon/solid/general/index.d.ts +118 -0
- package/icon/solid/index.d.ts +2 -0
- package/icon/solid/media/index.d.ts +19 -0
- package/icon/solid/text/index.d.ts +6 -0
- package/icon/solid/user/index.d.ts +12 -0
- package/icon/solid/weather/index.d.ts +4 -0
- package/index.d.ts +126 -3
- package/indicator/index.d.ts +242 -4
- package/modal/index.d.ts +458 -16
- package/navbar/index.d.ts +1467 -24
- package/package.json +137 -42
- package/pagination/README.md +4 -0
- package/pagination/index.d.ts +1135 -0
- package/sidebar/index.d.ts +880 -24
- package/styles/flowbite-angular.css +8 -0
- package/styles/part/animation.css +0 -0
- package/styles/part/color.css +125 -0
- package/styles/part/font-size.css +67 -0
- package/styles/part/rounded.css +11 -0
- package/styles/part/shadow.css +9 -0
- package/styles/part/spacing.css +38 -0
- package/{badge → tab}/README.md +2 -2
- package/tab/index.d.ts +791 -0
- package/theme-toggle/README.md +4 -0
- package/theme-toggle/index.d.ts +342 -0
- package/{button → tooltip}/README.md +2 -2
- package/tooltip/index.d.ts +158 -0
- package/accordion/accordion-content.component.d.ts +0 -69
- package/accordion/accordion-content.theme.d.ts +0 -28
- package/accordion/accordion-content.theme.service.d.ts +0 -19
- package/accordion/accordion-panel.component.d.ts +0 -67
- package/accordion/accordion-panel.theme.d.ts +0 -23
- package/accordion/accordion-panel.theme.service.d.ts +0 -20
- package/accordion/accordion-title.component.d.ts +0 -106
- package/accordion/accordion-title.theme.d.ts +0 -35
- package/accordion/accordion-title.theme.service.d.ts +0 -19
- package/accordion/accordion.component.d.ts +0 -61
- package/accordion/accordion.theme.d.ts +0 -29
- package/accordion/accordion.theme.service.d.ts +0 -19
- package/alert/alert.component.d.ts +0 -150
- package/alert/alert.theme.d.ts +0 -39
- package/alert/alert.theme.service.d.ts +0 -19
- package/badge/badge.component.d.ts +0 -122
- package/badge/badge.theme.d.ts +0 -45
- package/badge/badge.theme.service.d.ts +0 -19
- package/base-component.directive.d.ts +0 -51
- package/breadcrumb/breadcrumb-item.component.d.ts +0 -84
- package/breadcrumb/breadcrumb-item.theme.d.ts +0 -33
- package/breadcrumb/breadcrumb-item.theme.service.d.ts +0 -19
- package/breadcrumb/breadcrumb.component.d.ts +0 -43
- package/breadcrumb/breadcrumb.theme.d.ts +0 -29
- package/breadcrumb/breadcrumb.theme.service.d.ts +0 -19
- package/button/button.component.d.ts +0 -250
- package/button/button.theme.d.ts +0 -79
- package/button/button.theme.service.d.ts +0 -19
- package/core/flowbite.theme.init.d.ts +0 -9
- package/core/index.d.ts +0 -1
- package/dark-theme-toggle/README.md +0 -4
- package/dark-theme-toggle/dark-theme-toggle.component.d.ts +0 -51
- package/dark-theme-toggle/dark-theme-toggle.theme.d.ts +0 -23
- package/dark-theme-toggle/dark-theme-toggle.theme.service.d.ts +0 -19
- package/dark-theme-toggle/index.d.ts +0 -3
- package/dropdown/README.md +0 -4
- package/dropdown/dropdown-divider.component.d.ts +0 -36
- package/dropdown/dropdown-divider.theme.d.ts +0 -23
- package/dropdown/dropdown-divider.theme.service.d.ts +0 -19
- package/dropdown/dropdown-header.component.d.ts +0 -42
- package/dropdown/dropdown-header.theme.d.ts +0 -28
- package/dropdown/dropdown-header.theme.service.d.ts +0 -19
- package/dropdown/dropdown-item.component.d.ts +0 -36
- package/dropdown/dropdown-item.theme.d.ts +0 -23
- package/dropdown/dropdown-item.theme.service.d.ts +0 -19
- package/dropdown/dropdown.component.d.ts +0 -136
- package/dropdown/dropdown.theme.d.ts +0 -56
- package/dropdown/dropdown.theme.service.d.ts +0 -19
- package/fesm2022/flowbite-angular-core.mjs +0 -322
- package/fesm2022/flowbite-angular-core.mjs.map +0 -1
- package/fesm2022/flowbite-angular-dark-theme-toggle.mjs +0 -138
- package/fesm2022/flowbite-angular-dark-theme-toggle.mjs.map +0 -1
- package/fesm2022/flowbite-angular-router-link-active.mjs +0 -68
- package/fesm2022/flowbite-angular-router-link-active.mjs.map +0 -1
- package/fesm2022/flowbite-angular-router-link.mjs +0 -73
- package/fesm2022/flowbite-angular-router-link.mjs.map +0 -1
- package/fesm2022/flowbite-angular-sanitize-html.mjs +0 -39
- package/fesm2022/flowbite-angular-sanitize-html.mjs.map +0 -1
- package/fesm2022/flowbite-angular-scroll-top.mjs +0 -192
- package/fesm2022/flowbite-angular-scroll-top.mjs.map +0 -1
- package/fesm2022/flowbite-angular-theme.mjs +0 -78
- package/fesm2022/flowbite-angular-theme.mjs.map +0 -1
- package/fesm2022/flowbite-angular-utils.mjs +0 -210
- package/fesm2022/flowbite-angular-utils.mjs.map +0 -1
- package/flowbite.theme.service.d.ts +0 -12
- package/icon/icon-registry.d.ts +0 -45
- package/icon/icon.component.d.ts +0 -22
- package/icon/trusted-types.d.ts +0 -15
- package/indicator/indicators.component.d.ts +0 -224
- package/indicator/indicators.theme.d.ts +0 -59
- package/indicator/indicators.theme.service.d.ts +0 -19
- package/modal/modal-body.component.d.ts +0 -36
- package/modal/modal-body.theme.d.ts +0 -23
- package/modal/modal-body.theme.service.d.ts +0 -19
- package/modal/modal-footer.component.d.ts +0 -36
- package/modal/modal-footer.theme.d.ts +0 -23
- package/modal/modal-footer.theme.service.d.ts +0 -19
- package/modal/modal-header.component.d.ts +0 -60
- package/modal/modal-header.theme.d.ts +0 -32
- package/modal/modal-header.theme.service.d.ts +0 -19
- package/modal/modal.component.d.ts +0 -146
- package/modal/modal.theme.d.ts +0 -35
- package/modal/modal.theme.service.d.ts +0 -19
- package/navbar/navbar-brand.component.d.ts +0 -36
- package/navbar/navbar-brand.theme.d.ts +0 -23
- package/navbar/navbar-brand.theme.service.d.ts +0 -19
- package/navbar/navbar-content.component.d.ts +0 -50
- package/navbar/navbar-content.theme.d.ts +0 -28
- package/navbar/navbar-content.theme.service.d.ts +0 -19
- package/navbar/navbar-icon-button.component.d.ts +0 -59
- package/navbar/navbar-icon-button.theme.d.ts +0 -26
- package/navbar/navbar-icon-button.theme.service.d.ts +0 -19
- package/navbar/navbar-item.component.d.ts +0 -67
- package/navbar/navbar-item.theme.d.ts +0 -26
- package/navbar/navbar-item.theme.service.d.ts +0 -19
- package/navbar/navbar-toggle.component.d.ts +0 -51
- package/navbar/navbar-toggle.theme.d.ts +0 -23
- package/navbar/navbar-toggle.theme.service.d.ts +0 -19
- package/navbar/navbar.component.d.ts +0 -121
- package/navbar/navbar.theme.d.ts +0 -21
- package/navbar/navbar.theme.service.d.ts +0 -19
- package/router-link/README.md +0 -4
- package/router-link/flowbite-router-link.directive.d.ts +0 -28
- package/router-link/index.d.ts +0 -1
- package/router-link-active/README.md +0 -4
- package/router-link-active/flowbite-router-link-active.directive.d.ts +0 -37
- package/router-link-active/index.d.ts +0 -1
- package/sanitize-html/README.md +0 -4
- package/sanitize-html/index.d.ts +0 -1
- package/sanitize-html/sanitize-html.pipe.d.ts +0 -20
- package/scroll-top/README.md +0 -4
- package/scroll-top/index.d.ts +0 -4
- package/scroll-top/scroll-top.component.d.ts +0 -114
- package/scroll-top/scroll-top.theme.d.ts +0 -39
- package/scroll-top/scroll-top.theme.service.d.ts +0 -19
- package/sidebar/sidebar-item-group.component.d.ts +0 -100
- package/sidebar/sidebar-item-group.theme.d.ts +0 -31
- package/sidebar/sidebar-item-group.theme.service.d.ts +0 -19
- package/sidebar/sidebar-item.component.d.ts +0 -101
- package/sidebar/sidebar-item.theme.d.ts +0 -33
- package/sidebar/sidebar-item.theme.service.d.ts +0 -19
- package/sidebar/sidebar-menu.component.d.ts +0 -93
- package/sidebar/sidebar-menu.theme.d.ts +0 -30
- package/sidebar/sidebar-menu.theme.service.d.ts +0 -19
- package/sidebar/sidebar-page-content.component.d.ts +0 -46
- package/sidebar/sidebar-page-content.theme.d.ts +0 -27
- package/sidebar/sidebar-page-content.theme.service.d.ts +0 -19
- package/sidebar/sidebar-toggle.component.d.ts +0 -95
- package/sidebar/sidebar-toggle.theme.d.ts +0 -34
- package/sidebar/sidebar-toggle.theme.service.d.ts +0 -19
- package/sidebar/sidebar.component.d.ts +0 -84
- package/sidebar/sidebar.theme.d.ts +0 -22
- package/sidebar/sidebar.theme.service.d.ts +0 -19
- package/tailwind.config.js +0 -303
- package/theme/README.md +0 -4
- package/theme/flowbite-theme.directive.d.ts +0 -36
- package/theme/index.d.ts +0 -1
- package/type-definitions/colors/flowbite.colors.d.ts +0 -19
- package/type-definitions/colors/flowbite.gradient-colors.d.ts +0 -11
- package/type-definitions/colors/flowbite.gradient-duo-tone-colors.d.ts +0 -12
- package/type-definitions/colors/index.d.ts +0 -3
- package/type-definitions/flowbite.boolean.d.ts +0 -14
- package/type-definitions/flowbite.class.d.ts +0 -6
- package/type-definitions/flowbite.combination.d.ts +0 -8
- package/type-definitions/flowbite.content-positions.d.ts +0 -6
- package/type-definitions/flowbite.deep-partial.d.ts +0 -6
- package/type-definitions/flowbite.heading-levels.d.ts +0 -4
- package/type-definitions/flowbite.positions.d.ts +0 -14
- package/type-definitions/flowbite.router-link-parameter.d.ts +0 -5
- package/type-definitions/flowbite.sizes.d.ts +0 -10
- package/type-definitions/flowbite.themes.d.ts +0 -4
- package/type-definitions/index.d.ts +0 -12
- package/utils/README.md +0 -4
- package/utils/icon.list.d.ts +0 -7
- package/utils/id.generator.d.ts +0 -59
- package/utils/index.d.ts +0 -8
- package/utils/theme/clone-deep.d.ts +0 -7
- package/utils/theme/create-class.d.ts +0 -7
- package/utils/theme/create-theme.d.ts +0 -7
- package/utils/theme/is-object.d.ts +0 -7
- package/utils/theme/merge-theme.d.ts +0 -8
- package/utils/theme/to-string.d.ts +0 -7
|
@@ -1,745 +1,742 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createTheme, mergeDeep, colorToTheme } from 'flowbite-angular';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { InjectionToken, inject,
|
|
3
|
+
import { InjectionToken, inject, input, booleanAttribute, computed, ChangeDetectionStrategy, ViewEncapsulation, Component, Directive } from '@angular/core';
|
|
4
|
+
import { createStateToken, createStateProvider, createStateInjector, createState } from 'ng-primitives/state';
|
|
4
5
|
import { twMerge } from 'tailwind-merge';
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
6
|
+
import * as i1 from 'flowbite-angular/button';
|
|
7
|
+
import { BaseButton, injectFlowbiteBaseButtonState } from 'flowbite-angular/button';
|
|
8
|
+
import * as i2 from 'ng-primitives/button';
|
|
9
|
+
import { NgpButton } from 'ng-primitives/button';
|
|
10
|
+
import * as i3 from 'ng-primitives/interactions';
|
|
11
|
+
import { NgpFocus } from 'ng-primitives/interactions';
|
|
12
|
+
import { bars } from 'flowbite-angular/icon/outline/general';
|
|
13
|
+
import { provideIcons } from '@ng-icons/core';
|
|
11
14
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
useValue: {},
|
|
15
|
+
const flowbiteNavbarTheme = createTheme({
|
|
16
|
+
host: {
|
|
17
|
+
base: '',
|
|
18
|
+
transition: '',
|
|
19
|
+
fixed: {
|
|
20
|
+
on: 'fixed start-0 top-0 z-20 w-full border-b',
|
|
21
|
+
off: '',
|
|
22
|
+
},
|
|
23
|
+
color: {
|
|
24
|
+
default: {
|
|
25
|
+
light: 'border-gray-200 bg-gray-100',
|
|
26
|
+
dark: 'dark:border-gray-800 dark:bg-gray-900',
|
|
27
|
+
},
|
|
28
|
+
info: {
|
|
29
|
+
light: 'border-blue-200 bg-gray-100',
|
|
30
|
+
dark: 'dark:border-blue-800 dark:bg-gray-900',
|
|
31
|
+
},
|
|
32
|
+
failure: {
|
|
33
|
+
light: 'border-red-200 bg-gray-100',
|
|
34
|
+
dark: 'dark:border-red-800 dark:bg-gray-900',
|
|
35
|
+
},
|
|
36
|
+
success: {
|
|
37
|
+
light: 'border-green-200 bg-gray-100',
|
|
38
|
+
dark: 'dark:border-green-800 dark:bg-gray-900',
|
|
39
|
+
},
|
|
40
|
+
warning: {
|
|
41
|
+
light: 'border-yellow-200 bg-gray-100',
|
|
42
|
+
dark: 'dark:border-yellow-800 dark:bg-gray-900',
|
|
43
|
+
},
|
|
44
|
+
primary: {
|
|
45
|
+
light: 'border-primary-200 bg-gray-100',
|
|
46
|
+
dark: 'dark:border-primary-800 dark:bg-gray-900',
|
|
47
|
+
},
|
|
48
|
+
},
|
|
47
49
|
},
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
constructor() {
|
|
54
|
-
super(...arguments);
|
|
55
|
-
/**
|
|
56
|
-
* Service injected used to generate class
|
|
57
|
-
*/
|
|
58
|
-
this.themeService = inject(NavbarBrandThemeService);
|
|
59
|
-
/**
|
|
60
|
-
* The parent `NavbarComponent`
|
|
61
|
-
*/
|
|
62
|
-
this.navbarComponent = inject(NavbarComponent);
|
|
63
|
-
//#region properties
|
|
64
|
-
/**
|
|
65
|
-
* Set the custom style for this navbar brand
|
|
66
|
-
*/
|
|
67
|
-
this.customStyle = model(inject(FLOWBITE_NAVBAR_BRAND_CUSTOM_STYLE_DEFAULT_VALUE));
|
|
68
|
-
}
|
|
69
|
-
//#endregion
|
|
70
|
-
//#region BaseComponent implementation
|
|
71
|
-
fetchClass() {
|
|
72
|
-
return this.themeService.getClasses({
|
|
73
|
-
customStyle: this.customStyle(),
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: NavbarBrandComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
77
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.0.4", 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, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
78
|
-
}
|
|
79
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: NavbarBrandComponent, decorators: [{
|
|
80
|
-
type: Component,
|
|
81
|
-
args: [{
|
|
82
|
-
selector: 'flowbite-navbar-brand',
|
|
83
|
-
standalone: true,
|
|
84
|
-
template: `<ng-content />`,
|
|
85
|
-
encapsulation: ViewEncapsulation.None,
|
|
86
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
87
|
-
}]
|
|
88
|
-
}] });
|
|
50
|
+
container: {
|
|
51
|
+
base: 'mx-auto flex max-w-screen flex-wrap items-center justify-between p-4',
|
|
52
|
+
transition: '',
|
|
53
|
+
},
|
|
54
|
+
});
|
|
89
55
|
|
|
56
|
+
const defaultFlowbiteNavbarConfig = {
|
|
57
|
+
baseTheme: flowbiteNavbarTheme,
|
|
58
|
+
fixed: false,
|
|
59
|
+
open: false,
|
|
60
|
+
color: 'default',
|
|
61
|
+
customTheme: {},
|
|
62
|
+
};
|
|
63
|
+
const FlowbiteNavbarConfigToken = new InjectionToken('FlowbiteNavbarConfigToken');
|
|
90
64
|
/**
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
* @
|
|
94
|
-
* ```
|
|
95
|
-
* var theme = inject(FLOWBITE_NAVBAR_CONTENT_THEME_TOKEN)
|
|
96
|
-
* ```
|
|
65
|
+
* Provide the default Navbar configuration
|
|
66
|
+
* @param config The Navbar configuration
|
|
67
|
+
* @returns The provider
|
|
97
68
|
*/
|
|
98
|
-
const
|
|
99
|
-
class NavbarContentThemeService {
|
|
100
|
-
constructor() {
|
|
101
|
-
this.baseTheme = inject(FLOWBITE_NAVBAR_CONTENT_THEME_TOKEN);
|
|
102
|
-
}
|
|
103
|
-
getClasses(properties) {
|
|
104
|
-
const theme = mergeTheme(this.baseTheme, properties.customStyle);
|
|
105
|
-
const output = {
|
|
106
|
-
rootClass: twMerge(theme.root.base),
|
|
107
|
-
navbarContentListClass: twMerge(theme.list.base),
|
|
108
|
-
};
|
|
109
|
-
return output;
|
|
110
|
-
}
|
|
111
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: NavbarContentThemeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
112
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: NavbarContentThemeService, providedIn: 'root' }); }
|
|
113
|
-
}
|
|
114
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: NavbarContentThemeService, decorators: [{
|
|
115
|
-
type: Injectable,
|
|
116
|
-
args: [{
|
|
117
|
-
providedIn: 'root',
|
|
118
|
-
}]
|
|
119
|
-
}] });
|
|
120
|
-
|
|
121
|
-
const FLOWBITE_NAVBAR_CONTENT_CUSTOM_STYLE_DEFAULT_VALUE = new InjectionToken('FLOWBITE_NAVBAR_CONTENT_CUSTOM_STYLE_DEFAULT_VALUE');
|
|
122
|
-
const navbarContentDefaultValueProvider = makeEnvironmentProviders([
|
|
69
|
+
const provideFlowbiteNavbarConfig = (config) => [
|
|
123
70
|
{
|
|
124
|
-
provide:
|
|
125
|
-
useValue: {},
|
|
71
|
+
provide: FlowbiteNavbarConfigToken,
|
|
72
|
+
useValue: { ...defaultFlowbiteNavbarConfig, ...config },
|
|
126
73
|
},
|
|
127
|
-
]
|
|
74
|
+
];
|
|
128
75
|
/**
|
|
129
|
-
*
|
|
76
|
+
* Inject the Navbar configuration
|
|
77
|
+
* @see {@link defaultFlowbiteNavbarConfig}
|
|
78
|
+
* @returns The configuration
|
|
130
79
|
*/
|
|
131
|
-
|
|
80
|
+
const injectFlowbiteNavbarConfig = () => inject(FlowbiteNavbarConfigToken, { optional: true }) ?? defaultFlowbiteNavbarConfig;
|
|
81
|
+
|
|
82
|
+
const FlowbiteNavbarStateToken = createStateToken('Flowbite Navbar');
|
|
83
|
+
const provideFlowbiteNavbarState = createStateProvider(FlowbiteNavbarStateToken);
|
|
84
|
+
const injectFlowbiteNavbarState = createStateInjector(FlowbiteNavbarStateToken);
|
|
85
|
+
const flowbiteNavbarState = createState(FlowbiteNavbarStateToken);
|
|
86
|
+
|
|
87
|
+
class Navbar {
|
|
132
88
|
constructor() {
|
|
133
|
-
|
|
89
|
+
this.config = injectFlowbiteNavbarConfig();
|
|
134
90
|
/**
|
|
135
|
-
*
|
|
91
|
+
* @see {@link injectFlowbiteNavbarConfig}
|
|
136
92
|
*/
|
|
137
|
-
this.
|
|
93
|
+
this.fixed = input(this.config.fixed, { transform: booleanAttribute });
|
|
138
94
|
/**
|
|
139
|
-
*
|
|
95
|
+
* @see {@link injectFlowbiteNavbarConfig}
|
|
140
96
|
*/
|
|
141
|
-
this.
|
|
142
|
-
//#region properties
|
|
97
|
+
this.open = input(this.config.open, { transform: booleanAttribute });
|
|
143
98
|
/**
|
|
144
|
-
*
|
|
145
|
-
*
|
|
146
|
-
* @default `NavbarComponent`'s color
|
|
99
|
+
* @see {@link injectFlowbiteNavbarConfig}
|
|
147
100
|
*/
|
|
148
|
-
this.color =
|
|
101
|
+
this.color = input(this.config.color);
|
|
149
102
|
/**
|
|
150
|
-
*
|
|
103
|
+
* @see {@link injectFlowbiteNavbarConfig}
|
|
151
104
|
*/
|
|
152
|
-
this.
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
105
|
+
this.customTheme = input(this.config.customTheme);
|
|
106
|
+
this.theme = computed(() => {
|
|
107
|
+
const mergedTheme = mergeDeep(this.config.baseTheme, this.state.customTheme());
|
|
108
|
+
return {
|
|
109
|
+
host: {
|
|
110
|
+
root: twMerge(mergedTheme.host.base, mergedTheme.host.transition, mergedTheme.host.fixed[this.state.fixed() ? 'on' : 'off'], colorToTheme(mergedTheme.host.color, this.state.color())),
|
|
111
|
+
},
|
|
112
|
+
container: {
|
|
113
|
+
root: twMerge(mergedTheme.container.base, mergedTheme.container.transition),
|
|
114
|
+
},
|
|
115
|
+
};
|
|
159
116
|
});
|
|
117
|
+
/**
|
|
118
|
+
* @internal
|
|
119
|
+
*/
|
|
120
|
+
this.state = flowbiteNavbarState(this);
|
|
160
121
|
}
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
122
|
+
/**
|
|
123
|
+
* @internal
|
|
124
|
+
*/
|
|
125
|
+
toggle(newState) {
|
|
126
|
+
newState ??= !this.state.open();
|
|
127
|
+
this.state.open.set(newState);
|
|
128
|
+
}
|
|
129
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: Navbar, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
130
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.0.6", type: Navbar, isStandalone: true, selector: "\n nav[flowbiteNavbar]\n ", inputs: { fixed: { classPropertyName: "fixed", publicName: "fixed", isSignal: true, isRequired: false, transformFunction: null }, open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, customTheme: { classPropertyName: "customTheme", publicName: "customTheme", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "theme().host.root" } }, providers: [provideFlowbiteNavbarState({ inherit: true })], exportAs: ["flowbiteNavbar"], ngImport: i0, template: `
|
|
131
|
+
<div [class]="theme().container.root">
|
|
164
132
|
<ng-content />
|
|
165
133
|
</div>
|
|
166
|
-
`, isInline: true,
|
|
167
|
-
trigger('isOpenAnimation', [
|
|
168
|
-
state('true', style({ height: '*' })),
|
|
169
|
-
state('false', style({ height: '0px' })),
|
|
170
|
-
transition('true <=> false', animate('300ms')),
|
|
171
|
-
]),
|
|
172
|
-
], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
134
|
+
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
173
135
|
}
|
|
174
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
136
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: Navbar, decorators: [{
|
|
175
137
|
type: Component,
|
|
176
138
|
args: [{
|
|
177
|
-
selector: 'flowbite-navbar-content',
|
|
178
139
|
standalone: true,
|
|
140
|
+
selector: `
|
|
141
|
+
nav[flowbiteNavbar]
|
|
142
|
+
`,
|
|
143
|
+
exportAs: 'flowbiteNavbar',
|
|
144
|
+
hostDirectives: [],
|
|
145
|
+
imports: [],
|
|
146
|
+
providers: [provideFlowbiteNavbarState({ inherit: true })],
|
|
147
|
+
host: { '[class]': `theme().host.root` },
|
|
179
148
|
template: `
|
|
180
|
-
<div [class]="
|
|
149
|
+
<div [class]="theme().container.root">
|
|
181
150
|
<ng-content />
|
|
182
151
|
</div>
|
|
183
152
|
`,
|
|
184
|
-
host: {
|
|
185
|
-
'[@isOpenAnimation]': 'navbarComponent().isOpen()',
|
|
186
|
-
},
|
|
187
|
-
animations: [
|
|
188
|
-
trigger('isOpenAnimation', [
|
|
189
|
-
state('true', style({ height: '*' })),
|
|
190
|
-
state('false', style({ height: '0px' })),
|
|
191
|
-
transition('true <=> false', animate('300ms')),
|
|
192
|
-
]),
|
|
193
|
-
],
|
|
194
153
|
encapsulation: ViewEncapsulation.None,
|
|
195
154
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
196
155
|
}]
|
|
197
156
|
}] });
|
|
198
157
|
|
|
158
|
+
const flowbiteNavbarItemTheme = createTheme({
|
|
159
|
+
host: {
|
|
160
|
+
base: 'm-0 block cursor-pointer rounded-sm px-3 py-2',
|
|
161
|
+
transition: '',
|
|
162
|
+
focus: 'data-focus:ring-0 data-focus:outline-none data-focus-visible:ring-2 data-focus-visible:outline-none',
|
|
163
|
+
disabled: 'data-disabled:cursor-not-allowed data-disabled:opacity-50',
|
|
164
|
+
size: {},
|
|
165
|
+
pill: {},
|
|
166
|
+
color: {
|
|
167
|
+
default: {
|
|
168
|
+
light: 'text-gray-800 data-hover:text-gray-900',
|
|
169
|
+
dark: 'dark:text-white dark:data-hover:text-gray-100',
|
|
170
|
+
},
|
|
171
|
+
info: {
|
|
172
|
+
light: 'text-gray-800 data-hover:text-blue-900',
|
|
173
|
+
dark: 'dark:text-white dark:data-hover:text-blue-100',
|
|
174
|
+
},
|
|
175
|
+
failure: {
|
|
176
|
+
light: 'text-gray-800 data-hover:text-red-900',
|
|
177
|
+
dark: 'dark:text-white dark:data-hover:text-red-100',
|
|
178
|
+
},
|
|
179
|
+
success: {
|
|
180
|
+
light: 'text-gray-800 data-hover:text-green-900',
|
|
181
|
+
dark: 'dark:text-white dark:data-hover:text-green-100',
|
|
182
|
+
},
|
|
183
|
+
warning: {
|
|
184
|
+
light: 'text-gray-800 data-hover:text-yellow-900',
|
|
185
|
+
dark: 'dark:text-white dark:data-hover:text-yellow-100',
|
|
186
|
+
},
|
|
187
|
+
primary: {
|
|
188
|
+
light: 'data-hover:text-primary-900 text-gray-800',
|
|
189
|
+
dark: 'dark:data-hover:text-primary-100 dark:text-white',
|
|
190
|
+
},
|
|
191
|
+
},
|
|
192
|
+
colorOutline: {},
|
|
193
|
+
},
|
|
194
|
+
});
|
|
195
|
+
|
|
196
|
+
const defaultFlowbiteNavbarItemConfig = {
|
|
197
|
+
baseTheme: flowbiteNavbarItemTheme,
|
|
198
|
+
customTheme: {},
|
|
199
|
+
};
|
|
200
|
+
const FlowbiteNavbarItemConfigToken = new InjectionToken('FlowbiteNavbarItemConfigToken');
|
|
199
201
|
/**
|
|
200
|
-
*
|
|
201
|
-
*
|
|
202
|
-
* @
|
|
203
|
-
* ```
|
|
204
|
-
* var theme = inject(FLOWBITE_NAVBAR_TOGGLE_THEME_TOKEN)
|
|
205
|
-
* ```
|
|
202
|
+
* Provide the default NavbarItem configuration
|
|
203
|
+
* @param config The NavbarItem configuration
|
|
204
|
+
* @returns The provider
|
|
206
205
|
*/
|
|
207
|
-
const
|
|
208
|
-
class NavbarToggleThemeService {
|
|
209
|
-
constructor() {
|
|
210
|
-
this.baseTheme = inject(FLOWBITE_NAVBAR_TOGGLE_THEME_TOKEN);
|
|
211
|
-
}
|
|
212
|
-
getClasses(properties) {
|
|
213
|
-
const theme = mergeTheme(this.baseTheme, properties.customStyle);
|
|
214
|
-
const output = {
|
|
215
|
-
rootClass: twMerge(theme.root.base),
|
|
216
|
-
};
|
|
217
|
-
return output;
|
|
218
|
-
}
|
|
219
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: NavbarToggleThemeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
220
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: NavbarToggleThemeService, providedIn: 'root' }); }
|
|
221
|
-
}
|
|
222
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: NavbarToggleThemeService, decorators: [{
|
|
223
|
-
type: Injectable,
|
|
224
|
-
args: [{
|
|
225
|
-
providedIn: 'root',
|
|
226
|
-
}]
|
|
227
|
-
}] });
|
|
228
|
-
|
|
229
|
-
const FLOWBITE_NAVBAR_TOGGLE_CUSTOM_STYLE_DEFAULT_VALUE = new InjectionToken('FLOWBITE_NAVBAR_TOGGLE_CUSTOM_STYLE_DEFAULT_VALUE');
|
|
230
|
-
const navbarToggleDefaultValueProvider = makeEnvironmentProviders([
|
|
206
|
+
const provideFlowbiteNavbarItemConfig = (config) => [
|
|
231
207
|
{
|
|
232
|
-
provide:
|
|
233
|
-
useValue: {},
|
|
208
|
+
provide: FlowbiteNavbarItemConfigToken,
|
|
209
|
+
useValue: { ...defaultFlowbiteNavbarItemConfig, ...config },
|
|
234
210
|
},
|
|
235
|
-
]
|
|
211
|
+
];
|
|
236
212
|
/**
|
|
237
|
-
*
|
|
213
|
+
* Inject the NavbarItem configuration
|
|
214
|
+
* @see {@link defaultFlowbiteNavbarItemConfig}
|
|
215
|
+
* @returns The configuration
|
|
238
216
|
*/
|
|
239
|
-
|
|
217
|
+
const injectFlowbiteNavbarItemConfig = () => inject(FlowbiteNavbarItemConfigToken, { optional: true }) ?? defaultFlowbiteNavbarItemConfig;
|
|
218
|
+
|
|
219
|
+
const FlowbiteNavbarItemStateToken = createStateToken('Flowbite NavbarItem');
|
|
220
|
+
const provideFlowbiteNavbarItemState = createStateProvider(FlowbiteNavbarItemStateToken);
|
|
221
|
+
const injectFlowbiteNavbarItemState = createStateInjector(FlowbiteNavbarItemStateToken);
|
|
222
|
+
const flowbiteNavbarItemState = createState(FlowbiteNavbarItemStateToken);
|
|
223
|
+
|
|
224
|
+
class NavbarItem {
|
|
240
225
|
constructor() {
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
/**
|
|
255
|
-
* `DomSanitizer` service
|
|
256
|
-
*/
|
|
257
|
-
this.domSanitizer = inject(DomSanitizer);
|
|
258
|
-
//#region properties
|
|
259
|
-
/**
|
|
260
|
-
* Set the custom style for this navbar toggle
|
|
261
|
-
*/
|
|
262
|
-
this.customStyle = model(inject(FLOWBITE_NAVBAR_TOGGLE_CUSTOM_STYLE_DEFAULT_VALUE));
|
|
263
|
-
}
|
|
264
|
-
//#endregion
|
|
265
|
-
//#region BaseComponent implementation
|
|
266
|
-
fetchClass() {
|
|
267
|
-
return this.themeService.getClasses({
|
|
268
|
-
customStyle: this.customStyle(),
|
|
226
|
+
this.config = injectFlowbiteNavbarItemConfig();
|
|
227
|
+
this.navbarState = injectFlowbiteNavbarState();
|
|
228
|
+
/**
|
|
229
|
+
* @see {@link injectFlowbiteNavbarItemConfig}
|
|
230
|
+
*/
|
|
231
|
+
this.customTheme = input(this.config.customTheme);
|
|
232
|
+
this.theme = computed(() => {
|
|
233
|
+
const mergedTheme = mergeDeep(this.config.baseTheme, this.state.customTheme());
|
|
234
|
+
return {
|
|
235
|
+
host: {
|
|
236
|
+
root: twMerge(mergedTheme.host.base, mergedTheme.host.transition, mergedTheme.host.focus, mergedTheme.host.disabled, colorToTheme(mergedTheme.host.color, this.navbarState().color())),
|
|
237
|
+
},
|
|
238
|
+
};
|
|
269
239
|
});
|
|
240
|
+
this.state = flowbiteNavbarItemState(this);
|
|
270
241
|
}
|
|
271
|
-
init() {
|
|
272
|
-
this.iconRegistry.addRawSvgIconInNamepsace('flowbite-angular', 'bars', this.domSanitizer.bypassSecurityTrustHtml(BARS_SVG_ICON));
|
|
273
|
-
}
|
|
274
|
-
//#endregion
|
|
275
242
|
/**
|
|
276
|
-
*
|
|
243
|
+
* @internal
|
|
277
244
|
*/
|
|
278
245
|
onClick() {
|
|
279
|
-
|
|
280
|
-
this.navbarComponent().isOpen.set(!isCollapsed);
|
|
246
|
+
this.toggleNavbar();
|
|
281
247
|
}
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
248
|
+
/**
|
|
249
|
+
* @internal
|
|
250
|
+
*/
|
|
251
|
+
toggleNavbar() {
|
|
252
|
+
this.navbarState().toggle();
|
|
253
|
+
}
|
|
254
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: NavbarItem, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
255
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.0.6", type: NavbarItem, isStandalone: true, selector: "\n a[flowbiteNavbarItem],\n button[flowbiteNavbarItem]\n ", inputs: { customTheme: { classPropertyName: "customTheme", publicName: "customTheme", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "onClick()" }, properties: { "class": "theme().host.root" } }, providers: [provideFlowbiteNavbarItemState()], exportAs: ["flowbiteNavbarItem"], hostDirectives: [{ directive: i1.BaseButton, inputs: ["color", "color"] }, { directive: i2.NgpButton, inputs: ["disabled", "disabled"] }, { directive: i3.NgpFocus, inputs: ["ngpFocusDisabled", "focusDisabled"], outputs: ["ngpFocus", "ngpFocus"] }], ngImport: i0 }); }
|
|
288
256
|
}
|
|
289
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
290
|
-
type:
|
|
257
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: NavbarItem, decorators: [{
|
|
258
|
+
type: Directive,
|
|
291
259
|
args: [{
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
svgIcon="flowbite-angular:bars"
|
|
297
|
-
class="w-5 h-5" />
|
|
260
|
+
standalone: true,
|
|
261
|
+
selector: `
|
|
262
|
+
a[flowbiteNavbarItem],
|
|
263
|
+
button[flowbiteNavbarItem]
|
|
298
264
|
`,
|
|
265
|
+
exportAs: 'flowbiteNavbarItem',
|
|
266
|
+
hostDirectives: [
|
|
267
|
+
{
|
|
268
|
+
directive: BaseButton,
|
|
269
|
+
inputs: ['color'],
|
|
270
|
+
outputs: [],
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
directive: NgpButton,
|
|
274
|
+
inputs: ['disabled:disabled'],
|
|
275
|
+
outputs: [],
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
directive: NgpFocus,
|
|
279
|
+
inputs: ['ngpFocusDisabled:focusDisabled'],
|
|
280
|
+
outputs: ['ngpFocus'],
|
|
281
|
+
},
|
|
282
|
+
],
|
|
283
|
+
providers: [provideFlowbiteNavbarItemState()],
|
|
299
284
|
host: {
|
|
285
|
+
'[class]': `theme().host.root`,
|
|
300
286
|
'(click)': 'onClick()',
|
|
301
287
|
},
|
|
302
|
-
encapsulation: ViewEncapsulation.None,
|
|
303
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
304
288
|
}]
|
|
305
289
|
}] });
|
|
306
290
|
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
}
|
|
320
|
-
getClasses(properties) {
|
|
321
|
-
const theme = mergeTheme(this.baseTheme, properties.customStyle);
|
|
322
|
-
const output = {
|
|
323
|
-
rootClass: twMerge(theme.root.base, theme.root.color['gray'], theme.root.isRounded[properties.isRounded], theme.root.hasBorder[properties.hasBorder], theme.root.isFixed[properties.isFixed]),
|
|
324
|
-
};
|
|
325
|
-
return output;
|
|
326
|
-
}
|
|
327
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: NavbarThemeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
328
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: NavbarThemeService, providedIn: 'root' }); }
|
|
329
|
-
}
|
|
330
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: NavbarThemeService, decorators: [{
|
|
331
|
-
type: Injectable,
|
|
332
|
-
args: [{
|
|
333
|
-
providedIn: 'root',
|
|
334
|
-
}]
|
|
335
|
-
}] });
|
|
336
|
-
|
|
337
|
-
const FLOWBITE_NAVBAR_COLOR_DEFAULT_VALUE = new InjectionToken('FLOWBITE_NAVBAR_COLOR_DEFAULT_VALUE');
|
|
338
|
-
const FLOWBITE_NAVBAR_IS_OPEN_DEFAULT_VALUE = new InjectionToken('FLOWBITE_NAVBAR_IS_OPEN_DEFAULT_VALUE');
|
|
339
|
-
const FLOWBITE_NAVBAR_IS_ROUNDED_DEFAULT_VALUE = new InjectionToken('FLOWBITE_NAVBAR_IS_ROUNDED_DEFAULT_VALUE');
|
|
340
|
-
const FLOWBITE_NAVBAR_HAS_BORDER_DEFAULT_VALUE = new InjectionToken('FLOWBITE_NAVBAR_HAS_BORDER_DEFAULT_VALUE');
|
|
341
|
-
const FLOWBITE_NAVBAR_IS_FIXED_DEFAULT_VALUE = new InjectionToken('FLOWBITE_NAVBAR_IS_FIXED_DEFAULT_VALUE');
|
|
342
|
-
const FLOWBITE_NAVBAR_CUSTOM_STYLE_DEFAULT_VALUE = new InjectionToken('FLOWBITE_NAVBAR_CUSTOM_STYLE_DEFAULT_VALUE');
|
|
343
|
-
const navbarDefaultValueProvider = makeEnvironmentProviders([
|
|
344
|
-
{
|
|
345
|
-
provide: FLOWBITE_NAVBAR_COLOR_DEFAULT_VALUE,
|
|
346
|
-
useValue: 'primary',
|
|
347
|
-
},
|
|
348
|
-
{
|
|
349
|
-
provide: FLOWBITE_NAVBAR_IS_OPEN_DEFAULT_VALUE,
|
|
350
|
-
useValue: false,
|
|
351
|
-
},
|
|
352
|
-
{
|
|
353
|
-
provide: FLOWBITE_NAVBAR_IS_ROUNDED_DEFAULT_VALUE,
|
|
354
|
-
useValue: false,
|
|
355
|
-
},
|
|
356
|
-
{
|
|
357
|
-
provide: FLOWBITE_NAVBAR_HAS_BORDER_DEFAULT_VALUE,
|
|
358
|
-
useValue: false,
|
|
291
|
+
const flowbiteNavbarContentTheme = createTheme({
|
|
292
|
+
host: {
|
|
293
|
+
base: 'w-full overflow-hidden max-md:order-last md:flex md:w-auto',
|
|
294
|
+
transition: '',
|
|
295
|
+
fixed: {
|
|
296
|
+
on: '',
|
|
297
|
+
off: '',
|
|
298
|
+
},
|
|
299
|
+
open: {
|
|
300
|
+
on: '',
|
|
301
|
+
off: 'hidden',
|
|
302
|
+
},
|
|
359
303
|
},
|
|
360
|
-
{
|
|
361
|
-
|
|
362
|
-
|
|
304
|
+
container: {
|
|
305
|
+
base: 'mt-4 flex flex-col rounded-lg border p-4 font-medium md:mt-0 md:flex-row md:space-x-4 md:border-0 md:p-0',
|
|
306
|
+
transition: '',
|
|
307
|
+
color: {
|
|
308
|
+
default: {
|
|
309
|
+
light: 'bg-gray-200 md:bg-inherit',
|
|
310
|
+
dark: 'dark:bg-gray-800 dark:md:bg-inherit',
|
|
311
|
+
},
|
|
312
|
+
info: {
|
|
313
|
+
light: 'bg-gray-200 md:bg-inherit',
|
|
314
|
+
dark: 'dark:bg-gray-800 dark:md:bg-inherit',
|
|
315
|
+
},
|
|
316
|
+
failure: {
|
|
317
|
+
light: 'bg-gray-200 md:bg-inherit',
|
|
318
|
+
dark: 'dark:bg-gray-800 dark:md:bg-inherit',
|
|
319
|
+
},
|
|
320
|
+
success: {
|
|
321
|
+
light: 'bg-gray-200 md:bg-inherit',
|
|
322
|
+
dark: 'dark:bg-gray-800 dark:md:bg-inherit',
|
|
323
|
+
},
|
|
324
|
+
warning: {
|
|
325
|
+
light: 'bg-gray-200 md:bg-inherit',
|
|
326
|
+
dark: 'dark:bg-gray-800 dark:md:bg-inherit',
|
|
327
|
+
},
|
|
328
|
+
primary: {
|
|
329
|
+
light: 'bg-gray-200 md:bg-inherit',
|
|
330
|
+
dark: 'dark:bg-gray-800 dark:md:bg-inherit',
|
|
331
|
+
},
|
|
332
|
+
},
|
|
363
333
|
},
|
|
334
|
+
});
|
|
335
|
+
|
|
336
|
+
const defaultFlowbiteNavbarContentConfig = {
|
|
337
|
+
baseTheme: flowbiteNavbarContentTheme,
|
|
338
|
+
customTheme: {},
|
|
339
|
+
};
|
|
340
|
+
const FlowbiteNavbarContentConfigToken = new InjectionToken('FlowbiteNavbarContentConfigToken');
|
|
341
|
+
/**
|
|
342
|
+
* Provide the default NavbarContent configuration
|
|
343
|
+
* @param config The NavbarContent configuration
|
|
344
|
+
* @returns The provider
|
|
345
|
+
*/
|
|
346
|
+
const provideFlowbiteNavbarContentConfig = (config) => [
|
|
364
347
|
{
|
|
365
|
-
provide:
|
|
366
|
-
useValue: {},
|
|
348
|
+
provide: FlowbiteNavbarContentConfigToken,
|
|
349
|
+
useValue: { ...defaultFlowbiteNavbarContentConfig, ...config },
|
|
367
350
|
},
|
|
368
|
-
]
|
|
351
|
+
];
|
|
369
352
|
/**
|
|
370
|
-
*
|
|
353
|
+
* Inject the NavbarContent configuration
|
|
354
|
+
* @see {@link defaultFlowbiteNavbarContentConfig}
|
|
355
|
+
* @returns The configuration
|
|
371
356
|
*/
|
|
372
|
-
|
|
357
|
+
const injectFlowbiteNavbarContentConfig = () => inject(FlowbiteNavbarContentConfigToken, { optional: true }) ??
|
|
358
|
+
defaultFlowbiteNavbarContentConfig;
|
|
359
|
+
|
|
360
|
+
const FlowbiteNavbarContentStateToken = createStateToken('Flowbite NavbarContent');
|
|
361
|
+
const provideFlowbiteNavbarContentState = createStateProvider(FlowbiteNavbarContentStateToken);
|
|
362
|
+
const injectFlowbiteNavbarContentState = createStateInjector(FlowbiteNavbarContentStateToken);
|
|
363
|
+
const flowbiteNavbarContentState = createState(FlowbiteNavbarContentStateToken);
|
|
364
|
+
|
|
365
|
+
class NavbarContent {
|
|
373
366
|
constructor() {
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
//#region properties
|
|
392
|
-
/**
|
|
393
|
-
* Set the navbar color
|
|
394
|
-
*
|
|
395
|
-
* @default primary
|
|
396
|
-
*/
|
|
397
|
-
this.color = model(inject(FLOWBITE_NAVBAR_COLOR_DEFAULT_VALUE));
|
|
398
|
-
/**
|
|
399
|
-
* Set if the navbar is open
|
|
400
|
-
*
|
|
401
|
-
* @default false
|
|
402
|
-
*/
|
|
403
|
-
this.isOpen = model(inject(FLOWBITE_NAVBAR_IS_OPEN_DEFAULT_VALUE));
|
|
404
|
-
/**
|
|
405
|
-
* Set if the navbar is rounded
|
|
406
|
-
*
|
|
407
|
-
* @default false
|
|
408
|
-
*/
|
|
409
|
-
this.isRounded = model(inject(FLOWBITE_NAVBAR_IS_ROUNDED_DEFAULT_VALUE));
|
|
410
|
-
/**
|
|
411
|
-
* Set if the navbar has border
|
|
412
|
-
*
|
|
413
|
-
* @default false
|
|
414
|
-
*/
|
|
415
|
-
this.hasBorder = model(inject(FLOWBITE_NAVBAR_HAS_BORDER_DEFAULT_VALUE));
|
|
416
|
-
/**
|
|
417
|
-
* Set if the navbar is fixed
|
|
418
|
-
*
|
|
419
|
-
* @default false
|
|
420
|
-
*/
|
|
421
|
-
this.isFixed = model(inject(FLOWBITE_NAVBAR_IS_FIXED_DEFAULT_VALUE));
|
|
367
|
+
this.config = injectFlowbiteNavbarContentConfig();
|
|
368
|
+
this.navbarState = injectFlowbiteNavbarState();
|
|
369
|
+
/**
|
|
370
|
+
* @see {@link injectFlowbiteNavbarContentConfig}
|
|
371
|
+
*/
|
|
372
|
+
this.customTheme = input(this.config.customTheme);
|
|
373
|
+
this.theme = computed(() => {
|
|
374
|
+
const mergedTheme = mergeDeep(this.config.baseTheme, this.state.customTheme());
|
|
375
|
+
return {
|
|
376
|
+
host: {
|
|
377
|
+
root: twMerge(mergedTheme.host.base, mergedTheme.host.transition, mergedTheme.host.open[this.navbarState().open() ? 'on' : 'off']),
|
|
378
|
+
},
|
|
379
|
+
container: {
|
|
380
|
+
root: twMerge(mergedTheme.container.base, mergedTheme.container.transition, colorToTheme(mergedTheme.container.color, this.navbarState().color())),
|
|
381
|
+
},
|
|
382
|
+
};
|
|
383
|
+
});
|
|
422
384
|
/**
|
|
423
|
-
*
|
|
385
|
+
* @internal
|
|
424
386
|
*/
|
|
425
|
-
this.
|
|
387
|
+
this.state = flowbiteNavbarContentState(this);
|
|
426
388
|
}
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
isFixed: booleanToFlowbiteBoolean(this.isFixed()),
|
|
434
|
-
customStyle: this.customStyle(),
|
|
435
|
-
});
|
|
436
|
-
}
|
|
437
|
-
//#endregion
|
|
438
|
-
/**
|
|
439
|
-
* Toggle visibility of the navbar
|
|
440
|
-
*
|
|
441
|
-
* @param isOpen When provide force the isOpen value
|
|
442
|
-
*/
|
|
443
|
-
toggleVisibility(isOpen) {
|
|
444
|
-
if (isOpen === undefined) {
|
|
445
|
-
isOpen = untracked(() => !this.isOpen());
|
|
446
|
-
}
|
|
447
|
-
this.isOpen.set(isOpen);
|
|
448
|
-
}
|
|
449
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: NavbarComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
450
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.0.4", 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, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
389
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: NavbarContent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
390
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.0.6", type: NavbarContent, isStandalone: true, selector: "\n div[flowbiteNavbarContent]\n ", inputs: { customTheme: { classPropertyName: "customTheme", publicName: "customTheme", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "theme().host.root" } }, providers: [provideFlowbiteNavbarContentState()], exportAs: ["flowbiteNavbarContent"], ngImport: i0, template: `
|
|
391
|
+
<ul [class]="theme().container.root">
|
|
392
|
+
<ng-content />
|
|
393
|
+
</ul>
|
|
394
|
+
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
451
395
|
}
|
|
452
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
396
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: NavbarContent, decorators: [{
|
|
453
397
|
type: Component,
|
|
454
398
|
args: [{
|
|
455
399
|
standalone: true,
|
|
456
|
-
selector:
|
|
457
|
-
|
|
400
|
+
selector: `
|
|
401
|
+
div[flowbiteNavbarContent]
|
|
402
|
+
`,
|
|
403
|
+
exportAs: 'flowbiteNavbarContent',
|
|
404
|
+
hostDirectives: [],
|
|
405
|
+
imports: [],
|
|
406
|
+
providers: [provideFlowbiteNavbarContentState()],
|
|
407
|
+
host: { '[class]': `theme().host.root` },
|
|
408
|
+
template: `
|
|
409
|
+
<ul [class]="theme().container.root">
|
|
410
|
+
<ng-content />
|
|
411
|
+
</ul>
|
|
412
|
+
`,
|
|
458
413
|
encapsulation: ViewEncapsulation.None,
|
|
459
414
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
460
415
|
}]
|
|
461
416
|
}] });
|
|
462
417
|
|
|
463
|
-
const
|
|
464
|
-
|
|
465
|
-
base: 'flex
|
|
418
|
+
const flowbiteNavbarToggleTheme = createTheme({
|
|
419
|
+
host: {
|
|
420
|
+
base: 'inline-flex cursor-pointer items-center justify-center rounded-lg p-2 text-sm md:hidden',
|
|
421
|
+
transition: '',
|
|
422
|
+
focus: 'data-focus:ring-0 data-focus:outline-none data-focus-visible:ring-2 data-focus-visible:outline-none',
|
|
423
|
+
disabled: 'data-disabled:cursor-not-allowed data-disabled:opacity-50',
|
|
424
|
+
size: {},
|
|
425
|
+
pill: {},
|
|
466
426
|
color: {
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
427
|
+
default: {
|
|
428
|
+
light: 'text-gray-900',
|
|
429
|
+
dark: 'dark:text-gray-100',
|
|
430
|
+
},
|
|
431
|
+
info: {
|
|
432
|
+
light: 'text-blue-900',
|
|
433
|
+
dark: 'dark:text-blue-100',
|
|
434
|
+
},
|
|
435
|
+
failure: {
|
|
436
|
+
light: 'text-red-900',
|
|
437
|
+
dark: 'dark:text-red-100',
|
|
438
|
+
},
|
|
439
|
+
success: {
|
|
440
|
+
light: 'text-green-900',
|
|
441
|
+
dark: 'dark:text-green-100',
|
|
442
|
+
},
|
|
443
|
+
warning: {
|
|
444
|
+
light: 'text-yellow-900',
|
|
445
|
+
dark: 'dark:text-yellow-100',
|
|
446
|
+
},
|
|
447
|
+
primary: {
|
|
448
|
+
light: 'text-primary-900',
|
|
449
|
+
dark: 'dark:text-primary-100',
|
|
450
|
+
},
|
|
481
451
|
},
|
|
452
|
+
colorOutline: {},
|
|
482
453
|
},
|
|
483
454
|
});
|
|
484
455
|
|
|
456
|
+
const defaultFlowbiteNavbarToggleConfig = {
|
|
457
|
+
baseTheme: flowbiteNavbarToggleTheme,
|
|
458
|
+
customTheme: {},
|
|
459
|
+
};
|
|
460
|
+
const FlowbiteNavbarToggleConfigToken = new InjectionToken('FlowbiteNavbarToggleConfigToken');
|
|
485
461
|
/**
|
|
486
|
-
*
|
|
462
|
+
* Provide the default NavbarToggle configuration
|
|
463
|
+
* @param config The NavbarToggle configuration
|
|
464
|
+
* @returns The provider
|
|
487
465
|
*/
|
|
488
|
-
const
|
|
489
|
-
|
|
490
|
-
|
|
466
|
+
const provideFlowbiteNavbarToggleConfig = (config) => [
|
|
467
|
+
{
|
|
468
|
+
provide: FlowbiteNavbarToggleConfigToken,
|
|
469
|
+
useValue: { ...defaultFlowbiteNavbarToggleConfig, ...config },
|
|
491
470
|
},
|
|
492
|
-
|
|
493
|
-
|
|
471
|
+
];
|
|
494
472
|
/**
|
|
495
|
-
*
|
|
473
|
+
* Inject the NavbarToggle configuration
|
|
474
|
+
* @see {@link defaultFlowbiteNavbarToggleConfig}
|
|
475
|
+
* @returns The configuration
|
|
496
476
|
*/
|
|
497
|
-
const
|
|
498
|
-
root: {
|
|
499
|
-
base: 'w-full md:!h-fit md:w-auto order-last md:order-none overflow-hidden',
|
|
500
|
-
},
|
|
501
|
-
list: {
|
|
502
|
-
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',
|
|
503
|
-
},
|
|
504
|
-
});
|
|
477
|
+
const injectFlowbiteNavbarToggleConfig = () => inject(FlowbiteNavbarToggleConfigToken, { optional: true }) ?? defaultFlowbiteNavbarToggleConfig;
|
|
505
478
|
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
* ```
|
|
511
|
-
* var theme = inject(FLOWBITE_NAVBAR_ITEM_THEME_TOKEN)
|
|
512
|
-
* ```
|
|
513
|
-
*/
|
|
514
|
-
const FLOWBITE_NAVBAR_ITEM_THEME_TOKEN = new InjectionToken('FLOWBITE_NAVBAR_ITEM_THEME_TOKEN');
|
|
515
|
-
class NavbarItemThemeService {
|
|
516
|
-
constructor() {
|
|
517
|
-
this.baseTheme = inject(FLOWBITE_NAVBAR_ITEM_THEME_TOKEN);
|
|
518
|
-
}
|
|
519
|
-
getClasses(properties) {
|
|
520
|
-
const theme = mergeTheme(this.baseTheme, properties.customStyle);
|
|
521
|
-
const output = {
|
|
522
|
-
rootClass: twMerge(theme.root.base, theme.root.color[properties.color]),
|
|
523
|
-
};
|
|
524
|
-
return output;
|
|
525
|
-
}
|
|
526
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: NavbarItemThemeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
527
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: NavbarItemThemeService, providedIn: 'root' }); }
|
|
528
|
-
}
|
|
529
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: NavbarItemThemeService, decorators: [{
|
|
530
|
-
type: Injectable,
|
|
531
|
-
args: [{
|
|
532
|
-
providedIn: 'root',
|
|
533
|
-
}]
|
|
534
|
-
}] });
|
|
479
|
+
const FlowbiteNavbarToggleStateToken = createStateToken('Flowbite NavbarToggle');
|
|
480
|
+
const provideFlowbiteNavbarToggleState = createStateProvider(FlowbiteNavbarToggleStateToken);
|
|
481
|
+
const injectFlowbiteNavbarToggleState = createStateInjector(FlowbiteNavbarToggleStateToken);
|
|
482
|
+
const flowbiteNavbarToggleState = createState(FlowbiteNavbarToggleStateToken);
|
|
535
483
|
|
|
536
|
-
|
|
537
|
-
const navbarItemDefaultValueProvider = makeEnvironmentProviders([
|
|
538
|
-
{
|
|
539
|
-
provide: FLOWBITE_NAVBAR_ITEM_CUSTOM_STYLE_DEFAULT_VALUE,
|
|
540
|
-
useValue: {},
|
|
541
|
-
},
|
|
542
|
-
]);
|
|
543
|
-
/**
|
|
544
|
-
* @see https://flowbite.com/docs/components/navbar/
|
|
545
|
-
*/
|
|
546
|
-
class NavbarItemComponent extends BaseComponent {
|
|
484
|
+
class NavbarToggle {
|
|
547
485
|
constructor() {
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
*/
|
|
562
|
-
this.themeService = inject(NavbarItemThemeService);
|
|
563
|
-
/**
|
|
564
|
-
* The parent `NavbarContentComponent`
|
|
565
|
-
*/
|
|
566
|
-
this.navbarContentComponent = inject(NavbarContentComponent);
|
|
567
|
-
//#region properties
|
|
568
|
-
/**
|
|
569
|
-
* Set the navbar item color
|
|
570
|
-
*
|
|
571
|
-
* @default `NavbarContentComponent`'s color
|
|
572
|
-
*/
|
|
573
|
-
this.color = model(this.navbarContentComponent.color());
|
|
574
|
-
/**
|
|
575
|
-
* Set the custom style for this navbar item
|
|
576
|
-
*/
|
|
577
|
-
this.customStyle = model(inject(FLOWBITE_NAVBAR_ITEM_CUSTOM_STYLE_DEFAULT_VALUE));
|
|
578
|
-
}
|
|
579
|
-
//#endregion
|
|
580
|
-
//#region BaseComponent implementation
|
|
581
|
-
fetchClass() {
|
|
582
|
-
return this.themeService.getClasses({
|
|
583
|
-
color: this.color(),
|
|
584
|
-
customStyle: this.customStyle(),
|
|
486
|
+
this.config = injectFlowbiteNavbarToggleConfig();
|
|
487
|
+
this.navbarState = injectFlowbiteNavbarState();
|
|
488
|
+
/**
|
|
489
|
+
* @see {@link injectFlowbiteNavbarToggleConfig}
|
|
490
|
+
*/
|
|
491
|
+
this.customTheme = input(this.config.customTheme);
|
|
492
|
+
this.theme = computed(() => {
|
|
493
|
+
const mergedTheme = mergeDeep(this.config.baseTheme, this.state.customTheme());
|
|
494
|
+
return {
|
|
495
|
+
host: {
|
|
496
|
+
root: twMerge(mergedTheme.host.base, mergedTheme.host.transition, mergedTheme.host.focus, mergedTheme.host.disabled, colorToTheme(mergedTheme.host.color, this.navbarState().color())),
|
|
497
|
+
},
|
|
498
|
+
};
|
|
585
499
|
});
|
|
500
|
+
this.state = flowbiteNavbarToggleState(this);
|
|
586
501
|
}
|
|
587
|
-
//#endregion
|
|
588
502
|
/**
|
|
589
|
-
*
|
|
503
|
+
* @internal
|
|
590
504
|
*/
|
|
591
505
|
onClick() {
|
|
592
|
-
this.
|
|
506
|
+
this.toggleNavbar();
|
|
507
|
+
}
|
|
508
|
+
/**
|
|
509
|
+
* @internal
|
|
510
|
+
*/
|
|
511
|
+
toggleNavbar() {
|
|
512
|
+
this.navbarState().toggle();
|
|
593
513
|
}
|
|
594
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
595
|
-
static { this.ɵ
|
|
514
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: NavbarToggle, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
515
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.0.6", type: NavbarToggle, isStandalone: true, selector: "\n button[flowbiteNavbarToggle]\n ", inputs: { customTheme: { classPropertyName: "customTheme", publicName: "customTheme", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "onClick()" }, properties: { "class": "theme().host.root" } }, providers: [provideFlowbiteNavbarToggleState(), provideIcons({ bars })], exportAs: ["flowbiteNavbarToggle"], hostDirectives: [{ directive: i1.BaseButton }], ngImport: i0 }); }
|
|
596
516
|
}
|
|
597
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
598
|
-
type:
|
|
517
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: NavbarToggle, decorators: [{
|
|
518
|
+
type: Directive,
|
|
599
519
|
args: [{
|
|
600
|
-
selector: 'flowbite-navbar-item',
|
|
601
520
|
standalone: true,
|
|
602
|
-
|
|
521
|
+
selector: `
|
|
522
|
+
button[flowbiteNavbarToggle]
|
|
523
|
+
`,
|
|
524
|
+
exportAs: 'flowbiteNavbarToggle',
|
|
525
|
+
hostDirectives: [
|
|
526
|
+
{
|
|
527
|
+
directive: BaseButton,
|
|
528
|
+
inputs: [],
|
|
529
|
+
outputs: [],
|
|
530
|
+
},
|
|
531
|
+
],
|
|
532
|
+
providers: [provideFlowbiteNavbarToggleState(), provideIcons({ bars })],
|
|
603
533
|
host: {
|
|
534
|
+
'[class]': `theme().host.root`,
|
|
604
535
|
'(click)': 'onClick()',
|
|
605
536
|
},
|
|
606
|
-
encapsulation: ViewEncapsulation.None,
|
|
607
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
608
537
|
}]
|
|
609
538
|
}] });
|
|
610
539
|
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
root: {
|
|
616
|
-
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',
|
|
617
|
-
color: {
|
|
618
|
-
primary: 'md:hover:text-primary-700 md:dark:hover:text-primary-500 aria-current:text-primary-500 dark:aria-current:text-primary-300',
|
|
619
|
-
gray: 'md:hover:text-gray-700 md:dark:hover:text-gray-500 aria-current:text-gray-500 dark:aria-current:text-gray-300',
|
|
620
|
-
},
|
|
540
|
+
const flowbiteNavbarBrandTheme = createTheme({
|
|
541
|
+
host: {
|
|
542
|
+
base: 'flex cursor-pointer items-center space-x-3',
|
|
543
|
+
transition: '',
|
|
621
544
|
},
|
|
622
545
|
});
|
|
623
546
|
|
|
547
|
+
const defaultFlowbiteNavbarBrandConfig = {
|
|
548
|
+
baseTheme: flowbiteNavbarBrandTheme,
|
|
549
|
+
customTheme: {},
|
|
550
|
+
};
|
|
551
|
+
const FlowbiteNavbarBrandConfigToken = new InjectionToken('FlowbiteNavbarBrandConfigToken');
|
|
624
552
|
/**
|
|
625
|
-
*
|
|
553
|
+
* Provide the default NavbarBrand configuration
|
|
554
|
+
* @param config The NavbarBrand configuration
|
|
555
|
+
* @returns The provider
|
|
626
556
|
*/
|
|
627
|
-
const
|
|
628
|
-
|
|
629
|
-
|
|
557
|
+
const provideFlowbiteNavbarBrandConfig = (config) => [
|
|
558
|
+
{
|
|
559
|
+
provide: FlowbiteNavbarBrandConfigToken,
|
|
560
|
+
useValue: { ...defaultFlowbiteNavbarBrandConfig, ...config },
|
|
630
561
|
},
|
|
631
|
-
|
|
632
|
-
|
|
562
|
+
];
|
|
633
563
|
/**
|
|
634
|
-
*
|
|
635
|
-
*
|
|
636
|
-
* @
|
|
637
|
-
* ```
|
|
638
|
-
* var theme = inject(FLOWBITE_NAVBAR_ICON_BUTTON_THEME_TOKEN)
|
|
639
|
-
* ```
|
|
564
|
+
* Inject the NavbarBrand configuration
|
|
565
|
+
* @see {@link defaultFlowbiteNavbarBrandConfig}
|
|
566
|
+
* @returns The configuration
|
|
640
567
|
*/
|
|
641
|
-
const
|
|
642
|
-
|
|
568
|
+
const injectFlowbiteNavbarBrandConfig = () => inject(FlowbiteNavbarBrandConfigToken, { optional: true }) ?? defaultFlowbiteNavbarBrandConfig;
|
|
569
|
+
|
|
570
|
+
const FlowbiteNavbarBrandStateToken = createStateToken('Flowbite NavbarBrand');
|
|
571
|
+
const provideFlowbiteNavbarBrandState = createStateProvider(FlowbiteNavbarBrandStateToken);
|
|
572
|
+
const injectFlowbiteNavbarBrandState = createStateInjector(FlowbiteNavbarBrandStateToken);
|
|
573
|
+
const flowbiteNavbarBrandState = createState(FlowbiteNavbarBrandStateToken);
|
|
574
|
+
|
|
575
|
+
class NavbarBrand {
|
|
643
576
|
constructor() {
|
|
644
|
-
this.
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
577
|
+
this.config = injectFlowbiteNavbarBrandConfig();
|
|
578
|
+
/**
|
|
579
|
+
* @see {@link injectFlowbiteNavbarBrandConfig}
|
|
580
|
+
*/
|
|
581
|
+
this.customTheme = input(this.config.customTheme);
|
|
582
|
+
this.theme = computed(() => {
|
|
583
|
+
const mergedTheme = mergeDeep(this.config.baseTheme, this.state.customTheme());
|
|
584
|
+
return {
|
|
585
|
+
host: {
|
|
586
|
+
root: twMerge(mergedTheme.host.base, mergedTheme.host.transition),
|
|
587
|
+
},
|
|
588
|
+
};
|
|
589
|
+
});
|
|
590
|
+
this.state = flowbiteNavbarBrandState(this);
|
|
652
591
|
}
|
|
653
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
654
|
-
static { this.ɵ
|
|
592
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: NavbarBrand, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
593
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.0.6", type: NavbarBrand, isStandalone: true, selector: "\n a[flowbiteNavbarBrand]\n ", inputs: { customTheme: { classPropertyName: "customTheme", publicName: "customTheme", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "theme().host.root", "attr.type": "button" } }, providers: [provideFlowbiteNavbarBrandState()], exportAs: ["flowbiteNavbarBrand"], ngImport: i0 }); }
|
|
655
594
|
}
|
|
656
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
657
|
-
type:
|
|
595
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: NavbarBrand, decorators: [{
|
|
596
|
+
type: Directive,
|
|
658
597
|
args: [{
|
|
659
|
-
|
|
598
|
+
standalone: true,
|
|
599
|
+
selector: `
|
|
600
|
+
a[flowbiteNavbarBrand]
|
|
601
|
+
`,
|
|
602
|
+
exportAs: 'flowbiteNavbarBrand',
|
|
603
|
+
hostDirectives: [],
|
|
604
|
+
providers: [provideFlowbiteNavbarBrandState()],
|
|
605
|
+
host: {
|
|
606
|
+
'[class]': `theme().host.root`,
|
|
607
|
+
'[attr.type]': 'button',
|
|
608
|
+
},
|
|
660
609
|
}]
|
|
661
610
|
}] });
|
|
662
611
|
|
|
663
|
-
const
|
|
664
|
-
|
|
612
|
+
const flowbiteNavbarIconItemTheme = createTheme({
|
|
613
|
+
host: {
|
|
614
|
+
base: 'hidden cursor-pointer items-center justify-center rounded-lg p-2 text-sm sm:inline-flex',
|
|
615
|
+
transition: '',
|
|
616
|
+
focus: 'data-focus:ring-0 data-focus:outline-none data-focus-visible:ring-2 data-focus-visible:outline-none',
|
|
617
|
+
disabled: 'data-disabled:cursor-not-allowed data-disabled:opacity-50',
|
|
618
|
+
size: {},
|
|
619
|
+
pill: {},
|
|
620
|
+
color: {
|
|
621
|
+
default: {
|
|
622
|
+
light: 'text-gray-800 data-hover:text-gray-900',
|
|
623
|
+
dark: 'dark:text-white dark:data-hover:text-gray-100',
|
|
624
|
+
},
|
|
625
|
+
info: {
|
|
626
|
+
light: 'text-gray-800 data-hover:text-blue-900',
|
|
627
|
+
dark: 'dark:text-white dark:data-hover:text-blue-100',
|
|
628
|
+
},
|
|
629
|
+
failure: {
|
|
630
|
+
light: 'text-gray-800 data-hover:text-red-900',
|
|
631
|
+
dark: 'dark:text-white dark:data-hover:text-red-100',
|
|
632
|
+
},
|
|
633
|
+
success: {
|
|
634
|
+
light: 'text-gray-800 data-hover:text-green-900',
|
|
635
|
+
dark: 'dark:text-white dark:data-hover:text-green-100',
|
|
636
|
+
},
|
|
637
|
+
warning: {
|
|
638
|
+
light: 'text-gray-800 data-hover:text-yellow-900',
|
|
639
|
+
dark: 'dark:text-white dark:data-hover:text-yellow-100',
|
|
640
|
+
},
|
|
641
|
+
primary: {
|
|
642
|
+
light: 'data-hover:text-primary-900 text-gray-800',
|
|
643
|
+
dark: 'dark:data-hover:text-primary-100 dark:text-white',
|
|
644
|
+
},
|
|
645
|
+
},
|
|
646
|
+
colorOutline: {},
|
|
647
|
+
},
|
|
648
|
+
});
|
|
649
|
+
|
|
650
|
+
const defaultFlowbiteNavbarIconItemConfig = {
|
|
651
|
+
baseTheme: flowbiteNavbarIconItemTheme,
|
|
652
|
+
customTheme: {},
|
|
653
|
+
};
|
|
654
|
+
const FlowbiteNavbarIconItemConfigToken = new InjectionToken('FlowbiteNavbarIconItemConfigToken');
|
|
655
|
+
/**
|
|
656
|
+
* Provide the default NavbarIconItem configuration
|
|
657
|
+
* @param config The NavbarIconItem configuration
|
|
658
|
+
* @returns The provider
|
|
659
|
+
*/
|
|
660
|
+
const provideFlowbiteNavbarIconItemConfig = (config) => [
|
|
665
661
|
{
|
|
666
|
-
provide:
|
|
667
|
-
useValue: {},
|
|
662
|
+
provide: FlowbiteNavbarIconItemConfigToken,
|
|
663
|
+
useValue: { ...defaultFlowbiteNavbarIconItemConfig, ...config },
|
|
668
664
|
},
|
|
669
|
-
]
|
|
665
|
+
];
|
|
670
666
|
/**
|
|
671
|
-
*
|
|
667
|
+
* Inject the NavbarIconItem configuration
|
|
668
|
+
* @see {@link defaultFlowbiteNavbarIconItemConfig}
|
|
669
|
+
* @returns The configuration
|
|
672
670
|
*/
|
|
673
|
-
|
|
671
|
+
const injectFlowbiteNavbarIconItemConfig = () => inject(FlowbiteNavbarIconItemConfigToken, { optional: true }) ??
|
|
672
|
+
defaultFlowbiteNavbarIconItemConfig;
|
|
673
|
+
|
|
674
|
+
const FlowbiteNavbarIconItemStateToken = createStateToken('Flowbite NavbarIconItem');
|
|
675
|
+
const provideFlowbiteNavbarIconItemState = createStateProvider(FlowbiteNavbarIconItemStateToken);
|
|
676
|
+
const injectFlowbiteNavbarIconItemState = createStateInjector(FlowbiteNavbarIconItemStateToken);
|
|
677
|
+
const flowbiteNavbarIconItemState = createState(FlowbiteNavbarIconItemStateToken);
|
|
678
|
+
|
|
679
|
+
class NavbarIconItem {
|
|
674
680
|
constructor() {
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
* Set the navbar icon button color
|
|
691
|
-
*
|
|
692
|
-
* @default `NavbarContentComponent`'s color
|
|
693
|
-
* @default `NavbarComponent`'s color
|
|
694
|
-
*/
|
|
695
|
-
this.color = model(this.navbarContentComponent?.color() || this.navbarComponent.color());
|
|
681
|
+
this.baseButtonState = injectFlowbiteBaseButtonState();
|
|
682
|
+
this.navbarState = injectFlowbiteNavbarState();
|
|
683
|
+
this.config = injectFlowbiteNavbarIconItemConfig();
|
|
684
|
+
/**
|
|
685
|
+
* @see {@link injectFlowbiteNavbarIconItemConfig}
|
|
686
|
+
*/
|
|
687
|
+
this.customTheme = input(this.config.customTheme);
|
|
688
|
+
this.theme = computed(() => {
|
|
689
|
+
const mergedTheme = mergeDeep(this.config.baseTheme, this.state.customTheme());
|
|
690
|
+
return {
|
|
691
|
+
host: {
|
|
692
|
+
root: twMerge(mergedTheme.host.base, mergedTheme.host.transition, mergedTheme.host.focus, mergedTheme.host.disabled, colorToTheme(mergedTheme.host.color, this.navbarState().color())),
|
|
693
|
+
},
|
|
694
|
+
};
|
|
695
|
+
});
|
|
696
696
|
/**
|
|
697
|
-
*
|
|
697
|
+
* @internal
|
|
698
698
|
*/
|
|
699
|
-
this.
|
|
700
|
-
}
|
|
701
|
-
//#endregion
|
|
702
|
-
//#region BaseComponent implementation
|
|
703
|
-
fetchClass() {
|
|
704
|
-
return this.themeService.getClasses({
|
|
705
|
-
color: this.color(),
|
|
706
|
-
customStyle: this.customStyle(),
|
|
707
|
-
});
|
|
699
|
+
this.state = flowbiteNavbarIconItemState(this);
|
|
708
700
|
}
|
|
709
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
710
|
-
static { this.ɵ
|
|
701
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: NavbarIconItem, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
702
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.0.6", type: NavbarIconItem, isStandalone: true, selector: "\n button[flowbiteNavbarIconItem],\n a[flowbiteNavbarIconItem],\n ", inputs: { customTheme: { classPropertyName: "customTheme", publicName: "customTheme", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "theme().host.root" } }, providers: [provideFlowbiteNavbarIconItemState()], exportAs: ["flowbiteNavbarIconItem"], hostDirectives: [{ directive: i1.BaseButton, inputs: ["color", "color"] }, { directive: i2.NgpButton, inputs: ["disabled", "disabled"] }, { directive: i3.NgpFocus, inputs: ["ngpFocusDisabled", "focusDisabled"], outputs: ["ngpFocus", "ngpFocus"] }], ngImport: i0 }); }
|
|
711
703
|
}
|
|
712
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
713
|
-
type:
|
|
704
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: NavbarIconItem, decorators: [{
|
|
705
|
+
type: Directive,
|
|
714
706
|
args: [{
|
|
715
|
-
selector: 'flowbite-navbar-icon-button',
|
|
716
707
|
standalone: true,
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
708
|
+
selector: `
|
|
709
|
+
button[flowbiteNavbarIconItem],
|
|
710
|
+
a[flowbiteNavbarIconItem],
|
|
711
|
+
`,
|
|
712
|
+
exportAs: 'flowbiteNavbarIconItem',
|
|
713
|
+
hostDirectives: [
|
|
714
|
+
{
|
|
715
|
+
directive: BaseButton,
|
|
716
|
+
inputs: ['color:color'],
|
|
717
|
+
outputs: [],
|
|
718
|
+
},
|
|
719
|
+
{
|
|
720
|
+
directive: NgpButton,
|
|
721
|
+
inputs: ['disabled:disabled'],
|
|
722
|
+
outputs: [],
|
|
723
|
+
},
|
|
724
|
+
{
|
|
725
|
+
directive: NgpFocus,
|
|
726
|
+
inputs: ['ngpFocusDisabled:focusDisabled'],
|
|
727
|
+
outputs: ['ngpFocus'],
|
|
728
|
+
},
|
|
729
|
+
],
|
|
730
|
+
providers: [provideFlowbiteNavbarIconItemState()],
|
|
731
|
+
host: { '[class]': `theme().host.root` },
|
|
720
732
|
}]
|
|
721
733
|
}] });
|
|
722
734
|
|
|
723
|
-
|
|
724
|
-
* Default theme for `NavbarIconButtonComponent`
|
|
725
|
-
*/
|
|
726
|
-
const navbarIconButtonTheme = createTheme({
|
|
727
|
-
root: {
|
|
728
|
-
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',
|
|
729
|
-
color: {
|
|
730
|
-
primary: 'text-primary-500 dark:text-primary-300',
|
|
731
|
-
gray: 'text-gray-500 dark:text-gray-400',
|
|
732
|
-
blue: 'text-blue-500 dark:text-blue-300',
|
|
733
|
-
red: 'text-red-500 dark:text-red-300',
|
|
734
|
-
green: 'text-green-500 dark:text-green-300',
|
|
735
|
-
yellow: 'text-yellow-500 dark:text-yellow-300',
|
|
736
|
-
},
|
|
737
|
-
},
|
|
738
|
-
});
|
|
735
|
+
/* Navbar */
|
|
739
736
|
|
|
740
737
|
/**
|
|
741
738
|
* Generated bundle index. Do not edit.
|
|
742
739
|
*/
|
|
743
740
|
|
|
744
|
-
export {
|
|
741
|
+
export { FlowbiteNavbarBrandConfigToken, FlowbiteNavbarBrandStateToken, FlowbiteNavbarConfigToken, FlowbiteNavbarContentConfigToken, FlowbiteNavbarContentStateToken, FlowbiteNavbarIconItemConfigToken, FlowbiteNavbarIconItemStateToken, FlowbiteNavbarItemConfigToken, FlowbiteNavbarItemStateToken, FlowbiteNavbarStateToken, FlowbiteNavbarToggleConfigToken, FlowbiteNavbarToggleStateToken, Navbar, NavbarBrand, NavbarContent, NavbarIconItem, NavbarItem, NavbarToggle, defaultFlowbiteNavbarBrandConfig, defaultFlowbiteNavbarConfig, defaultFlowbiteNavbarContentConfig, defaultFlowbiteNavbarIconItemConfig, defaultFlowbiteNavbarItemConfig, defaultFlowbiteNavbarToggleConfig, flowbiteNavbarBrandState, flowbiteNavbarBrandTheme, flowbiteNavbarContentState, flowbiteNavbarContentTheme, flowbiteNavbarIconItemState, flowbiteNavbarIconItemTheme, flowbiteNavbarItemState, flowbiteNavbarItemTheme, flowbiteNavbarState, flowbiteNavbarTheme, flowbiteNavbarToggleState, flowbiteNavbarToggleTheme, injectFlowbiteNavbarBrandConfig, injectFlowbiteNavbarBrandState, injectFlowbiteNavbarConfig, injectFlowbiteNavbarContentConfig, injectFlowbiteNavbarContentState, injectFlowbiteNavbarIconItemConfig, injectFlowbiteNavbarIconItemState, injectFlowbiteNavbarItemConfig, injectFlowbiteNavbarItemState, injectFlowbiteNavbarState, injectFlowbiteNavbarToggleConfig, injectFlowbiteNavbarToggleState, provideFlowbiteNavbarBrandConfig, provideFlowbiteNavbarBrandState, provideFlowbiteNavbarConfig, provideFlowbiteNavbarContentConfig, provideFlowbiteNavbarContentState, provideFlowbiteNavbarIconItemConfig, provideFlowbiteNavbarIconItemState, provideFlowbiteNavbarItemConfig, provideFlowbiteNavbarItemState, provideFlowbiteNavbarState, provideFlowbiteNavbarToggleConfig, provideFlowbiteNavbarToggleState };
|
|
745
742
|
//# sourceMappingURL=flowbite-angular-navbar.mjs.map
|