@thetechfossil/auth2 1.2.8 → 1.2.9
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/index.components.js +41 -4
- package/dist/index.components.js.map +1 -1
- package/dist/index.components.mjs +40 -2
- package/dist/index.components.mjs.map +1 -1
- package/dist/index.js +41 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +40 -2
- package/dist/index.mjs.map +1 -1
- package/dist/index.next.js +41 -5
- package/dist/index.next.js.map +1 -1
- package/dist/index.next.mjs +40 -3
- package/dist/index.next.mjs.map +1 -1
- package/dist/index.next.server.d.ts +272 -0
- package/package.json +9 -6
|
@@ -1,10 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import React2, { createContext, forwardRef, useContext, useState, useMemo, useEffect, useRef, useCallback } from 'react';
|
|
2
3
|
import axios from 'axios';
|
|
3
4
|
import { ImageManager, UpfilesClient } from '@thetechfossil/upfiles';
|
|
4
5
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
5
|
-
import PhoneInputWithCountry from 'react-phone-number-input';
|
|
6
|
-
import 'react-phone-number-input/style.css';
|
|
7
6
|
|
|
7
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
8
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
9
|
+
}) : x)(function(x) {
|
|
10
|
+
if (typeof require !== "undefined")
|
|
11
|
+
return require.apply(this, arguments);
|
|
12
|
+
throw new Error('Dynamic require of "' + x + '" is not supported');
|
|
13
|
+
});
|
|
8
14
|
var HttpClient = class {
|
|
9
15
|
constructor(baseUrl, defaultHeaders = {}) {
|
|
10
16
|
this.csrfToken = null;
|
|
@@ -686,6 +692,14 @@ function useThemeColors() {
|
|
|
686
692
|
const { theme } = useAuthTheme();
|
|
687
693
|
return theme === "dark" ? darkTheme : lightTheme;
|
|
688
694
|
}
|
|
695
|
+
var PhoneInputWithCountry = null;
|
|
696
|
+
try {
|
|
697
|
+
const module = __require("react-phone-number-input");
|
|
698
|
+
PhoneInputWithCountry = module.default || module;
|
|
699
|
+
__require("react-phone-number-input/style.css");
|
|
700
|
+
} catch (error) {
|
|
701
|
+
console.warn("react-phone-number-input not available, using fallback");
|
|
702
|
+
}
|
|
689
703
|
var CustomPhoneInput = React2.forwardRef((props, ref) => /* @__PURE__ */ jsx(
|
|
690
704
|
"input",
|
|
691
705
|
{
|
|
@@ -878,6 +892,30 @@ var PhoneInput = ({
|
|
|
878
892
|
const handleChange = useMemo(() => (val) => {
|
|
879
893
|
onChange(val || "");
|
|
880
894
|
}, [onChange]);
|
|
895
|
+
if (!PhoneInputWithCountry) {
|
|
896
|
+
return /* @__PURE__ */ jsx(
|
|
897
|
+
"input",
|
|
898
|
+
{
|
|
899
|
+
id,
|
|
900
|
+
type: "tel",
|
|
901
|
+
value,
|
|
902
|
+
onChange: (e) => onChange(e.target.value),
|
|
903
|
+
disabled,
|
|
904
|
+
required,
|
|
905
|
+
placeholder,
|
|
906
|
+
style: {
|
|
907
|
+
width: "100%",
|
|
908
|
+
padding: "12px 16px",
|
|
909
|
+
border: `1px solid ${colors.borderSecondary}`,
|
|
910
|
+
borderRadius: "8px",
|
|
911
|
+
fontSize: "16px",
|
|
912
|
+
backgroundColor: colors.bgSecondary,
|
|
913
|
+
color: colors.textPrimary,
|
|
914
|
+
...style
|
|
915
|
+
}
|
|
916
|
+
}
|
|
917
|
+
);
|
|
918
|
+
}
|
|
881
919
|
return /* @__PURE__ */ jsxs(
|
|
882
920
|
"div",
|
|
883
921
|
{
|