@payos-inc/payos-react 1.0.23-staging.44 → 1.0.23-staging.46
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.
- package/dist/components/payos/phone-input.d.ts +3 -3
- package/dist/components/payos/phone-input.d.ts.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/payos-react.css +1 -1
- package/dist/payos-react.esm.js +6 -6
- package/dist/payos-react.min.js +1 -1
- package/dist/types/components/payos/phone-input.d.ts +3 -3
- package/dist/types/components/payos/phone-input.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/utils/formatting.d.ts +1 -2
- package/dist/types/utils/formatting.d.ts.map +1 -1
- package/dist/utils/formatting.d.ts +1 -2
- package/dist/utils/formatting.d.ts.map +1 -1
- package/package.json +4 -3
|
@@ -3,9 +3,9 @@ import { COUNTRIES } from "../../utils/validation";
|
|
|
3
3
|
import type { CountryCode } from "../../utils/validation";
|
|
4
4
|
export type { CountryCode } from "../../utils/validation";
|
|
5
5
|
/**
|
|
6
|
-
* Format phone number as user types
|
|
7
|
-
*
|
|
8
|
-
*
|
|
6
|
+
* Format phone number as user types using placeholder patterns.
|
|
7
|
+
* Applies the separator positions (spaces, hyphens, parens) from the
|
|
8
|
+
* country's placeholder string to the digits the user has typed so far.
|
|
9
9
|
*/
|
|
10
10
|
export declare function formatPhoneForDisplay(value: string, countryCode?: string): string;
|
|
11
11
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"phone-input.d.ts","sourceRoot":"","sources":["../../../../src/components/payos/phone-input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"phone-input.d.ts","sourceRoot":"","sources":["../../../../src/components/payos/phone-input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAAE,SAAS,EAA0C,MAAM,wBAAwB,CAAC;AAC3F,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,YAAY,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAU1D;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,GAAE,MAAa,GAAG,MAAM,CA8BvF;AAED;;;;;;;;;;GAUG;AAEH,UAAU,eAAgB,SAAQ,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,UAAU,CAAC;IAC7F,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,CAAC;CAC/C;AAED,eAAO,MAAM,UAAU,0FAiKtB,CAAC;AAGF,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export { Input } from './components/ui/input';
|
|
|
3
3
|
export { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from './components/ui/card';
|
|
4
4
|
export { Label } from './components/ui/label';
|
|
5
5
|
export { Separator } from './components/ui/separator';
|
|
6
|
-
export { PhoneInput } from './components/payos/phone-input';
|
|
6
|
+
export { PhoneInput, COUNTRIES } from './components/payos/phone-input';
|
|
7
7
|
export { OTPInput } from './components/payos/otp-input';
|
|
8
8
|
export { PayOSDrawer } from './components/payos/drawer';
|
|
9
9
|
export { PaymentMethodRow } from './components/payos/PaymentMethodRow';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE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2B,CAAC;AAGtF,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAG1F,YAAY,EACV,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACnB,UAAU,EACV,SAAS,IAAI,gBAAgB,EAC7B,WAAW,EACX,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,sBAAsB,EACtB,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -8,8 +8,7 @@ export declare function formatCurrency(cents: number, currency?: string): string
|
|
|
8
8
|
/**
|
|
9
9
|
* Format phone number for display
|
|
10
10
|
* Detects country from E.164 prefix and formats accordingly.
|
|
11
|
-
*
|
|
12
|
-
* International: +{dial} {local digits}
|
|
11
|
+
* Uses placeholder patterns from country data for proper local formatting.
|
|
13
12
|
* @param phone - Raw phone number (E.164 or local)
|
|
14
13
|
* @returns Formatted phone number
|
|
15
14
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatting.d.ts","sourceRoot":"","sources":["../../../src/utils/formatting.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,SAAQ,GAAG,MAAM,CAMtE;
|
|
1
|
+
{"version":3,"file":"formatting.d.ts","sourceRoot":"","sources":["../../../src/utils/formatting.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,SAAQ,GAAG,MAAM,CAMtE;AAwBD;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CA0BvD;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAiB7E;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAI3D;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAMzD;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAUnD"}
|
|
@@ -8,8 +8,7 @@ export declare function formatCurrency(cents: number, currency?: string): string
|
|
|
8
8
|
/**
|
|
9
9
|
* Format phone number for display
|
|
10
10
|
* Detects country from E.164 prefix and formats accordingly.
|
|
11
|
-
*
|
|
12
|
-
* International: +{dial} {local digits}
|
|
11
|
+
* Uses placeholder patterns from country data for proper local formatting.
|
|
13
12
|
* @param phone - Raw phone number (E.164 or local)
|
|
14
13
|
* @returns Formatted phone number
|
|
15
14
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatting.d.ts","sourceRoot":"","sources":["../../src/utils/formatting.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,SAAQ,GAAG,MAAM,CAMtE;
|
|
1
|
+
{"version":3,"file":"formatting.d.ts","sourceRoot":"","sources":["../../src/utils/formatting.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,SAAQ,GAAG,MAAM,CAMtE;AAwBD;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CA0BvD;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAiB7E;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAI3D;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAMzD;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAUnD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@payos-inc/payos-react",
|
|
3
|
-
"version": "1.0.23-staging.
|
|
3
|
+
"version": "1.0.23-staging.46",
|
|
4
4
|
"description": "PayOS React SDK - Drawer checkout component for React",
|
|
5
5
|
"main": "dist/payos-react.esm.js",
|
|
6
6
|
"module": "dist/payos-react.esm.js",
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
"@radix-ui/react-slot": "^1.0.2",
|
|
48
48
|
"class-variance-authority": "^0.7.1",
|
|
49
49
|
"clsx": "^2.1.1",
|
|
50
|
+
"country-flag-icons": "^1.6.15",
|
|
50
51
|
"framer-motion": "^12.5.0",
|
|
51
52
|
"lucide-react": "^0.536.0",
|
|
52
53
|
"tailwind-merge": "^3.3.1"
|
|
@@ -55,8 +56,8 @@
|
|
|
55
56
|
"@types/node": "^20.8.0",
|
|
56
57
|
"@types/react": "^18.2.15",
|
|
57
58
|
"@types/react-dom": "^18.2.7",
|
|
58
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
59
|
-
"@typescript-eslint/parser": "^
|
|
59
|
+
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
60
|
+
"@typescript-eslint/parser": "^8.0.0",
|
|
60
61
|
"autoprefixer": "^10.4.21",
|
|
61
62
|
"css-loader": "^6.8.1",
|
|
62
63
|
"eslint": "^8.51.0",
|