@insforge/react 0.2.1 → 0.2.3
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/atoms.js +17 -1
- package/dist/atoms.js.map +1 -1
- package/dist/atoms.mjs +17 -1
- package/dist/atoms.mjs.map +1 -1
- package/dist/components.js +17 -1
- package/dist/components.js.map +1 -1
- package/dist/components.mjs +17 -1
- package/dist/components.mjs.map +1 -1
- package/dist/forms.js +17 -1
- package/dist/forms.js.map +1 -1
- package/dist/forms.mjs +17 -1
- package/dist/forms.mjs.map +1 -1
- package/dist/index.js +19 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +19 -3
- package/dist/index.mjs.map +1 -1
- package/dist/lib.js +2 -2
- package/dist/lib.js.map +1 -1
- package/dist/lib.mjs +2 -2
- package/dist/lib.mjs.map +1 -1
- package/package.json +12 -12
package/dist/index.mjs
CHANGED
|
@@ -665,6 +665,22 @@ function AuthSubmitButton({
|
|
|
665
665
|
);
|
|
666
666
|
}
|
|
667
667
|
function AuthLink({ text, linkText, href, appearance = {} }) {
|
|
668
|
+
const currentSearch = typeof window !== "undefined" ? window.location.search : "";
|
|
669
|
+
const finalHref = (() => {
|
|
670
|
+
if (!currentSearch) return href;
|
|
671
|
+
try {
|
|
672
|
+
const url = new URL(href, window.location.origin);
|
|
673
|
+
const currentParams = new URLSearchParams(currentSearch);
|
|
674
|
+
currentParams.forEach((value, key) => {
|
|
675
|
+
if (!url.searchParams.has(key)) {
|
|
676
|
+
url.searchParams.set(key, value);
|
|
677
|
+
}
|
|
678
|
+
});
|
|
679
|
+
return url.pathname + url.search;
|
|
680
|
+
} catch {
|
|
681
|
+
return href;
|
|
682
|
+
}
|
|
683
|
+
})();
|
|
668
684
|
return /* @__PURE__ */ jsxs("p", { className: cn(
|
|
669
685
|
"text-center text-sm font-normal text-[#828282] leading-6",
|
|
670
686
|
appearance.containerClassName
|
|
@@ -674,7 +690,7 @@ function AuthLink({ text, linkText, href, appearance = {} }) {
|
|
|
674
690
|
/* @__PURE__ */ jsx(
|
|
675
691
|
"a",
|
|
676
692
|
{
|
|
677
|
-
href,
|
|
693
|
+
href: finalHref,
|
|
678
694
|
className: cn(
|
|
679
695
|
"text-sm font-medium text-black leading-6",
|
|
680
696
|
appearance.linkClassName
|
|
@@ -2033,7 +2049,7 @@ function validateEmail(email) {
|
|
|
2033
2049
|
if (result.success) {
|
|
2034
2050
|
return { valid: true };
|
|
2035
2051
|
}
|
|
2036
|
-
return { valid: false, error: result.error.
|
|
2052
|
+
return { valid: false, error: result.error.message };
|
|
2037
2053
|
}
|
|
2038
2054
|
function validatePassword(password, options) {
|
|
2039
2055
|
const schema = createPasswordSchema(options);
|
|
@@ -2041,7 +2057,7 @@ function validatePassword(password, options) {
|
|
|
2041
2057
|
if (result.success) {
|
|
2042
2058
|
return { valid: true };
|
|
2043
2059
|
}
|
|
2044
|
-
return { valid: false, error: result.error.
|
|
2060
|
+
return { valid: false, error: result.error.message };
|
|
2045
2061
|
}
|
|
2046
2062
|
function checkPasswordStrength(password) {
|
|
2047
2063
|
const feedback = [];
|