{"_id":"@divyraj33/location-selector","name":"@divyraj33/location-selector","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@divyraj33/location-selector","version":"1.0.0","type":"module","main":"./dist/location-selector.umd.js","module":"./dist/location-selector.es.js","exports":{".":{"import":"./dist/location-selector.es.js","require":"./dist/location-selector.umd.js"},"./style.css":"./dist/style.css"},"scripts":{"dev":"vite","build":"vite build","preview":"vite preview"},"peerDependencies":{"react":"^18.0.0","react-dom":"^18.0.0"},"devDependencies":{"@vitejs/plugin-react":"^4.0.0","autoprefixer":"^10.4.14","postcss":"^8.4.24","tailwindcss":"^3.3.2","vite":"^4.3.9"},"dependencies":{"lucide-react":"^0.244.0"},"_id":"@divyraj33/location-selector@1.0.0","description":"A production-ready, reusable React package for Country → State → City selection with searchable dropdowns and Tailwind CSS styling.","_nodeVersion":"24.12.0","_npmVersion":"11.2.0","dist":{"integrity":"sha512-483nTNpWMV3zNQACgkiHNFvcQ2l8w98JHfq1vt8iYi+IEwyW9z8i7lvj6n/kJZLcHKDqJjl3nihLCV9VlRUe8Q==","shasum":"a6462c891c1806ab7d29ee8b51eb86048fa01470","tarball":"https://registry.npmjs.org/@divyraj33/location-selector/-/location-selector-1.0.0.tgz","fileCount":5,"unpackedSize":56491,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIG+AXgR7CSGWjjAINJVFzMhL1u9f/PaDrdg3ZuiY3eVgAiEAzPz2bwCl8JphTAXySi1AI2heENFWN1oi+Vtqq83Tjyg="}]},"_npmUser":{"name":"divyraj33","email":"ahirdivyraj607@gmail.com"},"directories":{},"maintainers":[{"name":"divyraj33","email":"ahirdivyraj607@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/location-selector_1.0.0_1778308788369_0.829364880791521"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-09T06:39:48.243Z","1.0.0":"2026-05-09T06:39:48.532Z","modified":"2026-05-09T06:39:48.705Z"},"maintainers":[{"name":"divyraj33","email":"ahirdivyraj607@gmail.com"}],"description":"A production-ready, reusable React package for Country → State → City selection with searchable dropdowns and Tailwind CSS styling.","readme":"# @divyraj33/location-selector\n\nA production-ready, reusable React package for Country → State → City selection with searchable dropdowns and Tailwind CSS styling.\n\n## Features\n- 🌍 **Country dropdown**\n- 🏛️ **State dropdown** (based on selected country)\n- 🏙️ **City dropdown** (based on selected state)\n- 🔍 **Searchable dropdowns**\n- 📦 **Static JSON data** (No external API required)\n- 📱 **Responsive UI**\n- 🎨 **Tailwind CSS** styling\n- 🧩 **Reusable architecture**\n- ✅ **Validation support**\n- 🛠️ **Easy customization**\n\n## Installation\n\n```bash\nnpm install @divyraj33/location-selector\n```\n\n**Note:** Ensure you have `tailwindcss` and `lucide-react` installed in your project.\n\n## Usage\n\n```jsx\nimport React from 'react';\nimport LocationSelector from '@divyraj33/location-selector';\nimport '@divyraj33/location-selector/style.css'; // Import styles\n\nfunction App() {\n  const handleLocationChange = (data) => {\n    console.log(\"Selected Location:\", data);\n  };\n\n  return (\n    <div className=\"p-8\">\n      <h1 className=\"text-2xl font-bold mb-4\">Select Location</h1>\n      <LocationSelector onSelect={handleLocationChange} />\n    </div>\n  );\n}\n\nexport default App;\n```\n\n## Props\n\n| Prop | Type | Default | Description |\n|------|------|---------|-------------|\n| `onSelect` | `function` | `undefined` | Callback function triggered when selection changes |\n| `className` | `string` | `\"\"` | Additional CSS classes for the container |\n| `showSearch` | `boolean` | `true` | Toggle search input in dropdowns |\n| `labels` | `object` | `{ country: \"Select Country\", state: \"Select State\", city: \"Select City\" }` | Custom labels for dropdowns |\n\n## Build and Publish Guide\n\n### 1. Build the package\n```bash\nnpm run build\n```\n\n### 2. Login to NPM\n```bash\nnpm login\n```\n\n### 3. Publish\n```bash\nnpm publish --access public\n```\n\n## Local Development\nTo test this package locally in another project:\n1. In this package folder: `npm link`\n2. In your target project: `npm link @my-package/location-selector`\n\n## License\nMIT\n","readmeFilename":"README.md","_rev":"1-93d63a4c25ce35d91e4823ce7d8638cb"}