Skip to content

Commit b58375b

Browse files
committed
docs: add page for ng-primitives
1 parent d8e421f commit b58375b

File tree

6 files changed

+70
-14
lines changed

6 files changed

+70
-14
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
keyword: NgPrimitivesPage
3+
---
4+
5+
## What's angular primitives
6+
7+
Angular Primitives is a low-level headless UI component library with a focus on accessibility,
8+
customization, and developer experience. Whether you're building a robust design system from scratch
9+
or looking to enhance your existing one, our primitives are here to support you every step of the
10+
way.
11+
12+
## Special thanks
13+
14+
We're using `NgPrimitivesDocumentation` to provide accessibility and behavior base so
15+
flowbite-angular can be on design part. We want to address a special thanks to the maintainer of
16+
ng-primitives which has provided a packages called
17+
<span class="text-primary-500">@ng-primitives/state</span> which provides a clean way to have state
18+
management of components.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import GettingStartedCategory from '../ng-doc.category';
2+
3+
import type { NgDocPage } from '@ng-doc/core';
4+
5+
/**
6+
* Special thanks to ng-primitives
7+
*/
8+
const NgPrimitives: NgDocPage = {
9+
title: 'Ng Primitives',
10+
mdFile: 'index.md',
11+
category: GettingStartedCategory,
12+
order: 4,
13+
};
14+
15+
export default NgPrimitives;

apps/docs/ng-doc.config.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ const config: NgDocConfiguration = {
5252
title: 'Tailwind CSS Theming documentation',
5353
url: 'https://tailwindcss.com/docs/theme',
5454
},
55+
NgPrimitivesDocumentation: {
56+
title: 'ng-primitives',
57+
url: 'https://angularprimitives.com',
58+
},
5559
},
5660
loaders: [ngKeywordsLoader(), rxjsKeywordsLoader()],
5761
},

apps/docs/src/app/app.component.html

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
flowbiteNavbarIconItem
1414
class="inline-flex! lg:hidden!"
1515
(click)="sidebarService.toggle()">
16+
<span class="sr-only">Sidebar toggle</span>
1617
<flowbite-icon
1718
name="bars"
1819
class="size-5 stroke-2" />
@@ -99,10 +100,16 @@
99100
</a>
100101

101102
<button
103+
type="button"
102104
flowbiteThemeToggle
103-
color="primary"></button>
105+
color="primary">
106+
<span class="sr-only">Theme toggle</span>
107+
</button>
104108

105-
<button flowbiteNavbarToggle>
109+
<button
110+
type="button"
111+
flowbiteNavbarToggle>
112+
<span class="sr-only">Navbar toggle</span>
106113
<flowbite-icon
107114
name="bars"
108115
class="size-5 stroke-2" />

libs/flowbite-angular/theme-toggle/src/theme-toggle/theme-toggle.component.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ import {
1717
ViewEncapsulation,
1818
} from '@angular/core';
1919
import { provideIcons } from '@ng-icons/core';
20+
import { NgpButton } from 'ng-primitives/button';
21+
import { NgpFocus } from 'ng-primitives/interactions';
2022
import { twMerge } from 'tailwind-merge';
2123

2224
@Component({
@@ -31,6 +33,16 @@ import { twMerge } from 'tailwind-merge';
3133
inputs: ['color:color'],
3234
outputs: [],
3335
},
36+
{
37+
directive: NgpButton,
38+
inputs: ['disabled:disabled'],
39+
outputs: [],
40+
},
41+
{
42+
directive: NgpFocus,
43+
inputs: ['ngpFocusDisabled:focusDisabled'],
44+
outputs: ['ngpFocus'],
45+
},
3446
],
3547
imports: [Icon],
3648
providers: [provideFlowbiteThemeToggleState(), provideIcons({ sun, moon })],

libs/flowbite-angular/theme-toggle/src/theme-toggle/theme.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,28 +28,28 @@ export const flowbiteThemeToggleTheme: FlowbiteThemeToggleTheme = createTheme({
2828
pill: {} as FlowbiteBoolean,
2929
color: {
3030
default: {
31-
light: 'text-gray-900',
32-
dark: 'dark:text-gray-100',
31+
light: 'text-gray-800 data-hover:text-gray-900',
32+
dark: 'dark:text-white dark:data-hover:text-gray-100',
3333
},
3434
info: {
35-
light: 'text-blue-900',
36-
dark: 'dark:text-blue-100',
35+
light: 'text-gray-800 data-hover:text-blue-900',
36+
dark: 'dark:text-white dark:data-hover:text-blue-100',
3737
},
3838
failure: {
39-
light: 'text-red-900',
40-
dark: 'dark:text-red-100',
39+
light: 'text-gray-800 data-hover:text-red-900',
40+
dark: 'dark:text-white dark:data-hover:text-red-100',
4141
},
4242
success: {
43-
light: 'text-green-900',
44-
dark: 'dark:text-green-100',
43+
light: 'text-gray-800 data-hover:text-green-900',
44+
dark: 'dark:text-white dark:data-hover:text-green-100',
4545
},
4646
warning: {
47-
light: 'text-yellow-900',
48-
dark: 'dark:text-yellow-100',
47+
light: 'text-gray-800 data-hover:text-yellow-900',
48+
dark: 'dark:text-white dark:data-hover:text-yellow-100',
4949
},
5050
primary: {
51-
light: 'text-primary-900',
52-
dark: 'dark:text-primary-100',
51+
light: 'data-hover:text-primary-900 text-gray-800',
52+
dark: 'dark:data-hover:text-primary-100 dark:text-white',
5353
},
5454
},
5555
colorOutline: {} as FlowbiteBaseButtonColors,

0 commit comments

Comments
 (0)