react-country-list-picker 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,4 @@
1
+ import { Country } from './types';
2
+ export { default as CountryList } from './CountryList';
3
+ export * from './types';
4
+ export declare const countries: Country[];
package/dist/index.js ADDED
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ var __importDefault = (this && this.__importDefault) || function (mod) {
17
+ return (mod && mod.__esModule) ? mod : { "default": mod };
18
+ };
19
+ Object.defineProperty(exports, "__esModule", { value: true });
20
+ exports.countries = exports.CountryList = void 0;
21
+ const countries_json_1 = __importDefault(require("./data/countries.json"));
22
+ var CountryList_1 = require("./CountryList");
23
+ Object.defineProperty(exports, "CountryList", { enumerable: true, get: function () { return __importDefault(CountryList_1).default; } });
24
+ __exportStar(require("./types"), exports);
25
+ exports.countries = countries_json_1.default;
@@ -0,0 +1,16 @@
1
+ export interface Country {
2
+ name: string;
3
+ dial_code: string;
4
+ code: string;
5
+ Icon: string;
6
+ }
7
+ export interface CountryListProps {
8
+ /** Called with the selected country when the user picks one */
9
+ onSelect: (country: Country) => void;
10
+ /** Optionally override the country dataset */
11
+ data?: Country[];
12
+ /** Show the built-in search box (default: true) */
13
+ searchable?: boolean;
14
+ /** Placeholder text for the search box */
15
+ searchPlaceholder?: string;
16
+ }
package/dist/types.js ADDED
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json ADDED
@@ -0,0 +1,40 @@
1
+ {
2
+ "name": "react-country-list-picker",
3
+ "version": "1.0.0",
4
+ "description": "Cross-platform country list / picker component and country data (name, dial code, ISO code, flag) for React and React Native.",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "files": [
8
+ "dist"
9
+ ],
10
+ "scripts": {
11
+ "build": "rimraf dist && tsc -p tsconfig.json",
12
+ "prepublishOnly": "npm run build"
13
+ },
14
+ "keywords": [
15
+ "react",
16
+ "react-native",
17
+ "country",
18
+ "country-picker",
19
+ "country-list",
20
+ "dial-code",
21
+ "flag",
22
+ "iso-code"
23
+ ],
24
+ "peerDependencies": {
25
+ "react": ">=17.0.0"
26
+ },
27
+ "peerDependenciesMeta": {
28
+ "react-native": {
29
+ "optional": true
30
+ }
31
+ },
32
+ "devDependencies": {
33
+ "@types/react": "^18.2.0",
34
+ "react": "^18.2.0",
35
+ "rimraf": "^5.0.5",
36
+ "typescript": "^5.4.0"
37
+ },
38
+ "author": "",
39
+ "license": "MIT"
40
+ }