@ciscode/ui-authentication-kit 1.0.1 → 1.0.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.
@@ -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;AAE/B,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD;;;;;GAKG;AACH,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAkChD,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, // translation key for the label
11
- type = "text", placeholder, // translation key for the placeholder
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: `input-${label}`, className: "self-start text-base text-black dark:text-white block ltr:text-left rtl:text-right" }, t(label))),
16
- React.createElement("input", { id: `input-${label}`, type: type, placeholder: placeholder ? t(placeholder) : undefined, value: value, onChange: (e) => onChange === null || onChange === void 0 ? void 0 : onChange(e.target.value), className: `
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;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAGlD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,UAAU,GAA8B,CAAC,EACpD,KAAK,EAAW,gCAAgC;AAChD,IAAI,GAAG,MAAM,EACb,WAAW,EAAK,sCAAsC;AACtD,KAAK,GAAG,EAAE,EACV,KAAK,EACL,QAAQ,GACT,EAAE,EAAE;IACH,MAAM,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAE,4DAA4D;IAExF,OAAO,CACL,6BAAK,SAAS,EAAC,oBAAoB;QAChC,KAAK,IAAI,CACR,+BACE,OAAO,EAAE,SAAS,KAAK,EAAE,EACzB,SAAS,EAAC,oFAAoF,IAE7F,CAAC,CAAC,KAAK,CAAC,CACH,CACT;QACD,+BACE,EAAE,EAAE,SAAS,KAAK,EAAE,EACpB,IAAI,EAAE,IAAI,EACV,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,SAAS,EACrD,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
+ {"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;AAE/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAkBpD,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 ? t(label) : "", className: "object-contain shrink-0 aspect-square w-[26px]" }),
8
- label && (React.createElement("div", { className: "basis-auto text-sm hidden md:block ltr:text-left rtl:text-right" }, t(label)))));
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;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAGlD,MAAM,CAAC,MAAM,YAAY,GAAgC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE;IAC3E,MAAM,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,6CAA6C;IAExE,OAAO,CACL,6BAAK,SAAS,EAAC,uEAAuE;QACpF,6BACE,OAAO,EAAC,MAAM,EACd,GAAG,EAAE,IAAI,EACT,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,EAC1B,SAAS,EAAC,gDAAgD,GAC1D;QACD,KAAK,IAAI,CACR,6BAAK,SAAS,EAAC,iEAAiE,IAC7E,CAAC,CAAC,KAAK,CAAC,CACL,CACP,CACG,CACP,CAAC;AACJ,CAAC,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"}