Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
04f4d54
feat(accordion): provide injection token for default input value #80
MGREMY Nov 24, 2024
da3ff4a
feat(alert): provide injection token for default input value #80
MGREMY Nov 30, 2024
30ace3a
chore: fix precommit hook executable on linux
MGREMY Nov 30, 2024
f7337d6
feat(badge): provide injection token for default input value #80
MGREMY Nov 30, 2024
f8b0f20
feat(breadcrumb): provide injection token for default input value #80
MGREMY Nov 30, 2024
9d8d700
feat(button): provide injection token for default input value #80
MGREMY Nov 30, 2024
f4c5854
feat(dark-theme-toggle): provide injection token for default input va…
MGREMY Nov 30, 2024
bbda81d
feat(dropdown): provide injection token for default input value #80
MGREMY Nov 30, 2024
cdbb78c
feat(indicator): provide injection token for default input value #80
MGREMY Nov 30, 2024
cbaca0f
feat(indicator): provide injection token for default input value #80
MGREMY Nov 30, 2024
4463716
feat(modal): provide injection token for default input value #80
MGREMY Nov 30, 2024
fab0fbb
feat(navbar): provide injection token for default input value #80
MGREMY Nov 30, 2024
02b9e21
feat(scroll-top): provide injection token for default input value #80
MGREMY Nov 30, 2024
6d57117
feat(sidebar): provide injection token for default input value #80
MGREMY Nov 30, 2024
93b88e8
docs: add override component default input value page
MGREMY Nov 30, 2024
906a894
feat(theme): add clean api to access and modify the current applicati…
MGREMY Dec 3, 2024
8509bd1
docs(theme): fix doc #82
MGREMY Dec 3, 2024
90807d3
feat(theme): add signal based accessor to current theme #82
MGREMY Dec 5, 2024
1acd5fa
clean imports
MGREMY Dec 7, 2024
b143464
chore: remove verify function
MGREMY Dec 7, 2024
9eb35e7
chore: merge branch 'main' into 1.1.0
MGREMY Dec 11, 2024
e7eae0a
chore: post coderabbitai comment
MGREMY Dec 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions apps/docs/docs/components/accordion/_always-open.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<flowbite-accordion-panel [isOpen]="true">
<flowbite-accordion-title>What is Flowbite ?</flowbite-accordion-title>
<flowbite-accordion-content>
<span class="p-5">
<div class="p-5">
<p class="text-base font-normal text-gray-600 dark:text-gray-400">
Flowbite is an open-source library of interactive components built on top of Tailwind CSS
including buttons, dropdowns, modals, navbars, and more.
Expand All @@ -16,13 +16,13 @@
</a>
and start developing websites even faster with components on top of Tailwind CSS.
</p>
</span>
</div>
</flowbite-accordion-content>
</flowbite-accordion-panel>
<flowbite-accordion-panel>
<flowbite-accordion-title>Is there a Figma file available ?</flowbite-accordion-title>
<flowbite-accordion-content>
<span class="p-5">
<div class="p-5">
<p class="text-base font-normal text-gray-600 dark:text-gray-400">
Flowbite is first conceptualized and designed using the Figma software so everything you
see in the library has a design equivalent in our Figma file.
Expand All @@ -32,15 +32,15 @@
<a href="https://flowbite.com/figma/">Figma design system</a>
based on the utility classes from Tailwind CSS and components from Flowbite.
</p>
</span>
</div>
</flowbite-accordion-content>
</flowbite-accordion-panel>
<flowbite-accordion-panel>
<flowbite-accordion-title>
What are the differences between Flowbite and Tailwind UI ?
</flowbite-accordion-title>
<flowbite-accordion-content>
<span class="p-5">
<div class="p-5">
<p class="text-base font-normal text-gray-600 dark:text-gray-400">
The main difference is that the core components from Flowbite are open source under the
MIT license, whereas Tailwind UI is a paid product. Another difference is that Flowbite
Expand Down Expand Up @@ -70,7 +70,7 @@
</a>
</li>
</ul>
</span>
</div>
</flowbite-accordion-content>
</flowbite-accordion-panel>
</flowbite-accordion>
12 changes: 6 additions & 6 deletions apps/docs/docs/components/accordion/_color-option.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<flowbite-accordion-panel [isOpen]="true">
<flowbite-accordion-title>What is Flowbite ?</flowbite-accordion-title>
<flowbite-accordion-content>
<span class="p-5">
<div class="p-5">
<p class="text-base font-normal text-gray-600 dark:text-gray-400">
Flowbite is an open-source library of interactive components built on top of Tailwind CSS
including buttons, dropdowns, modals, navbars, and more.
Expand All @@ -16,13 +16,13 @@
</a>
and start developing websites even faster with components on top of Tailwind CSS.
</p>
</span>
</div>
</flowbite-accordion-content>
</flowbite-accordion-panel>
<flowbite-accordion-panel>
<flowbite-accordion-title>Is there a Figma file available ?</flowbite-accordion-title>
<flowbite-accordion-content>
<span class="p-5">
<div class="p-5">
<p class="text-base font-normal text-gray-600 dark:text-gray-400">
Flowbite is first conceptualized and designed using the Figma software so everything you
see in the library has a design equivalent in our Figma file.
Expand All @@ -32,15 +32,15 @@
<a href="https://flowbite.com/figma/">Figma design system</a>
based on the utility classes from Tailwind CSS and components from Flowbite.
</p>
</span>
</div>
</flowbite-accordion-content>
</flowbite-accordion-panel>
<flowbite-accordion-panel>
<flowbite-accordion-title>
What are the differences between Flowbite and Tailwind UI ?
</flowbite-accordion-title>
<flowbite-accordion-content>
<span class="p-5">
<div class="p-5">
<p class="text-base font-normal text-gray-600 dark:text-gray-400">
The main difference is that the core components from Flowbite are open source under the
MIT license, whereas Tailwind UI is a paid product. Another difference is that Flowbite
Expand Down Expand Up @@ -70,7 +70,7 @@
</a>
</li>
</ul>
</span>
</div>
</flowbite-accordion-content>
</flowbite-accordion-panel>
</flowbite-accordion>
12 changes: 6 additions & 6 deletions apps/docs/docs/components/accordion/_default.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<flowbite-accordion-panel [isOpen]="true">
<flowbite-accordion-title>What is Flowbite ?</flowbite-accordion-title>
<flowbite-accordion-content>
<span class="p-5">
<div class="p-5">
<p class="text-base font-normal text-gray-600 dark:text-gray-400">
Flowbite is an open-source library of interactive components built on top of Tailwind CSS
including buttons, dropdowns, modals, navbars, and more.
Expand All @@ -16,13 +16,13 @@
</a>
and start developing websites even faster with components on top of Tailwind CSS.
</p>
</span>
</div>
</flowbite-accordion-content>
</flowbite-accordion-panel>
<flowbite-accordion-panel>
<flowbite-accordion-title>Is there a Figma file available ?</flowbite-accordion-title>
<flowbite-accordion-content>
<span class="p-5">
<div class="p-5">
<p class="text-base font-normal text-gray-600 dark:text-gray-400">
Flowbite is first conceptualized and designed using the Figma software so everything you
see in the library has a design equivalent in our Figma file.
Expand All @@ -32,15 +32,15 @@
<a href="https://flowbite.com/figma/">Figma design system</a>
based on the utility classes from Tailwind CSS and components from Flowbite.
</p>
</span>
</div>
</flowbite-accordion-content>
</flowbite-accordion-panel>
<flowbite-accordion-panel>
<flowbite-accordion-title>
What are the differences between Flowbite and Tailwind UI ?
</flowbite-accordion-title>
<flowbite-accordion-content>
<span class="p-5">
<div class="p-5">
<p class="text-base font-normal text-gray-600 dark:text-gray-400">
The main difference is that the core components from Flowbite are open source under the
MIT license, whereas Tailwind UI is a paid product. Another difference is that Flowbite
Expand Down Expand Up @@ -70,7 +70,7 @@
</a>
</li>
</ul>
</span>
</div>
</flowbite-accordion-content>
</flowbite-accordion-panel>
</flowbite-accordion>
12 changes: 6 additions & 6 deletions apps/docs/docs/components/accordion/_flush.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<flowbite-accordion-panel [isOpen]="true">
<flowbite-accordion-title>What is Flowbite ?</flowbite-accordion-title>
<flowbite-accordion-content>
<span class="p-5">
<div class="p-5">
<p class="text-base font-normal text-gray-600 dark:text-gray-400">
Flowbite is an open-source library of interactive components built on top of Tailwind CSS
including buttons, dropdowns, modals, navbars, and more.
Expand All @@ -16,13 +16,13 @@
</a>
and start developing websites even faster with components on top of Tailwind CSS.
</p>
</span>
</div>
</flowbite-accordion-content>
</flowbite-accordion-panel>
<flowbite-accordion-panel>
<flowbite-accordion-title>Is there a Figma file available ?</flowbite-accordion-title>
<flowbite-accordion-content>
<span class="p-5">
<div class="p-5">
<p class="text-base font-normal text-gray-600 dark:text-gray-400">
Flowbite is first conceptualized and designed using the Figma software so everything you
see in the library has a design equivalent in our Figma file.
Expand All @@ -32,15 +32,15 @@
<a href="https://flowbite.com/figma/">Figma design system</a>
based on the utility classes from Tailwind CSS and components from Flowbite.
</p>
</span>
</div>
</flowbite-accordion-content>
</flowbite-accordion-panel>
<flowbite-accordion-panel>
<flowbite-accordion-title>
What are the differences between Flowbite and Tailwind UI ?
</flowbite-accordion-title>
<flowbite-accordion-content>
<span class="p-5">
<div class="p-5">
<p class="text-base font-normal text-gray-600 dark:text-gray-400">
The main difference is that the core components from Flowbite are open source under the
MIT license, whereas Tailwind UI is a paid product. Another difference is that Flowbite
Expand Down Expand Up @@ -70,7 +70,7 @@
</a>
</li>
</ul>
</span>
</div>
</flowbite-accordion-content>
</flowbite-accordion-panel>
</flowbite-accordion>
5 changes: 3 additions & 2 deletions apps/docs/docs/components/dropdown/_header.component.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<flowbite-dropdown>
<flowbite-dropdown-header>
<span className="block text-sm">Bonnie Green</span>
<span className="block truncate text-sm font-medium">bonnie&#64;flowbite.com</span>
<span class="block text-sm">Bonnie Green</span>
<span class="block truncate text-sm font-medium">bonnie&#64;flowbite.com</span>
</flowbite-dropdown-header>
<flowbite-dropdown-divider />
<flowbite-dropdown-item>Item 1</flowbite-dropdown-item>
<flowbite-dropdown-item>Item 2</flowbite-dropdown-item>
<flowbite-dropdown-item>Item 3</flowbite-dropdown-item>
Expand Down
8 changes: 7 additions & 1 deletion apps/docs/docs/components/dropdown/_header.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {
DropdownComponent,
DropdownDividerComponent,
DropdownHeaderComponent,
DropdownItemComponent,
} from 'flowbite-angular/dropdown';
Expand All @@ -9,7 +10,12 @@ import { Component } from '@angular/core';
@Component({
selector: 'flowbite-demo-dropdown-header',
standalone: true,
imports: [DropdownComponent, DropdownItemComponent, DropdownHeaderComponent],
imports: [
DropdownComponent,
DropdownItemComponent,
DropdownHeaderComponent,
DropdownDividerComponent,
],
templateUrl: '_header.component.html',
host: {
class: 'flex flex wrap flex-row gap-3',
Expand Down
35 changes: 35 additions & 0 deletions apps/docs/docs/customize/dark-mode/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
keyword: DarkModePage
---

## Enable dark mode

All you need to do is add `FlowbiteThemeDirective` as a `hostDirectives` in you `app.component.ts`.

```angular-ts
...
import { FlowbiteThemeDirective } from 'flowbite-angular/theme';
...

@Component({
...
hostDirectives: [FlowbiteThemeDirective],
})
export class AppComponent {
...
}
```

If your TailwindCSS configuration is based on the one provided by flowbite-angular, then everything
will be set up. Otherwise, you have to update your TailwindCSS configuration like this :

```javascript
module.exports = {
darkMode: 'class',
};
```

## Get or set theme manually

In order to access or to update the application theme manually, you simply have to inject
`FlowbiteThemeDirective` into your component and call one of the provided functions.
17 changes: 17 additions & 0 deletions apps/docs/docs/customize/dark-mode/ng-doc.page.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import CustomizeCategory from '../ng-doc.category';

import type { NgDocPage } from '@ng-doc/core';

/**
* Add dark theme to your application.
*
* @status:info NEW
*/
const darkMode: NgDocPage = {
title: 'Dark mode',
mdFile: './index.md',
category: CustomizeCategory,
order: 6,
};

export default darkMode;
2 changes: 1 addition & 1 deletion apps/docs/docs/customize/inherit-component/ng-doc.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const OverrideBaseStyle: NgDocPage = {
title: 'Inherit component',
mdFile: './index.md',
category: CustomizeCategory,
order: 4,
order: 5,
};

export default OverrideBaseStyle;
34 changes: 34 additions & 0 deletions apps/docs/docs/customize/override-component-default-value/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
keyword: OverrideComponentBaseValue
---

Each components provide a set of input to customize their behavior.

They are named following this pattern :

<span class="text-xs md:text-base">

FLOWBITE\_<span class="text-primary-500">COMPONENT_NAME</span>\_<span class="text-primary-500">INPUT_NAME</span>\_DEFAULT_VALUE

</span>

In order to modify the default value of an input, you have to add, after `initFlowbite` function, a
new `Provider` with its value :

```angular-ts
import { FLOWBITE_ALERT_HAS_BORDER_DEFAULT_VALUE } from 'flowbite-angular/alert';
import { initFlowbite } from 'flowbite-angular/core';
import { ApplicationConfig } from '@angular/core';

export const appConfig: ApplicationConfig = {
providers: [
...,
initFlowbite(),
{
provide: FLOWBITE_ALERT_HAS_BORDER_DEFAULT_VALUE,
useValue: true,
},
],
};

```
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import CustomizeCategory from '../ng-doc.category';

import type { NgDocPage } from '@ng-doc/core';

/**
* Customize flowbite-angular's component input default value.
*
* @status:info NEW
*/
const OverrideComponentDefaultValue: NgDocPage = {
title: 'Override component default value',
mdFile: './index.md',
category: CustomizeCategory,
order: 3,
};

export default OverrideComponentDefaultValue;
2 changes: 1 addition & 1 deletion apps/docs/docs/customize/use-custom-style/ng-doc.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const UseCustomStyle: NgDocPage = {
title: 'Use custom style',
mdFile: './index.md',
category: CustomizeCategory,
order: 3,
order: 4,
};

export default UseCustomStyle;
1 change: 1 addition & 0 deletions apps/docs/docs/ng-doc.api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ const api: NgDocApi = {
'libs/flowbite-angular/navbar/index.ts',
'libs/flowbite-angular/scroll-top/index.ts',
'libs/flowbite-angular/sidebar/index.ts',
'libs/flowbite-angular/theme/index.ts',
],
},
{
Expand Down
Loading
Loading