├── .github
├── CONTRIBUTING.md
├── ISSUE_TEMPLATE
│ ├── bug.yml
│ └── config.yml
├── SECURITY.md
├── dependabot.yml
└── workflows
│ ├── dependabot-auto-merge.yml
│ ├── fix-php-code-style-issues.yml
│ ├── phpstan.yml
│ ├── run-tests.yml
│ └── update-changelog.yml
├── .gitignore
├── .idea
├── .gitignore
├── aws.xml
├── blade.xml
├── codeception.xml
├── filament-page-with-sidebar.iml
├── git_toolbox_blame.xml
├── git_toolbox_prj.xml
├── laravel-idea-personal.xml
├── laravel-idea.xml
├── modules.xml
├── php.xml
├── phpspec.xml
├── phpunit.xml
└── vcs.xml
├── CHANGELOG.md
├── LICENSE.md
├── README.md
├── composer.json
├── config
└── filament-page-with-sidebar.php
├── images
├── sidebar.png
├── topbar.png
├── users-index.png
├── users-view-AR.png
└── users-view-EN.png
├── package-lock.json
├── package.json
├── phpstan-baseline.neon
├── phpstan.neon.dist
├── resources
├── css
│ └── app.css
├── dist
│ └── app.css
└── views
│ ├── components
│ ├── group.blade.php
│ ├── item.blade.php
│ ├── page.blade.php
│ └── topbar
│ │ ├── index.blade.php
│ │ └── item.blade.php
│ └── proxy.blade.php
├── src
├── Enums
│ └── PageNavigationLayoutEnum.php
├── FilamentPageSidebar.php
├── FilamentPageWithSidebarServiceProvider.php
├── Interfaces
│ └── MakeInterface.php
├── PageNavigationItem.php
└── Traits
│ └── HasPageSidebar.php
├── tailwind.config.js
└── tests
├── FilamentPageSidebarTest.php
├── PageNavigationItemTest.php
├── Pest.php
└── TestCase.php
/.github/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing
2 |
3 | Contributions are **welcome** and will be fully **credited**.
4 |
5 | Please read and understand the contribution guide before creating an issue or pull request.
6 |
7 | ## Etiquette
8 |
9 | This project is open source, and as such, the maintainers give their free time to build and maintain the source code
10 | held within. They make the code freely available in the hope that it will be of use to other developers. It would be
11 | extremely unfair for them to suffer abuse or anger for their hard work.
12 |
13 | Please be considerate towards maintainers when raising issues or presenting pull requests. Let's show the
14 | world that developers are civilized and selfless people.
15 |
16 | It's the duty of the maintainer to ensure that all submissions to the project are of sufficient
17 | quality to benefit the project. Many developers have different skills, strengths, and weaknesses. Respect the maintainer's decision, and do not be upset or abusive if your submission is not used.
18 |
19 | ## Viability
20 |
21 | When requesting or submitting new features, first consider whether it might be useful to others. Open
22 | source projects are used by many developers, who may have entirely different needs to your own. Think about
23 | whether or not your feature is likely to be used by other users of the project.
24 |
25 | ## Procedure
26 |
27 | Before filing an issue:
28 |
29 | - Attempt to replicate the problem, to ensure that it wasn't a coincidental incident.
30 | - Check to make sure your feature suggestion isn't already present within the project.
31 | - Check the pull requests tab to ensure that the bug doesn't have a fix in progress.
32 | - Check the pull requests tab to ensure that the feature isn't already in progress.
33 |
34 | Before submitting a pull request:
35 |
36 | - Check the codebase to ensure that your feature doesn't already exist.
37 | - Check the pull requests to ensure that another person hasn't already submitted the feature or fix.
38 |
39 | ## Requirements
40 |
41 | If the project maintainer has any additional requirements, you will find them listed here.
42 |
43 | - **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - The easiest way to apply the conventions is to install [PHP Code Sniffer](https://pear.php.net/package/PHP_CodeSniffer).
44 |
45 | - **Add tests!** - Your patch won't be accepted if it doesn't have tests.
46 |
47 | - **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date.
48 |
49 | - **Consider our release cycle** - We try to follow [SemVer v2.0.0](https://semver.org/). Randomly breaking public APIs is not an option.
50 |
51 | - **One pull request per feature** - If you want to do more than one thing, send multiple pull requests.
52 |
53 | - **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please [squash them](https://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages) before submitting.
54 |
55 | **Happy coding**!
56 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug.yml:
--------------------------------------------------------------------------------
1 | name: Bug Report
2 | description: Report an Issue or Bug with the Package
3 | title: "[Bug]: "
4 | labels: ["bug"]
5 | body:
6 | - type: markdown
7 | attributes:
8 | value: |
9 | We're sorry to hear you have a problem. Can you help us solve it by providing the following details.
10 | - type: textarea
11 | id: what-happened
12 | attributes:
13 | label: What happened?
14 | description: What did you expect to happen?
15 | placeholder: I cannot currently do X thing because when I do, it breaks X thing.
16 | validations:
17 | required: true
18 | - type: textarea
19 | id: how-to-reproduce
20 | attributes:
21 | label: How to reproduce the bug
22 | description: How did this occur, please add any config values used and provide a set of reliable steps if possible.
23 | placeholder: When I do X I see Y.
24 | validations:
25 | required: true
26 | - type: input
27 | id: package-version
28 | attributes:
29 | label: Package Version
30 | description: What version of our Package are you running? Please be as specific as possible
31 | placeholder: 2.0.0
32 | validations:
33 | required: true
34 | - type: input
35 | id: php-version
36 | attributes:
37 | label: PHP Version
38 | description: What version of PHP are you running? Please be as specific as possible
39 | placeholder: 8.2.0
40 | validations:
41 | required: true
42 | - type: input
43 | id: laravel-version
44 | attributes:
45 | label: Laravel Version
46 | description: What version of Laravel are you running? Please be as specific as possible
47 | placeholder: 9.0.0
48 | validations:
49 | required: true
50 | - type: dropdown
51 | id: operating-systems
52 | attributes:
53 | label: Which operating systems does with happen with?
54 | description: You may select more than one.
55 | multiple: true
56 | options:
57 | - macOS
58 | - Windows
59 | - Linux
60 | - type: textarea
61 | id: notes
62 | attributes:
63 | label: Notes
64 | description: Use this field to provide any other notes that you feel might be relevant to the issue.
65 | validations:
66 | required: false
67 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/config.yml:
--------------------------------------------------------------------------------
1 | blank_issues_enabled: false
2 | contact_links:
3 | - name: Ask a question
4 | url: https://github.com/aymanalhattami/filament-page-with-sidebar/discussions/new?category=q-a
5 | about: Ask the community for help
6 | - name: Request a feature
7 | url: https://github.com/aymanalhattami/filament-page-with-sidebar/discussions/new?category=ideas
8 | about: Share ideas for new features
9 | - name: Report a security issue
10 | url: https://github.com/aymanalhattami/filament-page-with-sidebar/security/policy
11 | about: Learn how to notify us for sensitive bugs
12 |
--------------------------------------------------------------------------------
/.github/SECURITY.md:
--------------------------------------------------------------------------------
1 | # Security Policy
2 |
3 | If you discover any security related issues, please email ayman.m.alhattami@gmail.com instead of using the issue tracker.
4 |
--------------------------------------------------------------------------------
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | # Please see the documentation for all configuration options:
2 | # https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
3 |
4 | version: 2
5 | updates:
6 |
7 | - package-ecosystem: "github-actions"
8 | directory: "/"
9 | schedule:
10 | interval: "weekly"
11 | labels:
12 | - "dependencies"
--------------------------------------------------------------------------------
/.github/workflows/dependabot-auto-merge.yml:
--------------------------------------------------------------------------------
1 | name: "Dependabot Auto-Merge"
2 |
3 | on: pull_request_target
4 |
5 | permissions:
6 | pull-requests: write
7 | contents: write
8 |
9 | jobs:
10 | dependabot:
11 | runs-on: ubuntu-latest
12 | if: ${{ github.actor == 'dependabot[bot]' }}
13 | steps:
14 |
15 | - name: Dependabot metadata
16 | id: metadata
17 | uses: dependabot/fetch-metadata@v2.4.0
18 | with:
19 | github-token: "${{ secrets.GITHUB_TOKEN }}"
20 |
21 | - name: Auto-merge Dependabot PRs for semver-minor updates
22 | if: ${{steps.metadata.outputs.update-type == 'version-update:semver-minor'}}
23 | run: gh pr merge --auto --merge "$PR_URL"
24 | env:
25 | PR_URL: ${{github.event.pull_request.html_url}}
26 | GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
27 |
28 | - name: Auto-merge Dependabot PRs for semver-patch updates
29 | if: ${{steps.metadata.outputs.update-type == 'version-update:semver-patch'}}
30 | run: gh pr merge --auto --merge "$PR_URL"
31 | env:
32 | PR_URL: ${{github.event.pull_request.html_url}}
33 | GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
34 |
--------------------------------------------------------------------------------
/.github/workflows/fix-php-code-style-issues.yml:
--------------------------------------------------------------------------------
1 | name: "Fix PHP Code Styling"
2 |
3 | on:
4 | push:
5 | paths:
6 | - '**.php'
7 |
8 | permissions:
9 | contents: write
10 |
11 | jobs:
12 | php-code-styling:
13 | runs-on: ubuntu-latest
14 |
15 | steps:
16 | - name: Checkout code
17 | uses: actions/checkout@v4
18 | with:
19 | ref: ${{ github.head_ref }}
20 |
21 | - name: Fix PHP code style issues
22 | uses: aglipanci/laravel-pint-action@2.5
23 |
24 | - name: Commit changes
25 | uses: stefanzweifel/git-auto-commit-action@v5
26 | with:
27 | commit_message: Fix styling
28 |
--------------------------------------------------------------------------------
/.github/workflows/phpstan.yml:
--------------------------------------------------------------------------------
1 | name: PHPStan
2 |
3 | on:
4 | push:
5 | paths:
6 | - '**.php'
7 | - 'phpstan.neon.dist'
8 |
9 | jobs:
10 | phpstan:
11 | name: phpstan
12 | runs-on: ubuntu-latest
13 | steps:
14 | - uses: actions/checkout@v4
15 |
16 | - name: Setup PHP
17 | uses: shivammathur/setup-php@v2
18 | with:
19 | php-version: '8.2'
20 | coverage: none
21 |
22 | - name: Install composer dependencies
23 | uses: ramsey/composer-install@v3
24 |
25 | - name: Run PHPStan
26 | run: ./vendor/bin/phpstan --error-format=github
27 |
--------------------------------------------------------------------------------
/.github/workflows/run-tests.yml:
--------------------------------------------------------------------------------
1 | name: run-tests
2 |
3 | on:
4 | push:
5 | branches: [main]
6 | pull_request:
7 | branches: [main]
8 |
9 | jobs:
10 | test:
11 | runs-on: ${{ matrix.os }}
12 | strategy:
13 | fail-fast: true
14 | matrix:
15 | os: [ubuntu-latest, windows-latest]
16 | php: [8.3, 8.2]
17 | laravel: [11.*]
18 | stability: [prefer-lowest, prefer-stable]
19 | include:
20 | - laravel: 11.*
21 | testbench: 9.*
22 | carbon: 2.*
23 |
24 | name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
25 |
26 | steps:
27 | - name: Checkout code
28 | uses: actions/checkout@v4
29 |
30 | - name: Setup PHP
31 | uses: shivammathur/setup-php@v2
32 | with:
33 | php-version: ${{ matrix.php }}
34 | extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
35 | coverage: none
36 |
37 | - name: Setup problem matchers
38 | run: |
39 | echo "::add-matcher::${{ runner.tool_cache }}/php.json"
40 | echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
41 |
42 | - name: Install dependencies
43 | run: |
44 | composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "nesbot/carbon:${{ matrix.carbon }}" --no-interaction --no-update
45 | composer update --${{ matrix.stability }} --prefer-dist --no-interaction
46 |
47 | - name: List Installed Dependencies
48 | run: composer show -D
49 |
50 | # - name: Execute tests
51 | # run: vendor/bin/pest
52 |
--------------------------------------------------------------------------------
/.github/workflows/update-changelog.yml:
--------------------------------------------------------------------------------
1 | name: "Update Changelog"
2 |
3 | on:
4 | release:
5 | types: [released]
6 |
7 | permissions:
8 | contents: write
9 |
10 | jobs:
11 | update:
12 | runs-on: ubuntu-latest
13 |
14 | steps:
15 | - name: Checkout code
16 | uses: actions/checkout@v4
17 | with:
18 | ref: main
19 |
20 | - name: Update Changelog
21 | uses: stefanzweifel/changelog-updater-action@v1
22 | with:
23 | latest-version: ${{ github.event.release.name }}
24 | release-notes: ${{ github.event.release.body }}
25 |
26 | - name: Commit updated CHANGELOG
27 | uses: stefanzweifel/git-auto-commit-action@v5
28 | with:
29 | branch: main
30 | commit_message: Update CHANGELOG
31 | file_pattern: CHANGELOG.md
32 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | .idea
3 | .phpunit.result.cache
4 | .phpunit.cache
5 | .vscode
6 | build
7 | composer.lock
8 | coverage
9 | node_modules
10 | phpunit.xml
11 | phpstan.neon
12 | testbench.yaml
13 | vendor
14 |
--------------------------------------------------------------------------------
/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /shelf/
3 | /workspace.xml
4 | # Editor-based HTTP Client requests
5 | /httpRequests/
6 | # Datasource local storage ignored files
7 | /dataSources/
8 | /dataSources.local.xml
9 |
--------------------------------------------------------------------------------
/.idea/aws.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
10 |
11 |
--------------------------------------------------------------------------------
/.idea/blade.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
--------------------------------------------------------------------------------
/.idea/codeception.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/filament-page-with-sidebar.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
--------------------------------------------------------------------------------
/.idea/git_toolbox_blame.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/git_toolbox_prj.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/.idea/laravel-idea-personal.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/.idea/laravel-idea.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.idea/php.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
--------------------------------------------------------------------------------
/.idea/phpspec.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/.idea/phpunit.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ## 2.6.0 - 2025-03-18
2 |
3 | ### What's Changed
4 |
5 | * Development by @aymanalhattami in https://github.com/aymanalhattami/filament-page-with-sidebar/pull/44
6 | * test by @aymanalhattami in https://github.com/aymanalhattami/filament-page-with-sidebar/pull/45
7 | * chore(deps): bump dependabot/fetch-metadata from 2.2.0 to 2.3.0 by @dependabot in https://github.com/aymanalhattami/filament-page-with-sidebar/pull/47
8 | * chore(deps): bump aglipanci/laravel-pint-action from 2.4 to 2.5 by @dependabot in https://github.com/aymanalhattami/filament-page-with-sidebar/pull/48
9 | * Support for Laravel 12 by @yuters in https://github.com/aymanalhattami/filament-page-with-sidebar/pull/49
10 | * Dev by @aymanalhattami in https://github.com/aymanalhattami/filament-page-with-sidebar/pull/51
11 |
12 | ### New Contributors
13 |
14 | * @aymanalhattami made their first contribution in https://github.com/aymanalhattami/filament-page-with-sidebar/pull/44
15 | * @dependabot made their first contribution in https://github.com/aymanalhattami/filament-page-with-sidebar/pull/47
16 | * @yuters made their first contribution in https://github.com/aymanalhattami/filament-page-with-sidebar/pull/49
17 |
18 | **Full Changelog**: https://github.com/aymanalhattami/filament-page-with-sidebar/compare/2.5.4...2.6.0
19 |
20 | ## 2.5.4 - 2024-09-22
21 |
22 | **Full Changelog**: https://github.com/aymanalhattami/filament-page-with-sidebar/compare/2.5.3...2.5.4
23 |
24 | ## 2.0.0 - 2023-08-05
25 |
26 | **What's new in 2.0.0?**
27 |
28 | - Filament v3 support
29 |
30 | **Full Changelog**:
31 | https://github.com/aymanalhattami/filament-page-with-sidebar/compare/1.1.6...2.0.0
32 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) Ayman Alhattami
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 | # Filament Page With Sidebar
3 |
4 | [](https://github.com/TheBSD/StandWithPalestine/blob/main/docs/README.md)
5 | [](https://packagist.org/packages/aymanalhattami/filament-page-with-sidebar)
6 | [](https://packagist.org/packages/aymanalhattami/filament-page-with-sidebar)
7 | [](https://github.com/aymanalhattami/filament-page-with-sidebar/actions?query=workflow%3Arun-tests+branch%3Amain)
8 | [](https://github.com/aymanalhattami/filament-page-with-sidebar/actions?query=workflow%3A"Fix+PHP+code+styling"+branch%3Amain)
9 |
10 | Organize pages in the sidebar in order to make navigation between pages more comfortable.
11 |
12 | > **Note:**
13 | > It supports both pages and resource pages.
14 |
15 | > **Note:**
16 | > For [Filament 2.x](https://filamentphp.com/docs/2.x/admin/installation) use [version 1.x](https://github.com/aymanalhattami/filament-page-with-sidebar/tree/1.x)
17 |
18 |
19 | ## Screenshots
20 | LTR (Left to Right)
21 | 
22 |
23 | RTL (Right to Left)
24 | 
25 |
26 | Please check out this video by Povilas Korop (Laravel Daily) to learn more about our package: [link](https://www.youtube.com/watch?v=J7dH8O-YBnY)
27 |
28 |
29 | ## Installation
30 | ```bash
31 | composer require aymanalhattami/filament-page-with-sidebar
32 | ```
33 |
34 | optionally you can publish config, views and components files
35 | ```bash
36 | php artisan vendor:publish --tag="filament-page-with-sidebar-config"
37 | php artisan vendor:publish --tag="filament-page-with-sidebar-views"
38 | ```
39 | ## Usage with Resource Pages
40 | 1. First you need to prepare resource pages, for example, we have an edit page, view page, manage page, change password page, and dashboar page for UserResource
41 | ```php
42 | use Filament\Resources\Resource;
43 |
44 | class UserResource extends Resource
45 | {
46 | // ...
47 |
48 | public static function getPages(): array
49 | {
50 | return [
51 | 'index' => App\Filament\Resources\UserResource\Pages\ListUsers::route('/'),
52 | 'edit' => App\Filament\Resources\UserResource\Pages\EditUser::route('/{record}/edit'),
53 | 'view' => App\Filament\Resources\UserResource\Pages\ViewUser::route('/{record}/view'),
54 | 'manage' => App\Filament\Resources\UserResource\Pages\ManageUser::route('/{record}/manage'),
55 | 'password.change' => App\Filament\Resources\UserResource\Pages\ChangePasswordUser::route('/{record}/password/change'),
56 | 'dashboard' => App\Filament\Resources\UserResource\Pages\DashboardUser::route('/{record}/dashboard'),
57 | // ... more pages
58 | ];
59 | }
60 |
61 | // ...
62 | }
63 | ```
64 |
65 | 2. Define a $record property in each custom page, example
66 |
67 | ```php
68 | public ModelName $record; // public User $record;
69 | ```
70 |
71 | 3. Then, define the sidebar method as static in the resource
72 | ```php
73 | use Illuminate\Database\Eloquent\Model;
74 | use Filament\Resources\Resource;
75 | use AymanAlhattami\FilamentPageWithSidebar\FilamentPageSidebar;
76 | use AymanAlhattami\FilamentPageWithSidebar\PageNavigationItem;
77 |
78 | class UserResource extends Resource
79 | {
80 | // ....
81 |
82 | public static function sidebar(Model $record): FilamentPageSidebar
83 | {
84 | return FilamentPageSidebar::make()
85 | ->setNavigationItems([
86 | PageNavigationItem::make('User Dashboard')
87 | ->url(function () use ($record) {
88 | return static::getUrl('dashboard', ['record' => $record->id]);
89 | }),
90 | PageNavigationItem::make('View User')
91 | ->url(function () use ($record) {
92 | return static::getUrl('view', ['record' => $record->id]);
93 | }),
94 | PageNavigationItem::make('Edit User')
95 | ->url(function () use ($record) {
96 | return static::getUrl('edit', ['record' => $record->id]);
97 | }),
98 | PageNavigationItem::make('Manage User')
99 | ->url(function () use ($record) {
100 | return static::getUrl('manage', ['record' => $record->id]);
101 | }),
102 | PageNavigationItem::make('Change Password')
103 | ->url(function () use ($record) {
104 | return static::getUrl('password.change', ['record' => $record->id]);
105 | }),
106 |
107 | // ... more items
108 | ]);
109 | }
110 |
111 | // ....
112 | }
113 | ```
114 |
115 | 4. Use x-filament-page-with-sidebar::page component in the page blade file as a wrapper for the whole content
116 | ```php
117 | // filament.resources.user-resource.pages.change-password-user
118 |
119 | // ... page content
120 |
121 |
122 | ```
123 |
124 | or add the trait ```AymanAlhattami\FilamentPageWithSidebar\Traits\HasPageSidebar``` on any page you want the sidebar included.
125 | This trait will add the sidebar to the Page. Add it to all your Resource Pages :
126 |
127 | ```php
128 | // ...
129 | use AymanAlhattami\FilamentPageWithSidebar\Traits\HasPageSidebar;
130 |
131 | class ViewUser extends ViewRecord
132 | {
133 | use HasPageSidebar; // use this trait to activate the Sidebar
134 |
135 | protected static string $resource = UserResource::class;
136 |
137 | protected function getHeaderActions(): array
138 | {
139 | return [
140 | Actions\EditAction::make(),
141 | ];
142 | }
143 | }
144 | ```
145 |
146 | If you want to use custom view, you can still overwrite the default value with ```protected static string $hasSidebar = false;``` and ```protected static $view = 'filament.[...].user-resource.pages.view-user';```
147 |
148 |
149 | ## Usage with Page
150 | 1. Add the trait ```AymanAlhattami\FilamentPageWithSidebar\Traits\HasPageSidebar``` on any page you want the sidebar included.
151 | 2. Then, define the sidebar method as static in the page
152 |
153 | ```php
154 | // ...
155 | use AymanAlhattami\FilamentPageWithSidebar\Traits\HasPageSidebar;
156 | use Filament\Pages\Page;
157 |
158 | class GeneralSettings extends Page
159 | {
160 | use HasPageSidebar; // use this trait to activate the Sidebar
161 |
162 | // ...
163 | public static function sidebar(): FilamentPageSidebar
164 | {
165 | return FilamentPageSidebar::make()
166 | ->setTitle('Application Settings')
167 | ->setDescription('general, admin, website, sms, payments, notifications, shipping')
168 | ->setNavigationItems([
169 | PageNavigationItem::make('General Settings')
170 | ->translateLabel()
171 | ->url(GeneralSettings::getUrl())
172 | ->icon('heroicon-o-cog-6-tooth')
173 | ->isActiveWhen(function () {
174 | return request()->routeIs(GeneralSettings::getRouteName());
175 | })
176 | ->visible(true),
177 | PageNavigationItem::make('Admin Panel Settings')
178 | ->translateLabel()
179 | ->url(AdminPanelSettings::getUrl())
180 | ->icon('heroicon-o-cog-6-tooth')
181 | ->isActiveWhen(function () {
182 | return request()->routeIs(AdminPanelSettings::getRouteName());
183 | })
184 | ->visible(true),
185 | PageNavigationItem::make('Web Settings')
186 | ->translateLabel()
187 | ->url(WebsiteSettings::getUrl())
188 | ->icon('heroicon-o-cog-6-tooth')
189 | ->isActiveWhen(function () {
190 | return request()->routeIs(WebsiteSettings::getRouteName());
191 | })
192 | ->visible(true),
193 | // ...
194 | ]);
195 | }
196 |
197 | // ...
198 | }
199 | ```
200 |
201 | ## More Options
202 |
203 | ### Set title and description for sidebar
204 | You can set the title or description by using setTitle, setDescription, setDescriptionCopyable methods for the sidebar that will be at the beginning of the sidebar on the top, for example
205 | ```php
206 | // ...
207 |
208 | public static function sidebar(Model $record): FilamentPageSidebar
209 | {
210 | return FilamentPageSidebar::make()
211 | ->setTitle('Sidebar title')
212 | ->setDescription('Sidebar description')
213 | ->setDescriptionCopyable()
214 | ->setNavigationItems([
215 | PageNavigationItem::make(__('User Dashboard'))
216 | ->url(function () use ($record) {
217 | return static::getUrl('dashboard', ['record' => $record->id]);
218 | }),
219 | PageNavigationItem::make(__('View User'))
220 | ->url(function () use ($record) {
221 | return static::getUrl('view', ['record' => $record->id]);
222 | }),
223 |
224 | // ... more items
225 | ]);
226 | }
227 |
228 | // ...
229 | ```
230 |
231 | ### Set navigation layout
232 | You can set navigation as sidebar by using ```->sidebarNavigation()``` or as topbar by using ```->topbarNavigation()```. The default layout is sidebar
233 |
234 | #### Sidebar
235 | 
236 | ```php
237 | // ...
238 |
239 | public static function sidebar(Model $record): FilamentPageSidebar
240 | {
241 | return FilamentPageSidebar::make()
242 | ->sidebarNavigation();
243 | //
244 | }
245 |
246 | // ...
247 | ```
248 |
249 | #### Topbar
250 | 
251 | ```php
252 | // ...
253 |
254 | public static function sidebar(Model $record): FilamentPageSidebar
255 | {
256 | return FilamentPageSidebar::make()
257 | ->topbarNavigation();
258 | //
259 | }
260 |
261 | // ...
262 | ```
263 |
264 | ### Add icon
265 | You can add an icon to the item by using the icon method, for example
266 | ```php
267 | // ...
268 |
269 | public static function sidebar(Model $record): FilamentPageSidebar
270 | {
271 | return FilamentPageSidebar::make()
272 | ->setNavigationItems([
273 | PageNavigationItem::make('Change Password')
274 | ->url(function () use ($record) {
275 | return static::getUrl('password.change', ['record' => $record->id]);
276 | })->icon('heroicon-o-collection')
277 |
278 | // ... more items
279 | ]);
280 | }
281 |
282 | // ...
283 | ```
284 |
285 | ### Add group
286 | You may group navigation items, for example
287 | ```php
288 | // ...
289 |
290 | public static function sidebar(Model $record): FilamentPageSidebar
291 | {
292 | return FilamentPageSidebar::make()
293 | ->setNavigationItems([
294 | PageNavigationItem::make('Change Password')
295 | ->url(function () use ($record) {
296 | return static::getUrl('password.change', ['record' => $record->id]);
297 | })
298 | ->group('Manage User')
299 |
300 | // ... more items
301 | ]);
302 | }
303 |
304 | // ...
305 | ```
306 |
307 | ### Set active item
308 | You can make an item active "has a different background color" by using isActiveWhen method, for example
309 | ```php
310 | // ...
311 | public static function sidebar(Model $record): FilamentPageSidebar
312 | {
313 | return FilamentPageSidebar::make()
314 | ->setNavigationItems([
315 | PageNavigationItem::make('Change Password')
316 | ->url(function () use ($record) {
317 | return static::getUrl('password.change', ['record' => $record->id]);
318 | })
319 | ->isActiveWhen(function () {
320 | return request()->route()->action['as'] == 'filament.resources.users.password.change';
321 | })
322 | // ... more items
323 | ]);
324 | }
325 | // ...
326 | ```
327 |
328 | ### Hide the item
329 | You can control the visibility of an item from the sidebar by using visible method, for example
330 | ```php
331 | // ...
332 |
333 | public static function sidebar(Model $record): FilamentPageSidebar
334 | {
335 | return FilamentPageSidebar::make()
336 | ->setNavigationItems([
337 | PageNavigationItem::make('Change Password')
338 | ->url(function () use ($record) {
339 | return static::getUrl('password.change', ['record' => $record->id]);
340 | })
341 | ->visible(false)
342 | // ... more items
343 | ]);
344 | }
345 | ,
346 | // ...
347 | ```
348 |
349 | ### Add bage to the item
350 | You can add a badge to the item by using the badge method, for example
351 | ```php
352 | // ...
353 | public static function sidebar(Model $record): FilamentPageSidebar
354 | {
355 | return FilamentPageSidebar::make()
356 | ->setNavigationItems([
357 | PageNavigationItem::make('Change Password')
358 | ->url(function () use ($record) {
359 | return static::getUrl('password.change', ['record' => $record->id]);
360 | })
361 | ->badge("badge name")
362 | // ... more items
363 | ]);
364 | }
365 | ,
366 | // ...
367 | ```
368 |
369 | ### Translate the item
370 | You can translate a label by using translateLabel method, for example
371 | ```php
372 | // ...
373 | public static function sidebar(Model $record): FilamentPageSidebar
374 | {
375 | return FilamentPageSidebar::make()->translateLabel()
376 | ->setNavigationItems([
377 | PageNavigationItem::make('Change Password')
378 | ->url(function () use ($record) {
379 | return static::getUrl('password.change', ['record' => $record->id]);
380 | })
381 | // ... more items
382 | ]);
383 | }
384 | ,
385 | // ...
386 | ```
387 |
388 | ## License
389 |
390 | The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
391 |
392 |
393 | [Demo Project Link](https://github.com/aymanalhattami/filament-page-with-sidebar-project)
394 |
--------------------------------------------------------------------------------
/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "aymanalhattami/filament-page-with-sidebar",
3 | "description": "Organize resource pages in sidebar instead of putting all the buttons and links elsewhere in order to make navigation between pages more comfortable.",
4 | "type": "library",
5 | "require": {
6 | "filament/filament": "^3.0",
7 | "spatie/laravel-package-tools": "^1.0"
8 | },
9 | "require-dev": {
10 | "laravel/pint": "^1.0",
11 | "nunomaduro/collision": "^8.0",
12 | "larastan/larastan": "^2.0",
13 | "orchestra/testbench": "^9.0",
14 | "pestphp/pest": "^3.0",
15 | "pestphp/pest-plugin-arch": "^3.0",
16 | "pestphp/pest-plugin-laravel": "^3.0",
17 | "phpstan/extension-installer": "^1.0",
18 | "phpstan/phpstan-deprecation-rules": "^1.0",
19 | "phpstan/phpstan-phpunit": "^1.0"
20 | },
21 | "license": "MIT",
22 | "autoload": {
23 | "psr-4": {
24 | "AymanAlhattami\\FilamentPageWithSidebar\\": "src/"
25 | }
26 | },
27 | "autoload-dev": {
28 | "psr-4": {
29 | "AymanAlhattami\\FilamentPageWithSidebar\\Tests\\": "tests/"
30 | }
31 | },
32 | "authors": [
33 | {
34 | "name": "Ayman Alhattami",
35 | "email": "ayman.m.alhattami@gmail.com"
36 | }
37 | ],
38 | "scripts": {
39 | "post-autoload-dump": "@php ./vendor/bin/testbench package:discover --ansi",
40 | "analyse": "vendor/bin/phpstan analyse",
41 | "test": "vendor/bin/pest",
42 | "test-coverage": "vendor/bin/pest --coverage",
43 | "format": "vendor/bin/pint"
44 | },
45 | "extra": {
46 | "laravel": {
47 | "providers": [
48 | "AymanAlhattami\\FilamentPageWithSidebar\\FilamentPageWithSidebarServiceProvider"
49 | ]
50 | }
51 | },
52 | "minimum-stability": "dev",
53 | "prefer-stable": true,
54 | "config": {
55 | "allow-plugins": {
56 | "pestphp/pest-plugin": true,
57 | "phpstan/extension-installer": true
58 | }
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/config/filament-page-with-sidebar.php:
--------------------------------------------------------------------------------
1 | [
8 | '2xl' => '3',
9 | 'xl' => '3',
10 | 'lg' => '3',
11 | 'md' => '3',
12 | 'sm' => '12',
13 | ],
14 | ];
15 |
--------------------------------------------------------------------------------
/images/sidebar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aymanalhattami/filament-page-with-sidebar/b5f0bbfe340dde941c79d1ffe9eb6ad663733d1a/images/sidebar.png
--------------------------------------------------------------------------------
/images/topbar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aymanalhattami/filament-page-with-sidebar/b5f0bbfe340dde941c79d1ffe9eb6ad663733d1a/images/topbar.png
--------------------------------------------------------------------------------
/images/users-index.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aymanalhattami/filament-page-with-sidebar/b5f0bbfe340dde941c79d1ffe9eb6ad663733d1a/images/users-index.png
--------------------------------------------------------------------------------
/images/users-view-AR.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aymanalhattami/filament-page-with-sidebar/b5f0bbfe340dde941c79d1ffe9eb6ad663733d1a/images/users-view-AR.png
--------------------------------------------------------------------------------
/images/users-view-EN.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aymanalhattami/filament-page-with-sidebar/b5f0bbfe340dde941c79d1ffe9eb6ad663733d1a/images/users-view-EN.png
--------------------------------------------------------------------------------
/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "filament-page-with-sidebar",
3 | "lockfileVersion": 3,
4 | "requires": true,
5 | "packages": {
6 | "": {
7 | "devDependencies": {
8 | "tailwindcss": "^3.3.3"
9 | }
10 | },
11 | "node_modules/@alloc/quick-lru": {
12 | "version": "5.2.0",
13 | "resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz",
14 | "integrity": "sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==",
15 | "dev": true,
16 | "engines": {
17 | "node": ">=10"
18 | },
19 | "funding": {
20 | "url": "https://github.com/sponsors/sindresorhus"
21 | }
22 | },
23 | "node_modules/@jridgewell/gen-mapping": {
24 | "version": "0.3.3",
25 | "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz",
26 | "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==",
27 | "dev": true,
28 | "dependencies": {
29 | "@jridgewell/set-array": "^1.0.1",
30 | "@jridgewell/sourcemap-codec": "^1.4.10",
31 | "@jridgewell/trace-mapping": "^0.3.9"
32 | },
33 | "engines": {
34 | "node": ">=6.0.0"
35 | }
36 | },
37 | "node_modules/@jridgewell/resolve-uri": {
38 | "version": "3.1.0",
39 | "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz",
40 | "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==",
41 | "dev": true,
42 | "engines": {
43 | "node": ">=6.0.0"
44 | }
45 | },
46 | "node_modules/@jridgewell/set-array": {
47 | "version": "1.1.2",
48 | "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz",
49 | "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==",
50 | "dev": true,
51 | "engines": {
52 | "node": ">=6.0.0"
53 | }
54 | },
55 | "node_modules/@jridgewell/sourcemap-codec": {
56 | "version": "1.4.15",
57 | "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz",
58 | "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==",
59 | "dev": true
60 | },
61 | "node_modules/@jridgewell/trace-mapping": {
62 | "version": "0.3.18",
63 | "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz",
64 | "integrity": "sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==",
65 | "dev": true,
66 | "dependencies": {
67 | "@jridgewell/resolve-uri": "3.1.0",
68 | "@jridgewell/sourcemap-codec": "1.4.14"
69 | }
70 | },
71 | "node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec": {
72 | "version": "1.4.14",
73 | "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz",
74 | "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==",
75 | "dev": true
76 | },
77 | "node_modules/@nodelib/fs.scandir": {
78 | "version": "2.1.5",
79 | "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
80 | "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==",
81 | "dev": true,
82 | "dependencies": {
83 | "@nodelib/fs.stat": "2.0.5",
84 | "run-parallel": "^1.1.9"
85 | },
86 | "engines": {
87 | "node": ">= 8"
88 | }
89 | },
90 | "node_modules/@nodelib/fs.stat": {
91 | "version": "2.0.5",
92 | "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz",
93 | "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==",
94 | "dev": true,
95 | "engines": {
96 | "node": ">= 8"
97 | }
98 | },
99 | "node_modules/@nodelib/fs.walk": {
100 | "version": "1.2.8",
101 | "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz",
102 | "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==",
103 | "dev": true,
104 | "dependencies": {
105 | "@nodelib/fs.scandir": "2.1.5",
106 | "fastq": "^1.6.0"
107 | },
108 | "engines": {
109 | "node": ">= 8"
110 | }
111 | },
112 | "node_modules/any-promise": {
113 | "version": "1.3.0",
114 | "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz",
115 | "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==",
116 | "dev": true
117 | },
118 | "node_modules/anymatch": {
119 | "version": "3.1.3",
120 | "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
121 | "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",
122 | "dev": true,
123 | "dependencies": {
124 | "normalize-path": "^3.0.0",
125 | "picomatch": "^2.0.4"
126 | },
127 | "engines": {
128 | "node": ">= 8"
129 | }
130 | },
131 | "node_modules/arg": {
132 | "version": "5.0.2",
133 | "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz",
134 | "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==",
135 | "dev": true
136 | },
137 | "node_modules/balanced-match": {
138 | "version": "1.0.2",
139 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
140 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
141 | "dev": true
142 | },
143 | "node_modules/binary-extensions": {
144 | "version": "2.2.0",
145 | "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
146 | "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
147 | "dev": true,
148 | "engines": {
149 | "node": ">=8"
150 | }
151 | },
152 | "node_modules/brace-expansion": {
153 | "version": "1.1.11",
154 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
155 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
156 | "dev": true,
157 | "dependencies": {
158 | "balanced-match": "^1.0.0",
159 | "concat-map": "0.0.1"
160 | }
161 | },
162 | "node_modules/braces": {
163 | "version": "3.0.2",
164 | "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
165 | "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
166 | "dev": true,
167 | "dependencies": {
168 | "fill-range": "^7.0.1"
169 | },
170 | "engines": {
171 | "node": ">=8"
172 | }
173 | },
174 | "node_modules/camelcase-css": {
175 | "version": "2.0.1",
176 | "resolved": "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz",
177 | "integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==",
178 | "dev": true,
179 | "engines": {
180 | "node": ">= 6"
181 | }
182 | },
183 | "node_modules/chokidar": {
184 | "version": "3.5.3",
185 | "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
186 | "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==",
187 | "dev": true,
188 | "funding": [
189 | {
190 | "type": "individual",
191 | "url": "https://paulmillr.com/funding/"
192 | }
193 | ],
194 | "dependencies": {
195 | "anymatch": "~3.1.2",
196 | "braces": "~3.0.2",
197 | "glob-parent": "~5.1.2",
198 | "is-binary-path": "~2.1.0",
199 | "is-glob": "~4.0.1",
200 | "normalize-path": "~3.0.0",
201 | "readdirp": "~3.6.0"
202 | },
203 | "engines": {
204 | "node": ">= 8.10.0"
205 | },
206 | "optionalDependencies": {
207 | "fsevents": "~2.3.2"
208 | }
209 | },
210 | "node_modules/chokidar/node_modules/glob-parent": {
211 | "version": "5.1.2",
212 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
213 | "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
214 | "dev": true,
215 | "dependencies": {
216 | "is-glob": "^4.0.1"
217 | },
218 | "engines": {
219 | "node": ">= 6"
220 | }
221 | },
222 | "node_modules/commander": {
223 | "version": "4.1.1",
224 | "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz",
225 | "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==",
226 | "dev": true,
227 | "engines": {
228 | "node": ">= 6"
229 | }
230 | },
231 | "node_modules/concat-map": {
232 | "version": "0.0.1",
233 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
234 | "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
235 | "dev": true
236 | },
237 | "node_modules/cssesc": {
238 | "version": "3.0.0",
239 | "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz",
240 | "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==",
241 | "dev": true,
242 | "bin": {
243 | "cssesc": "bin/cssesc"
244 | },
245 | "engines": {
246 | "node": ">=4"
247 | }
248 | },
249 | "node_modules/didyoumean": {
250 | "version": "1.2.2",
251 | "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz",
252 | "integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==",
253 | "dev": true
254 | },
255 | "node_modules/dlv": {
256 | "version": "1.1.3",
257 | "resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz",
258 | "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==",
259 | "dev": true
260 | },
261 | "node_modules/fast-glob": {
262 | "version": "3.3.1",
263 | "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz",
264 | "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==",
265 | "dev": true,
266 | "dependencies": {
267 | "@nodelib/fs.stat": "^2.0.2",
268 | "@nodelib/fs.walk": "^1.2.3",
269 | "glob-parent": "^5.1.2",
270 | "merge2": "^1.3.0",
271 | "micromatch": "^4.0.4"
272 | },
273 | "engines": {
274 | "node": ">=8.6.0"
275 | }
276 | },
277 | "node_modules/fast-glob/node_modules/glob-parent": {
278 | "version": "5.1.2",
279 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
280 | "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
281 | "dev": true,
282 | "dependencies": {
283 | "is-glob": "^4.0.1"
284 | },
285 | "engines": {
286 | "node": ">= 6"
287 | }
288 | },
289 | "node_modules/fastq": {
290 | "version": "1.15.0",
291 | "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz",
292 | "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==",
293 | "dev": true,
294 | "dependencies": {
295 | "reusify": "^1.0.4"
296 | }
297 | },
298 | "node_modules/fill-range": {
299 | "version": "7.0.1",
300 | "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
301 | "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
302 | "dev": true,
303 | "dependencies": {
304 | "to-regex-range": "^5.0.1"
305 | },
306 | "engines": {
307 | "node": ">=8"
308 | }
309 | },
310 | "node_modules/fs.realpath": {
311 | "version": "1.0.0",
312 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
313 | "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",
314 | "dev": true
315 | },
316 | "node_modules/fsevents": {
317 | "version": "2.3.2",
318 | "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
319 | "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
320 | "dev": true,
321 | "hasInstallScript": true,
322 | "optional": true,
323 | "os": [
324 | "darwin"
325 | ],
326 | "engines": {
327 | "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
328 | }
329 | },
330 | "node_modules/function-bind": {
331 | "version": "1.1.1",
332 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
333 | "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
334 | "dev": true
335 | },
336 | "node_modules/glob": {
337 | "version": "7.1.6",
338 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
339 | "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
340 | "dev": true,
341 | "dependencies": {
342 | "fs.realpath": "^1.0.0",
343 | "inflight": "^1.0.4",
344 | "inherits": "2",
345 | "minimatch": "^3.0.4",
346 | "once": "^1.3.0",
347 | "path-is-absolute": "^1.0.0"
348 | },
349 | "engines": {
350 | "node": "*"
351 | },
352 | "funding": {
353 | "url": "https://github.com/sponsors/isaacs"
354 | }
355 | },
356 | "node_modules/glob-parent": {
357 | "version": "6.0.2",
358 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz",
359 | "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==",
360 | "dev": true,
361 | "dependencies": {
362 | "is-glob": "^4.0.3"
363 | },
364 | "engines": {
365 | "node": ">=10.13.0"
366 | }
367 | },
368 | "node_modules/has": {
369 | "version": "1.0.3",
370 | "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
371 | "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
372 | "dev": true,
373 | "dependencies": {
374 | "function-bind": "^1.1.1"
375 | },
376 | "engines": {
377 | "node": ">= 0.4.0"
378 | }
379 | },
380 | "node_modules/inflight": {
381 | "version": "1.0.6",
382 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
383 | "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
384 | "dev": true,
385 | "dependencies": {
386 | "once": "^1.3.0",
387 | "wrappy": "1"
388 | }
389 | },
390 | "node_modules/inherits": {
391 | "version": "2.0.4",
392 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
393 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
394 | "dev": true
395 | },
396 | "node_modules/is-binary-path": {
397 | "version": "2.1.0",
398 | "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
399 | "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
400 | "dev": true,
401 | "dependencies": {
402 | "binary-extensions": "^2.0.0"
403 | },
404 | "engines": {
405 | "node": ">=8"
406 | }
407 | },
408 | "node_modules/is-core-module": {
409 | "version": "2.13.0",
410 | "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.0.tgz",
411 | "integrity": "sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==",
412 | "dev": true,
413 | "dependencies": {
414 | "has": "^1.0.3"
415 | },
416 | "funding": {
417 | "url": "https://github.com/sponsors/ljharb"
418 | }
419 | },
420 | "node_modules/is-extglob": {
421 | "version": "2.1.1",
422 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
423 | "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
424 | "dev": true,
425 | "engines": {
426 | "node": ">=0.10.0"
427 | }
428 | },
429 | "node_modules/is-glob": {
430 | "version": "4.0.3",
431 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
432 | "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
433 | "dev": true,
434 | "dependencies": {
435 | "is-extglob": "^2.1.1"
436 | },
437 | "engines": {
438 | "node": ">=0.10.0"
439 | }
440 | },
441 | "node_modules/is-number": {
442 | "version": "7.0.0",
443 | "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
444 | "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
445 | "dev": true,
446 | "engines": {
447 | "node": ">=0.12.0"
448 | }
449 | },
450 | "node_modules/jiti": {
451 | "version": "1.19.1",
452 | "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.19.1.tgz",
453 | "integrity": "sha512-oVhqoRDaBXf7sjkll95LHVS6Myyyb1zaunVwk4Z0+WPSW4gjS0pl01zYKHScTuyEhQsFxV5L4DR5r+YqSyqyyg==",
454 | "dev": true,
455 | "bin": {
456 | "jiti": "bin/jiti.js"
457 | }
458 | },
459 | "node_modules/lilconfig": {
460 | "version": "2.1.0",
461 | "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz",
462 | "integrity": "sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==",
463 | "dev": true,
464 | "engines": {
465 | "node": ">=10"
466 | }
467 | },
468 | "node_modules/lines-and-columns": {
469 | "version": "1.2.4",
470 | "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz",
471 | "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==",
472 | "dev": true
473 | },
474 | "node_modules/merge2": {
475 | "version": "1.4.1",
476 | "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
477 | "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==",
478 | "dev": true,
479 | "engines": {
480 | "node": ">= 8"
481 | }
482 | },
483 | "node_modules/micromatch": {
484 | "version": "4.0.5",
485 | "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz",
486 | "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==",
487 | "dev": true,
488 | "dependencies": {
489 | "braces": "^3.0.2",
490 | "picomatch": "^2.3.1"
491 | },
492 | "engines": {
493 | "node": ">=8.6"
494 | }
495 | },
496 | "node_modules/minimatch": {
497 | "version": "3.1.2",
498 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
499 | "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
500 | "dev": true,
501 | "dependencies": {
502 | "brace-expansion": "^1.1.7"
503 | },
504 | "engines": {
505 | "node": "*"
506 | }
507 | },
508 | "node_modules/mz": {
509 | "version": "2.7.0",
510 | "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz",
511 | "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==",
512 | "dev": true,
513 | "dependencies": {
514 | "any-promise": "^1.0.0",
515 | "object-assign": "^4.0.1",
516 | "thenify-all": "^1.0.0"
517 | }
518 | },
519 | "node_modules/nanoid": {
520 | "version": "3.3.6",
521 | "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz",
522 | "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==",
523 | "dev": true,
524 | "funding": [
525 | {
526 | "type": "github",
527 | "url": "https://github.com/sponsors/ai"
528 | }
529 | ],
530 | "bin": {
531 | "nanoid": "bin/nanoid.cjs"
532 | },
533 | "engines": {
534 | "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
535 | }
536 | },
537 | "node_modules/normalize-path": {
538 | "version": "3.0.0",
539 | "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
540 | "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
541 | "dev": true,
542 | "engines": {
543 | "node": ">=0.10.0"
544 | }
545 | },
546 | "node_modules/object-assign": {
547 | "version": "4.1.1",
548 | "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
549 | "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==",
550 | "dev": true,
551 | "engines": {
552 | "node": ">=0.10.0"
553 | }
554 | },
555 | "node_modules/object-hash": {
556 | "version": "3.0.0",
557 | "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz",
558 | "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==",
559 | "dev": true,
560 | "engines": {
561 | "node": ">= 6"
562 | }
563 | },
564 | "node_modules/once": {
565 | "version": "1.4.0",
566 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
567 | "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
568 | "dev": true,
569 | "dependencies": {
570 | "wrappy": "1"
571 | }
572 | },
573 | "node_modules/path-is-absolute": {
574 | "version": "1.0.1",
575 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
576 | "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",
577 | "dev": true,
578 | "engines": {
579 | "node": ">=0.10.0"
580 | }
581 | },
582 | "node_modules/path-parse": {
583 | "version": "1.0.7",
584 | "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
585 | "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
586 | "dev": true
587 | },
588 | "node_modules/picocolors": {
589 | "version": "1.0.0",
590 | "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
591 | "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==",
592 | "dev": true
593 | },
594 | "node_modules/picomatch": {
595 | "version": "2.3.1",
596 | "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
597 | "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
598 | "dev": true,
599 | "engines": {
600 | "node": ">=8.6"
601 | },
602 | "funding": {
603 | "url": "https://github.com/sponsors/jonschlinkert"
604 | }
605 | },
606 | "node_modules/pify": {
607 | "version": "2.3.0",
608 | "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
609 | "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==",
610 | "dev": true,
611 | "engines": {
612 | "node": ">=0.10.0"
613 | }
614 | },
615 | "node_modules/pirates": {
616 | "version": "4.0.6",
617 | "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz",
618 | "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==",
619 | "dev": true,
620 | "engines": {
621 | "node": ">= 6"
622 | }
623 | },
624 | "node_modules/postcss": {
625 | "version": "8.4.27",
626 | "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.27.tgz",
627 | "integrity": "sha512-gY/ACJtJPSmUFPDCHtX78+01fHa64FaU4zaaWfuh1MhGJISufJAH4cun6k/8fwsHYeK4UQmENQK+tRLCFJE8JQ==",
628 | "dev": true,
629 | "funding": [
630 | {
631 | "type": "opencollective",
632 | "url": "https://opencollective.com/postcss/"
633 | },
634 | {
635 | "type": "tidelift",
636 | "url": "https://tidelift.com/funding/github/npm/postcss"
637 | },
638 | {
639 | "type": "github",
640 | "url": "https://github.com/sponsors/ai"
641 | }
642 | ],
643 | "dependencies": {
644 | "nanoid": "^3.3.6",
645 | "picocolors": "^1.0.0",
646 | "source-map-js": "^1.0.2"
647 | },
648 | "engines": {
649 | "node": "^10 || ^12 || >=14"
650 | }
651 | },
652 | "node_modules/postcss-import": {
653 | "version": "15.1.0",
654 | "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-15.1.0.tgz",
655 | "integrity": "sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==",
656 | "dev": true,
657 | "dependencies": {
658 | "postcss-value-parser": "^4.0.0",
659 | "read-cache": "^1.0.0",
660 | "resolve": "^1.1.7"
661 | },
662 | "engines": {
663 | "node": ">=14.0.0"
664 | },
665 | "peerDependencies": {
666 | "postcss": "^8.0.0"
667 | }
668 | },
669 | "node_modules/postcss-js": {
670 | "version": "4.0.1",
671 | "resolved": "https://registry.npmjs.org/postcss-js/-/postcss-js-4.0.1.tgz",
672 | "integrity": "sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==",
673 | "dev": true,
674 | "dependencies": {
675 | "camelcase-css": "^2.0.1"
676 | },
677 | "engines": {
678 | "node": "^12 || ^14 || >= 16"
679 | },
680 | "funding": {
681 | "type": "opencollective",
682 | "url": "https://opencollective.com/postcss/"
683 | },
684 | "peerDependencies": {
685 | "postcss": "^8.4.21"
686 | }
687 | },
688 | "node_modules/postcss-load-config": {
689 | "version": "4.0.1",
690 | "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-4.0.1.tgz",
691 | "integrity": "sha512-vEJIc8RdiBRu3oRAI0ymerOn+7rPuMvRXslTvZUKZonDHFIczxztIyJ1urxM1x9JXEikvpWWTUUqal5j/8QgvA==",
692 | "dev": true,
693 | "dependencies": {
694 | "lilconfig": "^2.0.5",
695 | "yaml": "^2.1.1"
696 | },
697 | "engines": {
698 | "node": ">= 14"
699 | },
700 | "funding": {
701 | "type": "opencollective",
702 | "url": "https://opencollective.com/postcss/"
703 | },
704 | "peerDependencies": {
705 | "postcss": ">=8.0.9",
706 | "ts-node": ">=9.0.0"
707 | },
708 | "peerDependenciesMeta": {
709 | "postcss": {
710 | "optional": true
711 | },
712 | "ts-node": {
713 | "optional": true
714 | }
715 | }
716 | },
717 | "node_modules/postcss-nested": {
718 | "version": "6.0.1",
719 | "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.0.1.tgz",
720 | "integrity": "sha512-mEp4xPMi5bSWiMbsgoPfcP74lsWLHkQbZc3sY+jWYd65CUwXrUaTp0fmNpa01ZcETKlIgUdFN/MpS2xZtqL9dQ==",
721 | "dev": true,
722 | "dependencies": {
723 | "postcss-selector-parser": "^6.0.11"
724 | },
725 | "engines": {
726 | "node": ">=12.0"
727 | },
728 | "funding": {
729 | "type": "opencollective",
730 | "url": "https://opencollective.com/postcss/"
731 | },
732 | "peerDependencies": {
733 | "postcss": "^8.2.14"
734 | }
735 | },
736 | "node_modules/postcss-selector-parser": {
737 | "version": "6.0.13",
738 | "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.13.tgz",
739 | "integrity": "sha512-EaV1Gl4mUEV4ddhDnv/xtj7sxwrwxdetHdWUGnT4VJQf+4d05v6lHYZr8N573k5Z0BViss7BDhfWtKS3+sfAqQ==",
740 | "dev": true,
741 | "dependencies": {
742 | "cssesc": "^3.0.0",
743 | "util-deprecate": "^1.0.2"
744 | },
745 | "engines": {
746 | "node": ">=4"
747 | }
748 | },
749 | "node_modules/postcss-value-parser": {
750 | "version": "4.2.0",
751 | "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz",
752 | "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==",
753 | "dev": true
754 | },
755 | "node_modules/queue-microtask": {
756 | "version": "1.2.3",
757 | "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
758 | "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==",
759 | "dev": true,
760 | "funding": [
761 | {
762 | "type": "github",
763 | "url": "https://github.com/sponsors/feross"
764 | },
765 | {
766 | "type": "patreon",
767 | "url": "https://www.patreon.com/feross"
768 | },
769 | {
770 | "type": "consulting",
771 | "url": "https://feross.org/support"
772 | }
773 | ]
774 | },
775 | "node_modules/read-cache": {
776 | "version": "1.0.0",
777 | "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz",
778 | "integrity": "sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==",
779 | "dev": true,
780 | "dependencies": {
781 | "pify": "^2.3.0"
782 | }
783 | },
784 | "node_modules/readdirp": {
785 | "version": "3.6.0",
786 | "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
787 | "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
788 | "dev": true,
789 | "dependencies": {
790 | "picomatch": "^2.2.1"
791 | },
792 | "engines": {
793 | "node": ">=8.10.0"
794 | }
795 | },
796 | "node_modules/resolve": {
797 | "version": "1.22.4",
798 | "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.4.tgz",
799 | "integrity": "sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg==",
800 | "dev": true,
801 | "dependencies": {
802 | "is-core-module": "^2.13.0",
803 | "path-parse": "^1.0.7",
804 | "supports-preserve-symlinks-flag": "^1.0.0"
805 | },
806 | "bin": {
807 | "resolve": "bin/resolve"
808 | },
809 | "funding": {
810 | "url": "https://github.com/sponsors/ljharb"
811 | }
812 | },
813 | "node_modules/reusify": {
814 | "version": "1.0.4",
815 | "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz",
816 | "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==",
817 | "dev": true,
818 | "engines": {
819 | "iojs": ">=1.0.0",
820 | "node": ">=0.10.0"
821 | }
822 | },
823 | "node_modules/run-parallel": {
824 | "version": "1.2.0",
825 | "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz",
826 | "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==",
827 | "dev": true,
828 | "funding": [
829 | {
830 | "type": "github",
831 | "url": "https://github.com/sponsors/feross"
832 | },
833 | {
834 | "type": "patreon",
835 | "url": "https://www.patreon.com/feross"
836 | },
837 | {
838 | "type": "consulting",
839 | "url": "https://feross.org/support"
840 | }
841 | ],
842 | "dependencies": {
843 | "queue-microtask": "^1.2.2"
844 | }
845 | },
846 | "node_modules/source-map-js": {
847 | "version": "1.0.2",
848 | "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
849 | "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==",
850 | "dev": true,
851 | "engines": {
852 | "node": ">=0.10.0"
853 | }
854 | },
855 | "node_modules/sucrase": {
856 | "version": "3.34.0",
857 | "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.34.0.tgz",
858 | "integrity": "sha512-70/LQEZ07TEcxiU2dz51FKaE6hCTWC6vr7FOk3Gr0U60C3shtAN+H+BFr9XlYe5xqf3RA8nrc+VIwzCfnxuXJw==",
859 | "dev": true,
860 | "dependencies": {
861 | "@jridgewell/gen-mapping": "^0.3.2",
862 | "commander": "^4.0.0",
863 | "glob": "7.1.6",
864 | "lines-and-columns": "^1.1.6",
865 | "mz": "^2.7.0",
866 | "pirates": "^4.0.1",
867 | "ts-interface-checker": "^0.1.9"
868 | },
869 | "bin": {
870 | "sucrase": "bin/sucrase",
871 | "sucrase-node": "bin/sucrase-node"
872 | },
873 | "engines": {
874 | "node": ">=8"
875 | }
876 | },
877 | "node_modules/supports-preserve-symlinks-flag": {
878 | "version": "1.0.0",
879 | "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
880 | "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==",
881 | "dev": true,
882 | "engines": {
883 | "node": ">= 0.4"
884 | },
885 | "funding": {
886 | "url": "https://github.com/sponsors/ljharb"
887 | }
888 | },
889 | "node_modules/tailwindcss": {
890 | "version": "3.3.3",
891 | "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.3.3.tgz",
892 | "integrity": "sha512-A0KgSkef7eE4Mf+nKJ83i75TMyq8HqY3qmFIJSWy8bNt0v1lG7jUcpGpoTFxAwYcWOphcTBLPPJg+bDfhDf52w==",
893 | "dev": true,
894 | "dependencies": {
895 | "@alloc/quick-lru": "^5.2.0",
896 | "arg": "^5.0.2",
897 | "chokidar": "^3.5.3",
898 | "didyoumean": "^1.2.2",
899 | "dlv": "^1.1.3",
900 | "fast-glob": "^3.2.12",
901 | "glob-parent": "^6.0.2",
902 | "is-glob": "^4.0.3",
903 | "jiti": "^1.18.2",
904 | "lilconfig": "^2.1.0",
905 | "micromatch": "^4.0.5",
906 | "normalize-path": "^3.0.0",
907 | "object-hash": "^3.0.0",
908 | "picocolors": "^1.0.0",
909 | "postcss": "^8.4.23",
910 | "postcss-import": "^15.1.0",
911 | "postcss-js": "^4.0.1",
912 | "postcss-load-config": "^4.0.1",
913 | "postcss-nested": "^6.0.1",
914 | "postcss-selector-parser": "^6.0.11",
915 | "resolve": "^1.22.2",
916 | "sucrase": "^3.32.0"
917 | },
918 | "bin": {
919 | "tailwind": "lib/cli.js",
920 | "tailwindcss": "lib/cli.js"
921 | },
922 | "engines": {
923 | "node": ">=14.0.0"
924 | }
925 | },
926 | "node_modules/thenify": {
927 | "version": "3.3.1",
928 | "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz",
929 | "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==",
930 | "dev": true,
931 | "dependencies": {
932 | "any-promise": "^1.0.0"
933 | }
934 | },
935 | "node_modules/thenify-all": {
936 | "version": "1.6.0",
937 | "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz",
938 | "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==",
939 | "dev": true,
940 | "dependencies": {
941 | "thenify": ">= 3.1.0 < 4"
942 | },
943 | "engines": {
944 | "node": ">=0.8"
945 | }
946 | },
947 | "node_modules/to-regex-range": {
948 | "version": "5.0.1",
949 | "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
950 | "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
951 | "dev": true,
952 | "dependencies": {
953 | "is-number": "^7.0.0"
954 | },
955 | "engines": {
956 | "node": ">=8.0"
957 | }
958 | },
959 | "node_modules/ts-interface-checker": {
960 | "version": "0.1.13",
961 | "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz",
962 | "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==",
963 | "dev": true
964 | },
965 | "node_modules/util-deprecate": {
966 | "version": "1.0.2",
967 | "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
968 | "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
969 | "dev": true
970 | },
971 | "node_modules/wrappy": {
972 | "version": "1.0.2",
973 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
974 | "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
975 | "dev": true
976 | },
977 | "node_modules/yaml": {
978 | "version": "2.3.1",
979 | "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.1.tgz",
980 | "integrity": "sha512-2eHWfjaoXgTBC2jNM1LRef62VQa0umtvRiDSk6HSzW7RvS5YtkabJrwYLLEKWBc8a5U2PTSCs+dJjUTJdlHsWQ==",
981 | "dev": true,
982 | "engines": {
983 | "node": ">= 14"
984 | }
985 | }
986 | }
987 | }
988 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "scripts": {
3 | "dev": "npx tailwindcss -i resources/css/app.css -o resources/dist/app.css --watch",
4 | "build": "npx tailwindcss -i resources/css/app.css -o resources/dist/app.css --minify"
5 | },
6 | "devDependencies": {
7 | "tailwindcss": "^3.3.3"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/phpstan-baseline.neon:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aymanalhattami/filament-page-with-sidebar/b5f0bbfe340dde941c79d1ffe9eb6ad663733d1a/phpstan-baseline.neon
--------------------------------------------------------------------------------
/phpstan.neon.dist:
--------------------------------------------------------------------------------
1 | includes:
2 | - phpstan-baseline.neon
3 |
4 | parameters:
5 | level: 4
6 | paths:
7 | - src
8 | - config
9 | tmpDir: build/phpstan
10 | checkOctaneCompatibility: true
11 | checkModelProperties: true
12 | checkMissingIterableValueType: false
13 |
14 |
--------------------------------------------------------------------------------
/resources/css/app.css:
--------------------------------------------------------------------------------
1 | @tailwind base;
2 | @tailwind components;
3 | @tailwind utilities;
--------------------------------------------------------------------------------
/resources/dist/app.css:
--------------------------------------------------------------------------------
1 | /*! tailwindcss v3.3.3 | MIT License | https://tailwindcss.com*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:initial}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:initial;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:initial}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,::backdrop,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.absolute{position:absolute}.relative{position:relative}.-bottom-1\/2{bottom:-50%}.-top-1\/2{top:-50%}.bottom-1\/2{bottom:50%}.top-1\/2{top:50%}.col-\[--col-span-default\]{grid-column:var(--col-span-default)}.-my-2{margin-top:-.5rem;margin-bottom:-.5rem}.-me-2{-webkit-margin-end:-.5rem;margin-inline-end:-.5rem}.-mt-8{margin-top:-2rem}.me-6{-webkit-margin-end:1.5rem;margin-inline-end:1.5rem}.mt-4{margin-top:1rem}.mt-8{margin-top:2rem}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.h-1{height:.25rem}.h-1\.5{height:.375rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.w-1{width:.25rem}.w-1\.5{width:.375rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-full{width:100%}.w-px{width:1px}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.rotate-180{--tw-rotate:180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-pointer{cursor:pointer}.grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.gap-4{gap:1rem}.gap-x-1{-moz-column-gap:.25rem;column-gap:.25rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-y-1{row-gap:.25rem}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem*var(--tw-space-y-reverse))}.overflow-x-scroll{overflow-x:scroll}.truncate{overflow:hidden;text-overflow:ellipsis}.truncate,.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.bg-gray-300{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity))}.bg-gray-400{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.text-base{font-size:1rem;line-height:1.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-medium{font-weight:500}.font-semibold{font-weight:600}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity))}.text-slate-700{--tw-text-opacity:1;color:rgb(51 65 85/var(--tw-text-opacity))}.opacity-0{opacity:0}.opacity-100{opacity:1}.outline-none{outline:2px solid #0000;outline-offset:2px}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.delay-100{transition-delay:.1s}.duration-75{transition-duration:75ms}.hover\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.hover\:bg-gray-50:hover{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity))}.hover\:text-gray-700:hover{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity))}.focus\:bg-gray-100:focus{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.focus\:bg-gray-50:focus{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity))}:is([dir=rtl] .rtl\:space-x-reverse)>:not([hidden])~:not([hidden]){--tw-space-x-reverse:1}@media (prefers-color-scheme:dark){.dark\:bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity))}.dark\:bg-gray-600{--tw-bg-opacity:1;background-color:rgb(75 85 99/var(--tw-bg-opacity))}.dark\:bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity))}.dark\:bg-white\/5{background-color:#ffffff0d}.dark\:text-gray-200{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity))}.dark\:text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.dark\:text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.dark\:ring-white\/10{--tw-ring-color:#ffffff1a}.dark\:hover\:bg-white\/5:hover{background-color:#ffffff0d}.dark\:hover\:text-gray-400:hover{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.dark\:focus\:bg-white\/5:focus{background-color:#ffffff0d}}@media (min-width:640px){.sm\:col-\[--col-span-sm\]{grid-column:var(--col-span-sm)}.sm\:gap-5{gap:1.25rem}}@media (min-width:768px){.md\:col-\[--col-span-md\]{grid-column:var(--col-span-md)}.md\:px-4{padding-left:1rem;padding-right:1rem}}@media (min-width:1024px){.lg\:col-\[--col-span-lg\]{grid-column:var(--col-span-lg)}.lg\:flex{display:flex}.lg\:gap-6{gap:1.5rem}.lg\:px-4{padding-left:1rem;padding-right:1rem}.lg\:transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.lg\:delay-100{transition-delay:.1s}}@media (min-width:1280px){.xl\:col-\[--col-span-xl\]{grid-column:var(--col-span-xl)}}@media (min-width:1536px){.\32xl\:col-\[--col-span-2xl\]{grid-column:var(--col-span-2xl)}}
--------------------------------------------------------------------------------
/resources/views/components/group.blade.php:
--------------------------------------------------------------------------------
1 | @props([
2 | 'collapsible' => true,
3 | 'icon' => null,
4 | 'items' => [],
5 | 'label' => null,
6 | ])
7 |
8 |
76 |
--------------------------------------------------------------------------------
/resources/views/components/item.blade.php:
--------------------------------------------------------------------------------
1 | @props([
2 | 'active' => false,
3 | 'activeChildItems' => false,
4 | 'activeIcon' => null,
5 | 'badge' => null,
6 | 'badgeColor' => null,
7 | 'badgeTooltip' => null,
8 | 'childItems' => [],
9 | 'first' => false,
10 | 'grouped' => false,
11 | 'icon' => null,
12 | 'last' => false,
13 | 'shouldOpenUrlInNewTab' => false,
14 | 'sidebarCollapsible' => true,
15 | 'subGrouped' => false,
16 | 'url',
17 | ])
18 |
19 | @php
20 | $sidebarCollapsible = $sidebarCollapsible && filament()->isSidebarCollapsibleOnDesktop();
21 | @endphp
22 |
23 | class([
26 | 'fi-sidebar-item',
27 | // @deprecated `fi-sidebar-item-active` has been replaced by `fi-active`.
28 | 'fi-active fi-sidebar-item-active' => $active,
29 | 'flex flex-col gap-y-1' => $active || $activeChildItems,
30 | ])
31 | }}
32 | >
33 | filled($url),
52 | 'bg-gray-100 dark:bg-white/5' => $active,
53 | ])
54 | >
55 | @if (filled($icon) && ((! $subGrouped) || $sidebarCollapsible))
56 | ! $active,
62 | 'text-primary-600 dark:text-primary-400' => $active,
63 | ])
64 | />
65 | @endif
66 |
67 | @if ((blank($icon) && $grouped) || $subGrouped)
68 |
94 | @endif
95 |
96 | ! $active,
106 | 'text-primary-600 dark:text-primary-400' => $active,
107 | ])
108 | >
109 | {{ $slot }}
110 |
111 |
112 | @if (filled($badge))
113 |
121 |
125 | {{ $badge }}
126 |
127 |
128 | @endif
129 |
130 |
131 | @if (($active || $activeChildItems) && $childItems)
132 |
153 | @endif
154 |
155 |
--------------------------------------------------------------------------------
/resources/views/components/page.blade.php:
--------------------------------------------------------------------------------
1 | @php
2 | $sidebar = $this->getSidebar();
3 | $sidebarWidths = $this->getSidebarWidths();
4 | @endphp
5 |
6 |
7 | @if($sidebar->getPageNavigationLayout() == \AymanAlhattami\FilamentPageWithSidebar\Enums\PageNavigationLayoutEnum::Sidebar)
8 |
9 |
10 |
23 |
24 |
25 | @if ($sidebar->getTitle() != null || $sidebar->getDescription() != null)
26 |
27 | @if ($sidebar->getTitle() != null)
28 |
29 | {{ $sidebar->getTitle() }}
30 |
31 | @endif
32 |
33 | @if ($sidebar->getDescription())
34 |
35 | {{ $sidebar->getDescription() }}
36 |
37 | @if ($sidebar->getDescriptionCopyable())
38 |
45 | @endif
46 |
47 | @endif
48 |
49 | @endif
50 |
51 |
61 |
62 |
63 |
64 |
77 | {{ $slot }}
78 |
79 |
80 |
81 | @else
82 |
83 |
84 | {{ $slot }}
85 | @endif
86 |
87 |
--------------------------------------------------------------------------------
/resources/views/components/topbar/index.blade.php:
--------------------------------------------------------------------------------
1 | @props([
2 | 'sidebar',
3 | ])
4 |
5 |
6 |
66 |
--------------------------------------------------------------------------------
/resources/views/components/topbar/item.blade.php:
--------------------------------------------------------------------------------
1 | @props([
2 | 'active' => false,
3 | 'activeIcon' => null,
4 | 'badge' => null,
5 | 'badgeColor' => null,
6 | 'icon' => null,
7 | 'shouldOpenUrlInNewTab' => false,
8 | 'url' => null,
9 | ])
10 |
11 | @php
12 | $tag = $url ? 'a' : 'button';
13 | @endphp
14 |
15 | $active,
18 | ])
19 | >
20 | <{{ $tag }}
21 | @if ($url)
22 | {{ \Filament\Support\generate_href_html($url, $shouldOpenUrlInNewTab) }}
23 | @else
24 | type="button"
25 | @endif
26 | @class([
27 | 'flex items-center justify-center gap-x-2 rounded-lg px-3 py-2 text-sm font-semibold outline-none transition duration-75 hover:bg-gray-50 focus:bg-gray-50 dark:hover:bg-white/5 dark:focus:bg-white/5',
28 | 'text-gray-700 dark:text-gray-200' => ! $active,
29 | 'bg-gray-50 text-primary-600 dark:bg-white/5 dark:text-primary-400' => $active,
30 | ])
31 | >
32 | @if ($icon || $activeIcon)
33 | ! $active,
38 | 'text-primary-500' => $active,
39 | ])
40 | />
41 | @endif
42 |
43 |
44 | {{ $slot }}
45 |
46 |
47 | @if (filled($badge))
48 |
49 | {{ $badge }}
50 |
51 | @endif
52 | {{ $tag }}>
53 |
54 |
--------------------------------------------------------------------------------
/resources/views/proxy.blade.php:
--------------------------------------------------------------------------------
1 |
2 | @include($this->getIncludedSidebarView())
3 |
--------------------------------------------------------------------------------
/src/Enums/PageNavigationLayoutEnum.php:
--------------------------------------------------------------------------------
1 | title = $title;
37 |
38 | return $this;
39 | }
40 |
41 | public function getTitle(): ?string
42 | {
43 | return $this->evaluate($this->title);
44 | }
45 |
46 | public function setDescription(string|Closure $description): static
47 | {
48 | $this->description = $description;
49 |
50 | return $this;
51 | }
52 |
53 | public function getDescription(): ?string
54 | {
55 | return $this->evaluate($this->description);
56 | }
57 |
58 | public function setDescriptionCopyable(bool|Closure $copyable = true): static
59 | {
60 | $this->descriptionCopyable = $copyable;
61 |
62 | return $this;
63 | }
64 |
65 | public function getDescriptionCopyable(): bool
66 | {
67 | return $this->evaluate($this->descriptionCopyable);
68 | }
69 |
70 | public function setNavigationItems(array $navigationItems): static
71 | {
72 | $this->navigationItems = $navigationItems;
73 |
74 | return $this;
75 | }
76 |
77 | public function getNavigationItems(): array
78 | {
79 | return collect($this->navigationItems)
80 | ->filter(fn (PageNavigationItem $item): bool => $item->isVisible())
81 | ->sortBy(fn (PageNavigationItem $item): int => $item->getSort())
82 | ->groupBy(fn (PageNavigationItem $item): ?string => $item->getGroup())
83 | ->map(function (Collection $items, ?string $groupIndex): NavigationGroup {
84 | if (blank($groupIndex)) {
85 | return NavigationGroup::make()->items($items);
86 | }
87 |
88 | $registeredGroup = collect([])
89 | ->first(function (NavigationGroup|string $registeredGroup, string|int $registeredGroupIndex) use ($groupIndex) {
90 | if ($registeredGroupIndex === $groupIndex) {
91 | return true;
92 | }
93 |
94 | if ($registeredGroup === $groupIndex) {
95 | return true;
96 | }
97 |
98 | if (! $registeredGroup instanceof NavigationGroup) {
99 | return false;
100 | }
101 |
102 | return $registeredGroup->getLabel() === $groupIndex;
103 | });
104 |
105 | if ($registeredGroup instanceof NavigationGroup) {
106 | return $registeredGroup->items($items);
107 | }
108 |
109 | return NavigationGroup::make($registeredGroup ?? $groupIndex)
110 | ->items($items);
111 | })
112 | ->sortBy(function (NavigationGroup $group, ?string $groupIndex): int {
113 | if (blank($group->getLabel())) {
114 | return -1;
115 | }
116 |
117 | $registeredGroups = [];
118 |
119 | $groupsToSearch = $registeredGroups;
120 |
121 | if (Arr::first($registeredGroups) instanceof NavigationGroup) {
122 | $groupsToSearch = [
123 | ...array_keys($registeredGroups),
124 | ...array_map(fn (NavigationGroup $registeredGroup): string => $registeredGroup->getLabel(), array_values($registeredGroups)),
125 | ];
126 | }
127 |
128 | $sort = array_search(
129 | $groupIndex,
130 | $groupsToSearch,
131 | );
132 |
133 | if ($sort === false) {
134 | return count($registeredGroups);
135 | }
136 |
137 | return $sort;
138 | })
139 | ->all();
140 | }
141 |
142 | public function setPageNavigationLayout(PageNavigationLayoutEnum $pageNavigationLayoutEnum)
143 | {
144 | return $this->pageNavigationLayoutEnum = $pageNavigationLayoutEnum;
145 | }
146 |
147 | public function getPageNavigationLayout(): PageNavigationLayoutEnum
148 | {
149 | return $this->pageNavigationLayoutEnum;
150 | }
151 |
152 | public function sidebarNavigation(): static
153 | {
154 | $this->pageNavigationLayoutEnum = PageNavigationLayoutEnum::Sidebar;
155 |
156 | return $this;
157 | }
158 |
159 | public function topbarNavigation(): static
160 | {
161 | $this->pageNavigationLayoutEnum = PageNavigationLayoutEnum::Topbar;
162 |
163 | return $this;
164 | }
165 | }
166 |
--------------------------------------------------------------------------------
/src/FilamentPageWithSidebarServiceProvider.php:
--------------------------------------------------------------------------------
1 | name('filament-page-with-sidebar')
16 | ->hasConfigFile()
17 | ->hasViews()
18 | ->hasViewComponents('filament-page-with-sidebar')
19 | ->hasAssets();
20 |
21 | FilamentAsset::register(
22 | assets: [
23 | Css::make('filament-page-with-sidebar', __DIR__.'/../resources/dist/app.css'),
24 | ],
25 | package: 'aymanalhattami/filament-page-with-sidebar'
26 | );
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/Interfaces/MakeInterface.php:
--------------------------------------------------------------------------------
1 | shouldTranslateLabel = $shouldTranslateLabel;
14 |
15 | return $this;
16 | }
17 |
18 | public function getLabel(): string
19 | {
20 | $label = parent::getLabel();
21 |
22 | return ($this->shouldTranslateLabel)
23 | ? __($label)
24 | : $label;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/Traits/HasPageSidebar.php:
--------------------------------------------------------------------------------
1 | getDefaultProperties()
38 | );
39 |
40 | if ($props->get('view')) {
41 | return $props->get('view');
42 | }
43 | }
44 |
45 | throw new \Exception('No view detected for the Sidebar. Implement Filament\Pages\Page object with valid static $view');
46 | }
47 |
48 | public function getSidebar()
49 | {
50 | if (property_exists($this, 'resource')) {
51 | return static::getResource()::sidebar($this->record);
52 | } else {
53 | return static::sidebar();
54 | }
55 |
56 | }
57 |
58 | public function getSidebarWidths(): array
59 | {
60 | return config('filament-page-with-sidebar.sidebar_width') ?? [
61 | 'sm' => 12,
62 | 'md' => 3,
63 | 'lg' => 3,
64 | 'xl' => 3,
65 | '2xl' => 3,
66 | ];
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/tailwind.config.js:
--------------------------------------------------------------------------------
1 | /** @type {import('tailwindcss').Config} */
2 | module.exports = {
3 | content: ["./resources/views/**/*.blade.php"],
4 | theme: {
5 | extend: {},
6 | },
7 | plugins: [],
8 | }
--------------------------------------------------------------------------------
/tests/FilamentPageSidebarTest.php:
--------------------------------------------------------------------------------
1 | setTitle('Test Title');
12 | expect($sidebar->getTitle())->toBe('Test Title');
13 |
14 | // Test setting and getting description
15 | $sidebar->setDescription('Test Description');
16 | expect($sidebar->getDescription())->toBe('Test Description');
17 |
18 | // Test setting and getting description as copyable
19 | $sidebar->setDescriptionCopyable(true);
20 | expect($sidebar->getDescriptionCopyable())->toBeTrue();
21 | });
22 |
23 | test('FilamentPageSidebar sets and gets navigation layout correctly', function () {
24 | $sidebar = FilamentPageSidebar::make();
25 |
26 | expect($sidebar->getPageNavigationLayout())->toBe(PageNavigationLayoutEnum::Sidebar);
27 |
28 | $sidebar->topbarNavigation();
29 | expect($sidebar->getPageNavigationLayout())->toBe(PageNavigationLayoutEnum::Topbar);
30 |
31 | $sidebar->sidebarNavigation();
32 | expect($sidebar->getPageNavigationLayout())->toBe(PageNavigationLayoutEnum::Sidebar);
33 | });
34 |
35 | test('FilamentPageSidebar filters, sorts, and groups navigation items correctly', function () {
36 | $navigationItems = [
37 | PageNavigationItem::make('Item 1')->group('Group 1'),
38 | PageNavigationItem::make('Item 2')->group('Group 2'),
39 | PageNavigationItem::make('Item 3')->group('Group 1')->visible(false), // invisible item
40 | PageNavigationItem::make('Item 4'), // no group
41 | ];
42 |
43 | $sidebar = FilamentPageSidebar::make()->setNavigationItems($navigationItems);
44 |
45 | $sortedNavigationItems = $sidebar->getNavigationItems();
46 |
47 | // dd($sortedNavigationItems);
48 |
49 | expect($sortedNavigationItems)->toHaveCount(3);
50 | // ->and($sortedNavigationItems['Group 1']->items)->toHaveCount(1)
51 | // ->and($sortedNavigationItems['Group 2']->items)->toHaveCount(1)
52 | // ->and($sortedNavigationItems[0]->items['items'])->toHaveCount(1)// Item 3 is invisible, so it's excluded
53 | });
54 |
--------------------------------------------------------------------------------
/tests/PageNavigationItemTest.php:
--------------------------------------------------------------------------------
1 | getLabel())->toBe('Test Label');
11 |
12 | // Enable translation and mock the translation function
13 | $item->translateLabel();
14 | });
15 |
16 | test('PageNavigationItem does not translate label when disabled', function () {
17 | // Create a PageNavigationItem instance with a label
18 | $item = PageNavigationItem::make(label: 'Test Label');
19 |
20 | // Disable translation
21 | $item->translateLabel(false);
22 |
23 | // Ensure the label is not translated
24 | expect($item->getLabel())->toBe('Test Label');
25 | });
26 |
--------------------------------------------------------------------------------
/tests/Pest.php:
--------------------------------------------------------------------------------
1 | in(__DIR__);
6 |
--------------------------------------------------------------------------------
/tests/TestCase.php:
--------------------------------------------------------------------------------
1 | 'AymanAlhattami\\FilamentPageWithSidebar\\Database\\Factories\\'.class_basename($modelName).'Factory'
28 | );
29 | }
30 |
31 | protected function getPackageProviders($app)
32 | {
33 | return [
34 | ActionsServiceProvider::class,
35 | BladeCaptureDirectiveServiceProvider::class,
36 | BladeHeroiconsServiceProvider::class,
37 | BladeIconsServiceProvider::class,
38 | FilamentServiceProvider::class,
39 | FormsServiceProvider::class,
40 | InfolistsServiceProvider::class,
41 | LivewireServiceProvider::class,
42 | NotificationsServiceProvider::class,
43 | SupportServiceProvider::class,
44 | TablesServiceProvider::class,
45 | WidgetsServiceProvider::class,
46 | FilamentPageWithSidebarServiceProvider::class,
47 | ];
48 | }
49 |
50 | public function getEnvironmentSetUp($app)
51 | {
52 | config()->set('database.default', 'testing');
53 |
54 | /*
55 | $migration = include __DIR__.'/../database/migrations/create_skeleton_table.php.stub';
56 | $migration->up();
57 | */
58 | }
59 | }
60 |
--------------------------------------------------------------------------------