@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
package/dist/index.next.js
CHANGED
|
@@ -1,19 +1,23 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
'use strict';
|
|
2
3
|
|
|
3
4
|
var axios = require('axios');
|
|
4
5
|
var upfiles = require('@thetechfossil/upfiles');
|
|
5
6
|
var React3 = require('react');
|
|
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 axios__default = /*#__PURE__*/_interopDefault(axios);
|
|
13
12
|
var React3__default = /*#__PURE__*/_interopDefault(React3);
|
|
14
|
-
var PhoneInputWithCountry__default = /*#__PURE__*/_interopDefault(PhoneInputWithCountry);
|
|
15
13
|
|
|
16
|
-
|
|
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
|
+
});
|
|
17
21
|
var HttpClient = class {
|
|
18
22
|
constructor(baseUrl, defaultHeaders = {}) {
|
|
19
23
|
this.csrfToken = null;
|
|
@@ -1026,6 +1030,14 @@ function useThemeColors() {
|
|
|
1026
1030
|
const { theme } = useAuthTheme();
|
|
1027
1031
|
return theme === "dark" ? darkTheme : lightTheme;
|
|
1028
1032
|
}
|
|
1033
|
+
var PhoneInputWithCountry = null;
|
|
1034
|
+
try {
|
|
1035
|
+
const module = __require("react-phone-number-input");
|
|
1036
|
+
PhoneInputWithCountry = module.default || module;
|
|
1037
|
+
__require("react-phone-number-input/style.css");
|
|
1038
|
+
} catch (error) {
|
|
1039
|
+
console.warn("react-phone-number-input not available, using fallback");
|
|
1040
|
+
}
|
|
1029
1041
|
var CustomPhoneInput = React3__default.default.forwardRef((props, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1030
1042
|
"input",
|
|
1031
1043
|
{
|
|
@@ -1218,6 +1230,30 @@ var PhoneInput = ({
|
|
|
1218
1230
|
const handleChange = React3.useMemo(() => (val) => {
|
|
1219
1231
|
onChange(val || "");
|
|
1220
1232
|
}, [onChange]);
|
|
1233
|
+
if (!PhoneInputWithCountry) {
|
|
1234
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1235
|
+
"input",
|
|
1236
|
+
{
|
|
1237
|
+
id,
|
|
1238
|
+
type: "tel",
|
|
1239
|
+
value,
|
|
1240
|
+
onChange: (e) => onChange(e.target.value),
|
|
1241
|
+
disabled,
|
|
1242
|
+
required,
|
|
1243
|
+
placeholder,
|
|
1244
|
+
style: {
|
|
1245
|
+
width: "100%",
|
|
1246
|
+
padding: "12px 16px",
|
|
1247
|
+
border: `1px solid ${colors.borderSecondary}`,
|
|
1248
|
+
borderRadius: "8px",
|
|
1249
|
+
fontSize: "16px",
|
|
1250
|
+
backgroundColor: colors.bgSecondary,
|
|
1251
|
+
color: colors.textPrimary,
|
|
1252
|
+
...style
|
|
1253
|
+
}
|
|
1254
|
+
}
|
|
1255
|
+
);
|
|
1256
|
+
}
|
|
1221
1257
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1222
1258
|
"div",
|
|
1223
1259
|
{
|
|
@@ -1228,7 +1264,7 @@ var PhoneInput = ({
|
|
|
1228
1264
|
children: [
|
|
1229
1265
|
/* @__PURE__ */ jsxRuntime.jsx("style", { children: styleContent }),
|
|
1230
1266
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1231
|
-
|
|
1267
|
+
PhoneInputWithCountry,
|
|
1232
1268
|
{
|
|
1233
1269
|
id,
|
|
1234
1270
|
international: true,
|