flowbite-angular 1.3.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 +339 -479
- package/fesm2022/flowbite-angular-accordion.mjs.map +1 -1
- package/fesm2022/flowbite-angular-alert.mjs +308 -240
- package/fesm2022/flowbite-angular-alert.mjs.map +1 -1
- package/fesm2022/flowbite-angular-badge.mjs +332 -238
- package/fesm2022/flowbite-angular-badge.mjs.map +1 -1
- package/fesm2022/flowbite-angular-breadcrumb.mjs +262 -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 +189 -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 +272 -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 +337 -486
- package/fesm2022/flowbite-angular-modal.mjs.map +1 -1
- package/fesm2022/flowbite-angular-navbar.mjs +600 -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 +400 -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 -196
- package/badge/badge.theme.d.ts +0 -53
- 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 -139
- 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 -193
- 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,566 +1,426 @@
|
|
|
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, Directive } from '@angular/core';
|
|
4
|
+
import { createStateToken, createStateProvider, createStateInjector, createState } from 'ng-primitives/state';
|
|
5
|
+
import * as i1 from 'ng-primitives/accordion';
|
|
6
|
+
import { provideAccordionState, NgpAccordion, injectAccordionItemState, provideAccordionItemState, NgpAccordionItem, NgpAccordionTrigger, NgpAccordionContent } from 'ng-primitives/accordion';
|
|
4
7
|
import { twMerge } from 'tailwind-merge';
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import { DomSanitizer } from '@angular/platform-browser';
|
|
8
|
+
import * as i1$1 from 'ng-primitives/button';
|
|
9
|
+
import { NgpButton } from 'ng-primitives/button';
|
|
10
|
+
import * as i2 from 'ng-primitives/interactions';
|
|
11
|
+
import { NgpFocus } from 'ng-primitives/interactions';
|
|
10
12
|
|
|
13
|
+
const flowbiteAccordionTheme = createTheme({
|
|
14
|
+
host: {
|
|
15
|
+
base: 'shadow-sm',
|
|
16
|
+
transition: '',
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
const defaultFlowbiteAccordionConfig = {
|
|
21
|
+
baseTheme: flowbiteAccordionTheme,
|
|
22
|
+
color: 'default',
|
|
23
|
+
flush: false,
|
|
24
|
+
customTheme: {},
|
|
25
|
+
};
|
|
26
|
+
const FlowbiteAccordionConfigToken = new InjectionToken('FlowbiteAccordionConfig');
|
|
11
27
|
/**
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* @
|
|
15
|
-
* ```
|
|
16
|
-
* var theme = inject(FLOWBITE_ACCORDION_CONTENT_THEME_TOKEN)
|
|
17
|
-
* ```
|
|
28
|
+
* Provide the default Accordion configuration
|
|
29
|
+
* @param config The Accordion configuration
|
|
30
|
+
* @returns The provider
|
|
18
31
|
*/
|
|
19
|
-
const
|
|
20
|
-
class AccordionContentThemeService {
|
|
21
|
-
constructor() {
|
|
22
|
-
this.baseTheme = inject(FLOWBITE_ACCORDION_CONTENT_THEME_TOKEN);
|
|
23
|
-
}
|
|
24
|
-
getClasses(properties) {
|
|
25
|
-
const theme = mergeTheme(this.baseTheme, properties.customStyle);
|
|
26
|
-
const output = {
|
|
27
|
-
rootClass: twMerge(theme.root.base, theme.root.color[properties.color], theme.root.isFlush[properties.isFlush]),
|
|
28
|
-
};
|
|
29
|
-
return output;
|
|
30
|
-
}
|
|
31
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: AccordionContentThemeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
32
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: AccordionContentThemeService, providedIn: 'root' }); }
|
|
33
|
-
}
|
|
34
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: AccordionContentThemeService, decorators: [{
|
|
35
|
-
type: Injectable,
|
|
36
|
-
args: [{
|
|
37
|
-
providedIn: 'root',
|
|
38
|
-
}]
|
|
39
|
-
}] });
|
|
40
|
-
|
|
41
|
-
const FLOWBITE_ACCORDION_CONTENT_CUSTOM_STYLE_DEFAULT_VALUE = new InjectionToken('FLOWBITE_ACCORDION_CONTENT_CUSTOM_STYLE_DEFAULT_VALUE');
|
|
42
|
-
const accordionContentDefaultValueProvider = makeEnvironmentProviders([
|
|
32
|
+
const provideFlowbiteAccordionConfig = (config) => [
|
|
43
33
|
{
|
|
44
|
-
provide:
|
|
45
|
-
useValue: {},
|
|
34
|
+
provide: FlowbiteAccordionConfigToken,
|
|
35
|
+
useValue: { ...defaultFlowbiteAccordionConfig, ...config },
|
|
46
36
|
},
|
|
47
|
-
]
|
|
37
|
+
];
|
|
48
38
|
/**
|
|
49
|
-
*
|
|
39
|
+
* Inject the Accordion configuration
|
|
40
|
+
* @see {@link defaultFlowbiteAccordionConfig}
|
|
41
|
+
* @returns The configuration
|
|
50
42
|
*/
|
|
51
|
-
|
|
43
|
+
const injectFlowbiteAccordionConfig = () => inject(FlowbiteAccordionConfigToken, { optional: true }) ?? defaultFlowbiteAccordionConfig;
|
|
44
|
+
|
|
45
|
+
const FlowbiteAccordionStateToken = createStateToken('Flowbite Accordion');
|
|
46
|
+
const provideFlowbiteAccordionState = createStateProvider(FlowbiteAccordionStateToken);
|
|
47
|
+
const injectFlowbiteAccordionState = createStateInjector(FlowbiteAccordionStateToken);
|
|
48
|
+
const flowbiteAccordionState = createState(FlowbiteAccordionStateToken);
|
|
49
|
+
|
|
50
|
+
class Accordion {
|
|
52
51
|
constructor() {
|
|
53
|
-
|
|
52
|
+
this.config = injectFlowbiteAccordionConfig();
|
|
54
53
|
/**
|
|
55
|
-
*
|
|
54
|
+
* @see {@link injectFlowbiteAccordionConfig}
|
|
56
55
|
*/
|
|
57
|
-
this.
|
|
56
|
+
this.color = input(this.config.color);
|
|
58
57
|
/**
|
|
59
|
-
*
|
|
58
|
+
* @see {@link injectFlowbiteAccordionConfig}
|
|
60
59
|
*/
|
|
61
|
-
this.
|
|
62
|
-
//#region properties
|
|
60
|
+
this.flush = input(this.config.flush, { transform: booleanAttribute });
|
|
63
61
|
/**
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
@default `AccordionPanelComponent`'s color
|
|
62
|
+
* @see {@link injectFlowbiteAccordionConfig}
|
|
67
63
|
*/
|
|
68
|
-
this.
|
|
64
|
+
this.customTheme = input(this.config.customTheme);
|
|
65
|
+
this.theme = computed(() => {
|
|
66
|
+
const mergedTheme = mergeDeep(this.config.baseTheme, this.state.customTheme());
|
|
67
|
+
return {
|
|
68
|
+
host: {
|
|
69
|
+
root: twMerge(mergedTheme.host.base, mergedTheme.host.transition),
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
});
|
|
69
73
|
/**
|
|
70
|
-
*
|
|
74
|
+
* @internal
|
|
71
75
|
*/
|
|
72
|
-
this.
|
|
76
|
+
this.state = flowbiteAccordionState(this);
|
|
73
77
|
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
fetchClass() {
|
|
77
|
-
return this.themeService.getClasses({
|
|
78
|
-
color: this.accordionPanelComponent.accordionComponent.color(),
|
|
79
|
-
isFlush: booleanToFlowbiteBoolean(this.accordionPanelComponent.accordionComponent.isFlush()),
|
|
80
|
-
customStyle: this.customStyle(),
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: AccordionContentComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
84
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.0.4", 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" }, host: { properties: { "@isOpenAnimation": "accordionPanelComponent.isOpen()" } }, usesInheritance: true, ngImport: i0, template: `<ng-content />`, isInline: true, animations: [
|
|
85
|
-
trigger('isOpenAnimation', [
|
|
86
|
-
state('true', style({ height: '*' })),
|
|
87
|
-
state('false', style({ height: '0px' })),
|
|
88
|
-
transition('true <=> false', animate('300ms')),
|
|
89
|
-
]),
|
|
90
|
-
], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
78
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: Accordion, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
79
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.0.6", type: Accordion, isStandalone: true, selector: "\n div[flowbiteAccordion]\n ", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, flush: { classPropertyName: "flush", publicName: "flush", isSignal: true, isRequired: false, transformFunction: null }, customTheme: { classPropertyName: "customTheme", publicName: "customTheme", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "theme().host.root" } }, providers: [provideFlowbiteAccordionState(), provideAccordionState()], exportAs: ["flowbiteAccordion"], hostDirectives: [{ directive: i1.NgpAccordion, inputs: ["ngpAccordionType", "type", "ngpAccordionDisabled", "disabled", "ngpAccordionCollapsible", "collapsible"] }], ngImport: i0 }); }
|
|
91
80
|
}
|
|
92
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
93
|
-
type:
|
|
81
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: Accordion, decorators: [{
|
|
82
|
+
type: Directive,
|
|
94
83
|
args: [{
|
|
95
84
|
standalone: true,
|
|
96
|
-
selector:
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
85
|
+
selector: `
|
|
86
|
+
div[flowbiteAccordion]
|
|
87
|
+
`,
|
|
88
|
+
exportAs: 'flowbiteAccordion',
|
|
89
|
+
hostDirectives: [
|
|
90
|
+
{
|
|
91
|
+
directive: NgpAccordion,
|
|
92
|
+
inputs: [
|
|
93
|
+
'ngpAccordionType:type',
|
|
94
|
+
'ngpAccordionDisabled:disabled',
|
|
95
|
+
'ngpAccordionCollapsible:collapsible',
|
|
96
|
+
],
|
|
97
|
+
},
|
|
107
98
|
],
|
|
108
|
-
|
|
109
|
-
|
|
99
|
+
providers: [provideFlowbiteAccordionState(), provideAccordionState()],
|
|
100
|
+
host: { '[class]': `theme().host.root` },
|
|
110
101
|
}]
|
|
111
102
|
}] });
|
|
112
103
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
* ```
|
|
120
|
-
*/
|
|
121
|
-
const FLOWBITE_ACCORDION_PANEL_THEME_TOKEN = new InjectionToken('FLOWBITE_ACCORDION_PANEL_THEME_TOKEN');
|
|
122
|
-
class AccordionPanelThemeService {
|
|
123
|
-
constructor() {
|
|
124
|
-
this.baseTheme = inject(FLOWBITE_ACCORDION_PANEL_THEME_TOKEN);
|
|
125
|
-
}
|
|
126
|
-
getClasses(properties) {
|
|
127
|
-
const theme = mergeTheme(this.baseTheme, properties.customStyle);
|
|
128
|
-
const output = {
|
|
129
|
-
rootClass: twMerge(theme.root.base),
|
|
130
|
-
};
|
|
131
|
-
return output;
|
|
132
|
-
}
|
|
133
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: AccordionPanelThemeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
134
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: AccordionPanelThemeService, providedIn: 'root' }); }
|
|
135
|
-
}
|
|
136
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: AccordionPanelThemeService, decorators: [{
|
|
137
|
-
type: Injectable,
|
|
138
|
-
args: [{
|
|
139
|
-
providedIn: 'root',
|
|
140
|
-
}]
|
|
141
|
-
}] });
|
|
104
|
+
const flowbiteAccordionItemTheme = createTheme({
|
|
105
|
+
host: {
|
|
106
|
+
base: 'group/item',
|
|
107
|
+
transition: '',
|
|
108
|
+
},
|
|
109
|
+
});
|
|
142
110
|
|
|
111
|
+
const defaultFlowbiteAccordionItemConfig = {
|
|
112
|
+
baseTheme: flowbiteAccordionItemTheme,
|
|
113
|
+
customTheme: {},
|
|
114
|
+
};
|
|
115
|
+
const FlowbiteAccordionItemConfigToken = new InjectionToken('FlowbiteAccordionItemConfig');
|
|
143
116
|
/**
|
|
144
|
-
*
|
|
145
|
-
*
|
|
146
|
-
* @
|
|
147
|
-
* ```
|
|
148
|
-
* var theme = inject(FLOWBITE_ACCORDION_TITLE_THEME_TOKEN)
|
|
149
|
-
* ```
|
|
117
|
+
* Provide the default Accordion Item configuration
|
|
118
|
+
* @param config The Accordion Item configuration
|
|
119
|
+
* @returns The provider
|
|
150
120
|
*/
|
|
151
|
-
const
|
|
152
|
-
class AccordionTitleThemeService {
|
|
153
|
-
constructor() {
|
|
154
|
-
this.baseTheme = inject(FLOWBITE_ACCORDION_TITLE_THEME_TOKEN);
|
|
155
|
-
}
|
|
156
|
-
getClasses(properties) {
|
|
157
|
-
const theme = mergeTheme(this.baseTheme, properties.customStyle);
|
|
158
|
-
const output = {
|
|
159
|
-
rootClass: twMerge(theme.root.base, theme.root.color[properties.color], theme.root.isFlush[properties.isFlush], theme.root.isOpen[properties.isOpen]),
|
|
160
|
-
textClass: twMerge(theme.text.base),
|
|
161
|
-
};
|
|
162
|
-
return output;
|
|
163
|
-
}
|
|
164
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: AccordionTitleThemeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
165
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: AccordionTitleThemeService, providedIn: 'root' }); }
|
|
166
|
-
}
|
|
167
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: AccordionTitleThemeService, decorators: [{
|
|
168
|
-
type: Injectable,
|
|
169
|
-
args: [{
|
|
170
|
-
providedIn: 'root',
|
|
171
|
-
}]
|
|
172
|
-
}] });
|
|
173
|
-
|
|
174
|
-
const FLOWBITE_ACCORDION_TITLE_ICON_DEFAULT_VALUE = new InjectionToken('FLOWBITE_ACCORDION_TITLE_ICON_DEFAULT_VALUE');
|
|
175
|
-
const FLOWBITE_ACCORDION_TITLE_CUSTOM_STYLE_DEFAULT_VALUE = new InjectionToken('FLOWBITE_ACCORDION_TITLE_CUSTOM_STYLE_DEFAULT_VALUE');
|
|
176
|
-
const accordionTitleDefaultValueProvider = makeEnvironmentProviders([
|
|
177
|
-
{
|
|
178
|
-
provide: FLOWBITE_ACCORDION_TITLE_ICON_DEFAULT_VALUE,
|
|
179
|
-
useValue: undefined,
|
|
180
|
-
},
|
|
121
|
+
const provideFlowbiteAccordionItemConfig = (config) => [
|
|
181
122
|
{
|
|
182
|
-
provide:
|
|
183
|
-
useValue: {},
|
|
123
|
+
provide: FlowbiteAccordionItemConfigToken,
|
|
124
|
+
useValue: { ...defaultFlowbiteAccordionItemConfig, ...config },
|
|
184
125
|
},
|
|
185
|
-
]
|
|
126
|
+
];
|
|
186
127
|
/**
|
|
187
|
-
*
|
|
128
|
+
* Inject the Accordion Item configuration
|
|
129
|
+
* @see {@link defaultFlowbiteAccordionItemConfig}
|
|
130
|
+
* @returns The configuration
|
|
188
131
|
*/
|
|
189
|
-
|
|
132
|
+
const injectFlowbiteAccordionItemConfig = () => inject(FlowbiteAccordionItemConfigToken, { optional: true }) ??
|
|
133
|
+
defaultFlowbiteAccordionItemConfig;
|
|
134
|
+
|
|
135
|
+
const FlowbiteAccordionItemStateToken = createStateToken('Flowbite Accordion Item');
|
|
136
|
+
const provideFlowbiteAccordionItemState = createStateProvider(FlowbiteAccordionItemStateToken);
|
|
137
|
+
const injectFlowbiteAccordionItemState = createStateInjector(FlowbiteAccordionItemStateToken);
|
|
138
|
+
const flowbiteAccordionItemState = createState(FlowbiteAccordionItemStateToken);
|
|
139
|
+
|
|
140
|
+
class AccordionItem {
|
|
190
141
|
constructor() {
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
*/
|
|
195
|
-
this.themeService = inject(AccordionTitleThemeService);
|
|
142
|
+
this.config = injectFlowbiteAccordionItemConfig();
|
|
143
|
+
this.accordionState = injectFlowbiteAccordionState();
|
|
144
|
+
this.ngpAccordionItemState = injectAccordionItemState();
|
|
196
145
|
/**
|
|
197
|
-
*
|
|
146
|
+
* @see {@link injectFlowbiteAccordionItemConfig}
|
|
198
147
|
*/
|
|
199
|
-
this.
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
//#region properties
|
|
209
|
-
/**
|
|
210
|
-
* Set the accordion title color
|
|
211
|
-
*
|
|
212
|
-
* @default `AccordionPanelComponents`'s color
|
|
213
|
-
*/
|
|
214
|
-
this.color = model(this.accordionPanelComponent.color());
|
|
215
|
-
/**
|
|
216
|
-
* Set the accordion title icon
|
|
217
|
-
*
|
|
218
|
-
* @default undefined
|
|
219
|
-
*/
|
|
220
|
-
this.icon = model(inject(FLOWBITE_ACCORDION_TITLE_ICON_DEFAULT_VALUE));
|
|
148
|
+
this.customTheme = input(this.config.customTheme);
|
|
149
|
+
this.theme = computed(() => {
|
|
150
|
+
const mergedTheme = mergeDeep(this.config.baseTheme, this.state.customTheme());
|
|
151
|
+
return {
|
|
152
|
+
host: {
|
|
153
|
+
root: twMerge(mergedTheme.host.base, mergedTheme.host.transition),
|
|
154
|
+
},
|
|
155
|
+
};
|
|
156
|
+
});
|
|
221
157
|
/**
|
|
222
|
-
*
|
|
158
|
+
* @internal
|
|
223
159
|
*/
|
|
224
|
-
this.
|
|
225
|
-
}
|
|
226
|
-
//#endregion
|
|
227
|
-
//#region BaseComponent implementation
|
|
228
|
-
fetchClass() {
|
|
229
|
-
return this.themeService.getClasses({
|
|
230
|
-
color: this.accordionPanelComponent.accordionComponent.color(),
|
|
231
|
-
isFlush: booleanToFlowbiteBoolean(this.accordionPanelComponent.accordionComponent.isFlush()),
|
|
232
|
-
isOpen: booleanToFlowbiteBoolean(this.accordionPanelComponent.isOpen()),
|
|
233
|
-
customStyle: this.customStyle(),
|
|
234
|
-
});
|
|
235
|
-
}
|
|
236
|
-
init() {
|
|
237
|
-
this.iconRegistry.addRawSvgIconInNamepsace('flowbite-angular', 'chevron-down', this.domSanitizer.bypassSecurityTrustHtml(CHEVRON_DOWN_SVG_ICON));
|
|
238
|
-
}
|
|
239
|
-
//#endregion
|
|
240
|
-
/**
|
|
241
|
-
* Toggle the parent `AccordionPanelComponent`'s isOpen
|
|
242
|
-
*/
|
|
243
|
-
onClick() {
|
|
244
|
-
this.accordionPanelComponent.toggleVisibility();
|
|
245
|
-
}
|
|
246
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: AccordionTitleComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
247
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.4", type: AccordionTitleComponent, isStandalone: true, selector: "flowbite-accordion-title", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, customStyle: { classPropertyName: "customStyle", publicName: "customStyle", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { color: "colorChange", icon: "iconChange", customStyle: "customStyleChange" }, host: { listeners: { "click": "onClick()" } }, usesInheritance: true, ngImport: i0, template: `
|
|
248
|
-
<h2 [class]="contentClasses().textClass">
|
|
249
|
-
<ng-content />
|
|
250
|
-
</h2>
|
|
251
|
-
@if (icon()) {
|
|
252
|
-
<ng-container [ngTemplateOutlet]="icon()!" />
|
|
253
|
-
} @else {
|
|
254
|
-
<flowbite-icon
|
|
255
|
-
svgIcon="flowbite-angular:chevron-down"
|
|
256
|
-
class="h-6 w-6 shrink-0 duration-300"
|
|
257
|
-
[class.rotate-180]="accordionPanelComponent.isOpen()" />
|
|
160
|
+
this.state = flowbiteAccordionItemState(this);
|
|
258
161
|
}
|
|
259
|
-
|
|
162
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: AccordionItem, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
163
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.0.6", type: AccordionItem, isStandalone: true, selector: "\n div[flowbiteAccordionItem]\n ", inputs: { customTheme: { classPropertyName: "customTheme", publicName: "customTheme", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "theme().host.root" } }, providers: [provideFlowbiteAccordionItemState(), provideAccordionItemState()], exportAs: ["flowbiteAccordionItem"], hostDirectives: [{ directive: i1.NgpAccordionItem, inputs: ["ngpAccordionItemValue", "value", "ngpAccordionItemDisabled", "disabled"] }], ngImport: i0 }); }
|
|
260
164
|
}
|
|
261
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
262
|
-
type:
|
|
165
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: AccordionItem, decorators: [{
|
|
166
|
+
type: Directive,
|
|
263
167
|
args: [{
|
|
264
168
|
standalone: true,
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
template: `
|
|
268
|
-
<h2 [class]="contentClasses().textClass">
|
|
269
|
-
<ng-content />
|
|
270
|
-
</h2>
|
|
271
|
-
@if (icon()) {
|
|
272
|
-
<ng-container [ngTemplateOutlet]="icon()!" />
|
|
273
|
-
} @else {
|
|
274
|
-
<flowbite-icon
|
|
275
|
-
svgIcon="flowbite-angular:chevron-down"
|
|
276
|
-
class="h-6 w-6 shrink-0 duration-300"
|
|
277
|
-
[class.rotate-180]="accordionPanelComponent.isOpen()" />
|
|
278
|
-
}
|
|
169
|
+
selector: `
|
|
170
|
+
div[flowbiteAccordionItem]
|
|
279
171
|
`,
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
172
|
+
exportAs: 'flowbiteAccordionItem',
|
|
173
|
+
hostDirectives: [
|
|
174
|
+
{
|
|
175
|
+
directive: NgpAccordionItem,
|
|
176
|
+
inputs: ['ngpAccordionItemValue:value', 'ngpAccordionItemDisabled:disabled'],
|
|
177
|
+
},
|
|
178
|
+
],
|
|
179
|
+
providers: [provideFlowbiteAccordionItemState(), provideAccordionItemState()],
|
|
180
|
+
host: { '[class]': `theme().host.root` },
|
|
285
181
|
}]
|
|
286
182
|
}] });
|
|
287
183
|
|
|
288
|
-
const
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
184
|
+
const flowbiteAccordionTitleTheme = createTheme({
|
|
185
|
+
host: {
|
|
186
|
+
base: 'flex w-full cursor-pointer flex-row items-center justify-between p-5 text-base font-medium group-first/item:rounded-t-lg',
|
|
187
|
+
transition: '',
|
|
188
|
+
color: {
|
|
189
|
+
default: {
|
|
190
|
+
light: 'border-gray-200 bg-gray-100 text-gray-900 data-hover:bg-gray-200',
|
|
191
|
+
dark: 'dark:border-gray-700 dark:bg-gray-800 dark:text-white dark:data-hover:bg-gray-700',
|
|
192
|
+
},
|
|
193
|
+
info: {
|
|
194
|
+
light: 'border-blue-200 bg-blue-100 text-blue-900 data-hover:bg-blue-200',
|
|
195
|
+
dark: 'dark:border-blue-700 dark:bg-blue-800 dark:text-white dark:data-hover:bg-blue-700',
|
|
196
|
+
},
|
|
197
|
+
failure: {
|
|
198
|
+
light: 'border-red-200 bg-red-100 text-red-900 data-hover:bg-red-200',
|
|
199
|
+
dark: 'dark:border-red-700 dark:bg-red-800 dark:text-white dark:data-hover:bg-red-700',
|
|
200
|
+
},
|
|
201
|
+
success: {
|
|
202
|
+
light: 'border-green-200 bg-green-100 text-green-900 data-hover:bg-green-200',
|
|
203
|
+
dark: 'dark:border-green-700 dark:bg-green-800 dark:text-white dark:data-hover:bg-green-700',
|
|
204
|
+
},
|
|
205
|
+
warning: {
|
|
206
|
+
light: 'border-yellow-200 bg-yellow-100 text-yellow-900 data-hover:bg-yellow-200',
|
|
207
|
+
dark: 'dark:border-yellow-700 dark:bg-yellow-800 dark:text-white dark:data-hover:bg-yellow-700',
|
|
208
|
+
},
|
|
209
|
+
primary: {
|
|
210
|
+
light: 'border-primary-200 bg-primary-100 text-primary-900 data-hover:bg-primary-200',
|
|
211
|
+
dark: 'dark:border-primary-700 dark:bg-primary-800 dark:data-hover:bg-primary-700 dark:text-white',
|
|
212
|
+
},
|
|
213
|
+
},
|
|
214
|
+
flush: {
|
|
215
|
+
on: 'border-b bg-transparent data-hover:bg-transparent dark:bg-transparent dark:data-hover:bg-transparent',
|
|
216
|
+
off: 'border',
|
|
217
|
+
},
|
|
294
218
|
},
|
|
219
|
+
});
|
|
220
|
+
|
|
221
|
+
const defaultFlowbiteAccordionTitleConfig = {
|
|
222
|
+
baseTheme: flowbiteAccordionTitleTheme,
|
|
223
|
+
customTheme: {},
|
|
224
|
+
};
|
|
225
|
+
const FlowbiteAccordionTitleConfigToken = new InjectionToken('FlowbiteAccordionTitleConfigToken');
|
|
226
|
+
/**
|
|
227
|
+
* Provide the default AccordionTitle configuration
|
|
228
|
+
* @param config The AccordionTitle configuration
|
|
229
|
+
* @returns The provider
|
|
230
|
+
*/
|
|
231
|
+
const provideFlowbiteAccordionTitleConfig = (config) => [
|
|
295
232
|
{
|
|
296
|
-
provide:
|
|
297
|
-
useValue: {},
|
|
233
|
+
provide: FlowbiteAccordionTitleConfigToken,
|
|
234
|
+
useValue: { ...defaultFlowbiteAccordionTitleConfig, ...config },
|
|
298
235
|
},
|
|
299
|
-
]
|
|
236
|
+
];
|
|
300
237
|
/**
|
|
301
|
-
*
|
|
238
|
+
* Inject the AccordionTitle configuration
|
|
239
|
+
* @see {@link defaultFlowbiteAccordionTitleConfig}
|
|
240
|
+
* @returns The configuration
|
|
302
241
|
*/
|
|
303
|
-
|
|
242
|
+
const injectFlowbiteAccordionTitleConfig = () => inject(FlowbiteAccordionTitleConfigToken, { optional: true }) ??
|
|
243
|
+
defaultFlowbiteAccordionTitleConfig;
|
|
244
|
+
|
|
245
|
+
const FlowbiteAccordionTitleStateToken = createStateToken('Flowbite AccordionTitle');
|
|
246
|
+
const provideFlowbiteAccordionTitleState = createStateProvider(FlowbiteAccordionTitleStateToken);
|
|
247
|
+
const injectFlowbiteAccordionTitleState = createStateInjector(FlowbiteAccordionTitleStateToken);
|
|
248
|
+
const flowbiteAccordionTitleState = createState(FlowbiteAccordionTitleStateToken);
|
|
249
|
+
|
|
250
|
+
class AccordionTitle {
|
|
304
251
|
constructor() {
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
* Service injected used to generate class
|
|
308
|
-
*/
|
|
309
|
-
this.themeService = inject(AccordionPanelThemeService);
|
|
310
|
-
/**
|
|
311
|
-
* The parent `AccordionComponent`
|
|
312
|
-
*/
|
|
313
|
-
this.accordionComponent = inject(AccordionComponent);
|
|
314
|
-
/**
|
|
315
|
-
* The child `AccordionTitleComponent`
|
|
316
|
-
*/
|
|
317
|
-
this.accordionTitleChild = contentChild.required(AccordionTitleComponent);
|
|
252
|
+
this.config = injectFlowbiteAccordionTitleConfig();
|
|
253
|
+
this.accordionState = injectFlowbiteAccordionState();
|
|
318
254
|
/**
|
|
319
|
-
*
|
|
255
|
+
* @see {@link injectFlowbiteAccordionTitleConfig}
|
|
320
256
|
*/
|
|
321
|
-
this.
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
* Set if the accordion panel is open or not
|
|
331
|
-
*
|
|
332
|
-
* @default false
|
|
333
|
-
*/
|
|
334
|
-
this.isOpen = model(inject(FLOWBITE_ACCORDION_PANEL_IS_OPEN_DEFAULT_VALUE));
|
|
257
|
+
this.customTheme = input(this.config.customTheme);
|
|
258
|
+
this.theme = computed(() => {
|
|
259
|
+
const mergedTheme = mergeDeep(this.config.baseTheme, this.state.customTheme());
|
|
260
|
+
return {
|
|
261
|
+
host: {
|
|
262
|
+
root: twMerge(mergedTheme.host.base, mergedTheme.host.transition, colorToTheme(mergedTheme.host.color, this.accordionState().color()), mergedTheme.host.flush[this.accordionState().flush() ? 'on' : 'off']),
|
|
263
|
+
},
|
|
264
|
+
};
|
|
265
|
+
});
|
|
335
266
|
/**
|
|
336
|
-
*
|
|
267
|
+
* @internal
|
|
337
268
|
*/
|
|
338
|
-
this.
|
|
269
|
+
this.state = flowbiteAccordionTitleState(this);
|
|
339
270
|
}
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
fetchClass() {
|
|
343
|
-
return this.themeService.getClasses({
|
|
344
|
-
customStyle: this.customStyle(),
|
|
345
|
-
});
|
|
346
|
-
}
|
|
347
|
-
//#endregion
|
|
348
|
-
/**
|
|
349
|
-
* Toggle isOpen for itself and close every other `AccordionPanelComponent` if the parent `AccordionComponent`'s isAlwaysOpen is false
|
|
350
|
-
*
|
|
351
|
-
* @param isOpen Instead of toggle, it can set the value provided
|
|
352
|
-
*/
|
|
353
|
-
toggleVisibility(isOpen) {
|
|
354
|
-
if (isOpen === undefined) {
|
|
355
|
-
isOpen = untracked(() => !this.isOpen());
|
|
356
|
-
}
|
|
357
|
-
if (isOpen && untracked(() => !this.accordionComponent.isAlwaysOpen())) {
|
|
358
|
-
this.accordionComponent.closeAll();
|
|
359
|
-
}
|
|
360
|
-
this.isOpen.set(isOpen);
|
|
361
|
-
}
|
|
362
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: AccordionPanelComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
363
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.0.4", 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, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
271
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: AccordionTitle, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
272
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.0.6", type: AccordionTitle, isStandalone: true, selector: "\n [flowbiteAccordionTitle]\n ", inputs: { customTheme: { classPropertyName: "customTheme", publicName: "customTheme", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "theme().host.root" } }, providers: [provideFlowbiteAccordionTitleState()], exportAs: ["flowbiteAccordionTitle"], hostDirectives: [{ directive: i1$1.NgpButton, inputs: ["disabled", "disabled"] }, { directive: i2.NgpFocus }, { directive: i1.NgpAccordionTrigger, inputs: ["id", "id"] }], ngImport: i0 }); }
|
|
364
273
|
}
|
|
365
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
366
|
-
type:
|
|
274
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: AccordionTitle, decorators: [{
|
|
275
|
+
type: Directive,
|
|
367
276
|
args: [{
|
|
368
277
|
standalone: true,
|
|
369
|
-
selector:
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
278
|
+
selector: `
|
|
279
|
+
[flowbiteAccordionTitle]
|
|
280
|
+
`,
|
|
281
|
+
exportAs: 'flowbiteAccordionTitle',
|
|
282
|
+
hostDirectives: [
|
|
283
|
+
{
|
|
284
|
+
directive: NgpButton,
|
|
285
|
+
inputs: ['disabled:disabled'],
|
|
286
|
+
outputs: [],
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
directive: NgpFocus,
|
|
290
|
+
inputs: [],
|
|
291
|
+
outputs: [],
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
directive: NgpAccordionTrigger,
|
|
295
|
+
inputs: ['id'],
|
|
296
|
+
outputs: [],
|
|
297
|
+
},
|
|
298
|
+
],
|
|
299
|
+
providers: [provideFlowbiteAccordionTitleState()],
|
|
300
|
+
host: { '[class]': `theme().host.root` },
|
|
373
301
|
}]
|
|
374
302
|
}] });
|
|
375
303
|
|
|
304
|
+
const flowbiteAccordionContentTheme = createTheme({
|
|
305
|
+
host: {
|
|
306
|
+
base: 'overflow-hidden',
|
|
307
|
+
transition: '',
|
|
308
|
+
color: {
|
|
309
|
+
default: {
|
|
310
|
+
light: 'border-gray-200 bg-white',
|
|
311
|
+
dark: 'dark:border-gray-700 dark:bg-gray-900',
|
|
312
|
+
},
|
|
313
|
+
info: {
|
|
314
|
+
light: 'border-blue-200 bg-white',
|
|
315
|
+
dark: 'dark:border-blue-700 dark:bg-gray-900',
|
|
316
|
+
},
|
|
317
|
+
failure: {
|
|
318
|
+
light: 'border-red-200 bg-white',
|
|
319
|
+
dark: 'dark:border-red-700 dark:bg-gray-900',
|
|
320
|
+
},
|
|
321
|
+
success: {
|
|
322
|
+
light: 'border-green-200 bg-white',
|
|
323
|
+
dark: 'dark:border-green-700 dark:bg-gray-900',
|
|
324
|
+
},
|
|
325
|
+
warning: {
|
|
326
|
+
light: 'border-yellow-200 bg-white',
|
|
327
|
+
dark: 'dark:border-yellow-700 dark:bg-gray-900',
|
|
328
|
+
},
|
|
329
|
+
primary: {
|
|
330
|
+
light: 'border-primary-200 bg-white',
|
|
331
|
+
dark: 'dark:border-primary-700 dark:bg-gray-900',
|
|
332
|
+
},
|
|
333
|
+
},
|
|
334
|
+
open: {
|
|
335
|
+
on: 'h-fit',
|
|
336
|
+
off: 'h-0',
|
|
337
|
+
},
|
|
338
|
+
flush: {
|
|
339
|
+
on: 'bg-transparent dark:bg-transparent',
|
|
340
|
+
off: 'border-x group-last/item:border-b',
|
|
341
|
+
},
|
|
342
|
+
},
|
|
343
|
+
});
|
|
344
|
+
|
|
345
|
+
const defaultFlowbiteAccordionContentConfig = {
|
|
346
|
+
baseTheme: flowbiteAccordionContentTheme,
|
|
347
|
+
customTheme: {},
|
|
348
|
+
};
|
|
349
|
+
const FlowbiteAccordionContentConfigToken = new InjectionToken('FlowbiteAccordionContentConfigToken');
|
|
376
350
|
/**
|
|
377
|
-
*
|
|
378
|
-
*
|
|
379
|
-
* @
|
|
380
|
-
* ```
|
|
381
|
-
* var theme = inject(FLOWBITE_ACCORDION_THEME_TOKEN)
|
|
382
|
-
* ```
|
|
351
|
+
* Provide the default AccordionContent configuration
|
|
352
|
+
* @param config The AccordionContent configuration
|
|
353
|
+
* @returns The provider
|
|
383
354
|
*/
|
|
384
|
-
const
|
|
385
|
-
class AccordionThemeService {
|
|
386
|
-
constructor() {
|
|
387
|
-
this.baseTheme = inject(FLOWBITE_ACCORDION_THEME_TOKEN);
|
|
388
|
-
}
|
|
389
|
-
getClasses(properties) {
|
|
390
|
-
const theme = mergeTheme(this.baseTheme, properties.customStyle);
|
|
391
|
-
const output = {
|
|
392
|
-
rootClass: twMerge(theme.root.base),
|
|
393
|
-
};
|
|
394
|
-
return output;
|
|
395
|
-
}
|
|
396
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: AccordionThemeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
397
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: AccordionThemeService, providedIn: 'root' }); }
|
|
398
|
-
}
|
|
399
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: AccordionThemeService, decorators: [{
|
|
400
|
-
type: Injectable,
|
|
401
|
-
args: [{
|
|
402
|
-
providedIn: 'root',
|
|
403
|
-
}]
|
|
404
|
-
}] });
|
|
405
|
-
|
|
406
|
-
const FLOWBITE_ACCORDION_IS_ALWAYS_OPEN_DEFAULT_VALUE = new InjectionToken('FLOWBITE_ACCORDION_IS_ALWAYS_OPEN');
|
|
407
|
-
const FLOWBITE_ACCORDION_COLOR_DEFAULT_VALUE = new InjectionToken('FLOWBITE_ACCORDION_COLOR_DEFAULT_VALUE');
|
|
408
|
-
const FLOWBITE_ACCORDION_IS_FLUSH_DEFAULT_VALUE = new InjectionToken('FLOWBITE_ACCORDION_IS_FLUSH_DEFAULT_VALUE');
|
|
409
|
-
const FLOWBITE_ACCORDION_CUSTOM_STYLE_DEFAULT_VALUE = new InjectionToken('FLOWBITE_ACCORDION_CUSTOM_STYLE_DEFAULT_VALUE');
|
|
410
|
-
const accordionDefaultValueProvider = makeEnvironmentProviders([
|
|
411
|
-
{
|
|
412
|
-
provide: FLOWBITE_ACCORDION_IS_ALWAYS_OPEN_DEFAULT_VALUE,
|
|
413
|
-
useValue: false,
|
|
414
|
-
},
|
|
415
|
-
{
|
|
416
|
-
provide: FLOWBITE_ACCORDION_COLOR_DEFAULT_VALUE,
|
|
417
|
-
useValue: 'primary',
|
|
418
|
-
},
|
|
419
|
-
{
|
|
420
|
-
provide: FLOWBITE_ACCORDION_IS_FLUSH_DEFAULT_VALUE,
|
|
421
|
-
useValue: false,
|
|
422
|
-
},
|
|
355
|
+
const provideFlowbiteAccordionContentConfig = (config) => [
|
|
423
356
|
{
|
|
424
|
-
provide:
|
|
425
|
-
useValue: {},
|
|
357
|
+
provide: FlowbiteAccordionContentConfigToken,
|
|
358
|
+
useValue: { ...defaultFlowbiteAccordionContentConfig, ...config },
|
|
426
359
|
},
|
|
427
|
-
]
|
|
360
|
+
];
|
|
428
361
|
/**
|
|
429
|
-
*
|
|
362
|
+
* Inject the AccordionContent configuration
|
|
363
|
+
* @see {@link defaultFlowbiteAccordionContentConfig}
|
|
364
|
+
* @returns The configuration
|
|
430
365
|
*/
|
|
431
|
-
|
|
366
|
+
const injectFlowbiteAccordionContentConfig = () => inject(FlowbiteAccordionContentConfigToken, { optional: true }) ??
|
|
367
|
+
defaultFlowbiteAccordionContentConfig;
|
|
368
|
+
|
|
369
|
+
const FlowbiteAccordionContentStateToken = createStateToken('Flowbite AccordionContent');
|
|
370
|
+
const provideFlowbiteAccordionContentState = createStateProvider(FlowbiteAccordionContentStateToken);
|
|
371
|
+
const injectFlowbiteAccordionContentState = createStateInjector(FlowbiteAccordionContentStateToken);
|
|
372
|
+
const flowbiteAccordionContentState = createState(FlowbiteAccordionContentStateToken);
|
|
373
|
+
|
|
374
|
+
class AccordionContent {
|
|
432
375
|
constructor() {
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
*/
|
|
437
|
-
this.themeService = inject(AccordionThemeService);
|
|
438
|
-
/**
|
|
439
|
-
* List of `AccordionPanelComponent`
|
|
440
|
-
*/
|
|
441
|
-
this.accordionPanelChildren = contentChildren(AccordionPanelComponent);
|
|
442
|
-
//#region properties
|
|
376
|
+
this.config = injectFlowbiteAccordionContentConfig();
|
|
377
|
+
this.accordionState = injectFlowbiteAccordionState();
|
|
378
|
+
this.ngpAccordionItemState = injectAccordionItemState();
|
|
443
379
|
/**
|
|
444
|
-
*
|
|
445
|
-
*
|
|
446
|
-
* @default false
|
|
380
|
+
* @see {@link injectFlowbiteAccordionContentConfig}
|
|
447
381
|
*/
|
|
448
|
-
this.
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
*
|
|
458
|
-
* @default false
|
|
459
|
-
*/
|
|
460
|
-
this.isFlush = model(inject(FLOWBITE_ACCORDION_IS_FLUSH_DEFAULT_VALUE));
|
|
382
|
+
this.customTheme = input(this.config.customTheme);
|
|
383
|
+
this.theme = computed(() => {
|
|
384
|
+
const mergedTheme = mergeDeep(this.config.baseTheme, this.state.customTheme());
|
|
385
|
+
return {
|
|
386
|
+
host: {
|
|
387
|
+
root: twMerge(mergedTheme.host.base, mergedTheme.host.transition, colorToTheme(mergedTheme.host.color, this.accordionState().color()), mergedTheme.host.flush[this.accordionState().flush() ? 'on' : 'off'], mergedTheme.host.open[this.ngpAccordionItemState().open() ? 'on' : 'off']),
|
|
388
|
+
},
|
|
389
|
+
};
|
|
390
|
+
});
|
|
461
391
|
/**
|
|
462
|
-
*
|
|
392
|
+
* @internal
|
|
463
393
|
*/
|
|
464
|
-
this.
|
|
394
|
+
this.state = flowbiteAccordionContentState(this);
|
|
465
395
|
}
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
fetchClass() {
|
|
469
|
-
return this.themeService.getClasses({
|
|
470
|
-
customStyle: this.customStyle(),
|
|
471
|
-
});
|
|
472
|
-
}
|
|
473
|
-
//#endregion
|
|
474
|
-
/**
|
|
475
|
-
* Close every `AccordionPanelComponent`
|
|
476
|
-
*/
|
|
477
|
-
closeAll() {
|
|
478
|
-
this.accordionPanelChildren().forEach((child) => child.toggleVisibility(false));
|
|
479
|
-
}
|
|
480
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: AccordionComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
481
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.0.4", 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, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
396
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: AccordionContent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
397
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.0.6", type: AccordionContent, isStandalone: true, selector: "\n div[flowbiteAccordionContent]\n ", inputs: { customTheme: { classPropertyName: "customTheme", publicName: "customTheme", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "theme().host.root" } }, providers: [provideFlowbiteAccordionContentState()], exportAs: ["flowbiteAccordionContent"], hostDirectives: [{ directive: i1.NgpAccordionContent, inputs: ["id", "id"] }], ngImport: i0 }); }
|
|
482
398
|
}
|
|
483
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
484
|
-
type:
|
|
399
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: AccordionContent, decorators: [{
|
|
400
|
+
type: Directive,
|
|
485
401
|
args: [{
|
|
486
402
|
standalone: true,
|
|
487
|
-
selector:
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
403
|
+
selector: `
|
|
404
|
+
div[flowbiteAccordionContent]
|
|
405
|
+
`,
|
|
406
|
+
exportAs: 'flowbiteAccordionContent',
|
|
407
|
+
hostDirectives: [
|
|
408
|
+
{
|
|
409
|
+
directive: NgpAccordionContent,
|
|
410
|
+
inputs: ['id'],
|
|
411
|
+
outputs: [],
|
|
412
|
+
},
|
|
413
|
+
],
|
|
414
|
+
providers: [provideFlowbiteAccordionContentState()],
|
|
415
|
+
host: { '[class]': `theme().host.root` },
|
|
491
416
|
}]
|
|
492
417
|
}] });
|
|
493
418
|
|
|
494
|
-
|
|
495
|
-
* Default theme for `AccordionComponent`
|
|
496
|
-
*/
|
|
497
|
-
const accordionTheme = createTheme({
|
|
498
|
-
root: {
|
|
499
|
-
base: '',
|
|
500
|
-
},
|
|
501
|
-
});
|
|
502
|
-
|
|
503
|
-
/**
|
|
504
|
-
* Default theme for `AccordionContentComponent`
|
|
505
|
-
*/
|
|
506
|
-
const accordionContentTheme = createTheme({
|
|
507
|
-
root: {
|
|
508
|
-
base: 'flex flex-col overflow-hidden',
|
|
509
|
-
color: {
|
|
510
|
-
primary: 'border-primary-200 dark:border-primary-700',
|
|
511
|
-
light: 'border-gray-200 dark:border-gray-700',
|
|
512
|
-
blue: 'border-blue-200 dark:border-blue-700',
|
|
513
|
-
red: 'border-red-200 dark:border-red-700',
|
|
514
|
-
green: 'border-green-200 dark:border-green-700',
|
|
515
|
-
yellow: 'border-yellow-200 dark:border-yellow-700',
|
|
516
|
-
},
|
|
517
|
-
isFlush: {
|
|
518
|
-
enabled: '',
|
|
519
|
-
disabled: 'border-x border-t group-last:border-b',
|
|
520
|
-
},
|
|
521
|
-
},
|
|
522
|
-
});
|
|
523
|
-
|
|
524
|
-
/**
|
|
525
|
-
* Default theme for `AccordionPanelComponent`
|
|
526
|
-
*/
|
|
527
|
-
const accordionPanelTheme = createTheme({
|
|
528
|
-
root: {
|
|
529
|
-
base: 'group',
|
|
530
|
-
},
|
|
531
|
-
});
|
|
532
|
-
|
|
533
|
-
/**
|
|
534
|
-
* Default theme for `AccordionTitleComponent`
|
|
535
|
-
*/
|
|
536
|
-
const accordionTitleTheme = createTheme({
|
|
537
|
-
root: {
|
|
538
|
-
base: 'cursor-pointer flex items-center p-5 justify-between group-first:rounded-t-lg',
|
|
539
|
-
color: {
|
|
540
|
-
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',
|
|
541
|
-
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',
|
|
542
|
-
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',
|
|
543
|
-
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',
|
|
544
|
-
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',
|
|
545
|
-
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',
|
|
546
|
-
},
|
|
547
|
-
isFlush: {
|
|
548
|
-
enabled: 'border-b bg-transparent hover:bg-transparent',
|
|
549
|
-
disabled: 'border border-b-0',
|
|
550
|
-
},
|
|
551
|
-
isOpen: {
|
|
552
|
-
enabled: '',
|
|
553
|
-
disabled: 'bg-transparent dark:bg-transparent',
|
|
554
|
-
},
|
|
555
|
-
},
|
|
556
|
-
text: {
|
|
557
|
-
base: 'font-semibold text-base',
|
|
558
|
-
},
|
|
559
|
-
});
|
|
419
|
+
/* Accordion */
|
|
560
420
|
|
|
561
421
|
/**
|
|
562
422
|
* Generated bundle index. Do not edit.
|
|
563
423
|
*/
|
|
564
424
|
|
|
565
|
-
export {
|
|
425
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTitle, FlowbiteAccordionConfigToken, FlowbiteAccordionContentConfigToken, FlowbiteAccordionContentStateToken, FlowbiteAccordionItemConfigToken, FlowbiteAccordionItemStateToken, FlowbiteAccordionStateToken, FlowbiteAccordionTitleConfigToken, FlowbiteAccordionTitleStateToken, defaultFlowbiteAccordionConfig, defaultFlowbiteAccordionContentConfig, defaultFlowbiteAccordionItemConfig, defaultFlowbiteAccordionTitleConfig, flowbiteAccordionContentState, flowbiteAccordionContentTheme, flowbiteAccordionItemState, flowbiteAccordionItemTheme, flowbiteAccordionState, flowbiteAccordionTheme, flowbiteAccordionTitleState, flowbiteAccordionTitleTheme, injectFlowbiteAccordionConfig, injectFlowbiteAccordionContentConfig, injectFlowbiteAccordionContentState, injectFlowbiteAccordionItemConfig, injectFlowbiteAccordionItemState, injectFlowbiteAccordionState, injectFlowbiteAccordionTitleConfig, injectFlowbiteAccordionTitleState, provideFlowbiteAccordionConfig, provideFlowbiteAccordionContentConfig, provideFlowbiteAccordionContentState, provideFlowbiteAccordionItemConfig, provideFlowbiteAccordionItemState, provideFlowbiteAccordionState, provideFlowbiteAccordionTitleConfig, provideFlowbiteAccordionTitleState };
|
|
566
426
|
//# sourceMappingURL=flowbite-angular-accordion.mjs.map
|