diff --git a/packages/components/package.json b/packages/components/package.json index 40d1c932..e93a811a 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -1,6 +1,6 @@ { "name": "@lambdacurry/forms", - "version": "0.15.0", + "version": "0.15.1", "type": "module", "main": "./dist/index.js", "types": "./dist/index.d.ts", diff --git a/packages/components/src/remix-hook-form/text-field.tsx b/packages/components/src/remix-hook-form/text-field.tsx index 45ded662..db9f23e6 100644 --- a/packages/components/src/remix-hook-form/text-field.tsx +++ b/packages/components/src/remix-hook-form/text-field.tsx @@ -8,11 +8,17 @@ export type TextFieldProps = Omit; export function TextField(props: TextFieldProps) { const { control } = useRemixFormContext(); + // Merge the provided components with the default form components + const defaultComponents = { + FormControl, + FormLabel, + FormDescription, + FormMessage, + }; + const components = { - FormControl: FormControl, - FormLabel: FormLabel, - FormDescription: FormDescription, - FormMessage: FormMessage, + ...defaultComponents, + ...props.components, }; return ; diff --git a/packages/components/src/ui/text-field.tsx b/packages/components/src/ui/text-field.tsx index 437b9dd5..9835cf5d 100644 --- a/packages/components/src/ui/text-field.tsx +++ b/packages/components/src/ui/text-field.tsx @@ -56,7 +56,9 @@ export interface TextInputProps extends Omit { name: FieldPath; label?: string; description?: string; - components?: Partial; + components?: Partial & { + Input?: React.ComponentType; + }; prefix?: React.ReactNode; suffix?: React.ReactNode; className?: string; @@ -73,6 +75,9 @@ export const TextField = ({ suffix, ...props }: TextInputProps) => { + // Use the custom Input component if provided, otherwise use the default TextInput + const InputComponent = components?.Input || TextInput; + return ( {prefix && {prefix}} - =1.2.0": - version: 1.51.1 - resolution: "playwright-core@npm:1.51.1" +"playwright-core@npm:1.52.0, playwright-core@npm:>=1.2.0": + version: 1.52.0 + resolution: "playwright-core@npm:1.52.0" bin: playwright-core: cli.js - checksum: 10c0/4f004d9dea5ecbd76b84c858fa4880ed955600b6cda972a3e8093ea47e150ce20bf2ea806e73e740497d34f4b61b080c208339a661fc75ad04d8f00bedcc21e0 + checksum: 10c0/640945507e6ca2144e9f596b2a6ecac042c2fd3683ff99e6271e9a7b38f3602d415f282609d569456f66680aab8b3c5bb1b257d8fb63a7fc0ed648261110421f languageName: node linkType: hard "playwright@npm:^1.14.0": - version: 1.51.1 - resolution: "playwright@npm:1.51.1" + version: 1.52.0 + resolution: "playwright@npm:1.52.0" dependencies: fsevents: "npm:2.3.2" - playwright-core: "npm:1.51.1" + playwright-core: "npm:1.52.0" dependenciesMeta: fsevents: optional: true bin: playwright: cli.js - checksum: 10c0/2aea553b8b1086ee419e72c9d4f4117686e6bdb5e09e0f47dfe563ce0f0bd79c4ee79dd9c8a0f023a2fb7803b81d4fdc552887410d16c036be07f21ab72b3f46 + checksum: 10c0/2c6edf1e15e59bbaf77f3fa0fe0ac975793c17cff835d9c8b8bc6395a3b6f1c01898b3058ab37891b2e4d424bcc8f1b4844fe70d943e0143d239d7451408c579 languageName: node linkType: hard @@ -9294,12 +9317,12 @@ __metadata: linkType: hard "portfinder@npm:^1.0.28": - version: 1.0.36 - resolution: "portfinder@npm:1.0.36" + version: 1.0.37 + resolution: "portfinder@npm:1.0.37" dependencies: async: "npm:^3.2.6" debug: "npm:^4.3.6" - checksum: 10c0/65e55d7628ff1f29b094f20b067b2493c67975bdd1b2e91037fc14784393b11cc772dea2c6791c7bc0deec0a87caf5e94710edc31822aa9799c6387377127acb + checksum: 10c0/eabd2764ced7bb0e6da7a1382bb77f9531309f7782fb6169021d05eecff0c0a17958bcf87573047a164dd0bb23f294d5d74b08ffe58c47005c28ed92eea9a6a7 languageName: node linkType: hard @@ -9520,11 +9543,11 @@ __metadata: linkType: hard "react-hook-form@npm:^7.53.1": - version: 7.55.0 - resolution: "react-hook-form@npm:7.55.0" + version: 7.56.1 + resolution: "react-hook-form@npm:7.56.1" peerDependencies: react: ^16.8.0 || ^17 || ^18 || ^19 - checksum: 10c0/9cff0da58d8223dd14e01ac83688e3546edc42cfa557974b6f2f09922ee051e4713fd53abb69c7a815bf3600142a14186b977d69d438da32f63475a8ecf6b452 + checksum: 10c0/26eafd54bf47167628e34c2f22ea27ea7bdd5b4231a56af5be31ccedfb2a721708b308026ea4a17f2fb15c7b5fff83c0feb4acc7aa07bd6faa8506e917810cab languageName: node linkType: hard @@ -9592,22 +9615,21 @@ __metadata: linkType: hard "react-router-dom@npm:^7.0.0": - version: 7.5.0 - resolution: "react-router-dom@npm:7.5.0" + version: 7.5.3 + resolution: "react-router-dom@npm:7.5.3" dependencies: - react-router: "npm:7.5.0" + react-router: "npm:7.5.3" peerDependencies: react: ">=18" react-dom: ">=18" - checksum: 10c0/30fccb394869cf316d005367d55162401e650fdd146c53273e218ca7c7e42e539130ee663d0c5fbf546005bea6ee9bc5ce91b6698fd24b9282a2d13c6d951609 + checksum: 10c0/56c03d8c31c100db54029df82f7e2d350ec75d301b2ffa9512fbc7659faf492ef6d777115629da89c92d0826f3b8a98271dd8426fd3afd3aaf9ed92763f7deaa languageName: node linkType: hard -"react-router@npm:7.5.0, react-router@npm:^7.0.0": - version: 7.5.0 - resolution: "react-router@npm:7.5.0" +"react-router@npm:7.5.3, react-router@npm:^7.0.0": + version: 7.5.3 + resolution: "react-router@npm:7.5.3" dependencies: - "@types/cookie": "npm:^0.6.0" cookie: "npm:^1.0.1" set-cookie-parser: "npm:^2.6.0" turbo-stream: "npm:2.4.0" @@ -9617,7 +9639,7 @@ __metadata: peerDependenciesMeta: react-dom: optional: true - checksum: 10c0/fc1b4ed3eeb615f40727b81dfab7469429a0b662bff5f91434966751d48ce4b470d9627dcbc93dad9b1a535a0f9bd1b2267d8ff88ca4e636535bcbfe7d76cea3 + checksum: 10c0/1f98ab5974cbf6696944a3cbe3d5708add6cdb9c765e0952459eb912d388fe361914a94557546dcd45164413fd9bc2fde97302c8daf3951156644232a9e3ce16 languageName: node linkType: hard @@ -9697,13 +9719,6 @@ __metadata: languageName: node linkType: hard -"regenerator-runtime@npm:^0.14.0": - version: 0.14.1 - resolution: "regenerator-runtime@npm:0.14.1" - checksum: 10c0/1b16eb2c4bceb1665c89de70dcb64126a22bc8eb958feef3cd68fe11ac6d2a4899b5cd1b80b0774c7c03591dc57d16631a7f69d2daa2ec98100e2f29f7ec4cc4 - languageName: node - linkType: hard - "regexp.prototype.flags@npm:^1.5.1": version: 1.5.4 resolution: "regexp.prototype.flags@npm:1.5.4" @@ -9852,29 +9867,29 @@ __metadata: linkType: hard "rollup@npm:^4.20.0, rollup@npm:^4.34.9": - version: 4.40.0 - resolution: "rollup@npm:4.40.0" - dependencies: - "@rollup/rollup-android-arm-eabi": "npm:4.40.0" - "@rollup/rollup-android-arm64": "npm:4.40.0" - "@rollup/rollup-darwin-arm64": "npm:4.40.0" - "@rollup/rollup-darwin-x64": "npm:4.40.0" - "@rollup/rollup-freebsd-arm64": "npm:4.40.0" - "@rollup/rollup-freebsd-x64": "npm:4.40.0" - "@rollup/rollup-linux-arm-gnueabihf": "npm:4.40.0" - "@rollup/rollup-linux-arm-musleabihf": "npm:4.40.0" - "@rollup/rollup-linux-arm64-gnu": "npm:4.40.0" - "@rollup/rollup-linux-arm64-musl": "npm:4.40.0" - "@rollup/rollup-linux-loongarch64-gnu": "npm:4.40.0" - "@rollup/rollup-linux-powerpc64le-gnu": "npm:4.40.0" - "@rollup/rollup-linux-riscv64-gnu": "npm:4.40.0" - "@rollup/rollup-linux-riscv64-musl": "npm:4.40.0" - "@rollup/rollup-linux-s390x-gnu": "npm:4.40.0" - "@rollup/rollup-linux-x64-gnu": "npm:4.40.0" - "@rollup/rollup-linux-x64-musl": "npm:4.40.0" - "@rollup/rollup-win32-arm64-msvc": "npm:4.40.0" - "@rollup/rollup-win32-ia32-msvc": "npm:4.40.0" - "@rollup/rollup-win32-x64-msvc": "npm:4.40.0" + version: 4.40.1 + resolution: "rollup@npm:4.40.1" + dependencies: + "@rollup/rollup-android-arm-eabi": "npm:4.40.1" + "@rollup/rollup-android-arm64": "npm:4.40.1" + "@rollup/rollup-darwin-arm64": "npm:4.40.1" + "@rollup/rollup-darwin-x64": "npm:4.40.1" + "@rollup/rollup-freebsd-arm64": "npm:4.40.1" + "@rollup/rollup-freebsd-x64": "npm:4.40.1" + "@rollup/rollup-linux-arm-gnueabihf": "npm:4.40.1" + "@rollup/rollup-linux-arm-musleabihf": "npm:4.40.1" + "@rollup/rollup-linux-arm64-gnu": "npm:4.40.1" + "@rollup/rollup-linux-arm64-musl": "npm:4.40.1" + "@rollup/rollup-linux-loongarch64-gnu": "npm:4.40.1" + "@rollup/rollup-linux-powerpc64le-gnu": "npm:4.40.1" + "@rollup/rollup-linux-riscv64-gnu": "npm:4.40.1" + "@rollup/rollup-linux-riscv64-musl": "npm:4.40.1" + "@rollup/rollup-linux-s390x-gnu": "npm:4.40.1" + "@rollup/rollup-linux-x64-gnu": "npm:4.40.1" + "@rollup/rollup-linux-x64-musl": "npm:4.40.1" + "@rollup/rollup-win32-arm64-msvc": "npm:4.40.1" + "@rollup/rollup-win32-ia32-msvc": "npm:4.40.1" + "@rollup/rollup-win32-x64-msvc": "npm:4.40.1" "@types/estree": "npm:1.0.7" fsevents: "npm:~2.3.2" dependenciesMeta: @@ -9922,7 +9937,7 @@ __metadata: optional: true bin: rollup: dist/bin/rollup - checksum: 10c0/90aa57487d4a9a7de1a47bf42a6091f83f1cb7fe1814650dfec278ab8ddae5736b86535d4c766493517720f334dfd4aa0635405ca8f4f36ed8d3c0f875f2a801 + checksum: 10c0/11c44b5ef9b3fd521c5501b3f1c36af4ca07821aeff41d41f45336eee324d8f5b46c1a92189f5c8cd146bc21ac10418d57cb4571637ea09aced1ae831a2a4ae0 languageName: node linkType: hard @@ -10577,10 +10592,10 @@ __metadata: languageName: node linkType: hard -"tailwindcss@npm:4.1.4, tailwindcss@npm:^4.0.0": - version: 4.1.4 - resolution: "tailwindcss@npm:4.1.4" - checksum: 10c0/4927653b740861f0279b6b465c87e188652d3c0e311c633b4efe5d72bbb4dce12b9dddc674a386a3d0454ef4dd4951aac6fd7346dcd9b2b2b06952e431c1835d +"tailwindcss@npm:4.1.5, tailwindcss@npm:^4.0.0": + version: 4.1.5 + resolution: "tailwindcss@npm:4.1.5" + checksum: 10c0/19fd0709f8c8d706d28a936f6ae7ad371d8586ea38e17a68ab5ba1c1c5d97ffcc8eba144f1b5c91c1534aa8df053a26c298863272a3357161a1dd9849b89339c languageName: node linkType: hard @@ -10637,13 +10652,13 @@ __metadata: languageName: node linkType: hard -"tinyglobby@npm:^0.2.12": - version: 0.2.12 - resolution: "tinyglobby@npm:0.2.12" +"tinyglobby@npm:^0.2.12, tinyglobby@npm:^0.2.13": + version: 0.2.13 + resolution: "tinyglobby@npm:0.2.13" dependencies: - fdir: "npm:^6.4.3" + fdir: "npm:^6.4.4" picomatch: "npm:^4.0.2" - checksum: 10c0/7c9be4fd3625630e262dcb19015302aad3b4ba7fc620f269313e688f2161ea8724d6cb4444baab5ef2826eb6bed72647b169a33ec8eea37501832a2526ff540f + checksum: 10c0/ef07dfaa7b26936601d3f6d999f7928a4d1c6234c5eb36896bb88681947c0d459b7ebe797022400e555fe4b894db06e922b95d0ce60cb05fd827a0a66326b18c languageName: node linkType: hard @@ -10743,30 +10758,30 @@ __metadata: languageName: node linkType: hard -"turbo-darwin-64@npm:2.5.0": - version: 2.5.0 - resolution: "turbo-darwin-64@npm:2.5.0" +"turbo-darwin-64@npm:2.5.2": + version: 2.5.2 + resolution: "turbo-darwin-64@npm:2.5.2" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"turbo-darwin-arm64@npm:2.5.0": - version: 2.5.0 - resolution: "turbo-darwin-arm64@npm:2.5.0" +"turbo-darwin-arm64@npm:2.5.2": + version: 2.5.2 + resolution: "turbo-darwin-arm64@npm:2.5.2" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"turbo-linux-64@npm:2.5.0": - version: 2.5.0 - resolution: "turbo-linux-64@npm:2.5.0" +"turbo-linux-64@npm:2.5.2": + version: 2.5.2 + resolution: "turbo-linux-64@npm:2.5.2" conditions: os=linux & cpu=x64 languageName: node linkType: hard -"turbo-linux-arm64@npm:2.5.0": - version: 2.5.0 - resolution: "turbo-linux-arm64@npm:2.5.0" +"turbo-linux-arm64@npm:2.5.2": + version: 2.5.2 + resolution: "turbo-linux-arm64@npm:2.5.2" conditions: os=linux & cpu=arm64 languageName: node linkType: hard @@ -10778,30 +10793,30 @@ __metadata: languageName: node linkType: hard -"turbo-windows-64@npm:2.5.0": - version: 2.5.0 - resolution: "turbo-windows-64@npm:2.5.0" +"turbo-windows-64@npm:2.5.2": + version: 2.5.2 + resolution: "turbo-windows-64@npm:2.5.2" conditions: os=win32 & cpu=x64 languageName: node linkType: hard -"turbo-windows-arm64@npm:2.5.0": - version: 2.5.0 - resolution: "turbo-windows-arm64@npm:2.5.0" +"turbo-windows-arm64@npm:2.5.2": + version: 2.5.2 + resolution: "turbo-windows-arm64@npm:2.5.2" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard "turbo@npm:^2.3.3": - version: 2.5.0 - resolution: "turbo@npm:2.5.0" - dependencies: - turbo-darwin-64: "npm:2.5.0" - turbo-darwin-arm64: "npm:2.5.0" - turbo-linux-64: "npm:2.5.0" - turbo-linux-arm64: "npm:2.5.0" - turbo-windows-64: "npm:2.5.0" - turbo-windows-arm64: "npm:2.5.0" + version: 2.5.2 + resolution: "turbo@npm:2.5.2" + dependencies: + turbo-darwin-64: "npm:2.5.2" + turbo-darwin-arm64: "npm:2.5.2" + turbo-linux-64: "npm:2.5.2" + turbo-linux-arm64: "npm:2.5.2" + turbo-windows-64: "npm:2.5.2" + turbo-windows-arm64: "npm:2.5.2" dependenciesMeta: turbo-darwin-64: optional: true @@ -10817,7 +10832,7 @@ __metadata: optional: true bin: turbo: bin/turbo - checksum: 10c0/df4ca3e8fd1121702b8f3a2f64a4a02ab886e01236a72fe54ebd1b4e33368a9dd3cec393d7eb143a6173f96c70f4dba4f7abfff84a0b5535076fc662a746e0ac + checksum: 10c0/3eed6eba8bace18ed767785c83cd572985214e79d267f3eb631b2c147e941203746b241869fe629776704d3e69c37da90c5356c3b9506e08c468c9cab52f120c languageName: node linkType: hard @@ -11031,6 +11046,15 @@ __metadata: languageName: node linkType: hard +"use-sync-external-store@npm:^1.5.0": + version: 1.5.0 + resolution: "use-sync-external-store@npm:1.5.0" + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 + checksum: 10c0/1b8663515c0be34fa653feb724fdcce3984037c78dd4a18f68b2c8be55cc1a1084c578d5b75f158d41b5ddffc2bf5600766d1af3c19c8e329bb20af2ec6f52f4 + languageName: node + linkType: hard + "util-deprecate@npm:^1.0.1": version: 1.0.2 resolution: "util-deprecate@npm:1.0.2" @@ -11164,16 +11188,16 @@ __metadata: linkType: hard "vite@npm:^5.0.0 || ^6.0.0, vite@npm:^6.2.2": - version: 6.3.1 - resolution: "vite@npm:6.3.1" + version: 6.3.4 + resolution: "vite@npm:6.3.4" dependencies: esbuild: "npm:^0.25.0" - fdir: "npm:^6.4.3" + fdir: "npm:^6.4.4" fsevents: "npm:~2.3.3" picomatch: "npm:^4.0.2" postcss: "npm:^8.5.3" rollup: "npm:^4.34.9" - tinyglobby: "npm:^0.2.12" + tinyglobby: "npm:^0.2.13" peerDependencies: "@types/node": ^18.0.0 || ^20.0.0 || >=22.0.0 jiti: ">=1.21.0" @@ -11214,13 +11238,13 @@ __metadata: optional: true bin: vite: bin/vite.js - checksum: 10c0/79a330a9cd0348195e9b693e0576c5480436fd7b21da53fda84877027274d39ef00fa26516fdbbf8b561700c2994c26d31d5460404e8d6982bd19ed28533a6fa + checksum: 10c0/f1534a3f42d14b30e11c58e5e451903d965d5f5ba18d8c81f9df208589e3d2c65535abaa3268d3963573174b8e056ea7bc445f567622c65fcdf98eb4acc1bf4e languageName: node linkType: hard "vite@npm:^5.4.11": - version: 5.4.18 - resolution: "vite@npm:5.4.18" + version: 5.4.19 + resolution: "vite@npm:5.4.19" dependencies: esbuild: "npm:^0.21.3" fsevents: "npm:~2.3.3" @@ -11257,7 +11281,7 @@ __metadata: optional: true bin: vite: bin/vite.js - checksum: 10c0/a8cbbec6bdf399e62c386d70b8485e4f2f1b427beb19bc7c5d52b402a0c3750b7ff469fc20a8333755ea13bc1b0af5df3f22c8fd37d1739ee51d709b7a4740b6 + checksum: 10c0/c97601234dba482cea5290f2a2ea0fcd65e1fab3df06718ea48adc8ceb14bc3129508216c4989329c618f6a0470b42f439677a207aef62b0c76f445091c2d89e languageName: node linkType: hard