@ciscode/ui-authentication-kit 1.0.2 → 1.0.4
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/actions/InputField.d.ts.map +1 -1
- package/dist/components/actions/InputField.js +4 -7
- package/dist/components/actions/InputField.js.map +1 -1
- package/dist/components/actions/SocialButton.d.ts.map +1 -1
- package/dist/components/actions/SocialButton.js +2 -4
- package/dist/components/actions/SocialButton.js.map +1 -1
- package/dist/index.mjs +484 -2040
- package/dist/index.umd.js +13 -13
- package/dist/pages/auth/SignInPage.js +2 -2
- package/dist/pages/auth/SignInPage.js.map +1 -1
- package/dist/pages/auth/SignUpPage.js +2 -2
- package/dist/pages/auth/SignUpPage.js.map +1 -1
- package/package.json +6 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputField.d.ts","sourceRoot":"","sources":["../../../src/components/actions/InputField.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"InputField.d.ts","sourceRoot":"","sources":["../../../src/components/actions/InputField.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD;;;;;GAKG;AACH,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAkChD,CAAC"}
|
|
@@ -1,19 +1,16 @@
|
|
|
1
1
|
// src/components/actions/InputField.tsx
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
import { useT } from "@ciscode/ui-translate-core";
|
|
4
3
|
/**
|
|
5
4
|
* InputField:
|
|
6
5
|
* - Renders a label + input combination
|
|
7
6
|
* - Uses translation keys for both `label` and `placeholder`
|
|
8
7
|
* - Automatically flips text alignment in RTL
|
|
9
8
|
*/
|
|
10
|
-
export const InputField = ({ label,
|
|
11
|
-
|
|
12
|
-
color = "", value, onChange, }) => {
|
|
13
|
-
const t = useT("authLib"); // assumes your translations live under the "auth" namespace
|
|
9
|
+
export const InputField = ({ label, type = "text", placeholder, color = "", value, onChange, }) => {
|
|
10
|
+
const inputId = React.useId();
|
|
14
11
|
return (React.createElement("div", { className: "mt-8 flex flex-col" },
|
|
15
|
-
label && (React.createElement("label", { htmlFor:
|
|
16
|
-
React.createElement("input", { id:
|
|
12
|
+
label && (React.createElement("label", { htmlFor: inputId, className: "self-start text-base text-black dark:text-white block ltr:text-left rtl:text-right" }, label)),
|
|
13
|
+
React.createElement("input", { id: inputId, type: type, placeholder: placeholder || undefined, value: value, onChange: (e) => onChange === null || onChange === void 0 ? void 0 : onChange(e.target.value), className: `
|
|
17
14
|
px-4 py-4 mt-3.5 text-sm font-light rounded-lg border border-solid w-full
|
|
18
15
|
ltr:text-left rtl:text-right
|
|
19
16
|
${color}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputField.js","sourceRoot":"","sources":["../../../src/components/actions/InputField.tsx"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"InputField.js","sourceRoot":"","sources":["../../../src/components/actions/InputField.tsx"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B;;;;;GAKG;AACH,MAAM,CAAC,MAAM,UAAU,GAA8B,CAAC,EACpD,KAAK,EACL,IAAI,GAAG,MAAM,EACb,WAAW,EACX,KAAK,GAAG,EAAE,EACV,KAAK,EACL,QAAQ,GACT,EAAE,EAAE;IACH,MAAM,OAAO,GAAG,KAAK,CAAC,KAAK,EAAE,CAAC;IAE9B,OAAO,CACL,6BAAK,SAAS,EAAC,oBAAoB;QAChC,KAAK,IAAI,CACR,+BACE,OAAO,EAAE,OAAO,EAChB,SAAS,EAAC,oFAAoF,IAE7F,KAAK,CACA,CACT;QACD,+BACE,EAAE,EAAE,OAAO,EACX,IAAI,EAAE,IAAI,EACV,WAAW,EAAE,WAAW,IAAI,SAAS,EACrC,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAG,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAC3C,SAAS,EAAE;;;YAGP,KAAK;SACR,GACD,CACE,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SocialButton.d.ts","sourceRoot":"","sources":["../../../src/components/actions/SocialButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"SocialButton.d.ts","sourceRoot":"","sources":["../../../src/components/actions/SocialButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAgBpD,CAAC"}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
// src/components/actions/SocialButton.tsx
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
import { useT } from "@ciscode/ui-translate-core";
|
|
4
3
|
export const SocialButton = ({ icon, label }) => {
|
|
5
|
-
const t = useT("authLib"); // assuming "auth" namespace for these labels
|
|
6
4
|
return (React.createElement("div", { className: "flex gap-5 px-8 py-3 items-center bg-indigo-50 rounded-lg max-md:px-5" },
|
|
7
|
-
React.createElement("img", { loading: "lazy", src: icon, alt: label
|
|
8
|
-
label && (React.createElement("div", { className: "basis-auto text-sm hidden md:block ltr:text-left rtl:text-right" },
|
|
5
|
+
React.createElement("img", { loading: "lazy", src: icon, alt: label || "", className: "object-contain shrink-0 aspect-square w-[26px]" }),
|
|
6
|
+
label && (React.createElement("div", { className: "basis-auto text-sm hidden md:block ltr:text-left rtl:text-right" }, label))));
|
|
9
7
|
};
|
|
10
8
|
//# sourceMappingURL=SocialButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SocialButton.js","sourceRoot":"","sources":["../../../src/components/actions/SocialButton.tsx"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"SocialButton.js","sourceRoot":"","sources":["../../../src/components/actions/SocialButton.tsx"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,MAAM,CAAC,MAAM,YAAY,GAAgC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE;IAC3E,OAAO,CACL,6BAAK,SAAS,EAAC,uEAAuE;QACpF,6BACE,OAAO,EAAC,MAAM,EACd,GAAG,EAAE,IAAI,EACT,GAAG,EAAE,KAAK,IAAI,EAAE,EAChB,SAAS,EAAC,gDAAgD,GAC1D;QACD,KAAK,IAAI,CACR,6BAAK,SAAS,EAAC,iEAAiE,IAC7E,KAAK,CACF,CACP,CACG,CACP,CAAC;AACJ,CAAC,CAAC"}
|