Skip to content

Commit 1c0296a

Browse files
MGREMYMGREMYross1296bence444
authored
Rework documentation front (#46)
* docs: rework front update routing * style: edit eslint and prettier config * test: fix test for components after update * refactor: clean html template with prettier conf * perf: remove unused dependencies * fix: development/production config with nx start * docs: add icons from figma * docs: remove svg dark:hidden * docs: make home page responsive for mobile * docs: update home page responsive tablet * docs: add responsive laptop screen * docs: fix display block img * docs: simplify css home page * docs: clean imports and export library * feat: upgrade to nx 19 * feat: upgrade to angular 18 * feat: migrate sidebar service to signal style * fix: fix eslint comment * feat: migrate alert to signal * feat: migrate component to input style * fix: update project.json to build * refactor: component code * fix: theme local storage * feat: clean accordion component / signal service * refactor: clean theme component's part * refactor: add region to component's theme * refactor: remove direct call to Flowbite varients * feat: theme service implementation for components * feat: add Combination type * feat: switch from interface to type * feat: using Combination * feat: add [key: string]: string to component parameter types * feat: update navbar and add navbar toggle * refactor: clean input name and add link service * feat: migrate input and directive to new style sys * fix: rollback generateId in onInit * fix: crypto is not defined * feat: move to shiki and restyle input-field * feat: add some documentation + update library components * feat: add default tailwind conf for library * refactor: new prettier and lint config * feat: add CodeRabbit configuration * feat: move common into shared * refactor: update remove .tsx fils from eslint config * feat: update badge documentation * feat: update accordion documentation page * feat: update alert documentation page * feat: update breadcrumb documentation page * feat: update button documentation page * feat: update dropdown documentation page * feat: update indicator documentation page * feat: update modal documentation page * fix(docs): clip display example * refactor: auto close html tag * feat(â�docs): use iframe * feat(docs): add control panel on preview * feat(docs): add dark mode to iframe * feat: update breadcrumb documentation page * feat: update button documentation page * feat: update dropdown documentation page * feat: update modal documentation page * feat(docs): add size demo * feat(docs): update frame display height * feat(docs): get icons from flowbite-icon without size and color * feat: update usage of icons * feat: create IconComponent & single template file * refactor: remove img sun * refactor: format frame html code * feat: update icons in frame display * refactor: reorder class's member * feat: use IconComponent in other components * feat: many things after git crash lost commits :/ * docs(alert): complete alert documentation * docs(alert): re-add dismissable alerts section * docs: move github files to .github dir * feat: move to structural directive for routable components * feat: use RouterLink directive as HostDirective * docs: add override-base-style page * docs: fix w-full & add fragment anchor * feat: move from aliases to colors * feat: fix color call of config * feat: from baseComponent to baseDirective * feat: simplify theme files * docs: fix customStyle * feat: add dark and primary to colors of component * fix: breadcrumb style * fix: indicator offset * feat: add sidebar-menu and add mobile support for docs * fix(sidebar): fix autoclose on click * fix: mobile display * fix: mobile display * fix(sidebar): scrollable if opened * fix(sidebar): shrink-0 * feat(accordion): add isAlwaysOpen & clean classes * refactor: make all inject public * docs(accordion): add always open doc * docs: simplify example setup * docs(accordion): add color and flush accordion example * feat: move baseComponent to directive * feat: add init and verify function (see AccordionComponent) * feat: move to inject component instead of themeServices * docs: resize iframe for updated components * docs: add shiki theme on components * docs: add customStyle usage * feat(sidebar): add RouterLinkActive to items (not binded yet on isActive in theme) * feat(sidebar): add color and auto open if active * feat: moe from input boolean | string to unknown * feat: change default color to get parent's one * feat(breadcrumb): add color support * fix(indicator): display with text and default color * fix: prerender error with assets not being found * feat(navbar): add routerLinkActive like sidebar * docs: make iframe full height * refactor: change to anchor href for redirect * feat(dropdown): update divider and finish doc * feat: modal docs * docs: added title on pages * refactor: little fixes * docs: add table of content * feat: add flowbiterouterlink with href for external link * feat(ui): Navbar layout, navbar icons and small styling changes (#50) * feat(ui): update navbar layout * feat(ui): add navbar icon buttons for resources * feat(ui): change sidebar border-r colour to match figma * feat(ui): address PR comments * feat(ui): update ui component html --------- Co-authored-by: MGREMY <[email protected]> * feat(ui): add copy package input component (#51) * feat(ui): update navbar layout * feat(ui): add navbar icon buttons for resources * feat(ui): change sidebar border-r colour to match figma * feat(ui): address PR comments * feat(ui): update ui component html * feat(ui): add copy package input component --------- Co-authored-by: MGREMY <[email protected]> * docs: add sidebar documentation * docs: add navbar documentation * Move to new angular build executor (#52) * fix: build * feat: move to new application executor * feat: config vercel * feat: update nx * fix: update vercel config * fix: add env variable in vercel config --------- Co-authored-by: GREMY Miguel <[email protected]> * Move to npm package manager (#53) * chore: move from yarn to npm * fix: vercel npm install command * fix: to npx command * chore: add trigger to workflow * fix: github ci * fix: ci commands * refactor: pretty files * Full move to NgDoc library (#55) * docs: move to ng-doc * docs: add basic config and move landing page * docs: full move to ng-doc * docs: add all getting started * docs: add customize section * docs begin components doc * chore: add lock file and move to npm ci * chore: update commands & vercel config & ci config * docs: add sidebar toggle for mobile * docs: custom theme with custom primary color * docs: add footer * docs: add page processor for demo * docs: add keyword to pages * docs: custom ng-doc generation to fit flowbite recommendations * docs: accordion docs moved to ng-doc * docs: alert docs moved to ng-doc * docs: badge docs moved to ng-doc * docs: breadcrumb docs moved to ng-doc * docs: button docs moved to ng-doc * docs: dropdown docs moved to ng-doc * docs: indicator docs moved to ng-doc * docs: modal docs moved to ng-doc * docs: navbar docs moved to ng-doc * docs: sidebar docs moved to ng-doc * docs: fix navigation bug * docs: add subtitle on pages * docs: clear file name when having demo component * docs: from angular-{ts,html} to {typescript,html} * docs: add custom header, add API page * docs: update dependencies to fix angular keywords * docs: update api generation * docs: add search bar * docs: add comments to fill the documentation * docs: add comments in service section for the documentation * docs: add documentation for pipes * docs: add comments for directives and common * fix(modal): close on route change #33 (#56) * fix(modal): close on route change #33 * fix(modal): close on backdrop click * fix(modal): use signal based viewChild instead of @ViewChild * fix(modal): set z-index to 99 * fix(modal): update ModalClass to not apply any class on the host * feat(angular): remove allowSignalWrite from component declaration * fix(sidebar): inherit color from itemgroup/menu (it not provided) (#57) * fix(sidebar): inherit color from itemgroup/menu (it not provided) * fix(sidebar): remove unnecessary computed * fix(sidebar): verify() revert back * feat: multiple changes BREAKING CHANGES: remove state service (except theme toggle) and switch from `input()` to `model()` * refacto: move flowbite.theme.service and directive input/output * refacto: remove auto call to flowbite directive and add it in template when necessary * refacto: move every @host to host elements in @component decorator * docs: remove padding x in landing page & add themeService for buttons in landing page * refacto: split common types into multiple files * chore: add public-api.ts file, preparing for segmentation with ng-packagr * docs(navbar): add navbar example with brand, dropdown and toggle (#60) * docs(navbar): add navbar example with brand and dropdown inspired by flowbite-react * docs(navbar): add example of responsive navbar * docs(navbar): fix flowbite-navbar-brand placement * docs(navbar): add description to responsive example * docs(navbar): auto close if possible * docs(docs): add base documentation * docs(docs): update parameter table & links * chore: remove BUILD-TOOLS.md * fix(docs): revert `ul` and `ol` only outside of `flowbite-dropdown` #59 (#62) fix(docs): revert `ul` and `ol` only outside of `flowbite-dropdown` * docs(sidebar): add multi-level documentation --------- Co-authored-by: MGREMY <[email protected]> Co-authored-by: Ross <[email protected]> Co-authored-by: Bence Lovász <[email protected]>
1 parent 62b29c5 commit 1c0296a

File tree

1,075 files changed

+58296
-8084
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,075 files changed

+58296
-8084
lines changed

.coderabbit.yaml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
language: en-US
2+
tone_instructions: ''
3+
early_access: false
4+
enable_free_tier: true
5+
reviews:
6+
profile: chill
7+
request_changes_workflow: false
8+
high_level_summary: true
9+
high_level_summary_placeholder: '@coderabbitai summary'
10+
auto_title_placeholder: '@coderabbitai'
11+
poem: true
12+
review_status: true
13+
collapse_walkthrough: false
14+
path_filters: []
15+
path_instructions: []
16+
abort_on_close: true
17+
auto_review:
18+
enabled: true
19+
auto_incremental_review: true
20+
ignore_title_keywords: []
21+
labels: []
22+
drafts: true
23+
base_branches: []
24+
tools:
25+
shellcheck:
26+
enabled: true
27+
ruff:
28+
enabled: true
29+
markdownlint:
30+
enabled: true
31+
github-checks:
32+
enabled: true
33+
timeout_ms: 90000
34+
languagetool:
35+
enabled: true
36+
disabled_rules:
37+
- EN_UNPAIRED_BRACKETS
38+
- EN_UNPAIRED_QUOTES
39+
disabled_categories:
40+
- TYPOS
41+
- TYPOGRAPHY
42+
- CASING
43+
enabled_only: false
44+
level: default
45+
biome:
46+
enabled: true
47+
hadolint:
48+
enabled: false
49+
swiftlint:
50+
enabled: false
51+
phpstan:
52+
enabled: false
53+
level: default
54+
golangci-lint:
55+
enabled: false
56+
yamllint:
57+
enabled: true
58+
gitleaks:
59+
enabled: true
60+
checkov:
61+
enabled: true
62+
chat:
63+
auto_reply: true
64+
knowledge_base:
65+
learnings:
66+
scope: auto
67+
issues:
68+
scope: auto
69+
jira:
70+
project_keys: []
71+
linear:
72+
team_keys: []

.editorconfig

Lines changed: 0 additions & 13 deletions
This file was deleted.

.eslintrc.json

Lines changed: 34 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,46 @@
11
{
22
"root": true,
3-
"ignorePatterns": ["**/*"],
4-
"plugins": ["@nx", "sort-imports-es6-autofix"],
3+
"ignorePatterns": ["!**/*"],
4+
"plugins": ["@nx", "@typescript-eslint"],
5+
"extends": ["plugin:@angular-eslint/recommended", "plugin:@typescript-eslint/recommended-type-checked", "prettier"],
56
"overrides": [
67
{
7-
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
8+
"files": ["*.ts"],
9+
"plugins": [],
10+
"extends": [],
811
"rules": {
9-
"sort-imports-es6-autofix/sort-imports-es6": [
10-
2,
12+
// eslint
13+
"no-extra-semi": 0,
14+
"comma-dangle": 0,
15+
"no-empty-function": 0,
16+
// typescript-eslint
17+
"@typescript-eslint/comma-dangle": 0,
18+
"@typescript-eslint/no-extra-semi": 2,
19+
"@typescript-eslint/lines-around-comment": 1,
20+
"@typescript-eslint/member-delimiter-style": 2,
21+
"@typescript-eslint/member-ordering": [
22+
1,
1123
{
12-
"ignoreCase": false,
13-
"ignoreMemberSort": false,
14-
"memberSyntaxSortOrder": ["none", "all", "multiple", "single"]
24+
"default": ["signature", "field", "constructor", "method"]
1525
}
1626
],
17-
"@nx/enforce-module-boundaries": [
18-
"error",
19-
{
20-
"enforceBuildableLibDependency": true,
21-
"allow": [],
22-
"depConstraints": [
23-
{
24-
"sourceTag": "*",
25-
"onlyDependOnLibsWithTags": ["*"]
26-
}
27-
]
28-
}
29-
]
27+
"@typescript-eslint/no-empty-function": 1,
28+
"@typescript-eslint/no-explicit-any": 1,
29+
"@typescript-eslint/no-unnecessary-condition": 2,
30+
"@typescript-eslint/no-unsafe-assignment": 0,
31+
"@typescript-eslint/no-unsafe-call": 0,
32+
"@typescript-eslint/no-unsafe-argument": 0,
33+
"@typescript-eslint/no-unsafe-member-access": 0,
34+
"@typescript-eslint/no-floating-promises": 0,
35+
"@typescript-eslint/consistent-type-imports": 2,
36+
"@typescript-eslint/consistent-type-exports": 2,
37+
"@typescript-eslint/no-namespace": 0,
38+
// angular-eslint
39+
"@angular-eslint/no-host-metadata-property": "off",
40+
// nx
41+
"@nx/dependency-checks": 2,
42+
"@nx/enforce-module-boundaries": 2
3043
}
31-
},
32-
{
33-
"files": ["*.ts", "*.tsx"],
34-
"extends": ["plugin:@nx/typescript"],
35-
"rules": {}
36-
},
37-
{
38-
"files": ["*.js", "*.jsx"],
39-
"extends": ["plugin:@nx/javascript"],
40-
"rules": {}
4144
}
4245
]
4346
}
File renamed without changes.

CONTRIBUTING.md renamed to .github/CONTRIBUTING

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@ Our Code of Conduct means that you are responsible for treating everyone on the
3838

3939
## Code of conduct
4040

41-
For more information [check this file](CODE_OF_CONDUCT.md).
41+
For more information [check this file](CODE_OF_CONDUCT).

.github/workflows/ci-checks.yaml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: CI Checks
22

33
on:
4+
workflow_dispatch:
45
pull_request:
56
branches:
67
- main
@@ -28,21 +29,21 @@ jobs:
2829
uses: actions/cache@v3
2930
with:
3031
path: '**/node_modules'
31-
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
32+
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}
3233
restore-keys: |
3334
${{ runner.os }}-modules-
3435
3536
- name: Install packages 🏭
36-
run: yarn
37+
run: npm ci
3738

3839
- name: Lint the code 🕵
39-
run: yarn lint
40+
run: npm run all:lint
4041

4142
- name: Run Prettier 💅
42-
run: yarn prettier --base=HEAD
43+
run: npm run prettier
4344

4445
- name: Run unit tests 🔬
45-
run: yarn test
46+
run: npm run all:test
4647

4748
- name: Build code 🛠
48-
run: yarn build
49+
run: npm run all:build

.gitignore

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77

88
# dependencies
99
node_modules
10-
package-lock.json
11-
yarn.lock
10+
#package-lock.json
1211

1312
# IDEs and editors
1413
/.idea
@@ -32,7 +31,6 @@ yarn.lock
3231
/coverage
3332
/libpeerconnection.log
3433
npm-debug.log
35-
yarn-error.log
3634
testem.log
3735
/typings
3836

@@ -44,3 +42,7 @@ Thumbs.db
4442

4543
.vercel
4644
.nx
45+
46+
47+
# NgDoc files
48+
/ng-doc

.husky/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

.husky/commit-msg

Lines changed: 0 additions & 4 deletions
This file was deleted.

.husky/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/usr/bin/env sh
22
. "$(dirname -- "$0")/_/husky.sh"
33

4-
yarn lint-staged --concurrent false --relative
4+
npm run all:lint

.prettierignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@
55

66
.angular
77

8-
/.nx/cache
8+
/.nx/cache
9+
/.nx/workspace-data

.prettierrc

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
11
{
2-
"singleQuote": true
2+
"endOfLine": "crlf",
3+
"singleQuote": true,
4+
"singleAttributePerLine": true,
5+
"bracketSameLine": true,
6+
"printWidth": 120,
7+
"trailingComma": "all",
8+
"plugins": ["prettier-plugin-packagejson", "@ianvs/prettier-plugin-sort-imports"],
9+
"importOrderParserPlugins": ["typescript", "decorators-legacy"],
10+
"importOrder": [
11+
"^~/(.*)$",
12+
"^[.]",
13+
"",
14+
"(flowbite-angular|shiki)",
15+
"",
16+
"<THIRD_PARTY_MODULES>",
17+
"",
18+
"<BUILTIN_MODULES>"
19+
]
320
}

.stylelintrc.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"extends": "stylelint-config-standard",
3+
"rules": {
4+
"no-empty-source": null,
5+
"at-rule-no-unknown": null
6+
}
7+
}

.vscode/settings.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"editor.codeActionsOnSave": {
3+
"source.fixAll.eslint": "explicit"
4+
},
5+
"editor.defaultFormatter": "esbenp.prettier-vscode",
6+
"files.eol": "\r\n",
7+
"editor.formatOnSave": true,
8+
"tailwindCSS.classAttributes": ["class", "className", "ngClass", "customStyle"],
9+
"tailwindCSS.experimental.classRegex": [
10+
["twMerge\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"],
11+
["createTheme\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"]
12+
],
13+
"typescript.tsdk": "node_modules/typescript/lib",
14+
15+
"[markdown]": {
16+
"editor.unicodeHighlight.ambiguousCharacters": false,
17+
"editor.unicodeHighlight.invisibleCharacters": false,
18+
"diffEditor.ignoreTrimWhitespace": false,
19+
"editor.wordWrap": "on",
20+
"editor.quickSuggestions": {
21+
"comments": "off",
22+
"strings": "off",
23+
"other": "off"
24+
}
25+
}
26+
}

api/index.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

api/index.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { app } from '../dist/docs-static/server/server.mjs';
2+
3+
export default app();

apps/docs-e2e/.eslintrc.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
{
22
"extends": ["plugin:cypress/recommended", "../../.eslintrc.json"],
33
"ignorePatterns": ["!**/*"],
4+
"parserOptions": {
5+
"project": "./apps/docs-e2e/tsconfig(.*)?.json"
6+
},
47
"overrides": [
58
{
6-
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
9+
"files": ["*.ts", "*.js", "*.jsx"],
710
"rules": {}
811
},
912
{

apps/docs-e2e/project.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
"$schema": "../../node_modules/nx/schemas/project-schema.json",
44
"sourceRoot": "apps/docs-e2e/src",
55
"projectType": "application",
6+
"tags": [],
7+
"implicitDependencies": ["docs"],
68
"targets": {
79
"e2e": {
810
"executor": "@nx/cypress:cypress",
@@ -17,10 +19,7 @@
1719
}
1820
},
1921
"lint": {
20-
"executor": "@nx/eslint:lint",
21-
"outputs": ["{options.outputFile}"]
22+
"executor": "@nx/eslint:lint"
2223
}
23-
},
24-
"tags": [],
25-
"implicitDependencies": ["docs"]
24+
}
2625
}

apps/docs-e2e/src/support/commands.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
// https://on.cypress.io/custom-commands
99
// ***********************************************
1010

11-
// eslint-disable-next-line @typescript-eslint/no-namespace
1211
declare namespace Cypress {
1312
// eslint-disable-next-line @typescript-eslint/no-unused-vars
1413
interface Chainable<Subject> {

apps/docs/.eslintrc.json

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
{
22
"extends": ["../../.eslintrc.json"],
33
"ignorePatterns": ["!**/*"],
4+
"parserOptions": {
5+
"project": "./apps/docs/tsconfig(.*)?.json"
6+
},
47
"overrides": [
58
{
69
"files": ["*.ts"],
7-
"extends": [
8-
"plugin:@nx/angular",
9-
"plugin:@angular-eslint/template/process-inline-templates"
10-
],
1110
"rules": {
1211
"@angular-eslint/directive-selector": [
1312
"error",
@@ -26,11 +25,6 @@
2625
}
2726
]
2827
}
29-
},
30-
{
31-
"files": ["*.html"],
32-
"extends": ["plugin:@nx/angular-template"],
33-
"rules": {}
3428
}
3529
]
3630
}

0 commit comments

Comments
 (0)