@thetechfossil/auth2 1.2.8 → 1.2.10
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 +43 -5
- package/dist/index.components.js.map +1 -1
- package/dist/index.components.mjs +42 -3
- package/dist/index.components.mjs.map +1 -1
- package/dist/index.js +43 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +42 -3
- package/dist/index.mjs.map +1 -1
- package/dist/index.next.js +43 -6
- package/dist/index.next.js.map +1 -1
- package/dist/index.next.mjs +42 -4
- package/dist/index.next.mjs.map +1 -1
- package/dist/index.next.server.d.ts +272 -0
- package/package.json +9 -6
package/dist/index.components.js
CHANGED
|
@@ -1,18 +1,23 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
'use strict';
|
|
2
3
|
|
|
3
4
|
var React2 = require('react');
|
|
4
5
|
var axios = require('axios');
|
|
5
6
|
var upfiles = require('@thetechfossil/upfiles');
|
|
6
7
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
|
-
var PhoneInputWithCountry = require('react-phone-number-input');
|
|
8
|
-
require('react-phone-number-input/style.css');
|
|
9
8
|
|
|
10
9
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
10
|
|
|
12
11
|
var React2__default = /*#__PURE__*/_interopDefault(React2);
|
|
13
12
|
var axios__default = /*#__PURE__*/_interopDefault(axios);
|
|
14
|
-
var PhoneInputWithCountry__default = /*#__PURE__*/_interopDefault(PhoneInputWithCountry);
|
|
15
13
|
|
|
14
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
15
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
16
|
+
}) : x)(function(x) {
|
|
17
|
+
if (typeof require !== "undefined")
|
|
18
|
+
return require.apply(this, arguments);
|
|
19
|
+
throw new Error('Dynamic require of "' + x + '" is not supported');
|
|
20
|
+
});
|
|
16
21
|
var HttpClient = class {
|
|
17
22
|
constructor(baseUrl, defaultHeaders = {}) {
|
|
18
23
|
this.csrfToken = null;
|
|
@@ -694,6 +699,14 @@ function useThemeColors() {
|
|
|
694
699
|
const { theme } = useAuthTheme();
|
|
695
700
|
return theme === "dark" ? darkTheme : lightTheme;
|
|
696
701
|
}
|
|
702
|
+
var PhoneInputWithCountry = null;
|
|
703
|
+
try {
|
|
704
|
+
const module = __require("react-phone-number-input");
|
|
705
|
+
PhoneInputWithCountry = module.default || module;
|
|
706
|
+
__require("react-phone-number-input/style.css");
|
|
707
|
+
} catch (error) {
|
|
708
|
+
console.warn("react-phone-number-input not available, using fallback");
|
|
709
|
+
}
|
|
697
710
|
var CustomPhoneInput = React2__default.default.forwardRef((props, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
698
711
|
"input",
|
|
699
712
|
{
|
|
@@ -886,6 +899,30 @@ var PhoneInput = ({
|
|
|
886
899
|
const handleChange = React2.useMemo(() => (val) => {
|
|
887
900
|
onChange(val || "");
|
|
888
901
|
}, [onChange]);
|
|
902
|
+
if (!PhoneInputWithCountry) {
|
|
903
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
904
|
+
"input",
|
|
905
|
+
{
|
|
906
|
+
id,
|
|
907
|
+
type: "tel",
|
|
908
|
+
value,
|
|
909
|
+
onChange: (e) => onChange(e.target.value),
|
|
910
|
+
disabled,
|
|
911
|
+
required,
|
|
912
|
+
placeholder,
|
|
913
|
+
style: {
|
|
914
|
+
width: "100%",
|
|
915
|
+
padding: "12px 16px",
|
|
916
|
+
border: `1px solid ${colors.borderSecondary}`,
|
|
917
|
+
borderRadius: "8px",
|
|
918
|
+
fontSize: "16px",
|
|
919
|
+
backgroundColor: colors.bgSecondary,
|
|
920
|
+
color: colors.textPrimary,
|
|
921
|
+
...style
|
|
922
|
+
}
|
|
923
|
+
}
|
|
924
|
+
);
|
|
925
|
+
}
|
|
889
926
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
890
927
|
"div",
|
|
891
928
|
{
|
|
@@ -896,7 +933,7 @@ var PhoneInput = ({
|
|
|
896
933
|
children: [
|
|
897
934
|
/* @__PURE__ */ jsxRuntime.jsx("style", { children: styleContent }),
|
|
898
935
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
899
|
-
|
|
936
|
+
PhoneInputWithCountry,
|
|
900
937
|
{
|
|
901
938
|
id,
|
|
902
939
|
international: true,
|
|
@@ -4226,8 +4263,9 @@ var UserProfile = ({
|
|
|
4226
4263
|
setIsLoading(false);
|
|
4227
4264
|
}
|
|
4228
4265
|
};
|
|
4229
|
-
const handleAvatarUploadComplete = (avatarUrl) => {
|
|
4266
|
+
const handleAvatarUploadComplete = async (avatarUrl) => {
|
|
4230
4267
|
setSuccess("Avatar updated successfully!");
|
|
4268
|
+
window.location.reload();
|
|
4231
4269
|
};
|
|
4232
4270
|
const handleAvatarUploadError = (error2) => {
|
|
4233
4271
|
setError(error2.message || "Failed to upload avatar");
|