diff --git a/.gitignore b/.gitignore
index c7b467f..2cfdc8c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,6 +7,7 @@
/storage/*.key
/vendor
.env
+.release-it.json
.env.backup
.env.production
.phpactor.json
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 83f7664..d8a538e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,29 +1,455 @@
+# Changelog
+## [1.3.7](https://github.com/justdlabs/inertia.ts/compare/v1.3.6...v1.3.7) (2024-12-17)
+
+## [1.3.6](https://github.com/justdlabs/inertia.ts/compare/1.3.7...v1.3.6) (2024-12-17)
+
+
+### Bug Fixes
+
+* add config ([12f123c](https://github.com/justdlabs/inertia.ts/commit/12f123c1f4313188ae10d9956b346c8f806681a9))
+* deps ([bf0bcf0](https://github.com/justdlabs/inertia.ts/commit/bf0bcf08d7557dbc49f4be54267f82bf722e8669))
+* fix deps ([ed112da](https://github.com/justdlabs/inertia.ts/commit/ed112dafc0c94771b83103fe45ac36dcb52d473c))
+* fix deps ([22316a2](https://github.com/justdlabs/inertia.ts/commit/22316a2726db6c8b798be65d3da3504e27efee39))
+
+
+
+## [1.3.7](https://github.com/justdlabs/inertia.ts/compare/1.3.6...1.3.7) (2024-12-17)
+
+
+### Bug Fixes
+
+* fix ([72de2e7](https://github.com/justdlabs/inertia.ts/commit/72de2e7f864d9f828d4ae097563396ef96710033))
+
+
+
+## [1.3.6](https://github.com/justdlabs/inertia.ts/compare/1.3.5...1.3.6) (2024-12-17)
+
+
+### Bug Fixes
+
+* bump to beta 8 of tailwindcss ([163a8e3](https://github.com/justdlabs/inertia.ts/commit/163a8e3d503cb0f2f2d4772ada0853e5398d1acb))
+* sync ([73709ec](https://github.com/justdlabs/inertia.ts/commit/73709ec8f4650c8e618e23ed7d516d54bb0e8448))
+
+
+
+## [1.3.5](https://github.com/justdlabs/inertia.ts/compare/1.3.4...1.3.5) (2024-12-16)
+
+
+### Bug Fixes
+
+* add bun to actions ([61be853](https://github.com/justdlabs/inertia.ts/commit/61be85394c620cf504e25cd553e7bedfc2f4f7a9))
+
+
+
+## [1.3.4](https://github.com/justdlabs/inertia.ts/compare/1.3.3...1.3.4) (2024-12-16)
+
+
+### Bug Fixes
+
+* fix actions ([47e3a74](https://github.com/justdlabs/inertia.ts/commit/47e3a745e3668ed145d341d381948369bae4cab1))
+
+
+
+## [1.3.3](https://github.com/justdlabs/inertia.ts/compare/1.3.2...1.3.3) (2024-12-16)
+
+
+### Bug Fixes
+
+* input error should not use cn from primitive ([cb816f7](https://github.com/justdlabs/inertia.ts/commit/cb816f7caf6a11f9c7f1d38b8f7e8012bc7aec21))
+
+
+
+## [1.3.2](https://github.com/justdlabs/inertia.ts/compare/1.3.1...1.3.2) (2024-12-16)
+
+
+### Bug Fixes
+
+* fix actions to use legacy ([0b691e5](https://github.com/justdlabs/inertia.ts/commit/0b691e538fd53ef7ddd6f35a866f9b6ea6a7f2b0))
+
+
+
+## [1.3.1](https://github.com/justdlabs/inertia.ts/compare/1.3.0...1.3.1) (2024-12-16)
+
+
+
+# [1.3.0](https://github.com/justdlabs/inertia.ts/compare/1.2.0...1.3.0) (2024-12-16)
+
+
+### Bug Fixes
+
+* little thing ([d7a113c](https://github.com/justdlabs/inertia.ts/commit/d7a113c59f7f29a1103e19c9d71b82296d5758d5))
+
+
+### Features
+
+* upgrade to react 19 and tailwindcss beta 7 ([afb1cdc](https://github.com/justdlabs/inertia.ts/commit/afb1cdcd98b06126cdb233cb5f6cc2861767c995))
+
+
+
+# [1.2.0](https://github.com/justdlabs/inertia.ts/compare/1.1.8...1.2.0) (2024-12-14)
+
+
+### Features
+
+* upgrade to inertia v2 ([fee9000](https://github.com/justdlabs/inertia.ts/commit/fee9000a614d5bfaddda6b39ac8eba392d667443))
+
+
+
+## [1.1.8](https://github.com/justdlabs/inertia.ts/compare/1.1.7...1.1.8) (2024-11-20)
+
+
+### Bug Fixes
+
+* make it better ([a2c9f43](https://github.com/justdlabs/inertia.ts/commit/a2c9f43a1ee4b8db22bff2dbea5b1de847103303))
+
+
+
+## [1.1.7](https://github.com/justdlabs/inertia.ts/compare/1.1.6...1.1.7) (2024-11-18)
+
+
+### Bug Fixes
+
+* upgrade icons ([1606bf0](https://github.com/justdlabs/inertia.ts/commit/1606bf09cfa65ba464a0b42b9d7f0dd2b4c8d9c9))
+
+
+
+## [1.1.6](https://github.com/justdlabs/inertia.ts/compare/1.1.5...1.1.6) (2024-11-18)
+
+
+### Bug Fixes
+
+* syncing ([1d8f16e](https://github.com/justdlabs/inertia.ts/commit/1d8f16eedeafbc623f69833910740ae36bad2f74))
+
+
+
+## [1.1.5](https://github.com/justdlabs/inertia.ts/compare/1.1.4...1.1.5) (2024-11-18)
+
+
+### Bug Fixes
+
+* formatting ([fecdd87](https://github.com/justdlabs/inertia.ts/commit/fecdd8733d0a6fdcdd0e8317199fdea2110ba0e4))
+* upgrade ([3f13735](https://github.com/justdlabs/inertia.ts/commit/3f137357d3052ec02fa637af347d282ddf604e9b))
+
+
+
+## [1.1.4](https://github.com/justdlabs/inertia.ts/compare/1.1.3...1.1.4) (2024-10-26)
+
+
+### Bug Fixes
+
+* bump ([f18e3da](https://github.com/justdlabs/inertia.ts/commit/f18e3daa3948c628cda5da5dd8f6bef5454e70af))
+
+
+
+## [1.1.3](https://github.com/justdlabs/inertia.ts/compare/1.1.2...1.1.3) (2024-10-26)
+
+
+### Bug Fixes
+
+* **app-navbar:** remove max-w-2xl ([1c92708](https://github.com/justdlabs/inertia.ts/commit/1c92708413feda1fc39c02d7b8c0b72b9c59f454))
+* sync navbar ([ebaa12d](https://github.com/justdlabs/inertia.ts/commit/ebaa12df839f89fa79d123379bf9bd45ab646b25))
+
+
+
+## [1.1.2](https://github.com/justdlabs/inertia.ts/compare/1.1.1...1.1.2) (2024-10-24)
+
+
+### Bug Fixes
+
+* fix the navbar ([26859f4](https://github.com/justdlabs/inertia.ts/commit/26859f44dafa5519f46cb88235c3362b8c426548))
+
+
+
+## [1.1.1](https://github.com/justdlabs/inertia.ts/compare/1.1.0...1.1.1) (2024-10-22)
+
+
+
+# [1.1.0](https://github.com/justdlabs/inertia.ts/compare/1.0.34...1.1.0) (2024-10-22)
+
+
+### Bug Fixes
+
+* bump ([9cd9ba5](https://github.com/justdlabs/inertia.ts/commit/9cd9ba563d2107e603e2f68e46aa120a7a02454b))
+
+
+### Features
+
+* sync justd ([5ccf885](https://github.com/justdlabs/inertia.ts/commit/5ccf885ca9f09e85e004acc07b006a7b500c1c7c))
+
+
+
+## [1.0.34](https://github.com/justdlabs/inertia.ts/compare/1.0.33...1.0.34) (2024-10-17)
+
+
+### Bug Fixes
+
+* add flash message to page props ([5693438](https://github.com/justdlabs/inertia.ts/commit/5693438f098252f157fc3edc8f8d285e7a7fe479))
+
+
+
+## [1.0.33](https://github.com/justdlabs/inertia.ts/compare/1.0.32...1.0.33) (2024-10-17)
+
+
+### Bug Fixes
+
+* improve the global.d.ts file ([626f55c](https://github.com/justdlabs/inertia.ts/commit/626f55cfc4a5e6f3a17d04db1e95ee37025d0f83))
+
+
+
+## [1.0.32](https://github.com/justdlabs/inertia.ts/compare/1.0.31...1.0.32) (2024-10-16)
+
+
+### Bug Fixes
+
+* fix routing ssr ([829693d](https://github.com/justdlabs/inertia.ts/commit/829693d03508e0f483c157e988c5350cd04dd39b))
+
+
+
+## [1.0.31](https://github.com/justdlabs/inertia.ts/compare/1.0.30...1.0.31) (2024-10-16)
+
+
+### Bug Fixes
+
+* add run to composer.json ([ad00c97](https://github.com/justdlabs/inertia.ts/commit/ad00c975d4cb8ee502fb03c920cd2b1122adb9f9))
+
+
+
+## [1.0.30](https://github.com/justdlabs/inertia.ts/compare/1.0.29...1.0.30) (2024-10-16)
+
+
+### Bug Fixes
+
+* fix app.tsx ([bacb103](https://github.com/justdlabs/inertia.ts/commit/bacb103bf0293d4ddaf68391a55b5337bdc59674))
+
+
+
+## [1.0.29](https://github.com/justdlabs/inertia.ts/compare/1.0.28...1.0.29) (2024-10-16)
+
+
+### Bug Fixes
+
+* add ziggy location to inertia middleware ([a40dbc6](https://github.com/justdlabs/inertia.ts/commit/a40dbc68fe0650f9f6b8756067932521e45f805b))
+
+
+
+## [1.0.28](https://github.com/justdlabs/inertia.ts/compare/1.0.27...1.0.28) (2024-10-14)
+
+
+### Bug Fixes
+
+* fix prettier ([0d32de2](https://github.com/justdlabs/inertia.ts/commit/0d32de2abe4d90fddf448997df697f037bca945b))
+
+
+
+## [1.0.27](https://github.com/justdlabs/inertia.ts/compare/1.0.26...1.0.27) (2024-10-14)
+
+
+### Bug Fixes
+
+* fix providers ([a8fdfb9](https://github.com/justdlabs/inertia.ts/commit/a8fdfb9af7549f1aa448b2e942cca2d6d44c8dfb))
+
+
+
+## [1.0.26](https://github.com/justdlabs/inertia.ts/compare/1.0.25...1.0.26) (2024-10-13)
+
+
+### Bug Fixes
+
+* bumping vendor ([d992964](https://github.com/justdlabs/inertia.ts/commit/d99296422ce7d4bbc8707fc3c505cf0ff6976ed1))
+
+
+
+## [1.0.25](https://github.com/justdlabs/inertia.ts/compare/1.0.24...1.0.25) (2024-10-13)
+
+
+### Bug Fixes
+
+* update to latest justd components ([a7aa011](https://github.com/justdlabs/inertia.ts/commit/a7aa011b5b3d4f22d09c0bf06a0c293897ff3c15))
+
+
+
+## [1.0.24](https://github.com/justdlabs/inertia.ts/compare/1.0.23...1.0.24) (2024-10-08)
+
+
+### Bug Fixes
+
+* lfg ([c2cd08f](https://github.com/justdlabs/inertia.ts/commit/c2cd08fcf3872fecc789b10b45c9822639a36a71))
+
+
+
+## [1.0.23](https://github.com/justdlabs/inertia.ts/compare/1.0.22...1.0.23) (2024-10-07)
+
+
+### Bug Fixes
+
+* fix t ([9d444ba](https://github.com/justdlabs/inertia.ts/commit/9d444bae7133801275e48fce4688642815755242))
+* upgrade the rac to latest version and sync justd ([9484b63](https://github.com/justdlabs/inertia.ts/commit/9484b63031af882983e33733d0c78adefdb95803))
+
+
+
+## [1.0.22](https://github.com/justdlabs/inertia.ts/compare/1.0.21...1.0.22) (2024-09-16)
+
+
+
+## [1.0.21](https://github.com/justdlabs/inertia.ts/compare/1.0.20...1.0.21) (2024-09-16)
+
+
+### Bug Fixes
+
+* fix touch target not being installed ([172d58e](https://github.com/justdlabs/inertia.ts/commit/172d58e58b0bc1c103bd9f3ae4a87bbb774e6dc7))
+
+
+
+## [1.0.20](https://github.com/justdlabs/inertia.ts/compare/1.0.19...1.0.20) (2024-09-16)
+
+
+### Bug Fixes
+
+* bump packages ([9a9c2d1](https://github.com/justdlabs/inertia.ts/commit/9a9c2d15ef9cbccb9f104760c2ea9bb2aa9ee03f))
+* refactor all components ([11ea304](https://github.com/justdlabs/inertia.ts/commit/11ea304cba7b5b80c669fd967ed48b47fc339efa))
+
+
+
+## [1.0.19](https://github.com/justdlabs/inertia.ts/compare/1.0.18...1.0.19) (2024-09-12)
+
+
+
+## [1.0.18](https://github.com/justdlabs/inertia.ts/compare/1.0.17...1.0.18) (2024-09-09)
+
+
+
+## [1.0.17](https://github.com/justdlabs/inertia.ts/compare/1.0.16...1.0.17) (2024-09-07)
+
+
+### Bug Fixes
+
+* move theme switcher to menu sub ([cac009d](https://github.com/justdlabs/inertia.ts/commit/cac009d266be9c5586ecf1446f3e6859af2e237e))
+
+
+
+## [1.0.16](https://github.com/justdlabs/inertia.ts/compare/1.0.15...1.0.16) (2024-09-06)
+
+
+### Bug Fixes
+
+* bump ([049a347](https://github.com/justdlabs/inertia.ts/commit/049a347323942bccbd54e3b7081a315a49436d40))
+
+
+
+## [1.0.15](https://github.com/justdlabs/inertia.ts/compare/1.0.14...1.0.15) (2024-09-01)
+
+
+
+## [1.0.14](https://github.com/justdlabs/inertia.ts/compare/1.0.13...1.0.14) (2024-08-22)
+
+
+
+## [1.0.13](https://github.com/justdlabs/inertia.ts/compare/1.0.12...1.0.13) (2024-08-13)
+
+
+### Bug Fixes
+
+* fix cmd installation ([4472e9f](https://github.com/justdlabs/inertia.ts/commit/4472e9f599976968594ce3ef1825a186f89910ca))
+
+
+
+## [1.0.12](https://github.com/justdlabs/inertia.ts/compare/1.0.11...1.0.12) (2024-08-13)
+
+
+### Bug Fixes
+
+* bump ([9fb1857](https://github.com/justdlabs/inertia.ts/commit/9fb1857d1ca0947d8376787d5f4bdf09c3a8f7d1))
+* bump again ([e42a8d3](https://github.com/justdlabs/inertia.ts/commit/e42a8d361270f1232901067b3fa35869e17ee12b))
+
+
+
+## [1.0.11](https://github.com/justdlabs/inertia.ts/compare/1.0.10...1.0.11) (2024-08-13)
+
+
+### Bug Fixes
+
+* sync ([46772c9](https://github.com/justdlabs/inertia.ts/commit/46772c90832ca53facd6225fc02d529d12d99b2f))
+* sync latest justd components ([5506cb3](https://github.com/justdlabs/inertia.ts/commit/5506cb3501c97a42d0705af3ebf6df53cff11175))
+
+
+
+## [1.0.10](https://github.com/justdlabs/inertia.ts/compare/1.0.9...1.0.10) (2024-08-11)
+
+
+
+## [1.0.9](https://github.com/justdlabs/inertia.ts/compare/1.0.8...1.0.9) (2024-08-10)
+
+
+
+## [1.0.8](https://github.com/justdlabs/inertia.ts/compare/1.0.7...1.0.8) (2024-08-10)
+
+
+
+## [1.0.7](https://github.com/justdlabs/inertia.ts/compare/1.0.6...1.0.7) (2024-08-08)
+
+
+
+## [1.0.6](https://github.com/justdlabs/inertia.ts/compare/1.0.5...1.0.6) (2024-08-07)
+
+
+
+## [1.0.5](https://github.com/justdlabs/inertia.ts/compare/1.0.4...1.0.5) (2024-08-07)
+
+
+
+## [1.0.4](https://github.com/justdlabs/inertia.ts/compare/1.0.3...1.0.4) (2024-08-06)
+
+
+
+## [1.0.3](https://github.com/justdlabs/inertia.ts/compare/1.0.2...1.0.3) (2024-08-05)
+
+
+
+## [1.0.2](https://github.com/justdlabs/inertia.ts/compare/1.0.1...1.0.2) (2024-08-04)
+
+
+
+## [1.0.1](https://github.com/justdlabs/inertia.ts/compare/ac5b3945c2cb5576a908939a2b9420b9db05d411...1.0.1) (2024-08-04)
+
+
+### Bug Fixes
+
+* make all automate ([ac5b394](https://github.com/justdlabs/inertia.ts/commit/ac5b3945c2cb5576a908939a2b9420b9db05d411))
+
+## 1.3.7 (2024-12-17)
+
+- fix: fix ([72de2e7](https://github.com/justdlabs/inertia.ts/commit/72de2e7))
+
+## 1.3.6 (2024-12-17)
+
+- fix: bump to beta 8 of tailwindcss ([163a8e3](https://github.com/justdlabs/inertia.ts/commit/163a8e3))
+- fix: sync ([73709ec](https://github.com/justdlabs/inertia.ts/commit/73709ec))
## 1.3.5 (2024-12-16)
-* fix: add bun to actions ([61be853](https://github.com/justdlabs/inertia.ts/commit/61be853))
+- fix: add bun to actions ([61be853](https://github.com/justdlabs/inertia.ts/commit/61be853))
## 1.3.4 (2024-12-16)
-* fix: fix actions ([47e3a74](https://github.com/justdlabs/inertia.ts/commit/47e3a74))
+- fix: fix actions ([47e3a74](https://github.com/justdlabs/inertia.ts/commit/47e3a74))
## 1.3.3 (2024-12-16)
-* fix: input error should not use cn from primitive ([cb816f7](https://github.com/justdlabs/inertia.ts/commit/cb816f7))
+- fix: input error should not use cn from primitive ([cb816f7](https://github.com/justdlabs/inertia.ts/commit/cb816f7))
## 1.3.2 (2024-12-16)
-* fix: fix actions to use legacy ([0b691e5](https://github.com/justdlabs/inertia.ts/commit/0b691e5))
+- fix: fix actions to use legacy ([0b691e5](https://github.com/justdlabs/inertia.ts/commit/0b691e5))
## 1.3.1 (2024-12-16)
-* change read me to add composer ([92f09dc](https://github.com/justdlabs/inertia.ts/commit/92f09dc))
+- change read me to add composer ([92f09dc](https://github.com/justdlabs/inertia.ts/commit/92f09dc))
## 1.3.0 (2024-12-16)
-* fix: little thing ([d7a113c](https://github.com/justdlabs/inertia.ts/commit/d7a113c))
-* feat: upgrade to react 19 and tailwindcss beta 7 ([afb1cdc](https://github.com/justdlabs/inertia.ts/commit/afb1cdc))
+- fix: little thing ([d7a113c](https://github.com/justdlabs/inertia.ts/commit/d7a113c))
+- feat: upgrade to react 19 and tailwindcss beta 7 ([afb1cdc](https://github.com/justdlabs/inertia.ts/commit/afb1cdc))
## [1.2.0](https://github.com/justdlabs/inertia.ts/compare/1.1.8...1.2.0) (2024-12-14)
diff --git a/bun.lockb b/bun.lockb
new file mode 100755
index 0000000..bd4a019
Binary files /dev/null and b/bun.lockb differ
diff --git a/composer.json b/composer.json
index 72b35bb..7ca3136 100644
--- a/composer.json
+++ b/composer.json
@@ -1,6 +1,6 @@
{
"name": "justd/laravel",
- "version": "1.3.5",
+ "version": "1.3.7",
"type": "project",
"description": "The skeleton application for the Laravel framework.",
"keywords": [
@@ -58,8 +58,8 @@
"@php artisan key:generate --ansi",
"@php -r \"file_exists('database/database.sqlite') || touch('database/database.sqlite');\"",
"@php artisan migrate --graceful --ansi",
- "npm install --legacy-peer-deps",
- "npm uninstall husky @release-it/conventional-changelog @release-it/bumper @commitlint/config-conventional @commitlint/cli release-it"
+ "bun i --legacy-peer-deps",
+ "bun remove husky @release-it/conventional-changelog @release-it/bumper @commitlint/config-conventional @commitlint/cli release-it"
],
"dev": [
"Composer\\Config::disableProcessTimeout",
diff --git a/composer.lock b/composer.lock
index fbd1045..5901433 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "2f71dbed6a507bcdee438a789a1680a0",
+ "content-hash": "77fadc747a2eb7ff8fc31cb8520fb04d",
"packages": [
{
"name": "amphp/amp",
diff --git a/justd.json b/justd.json
index f68b1c6..9bd3a1d 100644
--- a/justd.json
+++ b/justd.json
@@ -1,8 +1,9 @@
{
- "$schema": "https://getjustd.com",
+ "$schema": "https://getjustd.com/schema.json",
"ui": "resources/js/components/ui",
- "classes": "resources/js/utils",
- "theme": "Default",
- "css": "resources/css/app.css",
- "created_at": "2024-10-07T20:33:03.716Z"
+ "utils": "resources/js/utils",
+ "gray": "zinc",
+ "css": "src/index.css",
+ "alias": "@",
+ "classes": "resources/js/utils"
}
diff --git a/package.json b/package.json
index 3c6bd8e..0135711 100644
--- a/package.json
+++ b/package.json
@@ -25,12 +25,12 @@
"prettier-plugin-organize-imports": "^4.1.0",
"prettier-plugin-tailwindcss": "^0.6.9",
"release-it": "^17.10.0",
- "tailwindcss": "^4.0.0-beta.7",
+ "tailwindcss": "^4.0.0-beta.8",
"typescript": "^5.7.2",
"vite-plugin-watch": "^0.3.1"
},
"dependencies": {
- "@tailwindcss/vite": "^4.0.0-beta.7",
+ "@tailwindcss/vite": "^4.0.0-beta.8",
"@types/node": "^22.10.2",
"clsx": "^2.1.1",
"justd-icons": "^1.10.4",
@@ -44,39 +44,5 @@
"tailwindcss-animate": "^1.0.7",
"vite": "^6.0.3"
},
- "release-it": {
- "git": {
- "commitMessage": "chore: release v${version}"
- },
- "github": {
- "release": true
- },
- "plugins": {
- "@release-it/conventional-changelog": {
- "infile": "CHANGELOG.md",
- "preset": {
- "name": "conventionalcommits",
- "types": [
- {
- "type": "feat",
- "section": "Features"
- },
- {
- "type": "fix",
- "section": "Bug Fixes"
- },
- {
- "type": "chore",
- "section": "Chores"
- }
- ]
- }
- },
- "@release-it/bumper": {
- "in": "composer.json",
- "out": "composer.json"
- }
- }
- },
- "version": "1.3.5"
+ "version": "1.3.7"
}
diff --git a/resources/js/components/ui/button.tsx b/resources/js/components/ui/button.tsx
index 770c719..ce03017 100644
--- a/resources/js/components/ui/button.tsx
+++ b/resources/js/components/ui/button.tsx
@@ -1,5 +1,3 @@
-'use client';
-
import {
Button as ButtonPrimitive,
type ButtonProps as ButtonPrimitiveProps,
diff --git a/resources/js/components/ui/checkbox.tsx b/resources/js/components/ui/checkbox.tsx
index ed4c443..0a74758 100644
--- a/resources/js/components/ui/checkbox.tsx
+++ b/resources/js/components/ui/checkbox.tsx
@@ -1,5 +1,3 @@
-'use client';
-
import { IconCheck, IconMinus } from 'justd-icons';
import type {
CheckboxGroupProps as CheckboxGroupPrimitiveProps,
diff --git a/resources/js/components/ui/dialog.tsx b/resources/js/components/ui/dialog.tsx
index 0877885..6fe27f3 100644
--- a/resources/js/components/ui/dialog.tsx
+++ b/resources/js/components/ui/dialog.tsx
@@ -1,5 +1,3 @@
-'use client';
-
import { useEffect, useRef } from 'react';
import { IconX } from 'justd-icons';
@@ -7,22 +5,22 @@ import type { ButtonProps as ButtonPrimitiveProps, DialogProps, HeadingProps } f
import { Button as ButtonPrimitive, Dialog as DialogPrimitive, Heading } from 'react-aria-components';
import { tv } from 'tailwind-variants';
+import { useMediaQuery } from '@/utils/use-media-query';
import { Button, type ButtonProps } from './button';
-import { useMediaQuery } from './primitive';
const dialogStyles = tv({
slots: {
root: [
- 'relative peer group flex max-h-[inherit] not-has-data-[slot=dialog-body]:**:data-[slot=dialog-header]:pb-0 [&::-webkit-scrollbar]:size-0.5 [scrollbar-width:thin] flex-col overflow-hidden outline-hidden'
+ 'relative peer group/dialog flex max-h-[inherit] not-has-data-[slot=dialog-body]:**:data-[slot=dialog-header]:pb-0 [&::-webkit-scrollbar]:size-0.5 [scrollbar-width:thin] flex-col overflow-hidden outline-hidden'
],
header: 'relative flex flex-col gap-0.5 sm:gap-1 p-4 sm:p-6',
description: 'text-sm text-muted-fg',
body: [
- 'has-[input]:py-1',
- 'flex flex-1 flex-col overflow-auto px-4 sm:px-6',
+ 'has-[input]:pb-1',
+ 'flex flex-1 isolate flex-col overflow-auto px-4 sm:px-6',
'max-h-[calc(var(--visual-viewport-height)-var(--visual-viewport-vertical-padding)-var(--dialog-header-height,0px)-var(--dialog-footer-height,0px))]'
],
- footer: ['mt-auto flex flex-col-reverse justify-between gap-3 sm:flex-row', 'p-4 sm:p-6'],
+ footer: 'mt-auto flex isolate flex-col-reverse justify-between gap-3 sm:flex-row p-4 sm:p-6',
closeIndicator:
'close absolute right-1 top-1 sm:right-2 sm:top-2 data-focused:outline-hidden data-focused:bg-secondary data-hovered:bg-secondary grid place-content-center rounded-xl sm:rounded-md data-focus-visible:ring-1 data-focus-visible:ring-primary size-8 sm:size-7 z-50'
}
diff --git a/resources/js/components/ui/dropdown.tsx b/resources/js/components/ui/dropdown.tsx
index a4f2062..3554f66 100644
--- a/resources/js/components/ui/dropdown.tsx
+++ b/resources/js/components/ui/dropdown.tsx
@@ -1,5 +1,3 @@
-'use client';
-
import { cn } from '@/utils/classes';
import { IconCheck } from 'justd-icons';
import {
diff --git a/resources/js/components/ui/field.tsx b/resources/js/components/ui/field.tsx
index 8cbe4fc..75bdb58 100644
--- a/resources/js/components/ui/field.tsx
+++ b/resources/js/components/ui/field.tsx
@@ -1,5 +1,3 @@
-'use client';
-
import { forwardRef } from 'react';
import type {
diff --git a/resources/js/components/ui/form.tsx b/resources/js/components/ui/form.tsx
index a0e2f1c..a3c0027 100644
--- a/resources/js/components/ui/form.tsx
+++ b/resources/js/components/ui/form.tsx
@@ -1,5 +1,3 @@
-'use client';
-
import type { FormProps } from 'react-aria-components';
import { Form as FormPrimitive } from 'react-aria-components';
diff --git a/resources/js/components/ui/keyboard.tsx b/resources/js/components/ui/keyboard.tsx
index 85e12e1..97593d5 100644
--- a/resources/js/components/ui/keyboard.tsx
+++ b/resources/js/components/ui/keyboard.tsx
@@ -1,5 +1,3 @@
-'use client';
-
import { Keyboard as KeyboardPrimitive } from 'react-aria-components';
import { tv } from 'tailwind-variants';
diff --git a/resources/js/components/ui/link.tsx b/resources/js/components/ui/link.tsx
index 7dbb9b4..012c232 100644
--- a/resources/js/components/ui/link.tsx
+++ b/resources/js/components/ui/link.tsx
@@ -1,5 +1,3 @@
-'use client';
-
import { Link as LinkPrimitive, type LinkProps as LinkPrimitiveProps, composeRenderProps } from 'react-aria-components';
import { tv } from 'tailwind-variants';
diff --git a/resources/js/components/ui/list-box.tsx b/resources/js/components/ui/list-box.tsx
index 1f7e502..80b45b8 100644
--- a/resources/js/components/ui/list-box.tsx
+++ b/resources/js/components/ui/list-box.tsx
@@ -1,5 +1,3 @@
-'use client';
-
import { IconCheck, IconHamburger } from 'justd-icons';
import type { ListBoxItemProps, ListBoxProps } from 'react-aria-components';
import { ListBoxItem, ListBox as ListBoxPrimitive, composeRenderProps } from 'react-aria-components';
diff --git a/resources/js/components/ui/loader.tsx b/resources/js/components/ui/loader.tsx
index aea3108..f06d867 100644
--- a/resources/js/components/ui/loader.tsx
+++ b/resources/js/components/ui/loader.tsx
@@ -1,5 +1,3 @@
-'use client';
-
import { cn } from '@/utils/classes';
import { IconLoader } from 'justd-icons';
import { ProgressBar } from 'react-aria-components';
diff --git a/resources/js/components/ui/menu.tsx b/resources/js/components/ui/menu.tsx
index 6317f92..26d636c 100644
--- a/resources/js/components/ui/menu.tsx
+++ b/resources/js/components/ui/menu.tsx
@@ -1,5 +1,3 @@
-'use client';
-
import { createContext, use } from 'react';
import { IconBulletFill, IconCheck, IconChevronLgRight } from 'justd-icons';
diff --git a/resources/js/components/ui/modal.tsx b/resources/js/components/ui/modal.tsx
index 877d75b..3bb46d4 100644
--- a/resources/js/components/ui/modal.tsx
+++ b/resources/js/components/ui/modal.tsx
@@ -1,5 +1,3 @@
-'use client';
-
import type { DialogProps, DialogTriggerProps, ModalOverlayProps } from 'react-aria-components';
import { DialogTrigger, ModalOverlay, Modal as ModalPrimitive, composeRenderProps } from 'react-aria-components';
import { type VariantProps, tv } from 'tailwind-variants';
diff --git a/resources/js/components/ui/navbar.tsx b/resources/js/components/ui/navbar.tsx
index 102c7ae..ac8cdce 100644
--- a/resources/js/components/ui/navbar.tsx
+++ b/resources/js/components/ui/navbar.tsx
@@ -1,5 +1,3 @@
-'use client';
-
import { createContext, use, useCallback, useId, useMemo, useState } from 'react';
import { IconHamburger } from 'justd-icons';
@@ -9,8 +7,9 @@ import { Link, composeRenderProps } from 'react-aria-components';
import { tv } from 'tailwind-variants';
import { cn } from '@/utils/classes';
+import { useMediaQuery } from '@/utils/use-media-query';
import { Button } from './button';
-import { composeTailwindRenderProps, useMediaQuery } from './primitive';
+import { composeTailwindRenderProps } from './primitive';
import { Sheet } from './sheet';
type NavbarOptions = {
diff --git a/resources/js/components/ui/pagination.tsx b/resources/js/components/ui/pagination.tsx
index 428e813..c97c50a 100644
--- a/resources/js/components/ui/pagination.tsx
+++ b/resources/js/components/ui/pagination.tsx
@@ -1,5 +1,3 @@
-'use client';
-
import {
IconChevronLgLeft,
IconChevronLgRight,
diff --git a/resources/js/components/ui/popover.tsx b/resources/js/components/ui/popover.tsx
index 324340c..312d03d 100644
--- a/resources/js/components/ui/popover.tsx
+++ b/resources/js/components/ui/popover.tsx
@@ -1,5 +1,3 @@
-'use client';
-
import type {
DialogTriggerProps,
ModalOverlayProps,
@@ -18,9 +16,9 @@ import {
} from 'react-aria-components';
import { tv } from 'tailwind-variants';
+import { useMediaQuery } from '@/utils/use-media-query';
import { twMerge } from 'tailwind-merge';
import { Dialog } from './dialog';
-import { useMediaQuery } from './primitive';
const Popover = ({ children, ...props }: DialogTriggerProps) => {
return {children};
@@ -31,20 +29,20 @@ const Title = ({ level = 2, className, ...props }: React.ComponentProps) => (
-
+
);
const Footer = ({ className, ...props }: React.HTMLAttributes) => (
-
+
);
const Body = ({ className, ...props }: React.HTMLAttributes) => (
-
+
);
-const popoverContentStyles = tv({
+const content = tv({
base: [
- 'max-w-xs transition-transform p-4 rounded-xl border bg-overlay bg-clip-padding text-overlay-fg shadow-xs dark:backdrop-saturate-200 sm:text-sm sm:max-w-3xl forced-colors:bg-[Canvas] [&::-webkit-scrollbar]:size-0.5 [scrollbar-width:thin]'
+ 'max-w-xs transition-transform peer-not-has-[data=dialog-header]:p-4 rounded-xl border bg-overlay bg-clip-padding text-overlay-fg shadow-xs dark:backdrop-saturate-200 sm:text-sm sm:max-w-3xl forced-colors:bg-[Canvas] [&::-webkit-scrollbar]:size-0.5 [scrollbar-width:thin]'
],
variants: {
isPicker: { true: 'max-h-72 min-w-(--trigger-width) overflow-y-auto p-0', false: 'min-w-80' },
@@ -126,7 +124,7 @@ const Content = ({ respectScreen = true, children, showArrow = true, className,
@@ -137,7 +135,7 @@ const Content = ({ respectScreen = true, children, showArrow = true, className,
offset={effectiveOffset}
{...props}
className={composeRenderProps(className, (className, renderProps) =>
- popoverContentStyles({
+ content({
...renderProps,
className
})
@@ -165,7 +163,7 @@ const Picker = ({ children, className, ...props }: PopoverProps) => {
- popoverContentStyles({
+ content({
...renderProps,
isPicker: true,
className
@@ -188,4 +186,4 @@ Popover.Header = Header;
Popover.Picker = Picker;
Popover.Title = Title;
-export { Popover, popoverContentStyles };
+export { Popover, content };
diff --git a/resources/js/components/ui/primitive.tsx b/resources/js/components/ui/primitive.tsx
index 5d515c4..34356b2 100644
--- a/resources/js/components/ui/primitive.tsx
+++ b/resources/js/components/ui/primitive.tsx
@@ -1,7 +1,3 @@
-'use client';
-
-import { useEffect, useState } from 'react';
-
import { composeRenderProps } from 'react-aria-components';
import { twMerge } from 'tailwind-merge';
import { tv } from 'tailwind-variants';
@@ -39,22 +35,4 @@ const focusButtonStyles = tv({
}
});
-const useMediaQuery = (query: string) => {
- const [value, setValue] = useState(false);
-
- useEffect(() => {
- const onChange = (event: MediaQueryListEvent) => {
- setValue(event.matches);
- };
-
- const result = matchMedia(query);
- result.addEventListener('change', onChange);
- setValue(result.matches);
-
- return () => result.removeEventListener('change', onChange);
- }, [query]);
-
- return value;
-};
-
-export { composeTailwindRenderProps, focusButtonStyles, focusRing, focusStyles, useMediaQuery };
+export { composeTailwindRenderProps, focusButtonStyles, focusRing, focusStyles };
diff --git a/resources/js/components/ui/select.tsx b/resources/js/components/ui/select.tsx
index eb7795f..b61a567 100644
--- a/resources/js/components/ui/select.tsx
+++ b/resources/js/components/ui/select.tsx
@@ -1,5 +1,3 @@
-'use client';
-
import type { Placement } from '@react-types/overlays';
import { IconChevronLgDown } from 'justd-icons';
import {
diff --git a/resources/js/components/ui/separator.tsx b/resources/js/components/ui/separator.tsx
index 56b907c..39791b8 100644
--- a/resources/js/components/ui/separator.tsx
+++ b/resources/js/components/ui/separator.tsx
@@ -1,5 +1,3 @@
-'use client';
-
import { Separator as Divider, type SeparatorProps as DividerProps } from 'react-aria-components';
import { tv } from 'tailwind-variants';
diff --git a/resources/js/components/ui/sheet.tsx b/resources/js/components/ui/sheet.tsx
index 95f6d24..1b6de66 100644
--- a/resources/js/components/ui/sheet.tsx
+++ b/resources/js/components/ui/sheet.tsx
@@ -1,5 +1,3 @@
-'use client';
-
import type { DialogProps, DialogTriggerProps, ModalOverlayProps } from 'react-aria-components';
import { DialogTrigger, Modal, ModalOverlay, composeRenderProps } from 'react-aria-components';
import { type VariantProps, tv } from 'tailwind-variants';
diff --git a/resources/js/components/ui/table.tsx b/resources/js/components/ui/table.tsx
index fef6ef2..62c61ff 100644
--- a/resources/js/components/ui/table.tsx
+++ b/resources/js/components/ui/table.tsx
@@ -1,5 +1,3 @@
-'use client';
-
import React from 'react';
import { IconChevronLgDown, IconHamburger } from 'justd-icons';
diff --git a/resources/js/components/ui/text-field.tsx b/resources/js/components/ui/text-field.tsx
index 741de4d..208d646 100644
--- a/resources/js/components/ui/text-field.tsx
+++ b/resources/js/components/ui/text-field.tsx
@@ -1,5 +1,3 @@
-'use client';
-
import { useState } from 'react';
import type { TextInputDOMProps } from '@react-types/shared';
diff --git a/resources/js/components/ui/toast.tsx b/resources/js/components/ui/toast.tsx
index 9204e52..1fba629 100644
--- a/resources/js/components/ui/toast.tsx
+++ b/resources/js/components/ui/toast.tsx
@@ -1,5 +1,3 @@
-'use client';
-
import { useTheme } from '@/components/theme-provider';
import { cn } from '@/utils/classes';
import {
diff --git a/resources/js/components/ui/visually-hidden.tsx b/resources/js/components/ui/visually-hidden.tsx
index 279455c..d0cd4a0 100644
--- a/resources/js/components/ui/visually-hidden.tsx
+++ b/resources/js/components/ui/visually-hidden.tsx
@@ -1,5 +1,3 @@
-'use client';
-
import { useVisuallyHidden } from 'react-aria';
type VisuallyHiddenSpanProps = {
diff --git a/resources/js/utils/use-media-query.ts b/resources/js/utils/use-media-query.ts
new file mode 100644
index 0000000..a382f15
--- /dev/null
+++ b/resources/js/utils/use-media-query.ts
@@ -0,0 +1,21 @@
+'use client';
+
+import { useEffect, useState } from 'react';
+
+export const useMediaQuery = (query: string) => {
+ const [value, setValue] = useState(false);
+
+ useEffect(() => {
+ const onChange = (event: MediaQueryListEvent) => {
+ setValue(event.matches);
+ };
+
+ const result = matchMedia(query);
+ result.addEventListener('change', onChange);
+ setValue(result.matches);
+
+ return () => result.removeEventListener('change', onChange);
+ }, [query]);
+
+ return value;
+};