@rubenpazch/identification-input 2.0.2 → 2.1.0

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/README.md CHANGED
@@ -1,3 +1,41 @@
1
1
  # IdentificationInput
2
2
 
3
3
  Generated component package.
4
+
5
+ <!-- catalogo:inicio (generado por pnpm catalogo, no editar) -->
6
+
7
+ Tipo y número de documento peruano (DNI, CE, pasaporte) con validación de longitud y formato.
8
+
9
+ - **Usar cuando:** Registrar el documento de identidad de una persona en Perú.
10
+ - **Evitar cuando:** Otros países o identificadores que no son documentos de identidad.
11
+
12
+ Se recomienda instalar el paquete completo `@rubenpazch/ui` (incluye este). Por separado:
13
+
14
+ ```bash
15
+ npm install @rubenpazch/identification-input
16
+ ```
17
+
18
+ ## IdentificationInput
19
+
20
+ El `ref` apunta al campo del número de documento.
21
+
22
+ | Prop | Tipo | Req. | Por defecto | Descripción |
23
+ | ------------------------------ | ------------------------------------------------ | ---- | ----------- | -------------------------------------------------------- |
24
+ | `documentType` | `null \| "dni" \| "ce" \| "passport"` | sí | | |
25
+ | `identificationNumber` | `string` | sí | | |
26
+ | `onDocumentTypeChange` | `(type: PeruIdentificationType \| null) => void` | sí | | |
27
+ | `onIdentificationNumberChange` | `(value: string) => void` | sí | | |
28
+ | `className` | `string` | | `` | |
29
+ | `disabled` | `boolean` | | `false` | |
30
+ | `documentTypeError` | `string` | | | |
31
+ | `id` | `string` | | | Prefijo de los ids de ambos campos. |
32
+ | `identificationNumberError` | `string` | | | |
33
+ | `labels` | `Partial<IdentificationInputLabels>` | | | Textos de la interfaz; por defecto en español. |
34
+ | `name` | `string` | | | `name` del campo de número (el tipo usa `${name}-tipo`). |
35
+ | `required` | `boolean` | | `false` | |
36
+
37
+ ## DEFAULT_IDENTIFICATION_LABELS
38
+
39
+ _Sin props documentadas._
40
+
41
+ <!-- catalogo:fin -->
@@ -6,6 +6,7 @@ export type IdentificationInputLabels = {
6
6
  documentTypeHint: string;
7
7
  identificationNumber: string;
8
8
  };
9
+ export declare const DEFAULT_IDENTIFICATION_LABELS: IdentificationInputLabels;
9
10
  export interface IdentificationInputProps {
10
11
  documentType: PeruIdentificationType | null;
11
12
  onDocumentTypeChange: (type: PeruIdentificationType | null) => void;
@@ -15,9 +16,15 @@ export interface IdentificationInputProps {
15
16
  identificationNumberError?: string;
16
17
  required?: boolean;
17
18
  disabled?: boolean;
18
- labels: IdentificationInputLabels;
19
+ /** Textos de la interfaz; por defecto en español. */
20
+ labels?: Partial<IdentificationInputLabels>;
21
+ /** Prefijo de los ids de ambos campos. */
22
+ id?: string;
23
+ /** `name` del campo de número (el tipo usa `${name}-tipo`). */
24
+ name?: string;
19
25
  className?: string;
20
26
  }
21
- declare const IdentificationInput: React.FC<IdentificationInputProps>;
27
+ /** El `ref` apunta al campo del número de documento. */
28
+ declare const IdentificationInput: React.ForwardRefExoticComponent<IdentificationInputProps & React.RefAttributes<HTMLInputElement>>;
22
29
  export default IdentificationInput;
23
30
  //# sourceMappingURL=IdentificationInput.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"IdentificationInput.d.ts","sourceRoot":"","sources":["../src/IdentificationInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EACL,sBAAsB,EAKvB,MAAM,0BAA0B,CAAC;AAElC,MAAM,MAAM,yBAAyB,GAAG;IACtC,YAAY,EAAE,MAAM,CAAC;IACrB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;IACzB,oBAAoB,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF,MAAM,WAAW,wBAAwB;IACvC,YAAY,EAAE,sBAAsB,GAAG,IAAI,CAAC;IAC5C,oBAAoB,EAAE,CAAC,IAAI,EAAE,sBAAsB,GAAG,IAAI,KAAK,IAAI,CAAC;IACpE,oBAAoB,EAAE,MAAM,CAAC;IAC7B,4BAA4B,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACtD,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,yBAAyB,CAAC;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CA4E3D,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"IdentificationInput.d.ts","sourceRoot":"","sources":["../src/IdentificationInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EACL,sBAAsB,EAKvB,MAAM,0BAA0B,CAAC;AAElC,MAAM,MAAM,yBAAyB,GAAG;IACtC,YAAY,EAAE,MAAM,CAAC;IACrB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;IACzB,oBAAoB,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF,eAAO,MAAM,6BAA6B,EAAE,yBAK3C,CAAC;AAEF,MAAM,WAAW,wBAAwB;IACvC,YAAY,EAAE,sBAAsB,GAAG,IAAI,CAAC;IAC5C,oBAAoB,EAAE,CAAC,IAAI,EAAE,sBAAsB,GAAG,IAAI,KAAK,IAAI,CAAC;IACpE,oBAAoB,EAAE,MAAM,CAAC;IAC7B,4BAA4B,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACtD,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,qDAAqD;IACrD,MAAM,CAAC,EAAE,OAAO,CAAC,yBAAyB,CAAC,CAAC;IAC5C,0CAA0C;IAC1C,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,+DAA+D;IAC/D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wDAAwD;AACxD,QAAA,MAAM,mBAAmB,mGA4FvB,CAAC;AAEH,eAAe,mBAAmB,CAAC"}
package/dist/index.cjs.js CHANGED
@@ -1,6 +1,9 @@
1
1
  'use strict';
2
2
 
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
3
5
  var require$$0__default = require('react');
6
+ var shared = require('@rubenpazch/shared');
4
7
 
5
8
  function _interopNamespaceDefault(e) {
6
9
  var n = Object.create(null);
@@ -865,7 +868,22 @@ function requireJsxRuntime$1 () {
865
868
 
866
869
  var jsxRuntimeExports$1 = requireJsxRuntime$1();
867
870
 
868
- var r,o={exports:{}},t={};var l$1,n,a$1={};
871
+ var e$2={exports:{}};
872
+
873
+ var r$2={};
874
+
875
+ /**
876
+ * @license React
877
+ * react-jsx-runtime.production.js
878
+ *
879
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
880
+ *
881
+ * This source code is licensed under the MIT license found in the
882
+ * LICENSE file in the root directory of this source tree.
883
+ */var e$1;function t$2(){if(e$1)return r$2;e$1=1;var t=Symbol.for("react.transitional.element"),o=Symbol.for("react.fragment");function n(r,e,o){var n=null;if(void 0!==o&&(n=""+o),void 0!==e.key&&(n=""+e.key),"key"in e)for(var i in o={},e)"key"!==i&&(o[i]=e[i]);else o=e;return e=o.ref,{$$typeof:t,type:r,key:n,ref:void 0!==e?e:null,props:o}}return r$2.Fragment=o,r$2.jsx=n,r$2.jsxs=n,r$2}
884
+
885
+ var r$1={};
886
+
869
887
  /**
870
888
  * @license React
871
889
  * react-jsx-runtime.development.js
@@ -874,7 +892,17 @@ var r,o={exports:{}},t={};var l$1,n,a$1={};
874
892
  *
875
893
  * This source code is licensed under the MIT license found in the
876
894
  * LICENSE file in the root directory of this source tree.
877
- */function i$1(){return l$1||(l$1=1,"production"!==process.env.NODE_ENV&&function(){function e(s){if(null==s)return null;if("function"==typeof s)return s.$$typeof===M?null:s.displayName||s.name||null;if("string"==typeof s)return s;switch(s){case x:return "Fragment";case p:return "Profiler";case v:return "StrictMode";case f:return "Suspense";case C:return "SuspenseList";case N:return "Activity"}if("object"==typeof s)switch("number"==typeof s.tag&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),s.$$typeof){case u:return "Portal";case j:return s.displayName||"Context";case g:return (s._context.displayName||"Context")+".Consumer";case k:var r=s.render;return (s=s.displayName)||(s=""!==(s=r.displayName||r.name||"")?"ForwardRef("+s+")":"ForwardRef"),s;case L:return null!==(r=s.displayName||null)?r:e(s.type)||"Memo";case y:r=s._payload,s=s._init;try{return e(s(r))}catch(e){}}return null}function r(e){return ""+e}function o(e){try{r(e);var s=!1;}catch(e){s=true;}if(s){var o=(s=console).error,t="function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return o.call(s,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",t),r(e)}}function t(s){if(s===x)return "<>";if("object"==typeof s&&null!==s&&s.$$typeof===y)return "<...>";try{var r=e(s);return r?"<"+r+">":"<...>"}catch(e){return "<...>"}}function l(){return Error("react-stack-top-frame")}function n(){var s=e(this.type);return B[s]||(B[s]=true,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),void 0!==(s=this.props.ref)?s:null}function i(s,r,t,l,a,i){var h,m=r.children;if(void 0!==m)if(l)if(z(m)){for(l=0;l<m.length;l++)c(m[l]);Object.freeze&&Object.freeze(m);}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else c(m);if(b.call(r,"key")){m=e(s);var u=Object.keys(r).filter(function(e){return "key"!==e});l=0<u.length?"{key: someKey, "+u.join(": ..., ")+": ...}":"{key: someKey}",W[m+l]||(u=0<u.length?"{"+u.join(": ..., ")+": ...}":"{}",console.error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',l,m,u,m),W[m+l]=true);}if(m=null,void 0!==t&&(o(t),m=""+t),function(e){if(b.call(e,"key")){var s=Object.getOwnPropertyDescriptor(e,"key").get;if(s&&s.isReactWarning)return false}return void 0!==e.key}(r)&&(o(r.key),m=""+r.key),"key"in r)for(var x in t={},r)"key"!==x&&(t[x]=r[x]);else t=r;return m&&function(e,s){function r(){d||(d=true,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",s));}r.isReactWarning=true,Object.defineProperty(e,"key",{get:r,configurable:true});}(t,"function"==typeof s?s.displayName||s.name||"Unknown":s),function(e,s,r,o,t,l){var a=r.ref;return e={$$typeof:w,type:e,key:s,props:r,_owner:o},null!==(void 0!==a?a:null)?Object.defineProperty(e,"ref",{enumerable:false,get:n}):Object.defineProperty(e,"ref",{enumerable:false,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:false,enumerable:false,writable:true,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:false,enumerable:false,writable:true,value:null}),Object.defineProperty(e,"_debugStack",{configurable:false,enumerable:false,writable:true,value:t}),Object.defineProperty(e,"_debugTask",{configurable:false,enumerable:false,writable:true,value:l}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}(s,m,t,null===(h=$.A)?null:h.getOwner(),a,i)}function c(e){h(e)?e._store&&(e._store.validated=1):"object"==typeof e&&null!==e&&e.$$typeof===y&&("fulfilled"===e._payload.status?h(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1));}function h(e){return "object"==typeof e&&null!==e&&e.$$typeof===w}var d,m=require$$0__default,w=Symbol.for("react.transitional.element"),u=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),p=Symbol.for("react.profiler"),g=Symbol.for("react.consumer"),j=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),L=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),N=Symbol.for("react.activity"),M=Symbol.for("react.client.reference"),$=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,b=Object.prototype.hasOwnProperty,z=Array.isArray,H=console.createTask?console.createTask:function(){return null},B={},V=(m={react_stack_bottom_frame:function(e){return e()}}).react_stack_bottom_frame.bind(m,l)(),Z=H(t(l)),W={};a$1.Fragment=x,a$1.jsx=function(e,s,r){var o=1e4>$.recentlyCreatedOwnerStacks++;return i(e,s,r,false,o?Error("react-stack-top-frame"):V,o?H(t(e)):Z)},a$1.jsxs=function(e,s,r){var o=1e4>$.recentlyCreatedOwnerStacks++;return i(e,s,r,true,o?Error("react-stack-top-frame"):V,o?H(t(e)):Z)};}()),a$1}var c$1=(n||(n=1,"production"===process.env.NODE_ENV?o.exports=function(){if(r)return t;r=1;var e=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function o(s,r,o){var t=null;if(void 0!==o&&(t=""+o),void 0!==r.key&&(t=""+r.key),"key"in r)for(var l in o={},r)"key"!==l&&(o[l]=r[l]);else o=r;return r=o.ref,{$$typeof:e,type:s,key:t,ref:void 0!==r?r:null,props:o}}return t.Fragment=s,t.jsx=o,t.jsxs=o,t}():o.exports=i$1()),o.exports);function p$1({className:e="",size:s="md"}){const r=`${{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"}[s]} ${e}`;return c$1.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:r,"aria-label":"Check",children:c$1.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})})}const y$1=({className:e="",size:s="md",color:r="currentColor",direction:o="down"})=>c$1.jsx("svg",{className:`${{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"}[s]} ${{up:"rotate-180",down:"",left:"rotate-90",right:"-rotate-90"}[o]} ${e}`,fill:"none",stroke:r,viewBox:"0 0 24 24",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:c$1.jsx("path",{d:"M6 9l6 6 6-6"})});function B$1({className:e="",size:s="md",color:r="currentColor"}){return c$1.jsx("svg",{className:`${{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"}[s]} ${e}`,fill:"none",stroke:r,viewBox:"0 0 24 24",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:c$1.jsx("path",{d:"M6 18L18 6M6 6l12 12"})})}const Xe={outlined:"material-symbols-outlined",rounded:"material-symbols-rounded",sharp:"material-symbols-sharp"},Ye=require$$0__default__namespace.forwardRef(({name:e,variant:s="outlined",size:r="md",fill:o=0,weight:t=400,grade:l=0,opticalSize:n=24,style:a,className:i,...h},d)=>{const m=(e=>"number"==typeof e?e:"sm"===e?16:"md"===e?20:24)(r),w=`"FILL" ${o}, "wght" ${t}, "GRAD" ${l}, "opsz" ${n}`;return c$1.jsx("span",{ref:d,"aria-hidden":"true",className:Xe[s]+(i?` ${i}`:""),style:{fontVariationSettings:w,fontSize:m,lineHeight:1,display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",...a},...h,children:e})});Ye.displayName="MaterialIcon";
895
+ */var t$1;function n(){return t$1||(t$1=1,"production"!==process.env.NODE_ENV&&function(){function t(e){if(null==e)return null;if("function"==typeof e)return e.$$typeof===N?null:e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case d:return "Fragment";case _:return "Profiler";case b:return "StrictMode";case S:return "Suspense";case j:return "SuspenseList";case w:return "Activity"}if("object"==typeof e)switch("number"==typeof e.tag&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case m:return "Portal";case g:return e.displayName||"Context";case v:return (e._context.displayName||"Context")+".Consumer";case k:var r=e.render;return (e=e.displayName)||(e=""!==(e=r.displayName||r.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case h:return null!==(r=e.displayName||null)?r:t(e.type)||"Memo";case O:r=e._payload,e=e._init;try{return t(e(r))}catch(e){}}return null}function n(e){return ""+e}function o(e){try{n(e);var r=!1;}catch(e){r=true;}if(r){var t=(r=console).error,o="function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",o),n(e)}}function a(e){if(e===d)return "<>";if("object"==typeof e&&null!==e&&e.$$typeof===O)return "<...>";try{var r=t(e);return r?"<"+r+">":"<...>"}catch(e){return "<...>"}}function l(){return Error("react-stack-top-frame")}function i(){var e=t(this.type);return P[e]||(P[e]=true,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),void 0!==(e=this.props.ref)?e:null}function c(e,r,n,a,l,c){var u,y=r.children;if(void 0!==y)if(a)if(x(y)){for(a=0;a<y.length;a++)s(y[a]);Object.freeze&&Object.freeze(y);}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else s(y);if(T.call(r,"key")){y=t(e);var m=Object.keys(r).filter(function(e){return "key"!==e});a=0<m.length?"{key: someKey, "+m.join(": ..., ")+": ...}":"{key: someKey}",C[y+a]||(m=0<m.length?"{"+m.join(": ..., ")+": ...}":"{}",console.error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',a,y,m,y),C[y+a]=true);}if(y=null,void 0!==n&&(o(n),y=""+n),function(e){if(T.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return false}return void 0!==e.key}(r)&&(o(r.key),y=""+r.key),"key"in r)for(var d in n={},r)"key"!==d&&(n[d]=r[d]);else n=r;return y&&function(e,r){function t(){f||(f=true,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",r));}t.isReactWarning=true,Object.defineProperty(e,"key",{get:t,configurable:true});}(n,"function"==typeof e?e.displayName||e.name||"Unknown":e),function(e,r,t,n,o,a){var l=t.ref;return e={$$typeof:p,type:e,key:r,props:t,_owner:n},null!==(void 0!==l?l:null)?Object.defineProperty(e,"ref",{enumerable:false,get:i}):Object.defineProperty(e,"ref",{enumerable:false,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:false,enumerable:false,writable:true,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:false,enumerable:false,writable:true,value:null}),Object.defineProperty(e,"_debugStack",{configurable:false,enumerable:false,writable:true,value:o}),Object.defineProperty(e,"_debugTask",{configurable:false,enumerable:false,writable:true,value:a}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}(e,y,n,null===(u=R.A)?null:u.getOwner(),l,c)}function s(e){u(e)?e._store&&(e._store.validated=1):"object"==typeof e&&null!==e&&e.$$typeof===O&&("fulfilled"===e._payload.status?u(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1));}function u(e){return "object"==typeof e&&null!==e&&e.$$typeof===p}var f,y=require$$0__default,p=Symbol.for("react.transitional.element"),m=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),v=Symbol.for("react.consumer"),g=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),S=Symbol.for("react.suspense"),j=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),w=Symbol.for("react.activity"),N=Symbol.for("react.client.reference"),R=y.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,T=Object.prototype.hasOwnProperty,x=Array.isArray,E=console.createTask?console.createTask:function(){return null},P={},$=(y={react_stack_bottom_frame:function(e){return e()}}).react_stack_bottom_frame.bind(y,l)(),A=E(a(l)),C={};r$1.Fragment=d,r$1.jsx=function(e,r,t){var n=1e4>R.recentlyCreatedOwnerStacks++;return c(e,r,t,false,n?Error("react-stack-top-frame"):$,n?E(a(e)):A)},r$1.jsxs=function(e,r,t){var n=1e4>R.recentlyCreatedOwnerStacks++;return c(e,r,t,true,n?Error("react-stack-top-frame"):$,n?E(a(e)):A)};}()),r$1}
896
+
897
+ var t;function s$1(){return t||(t=1,"production"===process.env.NODE_ENV?e$2.exports=t$2():e$2.exports=n()),e$2.exports}
898
+
899
+ var r=s$1();
900
+
901
+ function l$1({className:l="",size:s="md"}){const a={sm:16,md:20,lg:24},t=`${{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"}[s]} ${l}`;return r.jsx("svg",{width:a[s],height:a[s],xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:t,"aria-hidden":"true",children:r.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})})}
902
+
903
+ const o=({className:o="",size:e="md",color:r$1="currentColor",direction:s="down"})=>{const i={sm:16,md:20,lg:24};return r.jsx("svg",{width:i[e],height:i[e],className:`${{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"}[e]} ${{up:"rotate-180",down:"",left:"rotate-90",right:"-rotate-90"}[s]} ${o}`,fill:"none",stroke:r$1,viewBox:"0 0 24 24",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("path",{d:"M6 9l6 6 6-6"})})};
904
+
905
+ function e({className:e="",size:o="md",color:r$1="currentColor"}){const t={sm:16,md:20,lg:24};return r.jsx("svg",{width:t[o],height:t[o],className:`${{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"}[o]} ${e}`,fill:"none",stroke:r$1,viewBox:"0 0 24 24",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("path",{d:"M6 18L18 6M6 6l12 12"})})}
878
906
 
879
907
  var jsxRuntime = {exports: {}};
880
908
 
@@ -1405,7 +1433,24 @@ const highlightMatchText = (text, search, shouldHighlight = true) => {
1405
1433
  const parts = text.split(regex);
1406
1434
  return (jsxRuntimeExports$1.jsx(jsxRuntimeExports$1.Fragment, { children: parts.map((part, index) => regex.test(part) ? (jsxRuntimeExports$1.jsx("mark", { className: styles$2.highlight, children: part }, index)) : (jsxRuntimeExports$1.jsx("span", { children: part }, index))) }));
1407
1435
  };
1408
- const Autocomplete = ({ label, value, onChange, options = [], placeholder = "Search or select...", error, warning, hint, required = false, disabled = false, loading = false, searchable = true, clearable = true, icon, className = "", maxHeight = "300px", onCreate, onSearch, readOnly = false, renderOption, onBlur, onFocus, createLabel = "Create", noResultsText = "No results found", loadingText = "Loading...", highlightMatch = true, minSearchLength = 0, debounceMs = 300, keepListOpen = false, position = "bottom", }) => {
1436
+ /** Selector con búsqueda (combobox accesible): filtra mientras se escribe, teclado completo. */
1437
+ const Autocomplete = require$$0__default__namespace.forwardRef(function Autocomplete({ id, name, labels, label, value, onChange, options = [], placeholder = "Buscar o seleccionar…", error, warning, hint, required = false, disabled = false, loading = false, searchable = true, clearable = true, icon, className = "", maxHeight = "300px", onCreate, onSearch, readOnly = false, renderOption, onBlur, onFocus, createLabel = "Crear", noResultsText = "Sin resultados", loadingText = "Cargando…", highlightMatch = true, minSearchLength = 0, debounceMs = 300, keepListOpen = false, position = "bottom", }, forwardedRef) {
1438
+ const text = {
1439
+ clear: "Quitar selección",
1440
+ open: "Abrir lista",
1441
+ close: "Cerrar lista",
1442
+ ...labels,
1443
+ };
1444
+ const field = shared.useFieldIds({
1445
+ id,
1446
+ name,
1447
+ required,
1448
+ error,
1449
+ warning: !error ? warning : undefined,
1450
+ hint: hint && !error && !warning ? hint : undefined,
1451
+ });
1452
+ const listboxId = `${field.inputId}-opciones`;
1453
+ const optionId = (i) => `${field.inputId}-opcion-${i}`;
1409
1454
  const [isOpen, setIsOpen] = require$$0__default.useState(false);
1410
1455
  const [searchTerm, setSearchTerm] = require$$0__default.useState("");
1411
1456
  const [highlightedIndex, setHighlightedIndex] = require$$0__default.useState(-1);
@@ -1568,19 +1613,24 @@ const Autocomplete = ({ label, value, onChange, options = [], placeholder = "Sea
1568
1613
  const getInputClassName = () => {
1569
1614
  return classNames(styles$2.input, icon ? styles$2.inputWithIcon : undefined, clearable && value ? styles$2.inputWithClear : styles$2.inputWithoutClear, readOnly ? styles$2.inputReadOnly : undefined, error ? styles$2.inputError : undefined, warning && !error ? styles$2.inputWarning : undefined, isFocused && !error && !warning ? styles$2.inputFocused : undefined);
1570
1615
  };
1571
- return (jsxRuntimeExports$1.jsxs("div", { className: classNames(styles$2.container, className), children: [label && (jsxRuntimeExports$1.jsxs("label", { className: styles$2.label, children: [label, required && jsxRuntimeExports$1.jsx("span", { className: styles$2.required, children: "*" })] })), jsxRuntimeExports$1.jsxs("div", { ref: containerRef, className: styles$2.inputWrapper, children: [icon && jsxRuntimeExports$1.jsx("div", { className: styles$2.iconLeft, children: icon }), jsxRuntimeExports$1.jsx("input", { ref: inputRef, type: "text", value: displayValue, onChange: handleInputChange, onFocus: handleInputFocus, onBlur: handleInputBlur, onKeyDown: handleKeyDown, placeholder: placeholder, disabled: disabled, readOnly: readOnly || !searchable, className: getInputClassName(), "data-testid": "autocomplete-input", "data-has-error": error ? "true" : "false", "data-has-warning": warning ? "true" : "false", "data-is-focused": isFocused ? "true" : "false" }), jsxRuntimeExports$1.jsxs("div", { className: styles$2.rightIcons, children: [loading && jsxRuntimeExports$1.jsx(LoadingSpinner, { size: "sm", variant: "dots", inline: true }), clearable && value && !loading && !disabled && (jsxRuntimeExports$1.jsx("button", { type: "button", onClick: handleClear, className: styles$2.clearButton, "data-testid": "autocomplete-clear", "aria-label": "Clear selection", children: jsxRuntimeExports$1.jsx(B$1, { className: styles$2.clearIcon }) })), jsxRuntimeExports$1.jsx("button", { type: "button", onClick: handleToggle, className: styles$2.toggleButton, disabled: disabled, "data-testid": "autocomplete-toggle", "aria-label": isOpen ? "Close dropdown" : "Open dropdown", children: jsxRuntimeExports$1.jsx(y$1, { className: classNames(styles$2.toggleIcon, isOpen && styles$2.toggleIconOpen) }) })] }), isOpen && !disabled && !readOnly && (jsxRuntimeExports$1.jsxs("div", { ref: dropdownRef, className: classNames(styles$2.dropdown, position === "top" && styles$2.dropdownTop), style: { maxHeight }, "data-testid": "autocomplete-dropdown", children: [loading && filteredOptions.length === 0 && (jsxRuntimeExports$1.jsxs("div", { className: styles$2.loadingState, children: [jsxRuntimeExports$1.jsx(LoadingSpinner, { size: "sm", variant: "spinner", className: styles$2.loadingSpinner }), jsxRuntimeExports$1.jsx("span", { className: styles$2.loadingText, children: loadingText })] })), jsxRuntimeExports$1.jsx("div", { className: styles$2.dropdownContent, children: !loading && filteredOptions.length > 0 && (jsxRuntimeExports$1.jsx(jsxRuntimeExports$1.Fragment, { children: filteredOptions.map((option, index) => {
1616
+ return (jsxRuntimeExports$1.jsxs("div", { className: classNames(styles$2.container, className), children: [label && (jsxRuntimeExports$1.jsxs("label", { htmlFor: field.inputId, className: styles$2.label, children: [label, required && (jsxRuntimeExports$1.jsx("span", { className: styles$2.required, "aria-hidden": "true", children: "*" }))] })), jsxRuntimeExports$1.jsxs("div", { ref: containerRef, className: styles$2.inputWrapper, children: [icon && jsxRuntimeExports$1.jsx("div", { className: styles$2.iconLeft, children: icon }), jsxRuntimeExports$1.jsx("input", { ref: shared.mergeRefs(inputRef, forwardedRef), ...field.controlProps, name: name, required: required, role: "combobox", "aria-expanded": isOpen && !disabled && !readOnly, "aria-controls": listboxId, "aria-autocomplete": "list", "aria-activedescendant": isOpen &&
1617
+ highlightedIndex >= 0 &&
1618
+ highlightedIndex < filteredOptions.length
1619
+ ? optionId(highlightedIndex)
1620
+ : undefined, autoComplete: "off", type: "text", value: displayValue, onChange: handleInputChange, onFocus: handleInputFocus, onBlur: handleInputBlur, onKeyDown: handleKeyDown, placeholder: placeholder, disabled: disabled, readOnly: readOnly || !searchable, className: getInputClassName(), "data-testid": "autocomplete-input", "data-has-error": error ? "true" : "false", "data-has-warning": warning ? "true" : "false", "data-is-focused": isFocused ? "true" : "false" }), jsxRuntimeExports$1.jsxs("div", { className: styles$2.rightIcons, children: [loading && jsxRuntimeExports$1.jsx(LoadingSpinner, { size: "sm", variant: "dots", inline: true }), clearable && value && !loading && !disabled && (jsxRuntimeExports$1.jsx("button", { type: "button", onClick: handleClear, className: styles$2.clearButton, "data-testid": "autocomplete-clear", "aria-label": text.clear, children: jsxRuntimeExports$1.jsx(e, { className: styles$2.clearIcon }) })), jsxRuntimeExports$1.jsx("button", { type: "button", onClick: handleToggle, className: styles$2.toggleButton, disabled: disabled, "data-testid": "autocomplete-toggle", "aria-label": isOpen ? text.close : text.open, "aria-expanded": isOpen, tabIndex: -1, children: jsxRuntimeExports$1.jsx(o, { className: classNames(styles$2.toggleIcon, isOpen && styles$2.toggleIconOpen) }) })] }), isOpen && !disabled && !readOnly && (jsxRuntimeExports$1.jsxs("div", { ref: dropdownRef, className: classNames(styles$2.dropdown, position === "top" && styles$2.dropdownTop), style: { maxHeight }, "data-testid": "autocomplete-dropdown", children: [loading && filteredOptions.length === 0 && (jsxRuntimeExports$1.jsxs("div", { className: styles$2.loadingState, children: [jsxRuntimeExports$1.jsx(LoadingSpinner, { size: "sm", variant: "spinner", className: styles$2.loadingSpinner }), jsxRuntimeExports$1.jsx("span", { className: styles$2.loadingText, children: loadingText })] })), jsxRuntimeExports$1.jsx("div", { id: listboxId, role: "listbox", "aria-label": label, className: styles$2.dropdownContent, children: !loading && filteredOptions.length > 0 && (jsxRuntimeExports$1.jsx(jsxRuntimeExports$1.Fragment, { children: filteredOptions.map((option, index) => {
1572
1621
  const isSelected = option.value === value;
1573
1622
  const isHighlighted = index === highlightedIndex;
1574
- return (jsxRuntimeExports$1.jsx("div", { ref: (el) => {
1623
+ return (jsxRuntimeExports$1.jsx("div", { id: optionId(index), role: "option", "aria-selected": isSelected, "aria-disabled": option.disabled || undefined, ref: (el) => {
1575
1624
  optionRefs.current[index] = el;
1576
- }, onClick: () => handleSelect(option), onMouseEnter: () => setHighlightedIndex(index), className: classNames(styles$2.option, option.disabled && styles$2.optionDisabled, isHighlighted && styles$2.optionHighlighted, isSelected && styles$2.optionSelected), "data-testid": `autocomplete-option-${option.value}`, "data-disabled": option.disabled ? "true" : "false", "data-selected": isSelected ? "true" : "false", "data-highlighted": isHighlighted ? "true" : "false", children: renderOption ? (renderOption(option, isSelected)) : (jsxRuntimeExports$1.jsxs(jsxRuntimeExports$1.Fragment, { children: [jsxRuntimeExports$1.jsxs("div", { className: styles$2.optionContent, children: [jsxRuntimeExports$1.jsx("div", { className: styles$2.optionLabel, children: highlightMatchText(option.label, searchTerm, highlightMatch) }), option.description && (jsxRuntimeExports$1.jsx("div", { className: styles$2.optionDescription, children: option.description }))] }), isSelected && (jsxRuntimeExports$1.jsx(p$1, { className: styles$2.optionCheckIcon }))] })) }, option.value));
1625
+ }, onClick: () => handleSelect(option), onMouseEnter: () => setHighlightedIndex(index), className: classNames(styles$2.option, option.disabled && styles$2.optionDisabled, isHighlighted && styles$2.optionHighlighted, isSelected && styles$2.optionSelected), "data-testid": `autocomplete-option-${option.value}`, "data-disabled": option.disabled ? "true" : "false", "data-selected": isSelected ? "true" : "false", "data-highlighted": isHighlighted ? "true" : "false", children: renderOption ? (renderOption(option, isSelected)) : (jsxRuntimeExports$1.jsxs(jsxRuntimeExports$1.Fragment, { children: [jsxRuntimeExports$1.jsxs("div", { className: styles$2.optionContent, children: [jsxRuntimeExports$1.jsx("div", { className: styles$2.optionLabel, children: highlightMatchText(option.label, searchTerm, highlightMatch) }), option.description && (jsxRuntimeExports$1.jsx("div", { className: styles$2.optionDescription, children: option.description }))] }), isSelected && (jsxRuntimeExports$1.jsx(l$1, { className: styles$2.optionCheckIcon }))] })) }, option.value));
1577
1626
  }) })) }), onCreate && searchTerm && (jsxRuntimeExports$1.jsxs("div", { onClick: () => {
1578
1627
  onCreate(searchTerm.trim());
1579
1628
  setIsOpen(false);
1580
1629
  setSearchTerm("");
1581
1630
  }, className: classNames(styles$2.createOption, filteredOptions.length > 0 && styles$2.createOptionWithBorder, highlightedIndex === filteredOptions.length &&
1582
- styles$2.createOptionHighlighted), "data-testid": "autocomplete-create", children: [jsxRuntimeExports$1.jsx("span", { className: styles$2.createIcon, children: "+" }), jsxRuntimeExports$1.jsxs("span", { className: styles$2.createText, children: [createLabel, " \"", searchTerm, "\""] })] })), !loading && filteredOptions.length === 0 && !onCreate && (jsxRuntimeExports$1.jsx("div", { className: styles$2.noResults, children: noResultsText }))] }))] }), hint && !error && !warning && jsxRuntimeExports$1.jsx("p", { className: styles$2.hint, children: hint }), warning && !error && (jsxRuntimeExports$1.jsxs("p", { className: styles$2.warning, children: [jsxRuntimeExports$1.jsx("svg", { className: styles$2.warningIcon, fill: "currentColor", viewBox: "0 0 20 20", children: jsxRuntimeExports$1.jsx("path", { fillRule: "evenodd", d: "M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z", clipRule: "evenodd" }) }), warning] })), error && (jsxRuntimeExports$1.jsxs("p", { className: styles$2.error, children: [jsxRuntimeExports$1.jsx("svg", { className: styles$2.errorIcon, fill: "currentColor", viewBox: "0 0 20 20", children: jsxRuntimeExports$1.jsx("path", { fillRule: "evenodd", d: "M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z", clipRule: "evenodd" }) }), error] }))] }));
1583
- };
1631
+ styles$2.createOptionHighlighted), "data-testid": "autocomplete-create", children: [jsxRuntimeExports$1.jsx("span", { className: styles$2.createIcon, children: "+" }), jsxRuntimeExports$1.jsxs("span", { className: styles$2.createText, children: [createLabel, " \"", searchTerm, "\""] })] })), !loading && filteredOptions.length === 0 && !onCreate && (jsxRuntimeExports$1.jsx("div", { className: styles$2.noResults, children: noResultsText }))] }))] }), hint && !error && !warning && (jsxRuntimeExports$1.jsx("p", { id: field.hintId, className: styles$2.hint, children: hint })), warning && !error && (jsxRuntimeExports$1.jsxs("p", { id: field.warningId, className: styles$2.warning, children: [jsxRuntimeExports$1.jsx("svg", { "aria-hidden": "true", className: styles$2.warningIcon, fill: "currentColor", viewBox: "0 0 20 20", children: jsxRuntimeExports$1.jsx("path", { fillRule: "evenodd", d: "M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z", clipRule: "evenodd" }) }), warning] })), error && (jsxRuntimeExports$1.jsxs("p", { id: field.errorId, className: styles$2.error, role: "alert", children: [jsxRuntimeExports$1.jsx("svg", { "aria-hidden": "true", className: styles$2.errorIcon, fill: "currentColor", viewBox: "0 0 20 20", children: jsxRuntimeExports$1.jsx("path", { fillRule: "evenodd", d: "M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z", clipRule: "evenodd" }) }), error] }))] }));
1632
+ });
1633
+ Autocomplete.displayName = "Autocomplete";
1584
1634
 
1585
1635
  var a,l={exports:{}},s={};var i,u,c={};
1586
1636
  /**
@@ -1591,7 +1641,16 @@ var a,l={exports:{}},s={};var i,u,c={};
1591
1641
  *
1592
1642
  * This source code is licensed under the MIT license found in the
1593
1643
  * LICENSE file in the root directory of this source tree.
1594
- */function m(){return i||(i=1,"production"!==process.env.NODE_ENV&&function(){function e(n){if(null==n)return null;if("function"==typeof n)return n.$$typeof===S?null:n.displayName||n.name||null;if("string"==typeof n)return n;switch(n){case g:return "Fragment";case h:return "Profiler";case f:return "StrictMode";case v:return "Suspense";case T:return "SuspenseList";case k:return "Activity"}if("object"==typeof n)switch("number"==typeof n.tag&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),n.$$typeof){case _:return "Portal";case b:return n.displayName||"Context";case x:return (n._context.displayName||"Context")+".Consumer";case y:var t=n.render;return (n=n.displayName)||(n=""!==(n=t.displayName||t.name||"")?"ForwardRef("+n+")":"ForwardRef"),n;case I:return null!==(t=n.displayName||null)?t:e(n.type)||"Memo";case j:t=n._payload,n=n._init;try{return e(n(t))}catch(e){}}return null}function t(e){return ""+e}function r(e){try{t(e);var n=!1;}catch(e){n=true;}if(n){var r=(n=console).error,o="function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return r.call(n,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",o),t(e)}}function o(n){if(n===g)return "<>";if("object"==typeof n&&null!==n&&n.$$typeof===j)return "<...>";try{var t=e(n);return t?"<"+t+">":"<...>"}catch(e){return "<...>"}}function a(){return Error("react-stack-top-frame")}function l(){var n=e(this.type);return C[n]||(C[n]=true,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),void 0!==(n=this.props.ref)?n:null}function s(n,t,o,a,s,u){var c,d=t.children;if(void 0!==d)if(a)if(O(d)){for(a=0;a<d.length;a++)i(d[a]);Object.freeze&&Object.freeze(d);}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else i(d);if(N.call(t,"key")){d=e(n);var _=Object.keys(t).filter(function(e){return "key"!==e});a=0<_.length?"{key: someKey, "+_.join(": ..., ")+": ...}":"{key: someKey}",A[d+a]||(_=0<_.length?"{"+_.join(": ..., ")+": ...}":"{}",console.error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',a,d,_,d),A[d+a]=true);}if(d=null,void 0!==o&&(r(o),d=""+o),function(e){if(N.call(e,"key")){var n=Object.getOwnPropertyDescriptor(e,"key").get;if(n&&n.isReactWarning)return false}return void 0!==e.key}(t)&&(r(t.key),d=""+t.key),"key"in t)for(var g in o={},t)"key"!==g&&(o[g]=t[g]);else o=t;return d&&function(e,n){function t(){m||(m=true,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",n));}t.isReactWarning=true,Object.defineProperty(e,"key",{get:t,configurable:true});}(o,"function"==typeof n?n.displayName||n.name||"Unknown":n),function(e,n,t,r,o,a){var s=t.ref;return e={$$typeof:p,type:e,key:n,props:t,_owner:r},null!==(void 0!==s?s:null)?Object.defineProperty(e,"ref",{enumerable:false,get:l}):Object.defineProperty(e,"ref",{enumerable:false,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:false,enumerable:false,writable:true,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:false,enumerable:false,writable:true,value:null}),Object.defineProperty(e,"_debugStack",{configurable:false,enumerable:false,writable:true,value:o}),Object.defineProperty(e,"_debugTask",{configurable:false,enumerable:false,writable:true,value:a}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}(n,d,o,null===(c=w.A)?null:c.getOwner(),s,u)}function i(e){u(e)?e._store&&(e._store.validated=1):"object"==typeof e&&null!==e&&e.$$typeof===j&&("fulfilled"===e._payload.status?u(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1));}function u(e){return "object"==typeof e&&null!==e&&e.$$typeof===p}var m,d=require$$0__default,p=Symbol.for("react.transitional.element"),_=Symbol.for("react.portal"),g=Symbol.for("react.fragment"),f=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),x=Symbol.for("react.consumer"),b=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),k=Symbol.for("react.activity"),S=Symbol.for("react.client.reference"),w=d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,N=Object.prototype.hasOwnProperty,O=Array.isArray,z=console.createTask?console.createTask:function(){return null},C={},R=(d={react_stack_bottom_frame:function(e){return e()}}).react_stack_bottom_frame.bind(d,a)(),$=z(o(a)),A={};c.Fragment=g,c.jsx=function(e,n,t){var r=1e4>w.recentlyCreatedOwnerStacks++;return s(e,n,t,false,r?Error("react-stack-top-frame"):R,r?z(o(e)):$)},c.jsxs=function(e,n,t){var r=1e4>w.recentlyCreatedOwnerStacks++;return s(e,n,t,true,r?Error("react-stack-top-frame"):R,r?z(o(e)):$)};}()),c}var d,p,_,g=(u||(u=1,"production"===process.env.NODE_ENV?l.exports=function(){if(a)return s;a=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function t(n,t,r){var o=null;if(void 0!==r&&(o=""+r),void 0!==t.key&&(o=""+t.key),"key"in t)for(var a in r={},t)"key"!==a&&(r[a]=t[a]);else r=t;return t=r.ref,{$$typeof:e,type:n,key:o,ref:void 0!==t?t:null,props:r}}return s.Fragment=n,s.jsx=t,s.jsxs=t,s}():l.exports=m()),l.exports),f={exports:{}},h={},x={};var b=(_||(_=1,"production"===process.env.NODE_ENV?f.exports=function(){if(d)return h;d=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function t(n,t,r){var o=null;if(void 0!==r&&(o=""+r),void 0!==t.key&&(o=""+t.key),"key"in t)for(var a in r={},t)"key"!==a&&(r[a]=t[a]);else r=t;return t=r.ref,{$$typeof:e,type:n,key:o,ref:void 0!==t?t:null,props:r}}return h.Fragment=n,h.jsx=t,h.jsxs=t,h}():f.exports=(p||(p=1,"production"!==process.env.NODE_ENV&&function(){function e(n){if(null==n)return null;if("function"==typeof n)return n.$$typeof===S?null:n.displayName||n.name||null;if("string"==typeof n)return n;switch(n){case _:return "Fragment";case f:return "Profiler";case g:return "StrictMode";case v:return "Suspense";case T:return "SuspenseList";case k:return "Activity"}if("object"==typeof n)switch("number"==typeof n.tag&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),n.$$typeof){case p:return "Portal";case b:return n.displayName||"Context";case h:return (n._context.displayName||"Context")+".Consumer";case y:var t=n.render;return (n=n.displayName)||(n=""!==(n=t.displayName||t.name||"")?"ForwardRef("+n+")":"ForwardRef"),n;case I:return null!==(t=n.displayName||null)?t:e(n.type)||"Memo";case j:t=n._payload,n=n._init;try{return e(n(t))}catch(e){}}return null}function t(e){return ""+e}function r(e){try{t(e);var n=!1;}catch(e){n=true;}if(n){var r=(n=console).error,o="function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return r.call(n,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",o),t(e)}}function o(n){if(n===_)return "<>";if("object"==typeof n&&null!==n&&n.$$typeof===j)return "<...>";try{var t=e(n);return t?"<"+t+">":"<...>"}catch(e){return "<...>"}}function a(){return Error("react-stack-top-frame")}function l(){var n=e(this.type);return C[n]||(C[n]=true,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),void 0!==(n=this.props.ref)?n:null}function s(n,t,o,a,s,u){var m,p=t.children;if(void 0!==p)if(a)if(O(p)){for(a=0;a<p.length;a++)i(p[a]);Object.freeze&&Object.freeze(p);}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else i(p);if(N.call(t,"key")){p=e(n);var _=Object.keys(t).filter(function(e){return "key"!==e});a=0<_.length?"{key: someKey, "+_.join(": ..., ")+": ...}":"{key: someKey}",A[p+a]||(_=0<_.length?"{"+_.join(": ..., ")+": ...}":"{}",console.error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',a,p,_,p),A[p+a]=true);}if(p=null,void 0!==o&&(r(o),p=""+o),function(e){if(N.call(e,"key")){var n=Object.getOwnPropertyDescriptor(e,"key").get;if(n&&n.isReactWarning)return false}return void 0!==e.key}(t)&&(r(t.key),p=""+t.key),"key"in t)for(var g in o={},t)"key"!==g&&(o[g]=t[g]);else o=t;return p&&function(e,n){function t(){c||(c=true,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",n));}t.isReactWarning=true,Object.defineProperty(e,"key",{get:t,configurable:true});}(o,"function"==typeof n?n.displayName||n.name||"Unknown":n),function(e,n,t,r,o,a){var s=t.ref;return e={$$typeof:d,type:e,key:n,props:t,_owner:r},null!==(void 0!==s?s:null)?Object.defineProperty(e,"ref",{enumerable:false,get:l}):Object.defineProperty(e,"ref",{enumerable:false,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:false,enumerable:false,writable:true,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:false,enumerable:false,writable:true,value:null}),Object.defineProperty(e,"_debugStack",{configurable:false,enumerable:false,writable:true,value:o}),Object.defineProperty(e,"_debugTask",{configurable:false,enumerable:false,writable:true,value:a}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}(n,p,o,null===(m=w.A)?null:m.getOwner(),s,u)}function i(e){u(e)?e._store&&(e._store.validated=1):"object"==typeof e&&null!==e&&e.$$typeof===j&&("fulfilled"===e._payload.status?u(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1));}function u(e){return "object"==typeof e&&null!==e&&e.$$typeof===d}var c,m=require$$0__default,d=Symbol.for("react.transitional.element"),p=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),g=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),h=Symbol.for("react.consumer"),b=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),k=Symbol.for("react.activity"),S=Symbol.for("react.client.reference"),w=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,N=Object.prototype.hasOwnProperty,O=Array.isArray,z=console.createTask?console.createTask:function(){return null},C={},R=(m={react_stack_bottom_frame:function(e){return e()}}).react_stack_bottom_frame.bind(m,a)(),$=z(o(a)),A={};x.Fragment=_,x.jsx=function(e,n,t){var r=1e4>w.recentlyCreatedOwnerStacks++;return s(e,n,t,false,r?Error("react-stack-top-frame"):R,r?z(o(e)):$)},x.jsxs=function(e,n,t){var r=1e4>w.recentlyCreatedOwnerStacks++;return s(e,n,t,true,r?Error("react-stack-top-frame"):R,r?z(o(e)):$)};}()),x)),f.exports);function y({className:e="",size:n="md"}){const t=`${{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"}[n]} ${e}`;return b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:t,"aria-label":"Check",children:b.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})})}const v=({className:e="",size:n="md"})=>{const t=`${{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"}[n]} ${e}`;return b.jsx("svg",{className:t,viewBox:"0 0 20 20",fill:"currentColor","aria-label":"Error",children:b.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})})},T=({className:e="",size:n="md"})=>{const t=`${{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"}[n]} ${e}`;return b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,"aria-label":"Info",children:b.jsx("path",{d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})},I={outlined:"material-symbols-outlined",rounded:"material-symbols-rounded",sharp:"material-symbols-sharp"},j=require$$0__default__namespace.forwardRef(({name:e,variant:n="outlined",size:t="md",fill:r=0,weight:o=400,grade:a=0,opticalSize:l=24,style:s,className:i,...u},c)=>{const m=(e=>"number"==typeof e?e:"sm"===e?16:"md"===e?20:24)(t),d=`"FILL" ${r}, "wght" ${o}, "GRAD" ${a}, "opsz" ${l}`;return b.jsx("span",{ref:c,"aria-hidden":"true",className:I[n]+(i?` ${i}`:""),style:{fontVariationSettings:d,fontSize:m,lineHeight:1,display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",...s},...u,children:e})});j.displayName="MaterialIcon";var k="TextInput-module_container__QXVA9",S="TextInput-module_label__GGFxk",w="TextInput-module_required__qlHAH",N="TextInput-module_inputContainer__-zaWR",O="TextInput-module_icon__F1AYg",z="TextInput-module_input__I8TSn",C="TextInput-module_inputWithIcon__TDgMC",R="TextInput-module_inputWithCharCount__qgvqA",$="TextInput-module_inputError__-Ga78",A="TextInput-module_inputSuccess__xsjt7",E="TextInput-module_charCount__RyuVm",P="TextInput-module_charCountNormal__LCUr7",L="TextInput-module_charCountNear__OKroK",q="TextInput-module_charCountLimit__iaB20",V="TextInput-module_charCountIcon__lRD-4",F="TextInput-module_charProgressBar__Wva8D",M="TextInput-module_charProgress__ZUsGs",B="TextInput-module_charProgressNormal__TdFY4",U="TextInput-module_charProgressNear__beyMs",Z="TextInput-module_charProgressLimit__Vr6d-",D="TextInput-module_hint__iZiig",G="TextInput-module_requiredHelper__TUGsU",W="TextInput-module_validationMessage__3g-wc",Y="TextInput-module_validationIcon__q5LT6",K="TextInput-module_validationText__-qAuu",J="TextInput-module_validEmail__Ya1tf",Q="TextInput-module_emailSuggestion__ZzQkZ",H="TextInput-module_suggestionButton__Rsxt8",X="TextInput-module_error__ewnmB",ee="TextInput-module_errorIcon__JkIpb",ne="TextInput-module_errorText__ba7lR",te="TextInput-module_passwordStrength__ICyJU",re="TextInput-module_strengthBar__3c8Yf",oe="TextInput-module_strengthSegment__76ih4",ae="TextInput-module_strengthSegmentInactive__RK1Q8",le="TextInput-module_strengthSegmentWeak__BFvgT",se="TextInput-module_strengthSegmentFair__AOJW5",ie="TextInput-module_strengthSegmentGood__uGgTx",ue="TextInput-module_strengthSegmentStrong__vP5Yi",ce="TextInput-module_strengthSegmentVeryStrong__4Tull",me="TextInput-module_strengthLabel__PpEO9",de="TextInput-module_strengthText__jfVUh",pe="TextInput-module_strengthValue__04hhw",_e="TextInput-module_strengthValueWeak__8Ek8Q",ge="TextInput-module_strengthValueFair__70N63",fe="TextInput-module_strengthValueGood__NgsOd",he="TextInput-module_strengthValueStrong__qaKsi",xe="TextInput-module_strengthValueVeryStrong__80d9m",be="TextInput-module_requirements__eD6oz",ye="TextInput-module_requirement__KoZx2",ve="TextInput-module_requirementIcon__VjQXJ",Te="TextInput-module_requirementIconMet__UNZFD",Ie="TextInput-module_requirementIconUnmet__1MF9h",je="TextInput-module_requirementText__fFcdn",ke="TextInput-module_requirementTextMet__eGbSi";!function(e,n){ void 0===n&&(n={});var t=n.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===t&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e));}}("/* Container */\n.TextInput-module_container__QXVA9 {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n}\n\n/* Label */\n.TextInput-module_label__GGFxk {\n display: block;\n font-size: var(--lb-font-size-sm);\n line-height: 1.25rem;\n font-weight: var(--lb-font-weight-medium);\n color: var(--lb-color-neutral-700);\n}\n\n.TextInput-module_required__qlHAH {\n color: var(--lb-color-danger);\n margin-left: 0.25rem;\n}\n\n/* Input container */\n.TextInput-module_inputContainer__-zaWR {\n position: relative;\n}\n\n/* Icon */\n.TextInput-module_icon__F1AYg {\n position: absolute;\n left: 0.75rem;\n top: 50%;\n transform: translateY(-50%);\n color: var(--lb-color-neutral-400);\n pointer-events: none;\n display: flex;\n align-items: center;\n}\n\n/* Input */\n.TextInput-module_input__I8TSn {\n width: 100%;\n box-sizing: border-box;\n padding: 0.5rem 1rem;\n border-radius: var(--lb-radius-md);\n border: 2px solid var(--lb-color-neutral-300);\n transition: all 150ms ease;\n outline: none;\n font-family: var(--lb-font-sans);\n font-weight: var(--lb-font-weight-medium);\n color: var(--lb-color-foreground);\n}\n\n.TextInput-module_input__I8TSn::-moz-placeholder {\n color: var(--lb-color-neutral-400);\n}\n\n.TextInput-module_input__I8TSn::placeholder {\n color: var(--lb-color-neutral-400);\n}\n\n.TextInput-module_inputWithIcon__TDgMC {\n padding-left: 2.5rem;\n}\n\n.TextInput-module_inputWithCharCount__qgvqA {\n padding-right: 5rem;\n}\n\n.TextInput-module_input__I8TSn:hover:not(:disabled) {\n border-color: var(--lb-color-neutral-400);\n}\n\n.TextInput-module_input__I8TSn:focus {\n border-color: var(--lb-color-primary);\n box-shadow: 0 0 0 2px\n color-mix(in srgb, var(--lb-color-ring) 25%, transparent);\n}\n\n.TextInput-module_input__I8TSn:disabled {\n background: var(--lb-color-muted);\n color: var(--lb-color-muted-foreground);\n cursor: not-allowed;\n}\n\n.TextInput-module_inputError__-Ga78 {\n border-color: var(--lb-color-danger);\n}\n\n.TextInput-module_inputError__-Ga78:focus {\n border-color: var(--lb-color-danger);\n box-shadow: 0 0 0 2px\n color-mix(in srgb, var(--lb-color-danger) 25%, transparent);\n}\n\n.TextInput-module_inputSuccess__xsjt7 {\n border-color: var(--lb-color-success);\n}\n\n.TextInput-module_inputSuccess__xsjt7:focus {\n border-color: var(--lb-color-success);\n box-shadow: 0 0 0 2px\n color-mix(in srgb, var(--lb-color-success) 25%, transparent);\n}\n\n/* Character count */\n.TextInput-module_charCount__RyuVm {\n position: absolute;\n right: 0.75rem;\n top: 50%;\n transform: translateY(-50%);\n font-size: 0.75rem;\n line-height: 1rem;\n font-weight: 500;\n display: flex;\n align-items: center;\n gap: 0.25rem;\n}\n\n.TextInput-module_charCountNormal__LCUr7 {\n color: var(--lb-color-muted-foreground);\n}\n\n.TextInput-module_charCountNear__OKroK {\n color: var(--lb-color-warning);\n}\n\n.TextInput-module_charCountLimit__iaB20 {\n color: var(--lb-color-danger);\n}\n\n.TextInput-module_charCountIcon__lRD-4 {\n width: 1rem;\n height: 1rem;\n}\n\n/* Progress bar */\n.TextInput-module_charProgressBar__Wva8D {\n width: 100%;\n height: 0.25rem;\n background: var(--lb-color-neutral-200);\n border-radius: 9999px;\n overflow: hidden;\n}\n\n.TextInput-module_charProgress__ZUsGs {\n height: 100%;\n transition: all 150ms ease;\n border-radius: 9999px;\n}\n\n.TextInput-module_charProgressNormal__TdFY4 {\n background: var(--lb-color-primary);\n}\n\n.TextInput-module_charProgressNear__beyMs {\n background: var(--lb-color-warning);\n}\n\n.TextInput-module_charProgressLimit__Vr6d- {\n background: var(--lb-color-danger);\n}\n\n/* Hint text */\n.TextInput-module_hint__iZiig {\n font-size: 0.75rem;\n line-height: 1rem;\n color: var(--lb-color-muted-foreground);\n margin-top: 0.25rem;\n}\n\n.TextInput-module_requiredHelper__TUGsU {\n font-size: 0.75rem;\n line-height: 1rem;\n color: var(--lb-color-muted-foreground);\n margin-top: 0.25rem;\n}\n\n/* Validation messages */\n.TextInput-module_validationMessage__3g-wc {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n margin-top: 0.25rem;\n}\n\n.TextInput-module_validationIcon__q5LT6 {\n width: 1rem;\n height: 1rem;\n flex-shrink: 0;\n}\n\n.TextInput-module_validationText__-qAuu {\n font-size: 0.75rem;\n line-height: 1rem;\n}\n\n.TextInput-module_validEmail__Ya1tf .TextInput-module_validationIcon__q5LT6 {\n color: var(--lb-color-success);\n}\n\n.TextInput-module_validEmail__Ya1tf .TextInput-module_validationText__-qAuu {\n color: var(--lb-color-success);\n}\n\n.TextInput-module_emailSuggestion__ZzQkZ .TextInput-module_validationIcon__q5LT6 {\n color: var(--lb-color-primary);\n}\n\n.TextInput-module_emailSuggestion__ZzQkZ .TextInput-module_validationText__-qAuu {\n color: var(--lb-color-primary);\n}\n\n.TextInput-module_suggestionButton__Rsxt8 {\n font-weight: 600;\n text-decoration: underline;\n background: none;\n border: none;\n color: inherit;\n cursor: pointer;\n padding: 0;\n}\n\n.TextInput-module_suggestionButton__Rsxt8:hover {\n color: var(--lb-color-primary-hover);\n}\n\n/* Error message */\n.TextInput-module_error__ewnmB {\n display: flex;\n align-items: flex-start;\n gap: 0.5rem;\n margin-top: 0.25rem;\n}\n\n.TextInput-module_errorIcon__JkIpb {\n width: 1rem;\n height: 1rem;\n color: var(--lb-color-danger);\n flex-shrink: 0;\n margin-top: 0.125rem;\n}\n\n.TextInput-module_errorText__ba7lR {\n font-size: 0.875rem;\n line-height: 1.25rem;\n color: var(--lb-color-danger);\n}\n\n/* Password strength */\n.TextInput-module_passwordStrength__ICyJU {\n margin-top: 0.5rem;\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n}\n\n.TextInput-module_strengthBar__3c8Yf {\n display: flex;\n gap: 0.25rem;\n}\n\n.TextInput-module_strengthSegment__76ih4 {\n height: 0.375rem;\n flex: 1;\n border-radius: 9999px;\n transition: background-color 150ms ease;\n}\n\n.TextInput-module_strengthSegmentInactive__RK1Q8 {\n background: var(--lb-color-neutral-200);\n}\n\n.TextInput-module_strengthSegmentWeak__BFvgT {\n background: var(--lb-color-danger);\n}\n\n.TextInput-module_strengthSegmentFair__AOJW5 {\n background: var(--lb-color-warning);\n}\n\n.TextInput-module_strengthSegmentGood__uGgTx {\n background: var(--lb-color-warning);\n}\n\n.TextInput-module_strengthSegmentStrong__vP5Yi {\n background: #84cc16;\n}\n\n.TextInput-module_strengthSegmentVeryStrong__4Tull {\n background: var(--lb-color-success);\n}\n\n.TextInput-module_strengthLabel__PpEO9 {\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n\n.TextInput-module_strengthText__jfVUh {\n font-size: 0.75rem;\n line-height: 1rem;\n color: var(--lb-color-neutral-600);\n}\n\n.TextInput-module_strengthValue__04hhw {\n font-weight: 600;\n}\n\n.TextInput-module_strengthValueWeak__8Ek8Q {\n color: var(--lb-color-danger);\n}\n\n.TextInput-module_strengthValueFair__70N63 {\n color: var(--lb-color-warning);\n}\n\n.TextInput-module_strengthValueGood__NgsOd {\n color: var(--lb-color-amber-accent);\n}\n\n.TextInput-module_strengthValueStrong__qaKsi {\n color: #65a30d;\n}\n\n.TextInput-module_strengthValueVeryStrong__80d9m {\n color: var(--lb-color-success);\n}\n\n/* Requirements checklist */\n.TextInput-module_requirements__eD6oz {\n font-size: 0.75rem;\n line-height: 1rem;\n display: flex;\n flex-direction: column;\n gap: 0.25rem;\n padding: 0.5rem;\n background: var(--lb-color-neutral-50);\n border-radius: 0.375rem;\n border: 1px solid var(--lb-color-neutral-200);\n}\n\n.TextInput-module_requirement__KoZx2 {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n}\n\n.TextInput-module_requirementIcon__VjQXJ {\n width: 0.875rem;\n height: 0.875rem;\n flex-shrink: 0;\n}\n\n.TextInput-module_requirementIconMet__UNZFD {\n color: var(--lb-color-emerald-accent);\n}\n\n.TextInput-module_requirementIconUnmet__1MF9h {\n color: var(--lb-color-neutral-300);\n}\n\n.TextInput-module_requirementText__fFcdn {\n color: var(--lb-color-neutral-500);\n}\n\n.TextInput-module_requirementTextMet__eGbSi {\n color: var(--lb-color-neutral-700);\n}\n");const Se=(...e)=>e.filter(Boolean).join(" "),we=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Ne=({label:e,value:n,onChange:a,placeholder:l,error:s,required:i=false,disabled:u=false,type:c="text",className:m="",hint:d,maxLength:p,minLength:_,minLengthMessage:f,pattern:h,icon:x,onBlur:b,onFocus:I,onValidityChange:j,autoComplete:Ne,validateEmail:Oe=false,showPasswordStrength:ze=false,requiredMessage:Ce,emailValidMessage:Re,emailInvalidMessage:$e,emailSuggestionMessage:Ae,strengthLabels:Ee,strengthLabelPrefix:Pe,requirementsLabels:Le})=>{const[qe,Ve]=require$$0__default.useState(false),Fe=require$$0__default.useMemo(()=>Oe&&n?(e=>{if(!e||!e.includes("@"))return null;const[n,t]=e.split("@");if(!t)return null;const r={"gmial.com":"gmail.com","gmai.com":"gmail.com","gmil.com":"gmail.com","hotmial.com":"hotmail.com","hotmal.com":"hotmail.com","outlok.com":"outlook.com","yahooo.com":"yahoo.com","yaho.com":"yahoo.com"};return r[t.toLowerCase()]?`${n}@${r[t.toLowerCase()]}`:null})(n):null,[Oe,n]),Me=require$$0__default.useMemo(()=>{if(!Oe||!n)return null;return we.test(n)&&!(null!==Fe)},[Oe,n,Fe]),Be=Oe&&n&&!Me&&!Fe,Ue=Be&&$e||null,Ze=Boolean(_&&n.length>0&&n.length<_),De=!_||n.length>=_,Ge=!p||n.length<=p,We=!h||new RegExp(h).test(n),Ye=Boolean(n&&!s&&!Be&&!Fe&&(!i||n.length>0)&&(!Oe||Me)&&De&&Ge&&We),Ke=require$$0__default.useMemo(()=>"password"===c&&ze?(e=>{if(!e)return {score:0,strength:"none"};let n=0;const t=/[A-Z]/.test(e);return /[a-z]/.test(e)&&n++,t&&n++,/\d/.test(e)&&n++,/[!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?]/.test(e)&&n++,e.length>=8&&n++,n<=1?{score:n,strength:"weak"}:n<=2?{score:n,strength:"fair"}:n<=3?{score:n,strength:"good"}:4===n?{score:n,strength:"strong"}:{score:n,strength:"very-strong"}})(n):null,[c,n,ze]),Je=Boolean(!u&&!s&&(!i||n.trim().length>0)&&(!Oe||Me)&&De&&Ge&&We);require$$0__default.useEffect(()=>{j?.(Je);},[Je,j]);const Qe=p&&"text"===c&&n,He=n.length,Xe=p?He/p*100:0,en=Xe>80,nn=Xe>=100;return g.jsxs("div",{className:Se(k,m),"data-testid":"text-input",children:[e&&g.jsxs("label",{className:S,children:[e,i&&g.jsx("span",{className:w,children:"*"})]}),g.jsxs("div",{className:N,children:[x&&!qe&&g.jsx("div",{className:O,children:x}),g.jsx("input",{type:Oe?"text":c,inputMode:Oe?"email":void 0,value:n,onChange:e=>a(e.target.value),onFocus:()=>{Ve(true),I?.();},onBlur:()=>{Ve(false),b?.();},placeholder:l,disabled:u,maxLength:p,minLength:_,pattern:h,autoComplete:Ne,className:Se(z,x?C:void 0,Qe?R:void 0,s||Be||Ze?$:void 0,u||s||Ue||!Ye?void 0:A),"data-testid":"input-field","data-error":!!s||!!Be||Ze}),Qe&&g.jsxs("div",{className:Se(E,nn?q:en?L:P),"data-testid":"char-count",children:[g.jsxs("div",{children:[He,"/",p]}),nn&&g.jsx(v,{className:V,size:"sm"})]})]}),Qe&&p>20&&g.jsx("div",{className:F,children:g.jsx("div",{className:Se(M,nn?Z:en?U:B),style:{width:`${Math.min(Xe,100)}%`}})}),d&&!s&&!Be&&g.jsx("p",{className:D,children:d}),i&&!n&&!s&&!Be&&Ce&&g.jsx("p",{className:G,children:Ce}),Oe&&n&&Me&&Re&&g.jsxs("div",{className:Se(W,J),children:[g.jsx(y,{className:Y,size:"sm"}),g.jsx("p",{className:K,children:Re})]}),Fe&&!s&&Ae&&g.jsxs("div",{className:Se(W,Q),children:[g.jsx(T,{className:Y,size:"sm"}),g.jsxs("p",{className:K,children:[Ae.replace("{suggestion}",Fe),g.jsx("button",{type:"button",onClick:()=>a(Fe),className:H,children:Fe})]})]}),Ke&&Ke.score>0&&g.jsxs("div",{className:te,children:[g.jsx("div",{className:re,children:[0,1,2,3,4].map(e=>g.jsx("div",{className:Se(oe,e<Ke.score?"weak"===Ke.strength?le:"fair"===Ke.strength?se:"good"===Ke.strength?ie:"strong"===Ke.strength?ue:ce:ae)},e))}),(Pe||Ee?.[Ke.strength])&&g.jsx("div",{className:me,children:g.jsxs("p",{className:de,children:[Pe&&`${Pe} `,g.jsx("span",{className:Se(pe,"weak"===Ke.strength?_e:"fair"===Ke.strength?ge:"good"===Ke.strength?fe:"strong"===Ke.strength?he:xe),children:Ee?.[Ke.strength]})]})}),Le&&g.jsxs("div",{className:be,children:[Le.lowercase&&g.jsxs("div",{className:ye,children:[g.jsx(y,{className:Se(ve,/[a-z]/.test(n)?Te:Ie),size:"sm"}),g.jsx("span",{className:Se(je,/[a-z]/.test(n)&&ke),children:Le.lowercase})]}),Le.uppercase&&g.jsxs("div",{className:ye,children:[g.jsx(y,{className:Se(ve,/[A-Z]/.test(n)?Te:Ie),size:"sm"}),g.jsx("span",{className:Se(je,/[A-Z]/.test(n)&&ke),children:Le.uppercase})]}),Le.number&&g.jsxs("div",{className:ye,children:[g.jsx(y,{className:Se(ve,/\d/.test(n)?Te:Ie),size:"sm"}),g.jsx("span",{className:Se(je,/\d/.test(n)&&ke),children:Le.number})]}),Le.special&&g.jsxs("div",{className:ye,children:[g.jsx(y,{className:Se(ve,/[!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?]/.test(n)?Te:Ie),size:"sm"}),g.jsx("span",{className:Se(je,/[!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?]/.test(n)&&ke),children:Le.special})]}),Le.minLength&&g.jsxs("div",{className:ye,children:[g.jsx(y,{className:Se(ve,n.length>=8?Te:Ie),size:"sm"}),g.jsx("span",{className:Se(je,n.length>=8&&ke),children:Le.minLength})]})]})]}),(s||Be&&$e||Ze&&f)&&g.jsxs("div",{className:X,children:[g.jsx(v,{className:ee,size:"sm"}),g.jsx("p",{className:ne,children:s||(Be?$e:f)})]})]})};
1644
+ */function d(){return i||(i=1,"production"!==process.env.NODE_ENV&&function(){function n(e){if(null==e)return null;if("function"==typeof e)return e.$$typeof===k?null:e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case g:return "Fragment";case h:return "Profiler";case f:return "StrictMode";case v:return "Suspense";case T:return "SuspenseList";case w:return "Activity"}if("object"==typeof e)switch("number"==typeof e.tag&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case _:return "Portal";case b:return e.displayName||"Context";case x:return (e._context.displayName||"Context")+".Consumer";case y:var t=e.render;return (e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case I:return null!==(t=e.displayName||null)?t:n(e.type)||"Memo";case j:t=e._payload,e=e._init;try{return n(e(t))}catch(e){}}return null}function t(e){return ""+e}function r(e){try{t(e);var n=!1;}catch(e){n=true;}if(n){var r=(n=console).error,o="function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return r.call(n,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",o),t(e)}}function o(e){if(e===g)return "<>";if("object"==typeof e&&null!==e&&e.$$typeof===j)return "<...>";try{var t=n(e);return t?"<"+t+">":"<...>"}catch(e){return "<...>"}}function a(){return Error("react-stack-top-frame")}function l(){var e=n(this.type);return C[e]||(C[e]=true,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),void 0!==(e=this.props.ref)?e:null}function s(e,t,o,a,s,u){var c,m=t.children;if(void 0!==m)if(a)if(O(m)){for(a=0;a<m.length;a++)i(m[a]);Object.freeze&&Object.freeze(m);}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else i(m);if(N.call(t,"key")){m=n(e);var _=Object.keys(t).filter(function(e){return "key"!==e});a=0<_.length?"{key: someKey, "+_.join(": ..., ")+": ...}":"{key: someKey}",E[m+a]||(_=0<_.length?"{"+_.join(": ..., ")+": ...}":"{}",console.error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',a,m,_,m),E[m+a]=true);}if(m=null,void 0!==o&&(r(o),m=""+o),function(e){if(N.call(e,"key")){var n=Object.getOwnPropertyDescriptor(e,"key").get;if(n&&n.isReactWarning)return false}return void 0!==e.key}(t)&&(r(t.key),m=""+t.key),"key"in t)for(var g in o={},t)"key"!==g&&(o[g]=t[g]);else o=t;return m&&function(e,n){function t(){d||(d=true,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",n));}t.isReactWarning=true,Object.defineProperty(e,"key",{get:t,configurable:true});}(o,"function"==typeof e?e.displayName||e.name||"Unknown":e),function(e,n,t,r,o,a){var s=t.ref;return e={$$typeof:p,type:e,key:n,props:t,_owner:r},null!==(void 0!==s?s:null)?Object.defineProperty(e,"ref",{enumerable:false,get:l}):Object.defineProperty(e,"ref",{enumerable:false,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:false,enumerable:false,writable:true,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:false,enumerable:false,writable:true,value:null}),Object.defineProperty(e,"_debugStack",{configurable:false,enumerable:false,writable:true,value:o}),Object.defineProperty(e,"_debugTask",{configurable:false,enumerable:false,writable:true,value:a}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}(e,m,o,null===(c=S.A)?null:c.getOwner(),s,u)}function i(e){u(e)?e._store&&(e._store.validated=1):"object"==typeof e&&null!==e&&e.$$typeof===j&&("fulfilled"===e._payload.status?u(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1));}function u(e){return "object"==typeof e&&null!==e&&e.$$typeof===p}var d,m=require$$0__default,p=Symbol.for("react.transitional.element"),_=Symbol.for("react.portal"),g=Symbol.for("react.fragment"),f=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),x=Symbol.for("react.consumer"),b=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),w=Symbol.for("react.activity"),k=Symbol.for("react.client.reference"),S=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,N=Object.prototype.hasOwnProperty,O=Array.isArray,z=console.createTask?console.createTask:function(){return null},C={},R=(m={react_stack_bottom_frame:function(e){return e()}}).react_stack_bottom_frame.bind(m,a)(),A=z(o(a)),E={};c.Fragment=g,c.jsx=function(e,n,t){var r=1e4>S.recentlyCreatedOwnerStacks++;return s(e,n,t,false,r?Error("react-stack-top-frame"):R,r?z(o(e)):A)},c.jsxs=function(e,n,t){var r=1e4>S.recentlyCreatedOwnerStacks++;return s(e,n,t,true,r?Error("react-stack-top-frame"):R,r?z(o(e)):A)};}()),c}var m,p=(u||(u=1,"production"===process.env.NODE_ENV?l.exports=function(){if(a)return s;a=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function t(n,t,r){var o=null;if(void 0!==r&&(o=""+r),void 0!==t.key&&(o=""+t.key),"key"in t)for(var a in r={},t)"key"!==a&&(r[a]=t[a]);else r=t;return t=r.ref,{$$typeof:e,type:n,key:o,ref:void 0!==t?t:null,props:r}}return s.Fragment=n,s.jsx=t,s.jsxs=t,s}():l.exports=d()),l.exports),_={exports:{}},g={};var f,h,x={};
1645
+ /**
1646
+ * @license React
1647
+ * react-jsx-runtime.development.js
1648
+ *
1649
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
1650
+ *
1651
+ * This source code is licensed under the MIT license found in the
1652
+ * LICENSE file in the root directory of this source tree.
1653
+ */var b=(h||(h=1,"production"===process.env.NODE_ENV?_.exports=function(){if(m)return g;m=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function t(n,t,r){var o=null;if(void 0!==r&&(o=""+r),void 0!==t.key&&(o=""+t.key),"key"in t)for(var a in r={},t)"key"!==a&&(r[a]=t[a]);else r=t;return t=r.ref,{$$typeof:e,type:n,key:o,ref:void 0!==t?t:null,props:r}}return g.Fragment=n,g.jsx=t,g.jsxs=t,g}():_.exports=(f||(f=1,"production"!==process.env.NODE_ENV&&function(){function n(e){if(null==e)return null;if("function"==typeof e)return e.$$typeof===k?null:e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case _:return "Fragment";case f:return "Profiler";case g:return "StrictMode";case v:return "Suspense";case T:return "SuspenseList";case w:return "Activity"}if("object"==typeof e)switch("number"==typeof e.tag&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case p:return "Portal";case b:return e.displayName||"Context";case h:return (e._context.displayName||"Context")+".Consumer";case y:var t=e.render;return (e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case I:return null!==(t=e.displayName||null)?t:n(e.type)||"Memo";case j:t=e._payload,e=e._init;try{return n(e(t))}catch(e){}}return null}function t(e){return ""+e}function r(e){try{t(e);var n=!1;}catch(e){n=true;}if(n){var r=(n=console).error,o="function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return r.call(n,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",o),t(e)}}function o(e){if(e===_)return "<>";if("object"==typeof e&&null!==e&&e.$$typeof===j)return "<...>";try{var t=n(e);return t?"<"+t+">":"<...>"}catch(e){return "<...>"}}function a(){return Error("react-stack-top-frame")}function l(){var e=n(this.type);return C[e]||(C[e]=true,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),void 0!==(e=this.props.ref)?e:null}function s(e,t,o,a,s,u){var d,p=t.children;if(void 0!==p)if(a)if(O(p)){for(a=0;a<p.length;a++)i(p[a]);Object.freeze&&Object.freeze(p);}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else i(p);if(N.call(t,"key")){p=n(e);var _=Object.keys(t).filter(function(e){return "key"!==e});a=0<_.length?"{key: someKey, "+_.join(": ..., ")+": ...}":"{key: someKey}",E[p+a]||(_=0<_.length?"{"+_.join(": ..., ")+": ...}":"{}",console.error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',a,p,_,p),E[p+a]=true);}if(p=null,void 0!==o&&(r(o),p=""+o),function(e){if(N.call(e,"key")){var n=Object.getOwnPropertyDescriptor(e,"key").get;if(n&&n.isReactWarning)return false}return void 0!==e.key}(t)&&(r(t.key),p=""+t.key),"key"in t)for(var g in o={},t)"key"!==g&&(o[g]=t[g]);else o=t;return p&&function(e,n){function t(){c||(c=true,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",n));}t.isReactWarning=true,Object.defineProperty(e,"key",{get:t,configurable:true});}(o,"function"==typeof e?e.displayName||e.name||"Unknown":e),function(e,n,t,r,o,a){var s=t.ref;return e={$$typeof:m,type:e,key:n,props:t,_owner:r},null!==(void 0!==s?s:null)?Object.defineProperty(e,"ref",{enumerable:false,get:l}):Object.defineProperty(e,"ref",{enumerable:false,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:false,enumerable:false,writable:true,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:false,enumerable:false,writable:true,value:null}),Object.defineProperty(e,"_debugStack",{configurable:false,enumerable:false,writable:true,value:o}),Object.defineProperty(e,"_debugTask",{configurable:false,enumerable:false,writable:true,value:a}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}(e,p,o,null===(d=S.A)?null:d.getOwner(),s,u)}function i(e){u(e)?e._store&&(e._store.validated=1):"object"==typeof e&&null!==e&&e.$$typeof===j&&("fulfilled"===e._payload.status?u(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1));}function u(e){return "object"==typeof e&&null!==e&&e.$$typeof===m}var c,d=require$$0__default,m=Symbol.for("react.transitional.element"),p=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),g=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),h=Symbol.for("react.consumer"),b=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),w=Symbol.for("react.activity"),k=Symbol.for("react.client.reference"),S=d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,N=Object.prototype.hasOwnProperty,O=Array.isArray,z=console.createTask?console.createTask:function(){return null},C={},R=(d={react_stack_bottom_frame:function(e){return e()}}).react_stack_bottom_frame.bind(d,a)(),A=z(o(a)),E={};x.Fragment=_,x.jsx=function(e,n,t){var r=1e4>S.recentlyCreatedOwnerStacks++;return s(e,n,t,false,r?Error("react-stack-top-frame"):R,r?z(o(e)):A)},x.jsxs=function(e,n,t){var r=1e4>S.recentlyCreatedOwnerStacks++;return s(e,n,t,true,r?Error("react-stack-top-frame"):R,r?z(o(e)):A)};}()),x)),_.exports);function y({className:e="",size:n="md"}){const t={sm:16,md:20,lg:24},r=`${{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"}[n]} ${e}`;return b.jsx("svg",{width:t[n],height:t[n],xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:r,"aria-hidden":"true",children:b.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})})}const v=({className:e="",size:n="md"})=>{const t={sm:16,md:20,lg:24},r=`${{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"}[n]} ${e}`;return b.jsx("svg",{width:t[n],height:t[n],className:r,viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:b.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})})},T=({className:e="",size:n="md"})=>{const t={sm:16,md:20,lg:24},r=`${{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"}[n]} ${e}`;return b.jsx("svg",{width:t[n],height:t[n],xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:r,"aria-hidden":"true",children:b.jsx("path",{d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})};var I="TextInput-module_container__QXVA9",j="TextInput-module_label__GGFxk",w="TextInput-module_required__qlHAH",k="TextInput-module_inputContainer__-zaWR",S="TextInput-module_icon__F1AYg",N="TextInput-module_input__I8TSn",O="TextInput-module_inputWithIcon__TDgMC",z="TextInput-module_inputWithCharCount__qgvqA",C="TextInput-module_inputError__-Ga78",R="TextInput-module_inputSuccess__xsjt7",A="TextInput-module_charCount__RyuVm",E="TextInput-module_charCountNormal__LCUr7",P="TextInput-module_charCountNear__OKroK",$="TextInput-module_charCountLimit__iaB20",q="TextInput-module_charCountIcon__lRD-4",L="TextInput-module_charProgressBar__Wva8D",F="TextInput-module_charProgress__ZUsGs",V="TextInput-module_charProgressNormal__TdFY4",M="TextInput-module_charProgressNear__beyMs",B="TextInput-module_charProgressLimit__Vr6d-",U="TextInput-module_hint__iZiig",Z="TextInput-module_requiredHelper__TUGsU",D="TextInput-module_validationMessage__3g-wc",G="TextInput-module_validationIcon__q5LT6",W="TextInput-module_validationText__-qAuu",Y="TextInput-module_validEmail__Ya1tf",K="TextInput-module_emailSuggestion__ZzQkZ",J="TextInput-module_suggestionButton__Rsxt8",Q="TextInput-module_error__ewnmB",X="TextInput-module_errorIcon__JkIpb",H="TextInput-module_errorText__ba7lR",ee="TextInput-module_passwordStrength__ICyJU",ne="TextInput-module_strengthBar__3c8Yf",te="TextInput-module_strengthSegment__76ih4",re="TextInput-module_strengthSegmentInactive__RK1Q8",oe="TextInput-module_strengthSegmentWeak__BFvgT",ae="TextInput-module_strengthSegmentFair__AOJW5",le="TextInput-module_strengthSegmentGood__uGgTx",se="TextInput-module_strengthSegmentStrong__vP5Yi",ie="TextInput-module_strengthSegmentVeryStrong__4Tull",ue="TextInput-module_strengthLabel__PpEO9",ce="TextInput-module_strengthText__jfVUh",de="TextInput-module_strengthValue__04hhw",me="TextInput-module_strengthValueWeak__8Ek8Q",pe="TextInput-module_strengthValueFair__70N63",_e="TextInput-module_strengthValueGood__NgsOd",ge="TextInput-module_strengthValueStrong__qaKsi",fe="TextInput-module_strengthValueVeryStrong__80d9m",he="TextInput-module_requirements__eD6oz",xe="TextInput-module_requirement__KoZx2",be="TextInput-module_requirementIcon__VjQXJ",ye="TextInput-module_requirementIconMet__UNZFD",ve="TextInput-module_requirementIconUnmet__1MF9h",Te="TextInput-module_requirementText__fFcdn",Ie="TextInput-module_requirementTextMet__eGbSi",je="TextInput-module_warning__ywIFl";!function(e,n){ void 0===n&&(n={});var t=n.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===t&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e));}}("/* Container */\n.TextInput-module_container__QXVA9 {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n}\n\n/* Label */\n.TextInput-module_label__GGFxk {\n display: block;\n font-size: var(--lb-font-size-sm);\n line-height: 1.25rem;\n font-weight: var(--lb-font-weight-medium);\n color: var(--lb-color-neutral-700);\n}\n\n.TextInput-module_required__qlHAH {\n color: var(--lb-color-danger);\n margin-left: 0.25rem;\n}\n\n/* Input container */\n.TextInput-module_inputContainer__-zaWR {\n position: relative;\n}\n\n/* Icon */\n.TextInput-module_icon__F1AYg {\n position: absolute;\n left: 0.75rem;\n top: 50%;\n transform: translateY(-50%);\n color: var(--lb-color-neutral-400);\n pointer-events: none;\n display: flex;\n align-items: center;\n}\n\n/* Input */\n.TextInput-module_input__I8TSn {\n width: 100%;\n box-sizing: border-box;\n padding: 0.5rem 1rem;\n border-radius: var(--lb-radius-md);\n border: 2px solid var(--lb-color-neutral-300);\n transition: all 150ms ease;\n outline: none;\n font-family: var(--lb-font-sans);\n font-weight: var(--lb-font-weight-medium);\n color: var(--lb-color-foreground);\n}\n\n.TextInput-module_input__I8TSn::-moz-placeholder {\n color: var(--lb-color-neutral-400);\n}\n\n.TextInput-module_input__I8TSn::placeholder {\n color: var(--lb-color-neutral-400);\n}\n\n.TextInput-module_inputWithIcon__TDgMC {\n padding-left: 2.5rem;\n}\n\n.TextInput-module_inputWithCharCount__qgvqA {\n padding-right: 5rem;\n}\n\n.TextInput-module_input__I8TSn:hover:not(:disabled) {\n border-color: var(--lb-color-neutral-400);\n}\n\n.TextInput-module_input__I8TSn:focus {\n border-color: var(--lb-color-primary);\n box-shadow: 0 0 0 2px\n color-mix(in srgb, var(--lb-color-ring) 25%, transparent);\n}\n\n.TextInput-module_input__I8TSn:disabled {\n background: var(--lb-color-muted);\n color: var(--lb-color-muted-foreground);\n cursor: not-allowed;\n}\n\n.TextInput-module_inputError__-Ga78 {\n border-color: var(--lb-color-danger);\n}\n\n.TextInput-module_inputError__-Ga78:focus {\n border-color: var(--lb-color-danger);\n box-shadow: 0 0 0 2px\n color-mix(in srgb, var(--lb-color-danger) 25%, transparent);\n}\n\n.TextInput-module_inputSuccess__xsjt7 {\n border-color: var(--lb-color-success);\n}\n\n.TextInput-module_inputSuccess__xsjt7:focus {\n border-color: var(--lb-color-success);\n box-shadow: 0 0 0 2px\n color-mix(in srgb, var(--lb-color-success) 25%, transparent);\n}\n\n/* Character count */\n.TextInput-module_charCount__RyuVm {\n position: absolute;\n right: 0.75rem;\n top: 50%;\n transform: translateY(-50%);\n font-size: 0.75rem;\n line-height: 1rem;\n font-weight: 500;\n display: flex;\n align-items: center;\n gap: 0.25rem;\n}\n\n.TextInput-module_charCountNormal__LCUr7 {\n color: var(--lb-color-muted-foreground);\n}\n\n.TextInput-module_charCountNear__OKroK {\n color: var(--lb-color-warning);\n}\n\n.TextInput-module_charCountLimit__iaB20 {\n color: var(--lb-color-danger);\n}\n\n.TextInput-module_charCountIcon__lRD-4 {\n width: 1rem;\n height: 1rem;\n}\n\n/* Progress bar */\n.TextInput-module_charProgressBar__Wva8D {\n width: 100%;\n height: 0.25rem;\n background: var(--lb-color-neutral-200);\n border-radius: 9999px;\n overflow: hidden;\n}\n\n.TextInput-module_charProgress__ZUsGs {\n height: 100%;\n transition: all 150ms ease;\n border-radius: 9999px;\n}\n\n.TextInput-module_charProgressNormal__TdFY4 {\n background: var(--lb-color-primary);\n}\n\n.TextInput-module_charProgressNear__beyMs {\n background: var(--lb-color-warning);\n}\n\n.TextInput-module_charProgressLimit__Vr6d- {\n background: var(--lb-color-danger);\n}\n\n/* Hint text */\n.TextInput-module_hint__iZiig {\n font-size: 0.75rem;\n line-height: 1rem;\n color: var(--lb-color-muted-foreground);\n margin-top: 0.25rem;\n}\n\n.TextInput-module_requiredHelper__TUGsU {\n font-size: 0.75rem;\n line-height: 1rem;\n color: var(--lb-color-muted-foreground);\n margin-top: 0.25rem;\n}\n\n/* Validation messages */\n.TextInput-module_validationMessage__3g-wc {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n margin-top: 0.25rem;\n}\n\n.TextInput-module_validationIcon__q5LT6 {\n width: 1rem;\n height: 1rem;\n flex-shrink: 0;\n}\n\n.TextInput-module_validationText__-qAuu {\n font-size: 0.75rem;\n line-height: 1rem;\n}\n\n.TextInput-module_validEmail__Ya1tf .TextInput-module_validationIcon__q5LT6 {\n color: var(--lb-color-success);\n}\n\n.TextInput-module_validEmail__Ya1tf .TextInput-module_validationText__-qAuu {\n color: var(--lb-color-success);\n}\n\n.TextInput-module_emailSuggestion__ZzQkZ .TextInput-module_validationIcon__q5LT6 {\n color: var(--lb-color-primary);\n}\n\n.TextInput-module_emailSuggestion__ZzQkZ .TextInput-module_validationText__-qAuu {\n color: var(--lb-color-primary);\n}\n\n.TextInput-module_suggestionButton__Rsxt8 {\n font-weight: 600;\n text-decoration: underline;\n background: none;\n border: none;\n color: inherit;\n cursor: pointer;\n padding: 0;\n}\n\n.TextInput-module_suggestionButton__Rsxt8:hover {\n color: var(--lb-color-primary-hover);\n}\n\n/* Error message */\n.TextInput-module_error__ewnmB {\n display: flex;\n align-items: flex-start;\n gap: 0.5rem;\n margin-top: 0.25rem;\n}\n\n.TextInput-module_errorIcon__JkIpb {\n width: 1rem;\n height: 1rem;\n color: var(--lb-color-danger);\n flex-shrink: 0;\n margin-top: 0.125rem;\n}\n\n.TextInput-module_errorText__ba7lR {\n font-size: 0.875rem;\n line-height: 1.25rem;\n color: var(--lb-color-danger);\n}\n\n/* Password strength */\n.TextInput-module_passwordStrength__ICyJU {\n margin-top: 0.5rem;\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n}\n\n.TextInput-module_strengthBar__3c8Yf {\n display: flex;\n gap: 0.25rem;\n}\n\n.TextInput-module_strengthSegment__76ih4 {\n height: 0.375rem;\n flex: 1;\n border-radius: 9999px;\n transition: background-color 150ms ease;\n}\n\n.TextInput-module_strengthSegmentInactive__RK1Q8 {\n background: var(--lb-color-neutral-200);\n}\n\n.TextInput-module_strengthSegmentWeak__BFvgT {\n background: var(--lb-color-danger);\n}\n\n.TextInput-module_strengthSegmentFair__AOJW5 {\n background: var(--lb-color-warning);\n}\n\n.TextInput-module_strengthSegmentGood__uGgTx {\n background: var(--lb-color-warning);\n}\n\n.TextInput-module_strengthSegmentStrong__vP5Yi {\n background: var(--lb-color-emerald-accent);\n}\n\n.TextInput-module_strengthSegmentVeryStrong__4Tull {\n background: var(--lb-color-success);\n}\n\n.TextInput-module_strengthLabel__PpEO9 {\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n\n.TextInput-module_strengthText__jfVUh {\n font-size: 0.75rem;\n line-height: 1rem;\n color: var(--lb-color-neutral-600);\n}\n\n.TextInput-module_strengthValue__04hhw {\n font-weight: 600;\n}\n\n.TextInput-module_strengthValueWeak__8Ek8Q {\n color: var(--lb-color-danger);\n}\n\n.TextInput-module_strengthValueFair__70N63 {\n color: var(--lb-color-warning);\n}\n\n.TextInput-module_strengthValueGood__NgsOd {\n color: var(--lb-color-amber-accent);\n}\n\n.TextInput-module_strengthValueStrong__qaKsi {\n color: var(--lb-color-emerald-strong);\n}\n\n.TextInput-module_strengthValueVeryStrong__80d9m {\n color: var(--lb-color-success);\n}\n\n/* Requirements checklist */\n.TextInput-module_requirements__eD6oz {\n font-size: 0.75rem;\n line-height: 1rem;\n display: flex;\n flex-direction: column;\n gap: 0.25rem;\n padding: 0.5rem;\n background: var(--lb-color-neutral-50);\n border-radius: 0.375rem;\n border: 1px solid var(--lb-color-neutral-200);\n}\n\n.TextInput-module_requirement__KoZx2 {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n}\n\n.TextInput-module_requirementIcon__VjQXJ {\n width: 0.875rem;\n height: 0.875rem;\n flex-shrink: 0;\n}\n\n.TextInput-module_requirementIconMet__UNZFD {\n color: var(--lb-color-emerald-accent);\n}\n\n.TextInput-module_requirementIconUnmet__1MF9h {\n color: var(--lb-color-neutral-300);\n}\n\n.TextInput-module_requirementText__fFcdn {\n color: var(--lb-color-neutral-500);\n}\n\n.TextInput-module_requirementTextMet__eGbSi {\n color: var(--lb-color-neutral-700);\n}\n\n/* Advertencia (no bloquea el envío) */\n.TextInput-module_warning__ywIFl {\n font-size: var(--lb-font-size-xs);\n line-height: var(--lb-line-height-normal);\n color: var(--lb-color-amber-strong);\n margin-top: var(--lb-space-1);\n}\n");const we=(...e)=>e.filter(Boolean).join(" "),ke=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Se=require$$0__default.forwardRef(function({id:e,name:a,label:l,value:s,onChange:i,placeholder:u,error:c,warning:d,required:m=false,disabled:_=false,type:g="text",className:f="",hint:h,maxLength:x,minLength:b,minLengthMessage:Se,pattern:Ne,icon:Oe,onBlur:ze,onFocus:Ce,onValidityChange:Re,autoComplete:Ae,validateEmail:Ee=false,showPasswordStrength:Pe=false,requiredMessage:$e,emailValidMessage:qe,emailInvalidMessage:Le,emailSuggestionMessage:Fe,strengthLabels:Ve,strengthLabelPrefix:Me,requirementsLabels:Be},Ue){const[Ze,De]=require$$0__default.useState(false),Ge=require$$0__default.useMemo(()=>Ee&&s?(e=>{if(!e||!e.includes("@"))return null;const[n,t]=e.split("@");if(!t)return null;const r={"gmial.com":"gmail.com","gmai.com":"gmail.com","gmil.com":"gmail.com","hotmial.com":"hotmail.com","hotmal.com":"hotmail.com","outlok.com":"outlook.com","yahooo.com":"yahoo.com","yaho.com":"yahoo.com"};return r[t.toLowerCase()]?`${n}@${r[t.toLowerCase()]}`:null})(s):null,[Ee,s]),We=require$$0__default.useMemo(()=>{if(!Ee||!s)return null;return ke.test(s)&&!(null!==Ge)},[Ee,s,Ge]),Ye=Ee&&s&&!We&&!Ge,Ke=Ye&&Le||null,Je=Boolean(b&&s.length>0&&s.length<b),Qe=!b||s.length>=b,Xe=!x||s.length<=x,He=!Ne||new RegExp(Ne).test(s),en=Boolean(s&&!c&&!Ye&&!Ge&&(!m||s.length>0)&&(!Ee||We)&&Qe&&Xe&&He),nn=require$$0__default.useMemo(()=>"password"===g&&Pe?(e=>{if(!e)return {score:0,strength:"none"};let n=0;const t=/[A-Z]/.test(e);return /[a-z]/.test(e)&&n++,t&&n++,/\d/.test(e)&&n++,/[!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?]/.test(e)&&n++,e.length>=8&&n++,n<=1?{score:n,strength:"weak"}:n<=2?{score:n,strength:"fair"}:n<=3?{score:n,strength:"good"}:4===n?{score:n,strength:"strong"}:{score:n,strength:"very-strong"}})(s):null,[g,s,Pe]),tn=Boolean(!_&&!c&&(!m||s.trim().length>0)&&(!Ee||We)&&Qe&&Xe&&He);require$$0__default.useEffect(()=>{Re?.(tn);},[tn,Re]);const rn=x&&"text"===g&&s,on=s.length,an=x?on/x*100:0,ln=an>80,sn=an>=100,un=c||Ye&&Le||Je&&Se||void 0,cn=Boolean(h&&!c&&!Ye),dn=shared.useFieldIds({id:e,name:a,required:m,error:un||void 0,warning:un?void 0:d,hint:cn?h:void 0});return p.jsxs("div",{className:we(I,f),"data-testid":"text-input",children:[l&&p.jsxs("label",{htmlFor:dn.inputId,className:j,children:[l,m&&p.jsx("span",{className:w,"aria-hidden":"true",children:"*"})]}),p.jsxs("div",{className:k,children:[Oe&&!Ze&&p.jsx("div",{className:S,children:Oe}),p.jsx("input",{ref:Ue,...dn.controlProps,name:a,required:m,type:Ee?"text":g,inputMode:Ee?"email":void 0,value:s,onChange:e=>i(e.target.value),onFocus:()=>{De(true),Ce?.();},onBlur:()=>{De(false),ze?.();},placeholder:u,disabled:_,maxLength:x,minLength:b,pattern:Ne,autoComplete:Ae,className:we(N,Oe?O:void 0,rn?z:void 0,c||Ye||Je?C:void 0,_||c||Ke||!en?void 0:R),"data-testid":"input-field","data-error":!!c||!!Ye||Je}),rn&&p.jsxs("div",{className:we(A,sn?$:ln?P:E),"data-testid":"char-count",children:[p.jsxs("div",{children:[on,"/",x]}),sn&&p.jsx(v,{className:q,size:"sm"})]})]}),rn&&x>20&&p.jsx("div",{className:L,children:p.jsx("div",{className:we(F,sn?B:ln?M:V),style:{width:`${Math.min(an,100)}%`}})}),cn&&p.jsx("p",{id:dn.hintId,className:U,children:h}),d&&!un&&p.jsx("p",{id:dn.warningId,className:je,children:d}),m&&!s&&!c&&!Ye&&$e&&p.jsx("p",{className:Z,children:$e}),Ee&&s&&We&&qe&&p.jsxs("div",{className:we(D,Y),children:[p.jsx(y,{className:G,size:"sm"}),p.jsx("p",{className:W,children:qe})]}),Ge&&!c&&Fe&&p.jsxs("div",{className:we(D,K),children:[p.jsx(T,{className:G,size:"sm"}),p.jsxs("p",{className:W,children:[Fe.replace("{suggestion}",Ge),p.jsx("button",{type:"button",onClick:()=>i(Ge),className:J,children:Ge})]})]}),nn&&nn.score>0&&p.jsxs("div",{className:ee,children:[p.jsx("div",{className:ne,children:[0,1,2,3,4].map(e=>p.jsx("div",{className:we(te,e<nn.score?"weak"===nn.strength?oe:"fair"===nn.strength?ae:"good"===nn.strength?le:"strong"===nn.strength?se:ie:re)},e))}),(Me||Ve?.[nn.strength])&&p.jsx("div",{className:ue,children:p.jsxs("p",{className:ce,children:[Me&&`${Me} `,p.jsx("span",{className:we(de,"weak"===nn.strength?me:"fair"===nn.strength?pe:"good"===nn.strength?_e:"strong"===nn.strength?ge:fe),children:Ve?.[nn.strength]})]})}),Be&&p.jsxs("div",{className:he,children:[Be.lowercase&&p.jsxs("div",{className:xe,children:[p.jsx(y,{className:we(be,/[a-z]/.test(s)?ye:ve),size:"sm"}),p.jsx("span",{className:we(Te,/[a-z]/.test(s)&&Ie),children:Be.lowercase})]}),Be.uppercase&&p.jsxs("div",{className:xe,children:[p.jsx(y,{className:we(be,/[A-Z]/.test(s)?ye:ve),size:"sm"}),p.jsx("span",{className:we(Te,/[A-Z]/.test(s)&&Ie),children:Be.uppercase})]}),Be.number&&p.jsxs("div",{className:xe,children:[p.jsx(y,{className:we(be,/\d/.test(s)?ye:ve),size:"sm"}),p.jsx("span",{className:we(Te,/\d/.test(s)&&Ie),children:Be.number})]}),Be.special&&p.jsxs("div",{className:xe,children:[p.jsx(y,{className:we(be,/[!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?]/.test(s)?ye:ve),size:"sm"}),p.jsx("span",{className:we(Te,/[!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?]/.test(s)&&Ie),children:Be.special})]}),Be.minLength&&p.jsxs("div",{className:xe,children:[p.jsx(y,{className:we(be,s.length>=8?ye:ve),size:"sm"}),p.jsx("span",{className:we(Te,s.length>=8&&Ie),children:Be.minLength})]})]})]}),un&&p.jsxs("div",{id:dn.errorId,className:Q,role:"alert",children:[p.jsx(v,{className:X,size:"sm"}),p.jsx("p",{className:H,children:un})]})]})});Se.displayName="TextInput";
1595
1654
 
1596
1655
  function styleInject(css, ref) {
1597
1656
  if ( ref === void 0 ) ref = {};
@@ -1669,7 +1728,17 @@ const getIdentificationHint = (type) => {
1669
1728
  return PERU_IDENTIFICATION_DOCS[type]?.hint ?? "";
1670
1729
  };
1671
1730
 
1672
- const IdentificationInput = ({ documentType, onDocumentTypeChange, identificationNumber, onIdentificationNumberChange, documentTypeError, identificationNumberError, required = false, disabled = false, labels, className = "", }) => {
1731
+ const DEFAULT_IDENTIFICATION_LABELS = {
1732
+ documentType: "Tipo de documento",
1733
+ selectDocumentType: "Selecciona el tipo de documento",
1734
+ documentTypeHint: "DNI, carné de extranjería, RUC o pasaporte",
1735
+ identificationNumber: "Número de documento",
1736
+ };
1737
+ /** El `ref` apunta al campo del número de documento. */
1738
+ const IdentificationInput = require$$0__default.forwardRef(function IdentificationInput({ documentType, onDocumentTypeChange, identificationNumber, onIdentificationNumberChange, documentTypeError, identificationNumberError, required = false, disabled = false, labels: labelsProp, id, name, className = "", }, ref) {
1739
+ const labels = { ...DEFAULT_IDENTIFICATION_LABELS, ...labelsProp };
1740
+ const generatedId = require$$0__default.useId();
1741
+ const baseId = id ?? generatedId;
1673
1742
  const selectedDoc = documentType
1674
1743
  ? PERU_IDENTIFICATION_DOCS[documentType]
1675
1744
  : null;
@@ -1688,11 +1757,12 @@ const IdentificationInput = ({ documentType, onDocumentTypeChange, identificatio
1688
1757
  label: doc.label,
1689
1758
  description: doc.description,
1690
1759
  }));
1691
- return (jsxRuntimeExports$2.jsxs("div", { className: [styles.container, className].filter(Boolean).join(" "), "data-testid": "identification-input", children: [jsxRuntimeExports$2.jsx(Autocomplete, { label: labels.documentType, value: documentType, onChange: (value) => {
1760
+ return (jsxRuntimeExports$2.jsxs("div", { className: [styles.container, className].filter(Boolean).join(" "), "data-testid": "identification-input", children: [jsxRuntimeExports$2.jsx(Autocomplete, { id: `${baseId}-tipo`, name: name ? `${name}-tipo` : undefined, label: labels.documentType, value: documentType, onChange: (value) => {
1692
1761
  onDocumentTypeChange(value);
1693
1762
  // Reset identification number when changing document type
1694
1763
  onIdentificationNumberChange("");
1695
- }, options: documentTypeOptions, placeholder: labels.selectDocumentType, error: documentTypeError, required: required, disabled: disabled, hint: labels.documentTypeHint, searchable: false, clearable: true }), documentType && selectedDoc && (jsxRuntimeExports$2.jsx(Ne, { label: `${labels.identificationNumber} - ${selectedDoc.label}`, value: identificationNumber, onChange: handleIdentificationChange, placeholder: getIdentificationPlaceholder(documentType), error: identificationNumberError, hint: getIdentificationHint(documentType), required: required, disabled: disabled, maxLength: selectedDoc.maxLength, type: selectedDoc.alphanumeric ? "text" : "tel", autoComplete: "off" }))] }));
1696
- };
1764
+ }, options: documentTypeOptions, placeholder: labels.selectDocumentType, error: documentTypeError, required: required, disabled: disabled, hint: labels.documentTypeHint, searchable: false, clearable: true }), documentType && selectedDoc && (jsxRuntimeExports$2.jsx(Se, { ref: ref, id: `${baseId}-numero`, name: name, label: `${labels.identificationNumber} - ${selectedDoc.label}`, value: identificationNumber, onChange: handleIdentificationChange, placeholder: getIdentificationPlaceholder(documentType), error: identificationNumberError, hint: getIdentificationHint(documentType), required: required, disabled: disabled, maxLength: selectedDoc.maxLength, type: selectedDoc.alphanumeric ? "text" : "tel", autoComplete: "off" }))] }));
1765
+ });
1697
1766
 
1698
- module.exports = IdentificationInput;
1767
+ exports.DEFAULT_IDENTIFICATION_LABELS = DEFAULT_IDENTIFICATION_LABELS;
1768
+ exports.default = IdentificationInput;
package/dist/index.d.ts CHANGED
@@ -8,6 +8,7 @@ type IdentificationInputLabels = {
8
8
  documentTypeHint: string;
9
9
  identificationNumber: string;
10
10
  };
11
+ declare const DEFAULT_IDENTIFICATION_LABELS: IdentificationInputLabels;
11
12
  interface IdentificationInputProps {
12
13
  documentType: PeruIdentificationType | null;
13
14
  onDocumentTypeChange: (type: PeruIdentificationType | null) => void;
@@ -17,9 +18,15 @@ interface IdentificationInputProps {
17
18
  identificationNumberError?: string;
18
19
  required?: boolean;
19
20
  disabled?: boolean;
20
- labels: IdentificationInputLabels;
21
+ /** Textos de la interfaz; por defecto en español. */
22
+ labels?: Partial<IdentificationInputLabels>;
23
+ /** Prefijo de los ids de ambos campos. */
24
+ id?: string;
25
+ /** `name` del campo de número (el tipo usa `${name}-tipo`). */
26
+ name?: string;
21
27
  className?: string;
22
28
  }
23
- declare const IdentificationInput: React.FC<IdentificationInputProps>;
29
+ /** El `ref` apunta al campo del número de documento. */
30
+ declare const IdentificationInput: React.ForwardRefExoticComponent<IdentificationInputProps & React.RefAttributes<HTMLInputElement>>;
24
31
 
25
- export { IdentificationInput as default };
32
+ export { DEFAULT_IDENTIFICATION_LABELS, IdentificationInput as default };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,6BAA6B,EAAE,MAAM,uBAAuB,CAAC"}
package/dist/index.esm.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import * as require$$0__default from 'react';
2
2
  import require$$0__default__default, { useState, useRef, useMemo, useEffect } from 'react';
3
+ import { useFieldIds, mergeRefs } from '@rubenpazch/shared';
3
4
 
4
5
  var jsxRuntime$2 = {exports: {}};
5
6
 
@@ -845,7 +846,22 @@ function requireJsxRuntime$1 () {
845
846
 
846
847
  var jsxRuntimeExports$1 = requireJsxRuntime$1();
847
848
 
848
- var r,o={exports:{}},t={};var l$1,n,a$1={};
849
+ var e$2={exports:{}};
850
+
851
+ var r$2={};
852
+
853
+ /**
854
+ * @license React
855
+ * react-jsx-runtime.production.js
856
+ *
857
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
858
+ *
859
+ * This source code is licensed under the MIT license found in the
860
+ * LICENSE file in the root directory of this source tree.
861
+ */var e$1;function t$2(){if(e$1)return r$2;e$1=1;var t=Symbol.for("react.transitional.element"),o=Symbol.for("react.fragment");function n(r,e,o){var n=null;if(void 0!==o&&(n=""+o),void 0!==e.key&&(n=""+e.key),"key"in e)for(var i in o={},e)"key"!==i&&(o[i]=e[i]);else o=e;return e=o.ref,{$$typeof:t,type:r,key:n,ref:void 0!==e?e:null,props:o}}return r$2.Fragment=o,r$2.jsx=n,r$2.jsxs=n,r$2}
862
+
863
+ var r$1={};
864
+
849
865
  /**
850
866
  * @license React
851
867
  * react-jsx-runtime.development.js
@@ -854,7 +870,17 @@ var r,o={exports:{}},t={};var l$1,n,a$1={};
854
870
  *
855
871
  * This source code is licensed under the MIT license found in the
856
872
  * LICENSE file in the root directory of this source tree.
857
- */function i$1(){return l$1||(l$1=1,"production"!==process.env.NODE_ENV&&function(){function e(s){if(null==s)return null;if("function"==typeof s)return s.$$typeof===M?null:s.displayName||s.name||null;if("string"==typeof s)return s;switch(s){case x:return "Fragment";case p:return "Profiler";case v:return "StrictMode";case f:return "Suspense";case C:return "SuspenseList";case N:return "Activity"}if("object"==typeof s)switch("number"==typeof s.tag&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),s.$$typeof){case u:return "Portal";case j:return s.displayName||"Context";case g:return (s._context.displayName||"Context")+".Consumer";case k:var r=s.render;return (s=s.displayName)||(s=""!==(s=r.displayName||r.name||"")?"ForwardRef("+s+")":"ForwardRef"),s;case L:return null!==(r=s.displayName||null)?r:e(s.type)||"Memo";case y:r=s._payload,s=s._init;try{return e(s(r))}catch(e){}}return null}function r(e){return ""+e}function o(e){try{r(e);var s=!1;}catch(e){s=true;}if(s){var o=(s=console).error,t="function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return o.call(s,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",t),r(e)}}function t(s){if(s===x)return "<>";if("object"==typeof s&&null!==s&&s.$$typeof===y)return "<...>";try{var r=e(s);return r?"<"+r+">":"<...>"}catch(e){return "<...>"}}function l(){return Error("react-stack-top-frame")}function n(){var s=e(this.type);return B[s]||(B[s]=true,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),void 0!==(s=this.props.ref)?s:null}function i(s,r,t,l,a,i){var h,m=r.children;if(void 0!==m)if(l)if(z(m)){for(l=0;l<m.length;l++)c(m[l]);Object.freeze&&Object.freeze(m);}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else c(m);if(b.call(r,"key")){m=e(s);var u=Object.keys(r).filter(function(e){return "key"!==e});l=0<u.length?"{key: someKey, "+u.join(": ..., ")+": ...}":"{key: someKey}",W[m+l]||(u=0<u.length?"{"+u.join(": ..., ")+": ...}":"{}",console.error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',l,m,u,m),W[m+l]=true);}if(m=null,void 0!==t&&(o(t),m=""+t),function(e){if(b.call(e,"key")){var s=Object.getOwnPropertyDescriptor(e,"key").get;if(s&&s.isReactWarning)return false}return void 0!==e.key}(r)&&(o(r.key),m=""+r.key),"key"in r)for(var x in t={},r)"key"!==x&&(t[x]=r[x]);else t=r;return m&&function(e,s){function r(){d||(d=true,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",s));}r.isReactWarning=true,Object.defineProperty(e,"key",{get:r,configurable:true});}(t,"function"==typeof s?s.displayName||s.name||"Unknown":s),function(e,s,r,o,t,l){var a=r.ref;return e={$$typeof:w,type:e,key:s,props:r,_owner:o},null!==(void 0!==a?a:null)?Object.defineProperty(e,"ref",{enumerable:false,get:n}):Object.defineProperty(e,"ref",{enumerable:false,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:false,enumerable:false,writable:true,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:false,enumerable:false,writable:true,value:null}),Object.defineProperty(e,"_debugStack",{configurable:false,enumerable:false,writable:true,value:t}),Object.defineProperty(e,"_debugTask",{configurable:false,enumerable:false,writable:true,value:l}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}(s,m,t,null===(h=$.A)?null:h.getOwner(),a,i)}function c(e){h(e)?e._store&&(e._store.validated=1):"object"==typeof e&&null!==e&&e.$$typeof===y&&("fulfilled"===e._payload.status?h(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1));}function h(e){return "object"==typeof e&&null!==e&&e.$$typeof===w}var d,m=require$$0__default__default,w=Symbol.for("react.transitional.element"),u=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),p=Symbol.for("react.profiler"),g=Symbol.for("react.consumer"),j=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),L=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),N=Symbol.for("react.activity"),M=Symbol.for("react.client.reference"),$=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,b=Object.prototype.hasOwnProperty,z=Array.isArray,H=console.createTask?console.createTask:function(){return null},B={},V=(m={react_stack_bottom_frame:function(e){return e()}}).react_stack_bottom_frame.bind(m,l)(),Z=H(t(l)),W={};a$1.Fragment=x,a$1.jsx=function(e,s,r){var o=1e4>$.recentlyCreatedOwnerStacks++;return i(e,s,r,false,o?Error("react-stack-top-frame"):V,o?H(t(e)):Z)},a$1.jsxs=function(e,s,r){var o=1e4>$.recentlyCreatedOwnerStacks++;return i(e,s,r,true,o?Error("react-stack-top-frame"):V,o?H(t(e)):Z)};}()),a$1}var c$1=(n||(n=1,"production"===process.env.NODE_ENV?o.exports=function(){if(r)return t;r=1;var e=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function o(s,r,o){var t=null;if(void 0!==o&&(t=""+o),void 0!==r.key&&(t=""+r.key),"key"in r)for(var l in o={},r)"key"!==l&&(o[l]=r[l]);else o=r;return r=o.ref,{$$typeof:e,type:s,key:t,ref:void 0!==r?r:null,props:o}}return t.Fragment=s,t.jsx=o,t.jsxs=o,t}():o.exports=i$1()),o.exports);function p$1({className:e="",size:s="md"}){const r=`${{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"}[s]} ${e}`;return c$1.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:r,"aria-label":"Check",children:c$1.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})})}const y$1=({className:e="",size:s="md",color:r="currentColor",direction:o="down"})=>c$1.jsx("svg",{className:`${{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"}[s]} ${{up:"rotate-180",down:"",left:"rotate-90",right:"-rotate-90"}[o]} ${e}`,fill:"none",stroke:r,viewBox:"0 0 24 24",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:c$1.jsx("path",{d:"M6 9l6 6 6-6"})});function B$1({className:e="",size:s="md",color:r="currentColor"}){return c$1.jsx("svg",{className:`${{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"}[s]} ${e}`,fill:"none",stroke:r,viewBox:"0 0 24 24",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:c$1.jsx("path",{d:"M6 18L18 6M6 6l12 12"})})}const Xe={outlined:"material-symbols-outlined",rounded:"material-symbols-rounded",sharp:"material-symbols-sharp"},Ye=require$$0__default.forwardRef(({name:e,variant:s="outlined",size:r="md",fill:o=0,weight:t=400,grade:l=0,opticalSize:n=24,style:a,className:i,...h},d)=>{const m=(e=>"number"==typeof e?e:"sm"===e?16:"md"===e?20:24)(r),w=`"FILL" ${o}, "wght" ${t}, "GRAD" ${l}, "opsz" ${n}`;return c$1.jsx("span",{ref:d,"aria-hidden":"true",className:Xe[s]+(i?` ${i}`:""),style:{fontVariationSettings:w,fontSize:m,lineHeight:1,display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",...a},...h,children:e})});Ye.displayName="MaterialIcon";
873
+ */var t$1;function n(){return t$1||(t$1=1,"production"!==process.env.NODE_ENV&&function(){function t(e){if(null==e)return null;if("function"==typeof e)return e.$$typeof===N?null:e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case d:return "Fragment";case _:return "Profiler";case b:return "StrictMode";case S:return "Suspense";case j:return "SuspenseList";case w:return "Activity"}if("object"==typeof e)switch("number"==typeof e.tag&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case m:return "Portal";case g:return e.displayName||"Context";case v:return (e._context.displayName||"Context")+".Consumer";case k:var r=e.render;return (e=e.displayName)||(e=""!==(e=r.displayName||r.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case h:return null!==(r=e.displayName||null)?r:t(e.type)||"Memo";case O:r=e._payload,e=e._init;try{return t(e(r))}catch(e){}}return null}function n(e){return ""+e}function o(e){try{n(e);var r=!1;}catch(e){r=true;}if(r){var t=(r=console).error,o="function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",o),n(e)}}function a(e){if(e===d)return "<>";if("object"==typeof e&&null!==e&&e.$$typeof===O)return "<...>";try{var r=t(e);return r?"<"+r+">":"<...>"}catch(e){return "<...>"}}function l(){return Error("react-stack-top-frame")}function i(){var e=t(this.type);return P[e]||(P[e]=true,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),void 0!==(e=this.props.ref)?e:null}function c(e,r,n,a,l,c){var u,y=r.children;if(void 0!==y)if(a)if(x(y)){for(a=0;a<y.length;a++)s(y[a]);Object.freeze&&Object.freeze(y);}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else s(y);if(T.call(r,"key")){y=t(e);var m=Object.keys(r).filter(function(e){return "key"!==e});a=0<m.length?"{key: someKey, "+m.join(": ..., ")+": ...}":"{key: someKey}",C[y+a]||(m=0<m.length?"{"+m.join(": ..., ")+": ...}":"{}",console.error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',a,y,m,y),C[y+a]=true);}if(y=null,void 0!==n&&(o(n),y=""+n),function(e){if(T.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return false}return void 0!==e.key}(r)&&(o(r.key),y=""+r.key),"key"in r)for(var d in n={},r)"key"!==d&&(n[d]=r[d]);else n=r;return y&&function(e,r){function t(){f||(f=true,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",r));}t.isReactWarning=true,Object.defineProperty(e,"key",{get:t,configurable:true});}(n,"function"==typeof e?e.displayName||e.name||"Unknown":e),function(e,r,t,n,o,a){var l=t.ref;return e={$$typeof:p,type:e,key:r,props:t,_owner:n},null!==(void 0!==l?l:null)?Object.defineProperty(e,"ref",{enumerable:false,get:i}):Object.defineProperty(e,"ref",{enumerable:false,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:false,enumerable:false,writable:true,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:false,enumerable:false,writable:true,value:null}),Object.defineProperty(e,"_debugStack",{configurable:false,enumerable:false,writable:true,value:o}),Object.defineProperty(e,"_debugTask",{configurable:false,enumerable:false,writable:true,value:a}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}(e,y,n,null===(u=R.A)?null:u.getOwner(),l,c)}function s(e){u(e)?e._store&&(e._store.validated=1):"object"==typeof e&&null!==e&&e.$$typeof===O&&("fulfilled"===e._payload.status?u(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1));}function u(e){return "object"==typeof e&&null!==e&&e.$$typeof===p}var f,y=require$$0__default__default,p=Symbol.for("react.transitional.element"),m=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),v=Symbol.for("react.consumer"),g=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),S=Symbol.for("react.suspense"),j=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),w=Symbol.for("react.activity"),N=Symbol.for("react.client.reference"),R=y.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,T=Object.prototype.hasOwnProperty,x=Array.isArray,E=console.createTask?console.createTask:function(){return null},P={},$=(y={react_stack_bottom_frame:function(e){return e()}}).react_stack_bottom_frame.bind(y,l)(),A=E(a(l)),C={};r$1.Fragment=d,r$1.jsx=function(e,r,t){var n=1e4>R.recentlyCreatedOwnerStacks++;return c(e,r,t,false,n?Error("react-stack-top-frame"):$,n?E(a(e)):A)},r$1.jsxs=function(e,r,t){var n=1e4>R.recentlyCreatedOwnerStacks++;return c(e,r,t,true,n?Error("react-stack-top-frame"):$,n?E(a(e)):A)};}()),r$1}
874
+
875
+ var t;function s$1(){return t||(t=1,"production"===process.env.NODE_ENV?e$2.exports=t$2():e$2.exports=n()),e$2.exports}
876
+
877
+ var r=s$1();
878
+
879
+ function l$1({className:l="",size:s="md"}){const a={sm:16,md:20,lg:24},t=`${{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"}[s]} ${l}`;return r.jsx("svg",{width:a[s],height:a[s],xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:t,"aria-hidden":"true",children:r.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})})}
880
+
881
+ const o=({className:o="",size:e="md",color:r$1="currentColor",direction:s="down"})=>{const i={sm:16,md:20,lg:24};return r.jsx("svg",{width:i[e],height:i[e],className:`${{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"}[e]} ${{up:"rotate-180",down:"",left:"rotate-90",right:"-rotate-90"}[s]} ${o}`,fill:"none",stroke:r$1,viewBox:"0 0 24 24",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("path",{d:"M6 9l6 6 6-6"})})};
882
+
883
+ function e({className:e="",size:o="md",color:r$1="currentColor"}){const t={sm:16,md:20,lg:24};return r.jsx("svg",{width:t[o],height:t[o],className:`${{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"}[o]} ${e}`,fill:"none",stroke:r$1,viewBox:"0 0 24 24",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("path",{d:"M6 18L18 6M6 6l12 12"})})}
858
884
 
859
885
  var jsxRuntime = {exports: {}};
860
886
 
@@ -1385,7 +1411,24 @@ const highlightMatchText = (text, search, shouldHighlight = true) => {
1385
1411
  const parts = text.split(regex);
1386
1412
  return (jsxRuntimeExports$1.jsx(jsxRuntimeExports$1.Fragment, { children: parts.map((part, index) => regex.test(part) ? (jsxRuntimeExports$1.jsx("mark", { className: styles$2.highlight, children: part }, index)) : (jsxRuntimeExports$1.jsx("span", { children: part }, index))) }));
1387
1413
  };
1388
- const Autocomplete = ({ label, value, onChange, options = [], placeholder = "Search or select...", error, warning, hint, required = false, disabled = false, loading = false, searchable = true, clearable = true, icon, className = "", maxHeight = "300px", onCreate, onSearch, readOnly = false, renderOption, onBlur, onFocus, createLabel = "Create", noResultsText = "No results found", loadingText = "Loading...", highlightMatch = true, minSearchLength = 0, debounceMs = 300, keepListOpen = false, position = "bottom", }) => {
1414
+ /** Selector con búsqueda (combobox accesible): filtra mientras se escribe, teclado completo. */
1415
+ const Autocomplete = require$$0__default.forwardRef(function Autocomplete({ id, name, labels, label, value, onChange, options = [], placeholder = "Buscar o seleccionar…", error, warning, hint, required = false, disabled = false, loading = false, searchable = true, clearable = true, icon, className = "", maxHeight = "300px", onCreate, onSearch, readOnly = false, renderOption, onBlur, onFocus, createLabel = "Crear", noResultsText = "Sin resultados", loadingText = "Cargando…", highlightMatch = true, minSearchLength = 0, debounceMs = 300, keepListOpen = false, position = "bottom", }, forwardedRef) {
1416
+ const text = {
1417
+ clear: "Quitar selección",
1418
+ open: "Abrir lista",
1419
+ close: "Cerrar lista",
1420
+ ...labels,
1421
+ };
1422
+ const field = useFieldIds({
1423
+ id,
1424
+ name,
1425
+ required,
1426
+ error,
1427
+ warning: !error ? warning : undefined,
1428
+ hint: hint && !error && !warning ? hint : undefined,
1429
+ });
1430
+ const listboxId = `${field.inputId}-opciones`;
1431
+ const optionId = (i) => `${field.inputId}-opcion-${i}`;
1389
1432
  const [isOpen, setIsOpen] = useState(false);
1390
1433
  const [searchTerm, setSearchTerm] = useState("");
1391
1434
  const [highlightedIndex, setHighlightedIndex] = useState(-1);
@@ -1548,19 +1591,24 @@ const Autocomplete = ({ label, value, onChange, options = [], placeholder = "Sea
1548
1591
  const getInputClassName = () => {
1549
1592
  return classNames(styles$2.input, icon ? styles$2.inputWithIcon : undefined, clearable && value ? styles$2.inputWithClear : styles$2.inputWithoutClear, readOnly ? styles$2.inputReadOnly : undefined, error ? styles$2.inputError : undefined, warning && !error ? styles$2.inputWarning : undefined, isFocused && !error && !warning ? styles$2.inputFocused : undefined);
1550
1593
  };
1551
- return (jsxRuntimeExports$1.jsxs("div", { className: classNames(styles$2.container, className), children: [label && (jsxRuntimeExports$1.jsxs("label", { className: styles$2.label, children: [label, required && jsxRuntimeExports$1.jsx("span", { className: styles$2.required, children: "*" })] })), jsxRuntimeExports$1.jsxs("div", { ref: containerRef, className: styles$2.inputWrapper, children: [icon && jsxRuntimeExports$1.jsx("div", { className: styles$2.iconLeft, children: icon }), jsxRuntimeExports$1.jsx("input", { ref: inputRef, type: "text", value: displayValue, onChange: handleInputChange, onFocus: handleInputFocus, onBlur: handleInputBlur, onKeyDown: handleKeyDown, placeholder: placeholder, disabled: disabled, readOnly: readOnly || !searchable, className: getInputClassName(), "data-testid": "autocomplete-input", "data-has-error": error ? "true" : "false", "data-has-warning": warning ? "true" : "false", "data-is-focused": isFocused ? "true" : "false" }), jsxRuntimeExports$1.jsxs("div", { className: styles$2.rightIcons, children: [loading && jsxRuntimeExports$1.jsx(LoadingSpinner, { size: "sm", variant: "dots", inline: true }), clearable && value && !loading && !disabled && (jsxRuntimeExports$1.jsx("button", { type: "button", onClick: handleClear, className: styles$2.clearButton, "data-testid": "autocomplete-clear", "aria-label": "Clear selection", children: jsxRuntimeExports$1.jsx(B$1, { className: styles$2.clearIcon }) })), jsxRuntimeExports$1.jsx("button", { type: "button", onClick: handleToggle, className: styles$2.toggleButton, disabled: disabled, "data-testid": "autocomplete-toggle", "aria-label": isOpen ? "Close dropdown" : "Open dropdown", children: jsxRuntimeExports$1.jsx(y$1, { className: classNames(styles$2.toggleIcon, isOpen && styles$2.toggleIconOpen) }) })] }), isOpen && !disabled && !readOnly && (jsxRuntimeExports$1.jsxs("div", { ref: dropdownRef, className: classNames(styles$2.dropdown, position === "top" && styles$2.dropdownTop), style: { maxHeight }, "data-testid": "autocomplete-dropdown", children: [loading && filteredOptions.length === 0 && (jsxRuntimeExports$1.jsxs("div", { className: styles$2.loadingState, children: [jsxRuntimeExports$1.jsx(LoadingSpinner, { size: "sm", variant: "spinner", className: styles$2.loadingSpinner }), jsxRuntimeExports$1.jsx("span", { className: styles$2.loadingText, children: loadingText })] })), jsxRuntimeExports$1.jsx("div", { className: styles$2.dropdownContent, children: !loading && filteredOptions.length > 0 && (jsxRuntimeExports$1.jsx(jsxRuntimeExports$1.Fragment, { children: filteredOptions.map((option, index) => {
1594
+ return (jsxRuntimeExports$1.jsxs("div", { className: classNames(styles$2.container, className), children: [label && (jsxRuntimeExports$1.jsxs("label", { htmlFor: field.inputId, className: styles$2.label, children: [label, required && (jsxRuntimeExports$1.jsx("span", { className: styles$2.required, "aria-hidden": "true", children: "*" }))] })), jsxRuntimeExports$1.jsxs("div", { ref: containerRef, className: styles$2.inputWrapper, children: [icon && jsxRuntimeExports$1.jsx("div", { className: styles$2.iconLeft, children: icon }), jsxRuntimeExports$1.jsx("input", { ref: mergeRefs(inputRef, forwardedRef), ...field.controlProps, name: name, required: required, role: "combobox", "aria-expanded": isOpen && !disabled && !readOnly, "aria-controls": listboxId, "aria-autocomplete": "list", "aria-activedescendant": isOpen &&
1595
+ highlightedIndex >= 0 &&
1596
+ highlightedIndex < filteredOptions.length
1597
+ ? optionId(highlightedIndex)
1598
+ : undefined, autoComplete: "off", type: "text", value: displayValue, onChange: handleInputChange, onFocus: handleInputFocus, onBlur: handleInputBlur, onKeyDown: handleKeyDown, placeholder: placeholder, disabled: disabled, readOnly: readOnly || !searchable, className: getInputClassName(), "data-testid": "autocomplete-input", "data-has-error": error ? "true" : "false", "data-has-warning": warning ? "true" : "false", "data-is-focused": isFocused ? "true" : "false" }), jsxRuntimeExports$1.jsxs("div", { className: styles$2.rightIcons, children: [loading && jsxRuntimeExports$1.jsx(LoadingSpinner, { size: "sm", variant: "dots", inline: true }), clearable && value && !loading && !disabled && (jsxRuntimeExports$1.jsx("button", { type: "button", onClick: handleClear, className: styles$2.clearButton, "data-testid": "autocomplete-clear", "aria-label": text.clear, children: jsxRuntimeExports$1.jsx(e, { className: styles$2.clearIcon }) })), jsxRuntimeExports$1.jsx("button", { type: "button", onClick: handleToggle, className: styles$2.toggleButton, disabled: disabled, "data-testid": "autocomplete-toggle", "aria-label": isOpen ? text.close : text.open, "aria-expanded": isOpen, tabIndex: -1, children: jsxRuntimeExports$1.jsx(o, { className: classNames(styles$2.toggleIcon, isOpen && styles$2.toggleIconOpen) }) })] }), isOpen && !disabled && !readOnly && (jsxRuntimeExports$1.jsxs("div", { ref: dropdownRef, className: classNames(styles$2.dropdown, position === "top" && styles$2.dropdownTop), style: { maxHeight }, "data-testid": "autocomplete-dropdown", children: [loading && filteredOptions.length === 0 && (jsxRuntimeExports$1.jsxs("div", { className: styles$2.loadingState, children: [jsxRuntimeExports$1.jsx(LoadingSpinner, { size: "sm", variant: "spinner", className: styles$2.loadingSpinner }), jsxRuntimeExports$1.jsx("span", { className: styles$2.loadingText, children: loadingText })] })), jsxRuntimeExports$1.jsx("div", { id: listboxId, role: "listbox", "aria-label": label, className: styles$2.dropdownContent, children: !loading && filteredOptions.length > 0 && (jsxRuntimeExports$1.jsx(jsxRuntimeExports$1.Fragment, { children: filteredOptions.map((option, index) => {
1552
1599
  const isSelected = option.value === value;
1553
1600
  const isHighlighted = index === highlightedIndex;
1554
- return (jsxRuntimeExports$1.jsx("div", { ref: (el) => {
1601
+ return (jsxRuntimeExports$1.jsx("div", { id: optionId(index), role: "option", "aria-selected": isSelected, "aria-disabled": option.disabled || undefined, ref: (el) => {
1555
1602
  optionRefs.current[index] = el;
1556
- }, onClick: () => handleSelect(option), onMouseEnter: () => setHighlightedIndex(index), className: classNames(styles$2.option, option.disabled && styles$2.optionDisabled, isHighlighted && styles$2.optionHighlighted, isSelected && styles$2.optionSelected), "data-testid": `autocomplete-option-${option.value}`, "data-disabled": option.disabled ? "true" : "false", "data-selected": isSelected ? "true" : "false", "data-highlighted": isHighlighted ? "true" : "false", children: renderOption ? (renderOption(option, isSelected)) : (jsxRuntimeExports$1.jsxs(jsxRuntimeExports$1.Fragment, { children: [jsxRuntimeExports$1.jsxs("div", { className: styles$2.optionContent, children: [jsxRuntimeExports$1.jsx("div", { className: styles$2.optionLabel, children: highlightMatchText(option.label, searchTerm, highlightMatch) }), option.description && (jsxRuntimeExports$1.jsx("div", { className: styles$2.optionDescription, children: option.description }))] }), isSelected && (jsxRuntimeExports$1.jsx(p$1, { className: styles$2.optionCheckIcon }))] })) }, option.value));
1603
+ }, onClick: () => handleSelect(option), onMouseEnter: () => setHighlightedIndex(index), className: classNames(styles$2.option, option.disabled && styles$2.optionDisabled, isHighlighted && styles$2.optionHighlighted, isSelected && styles$2.optionSelected), "data-testid": `autocomplete-option-${option.value}`, "data-disabled": option.disabled ? "true" : "false", "data-selected": isSelected ? "true" : "false", "data-highlighted": isHighlighted ? "true" : "false", children: renderOption ? (renderOption(option, isSelected)) : (jsxRuntimeExports$1.jsxs(jsxRuntimeExports$1.Fragment, { children: [jsxRuntimeExports$1.jsxs("div", { className: styles$2.optionContent, children: [jsxRuntimeExports$1.jsx("div", { className: styles$2.optionLabel, children: highlightMatchText(option.label, searchTerm, highlightMatch) }), option.description && (jsxRuntimeExports$1.jsx("div", { className: styles$2.optionDescription, children: option.description }))] }), isSelected && (jsxRuntimeExports$1.jsx(l$1, { className: styles$2.optionCheckIcon }))] })) }, option.value));
1557
1604
  }) })) }), onCreate && searchTerm && (jsxRuntimeExports$1.jsxs("div", { onClick: () => {
1558
1605
  onCreate(searchTerm.trim());
1559
1606
  setIsOpen(false);
1560
1607
  setSearchTerm("");
1561
1608
  }, className: classNames(styles$2.createOption, filteredOptions.length > 0 && styles$2.createOptionWithBorder, highlightedIndex === filteredOptions.length &&
1562
- styles$2.createOptionHighlighted), "data-testid": "autocomplete-create", children: [jsxRuntimeExports$1.jsx("span", { className: styles$2.createIcon, children: "+" }), jsxRuntimeExports$1.jsxs("span", { className: styles$2.createText, children: [createLabel, " \"", searchTerm, "\""] })] })), !loading && filteredOptions.length === 0 && !onCreate && (jsxRuntimeExports$1.jsx("div", { className: styles$2.noResults, children: noResultsText }))] }))] }), hint && !error && !warning && jsxRuntimeExports$1.jsx("p", { className: styles$2.hint, children: hint }), warning && !error && (jsxRuntimeExports$1.jsxs("p", { className: styles$2.warning, children: [jsxRuntimeExports$1.jsx("svg", { className: styles$2.warningIcon, fill: "currentColor", viewBox: "0 0 20 20", children: jsxRuntimeExports$1.jsx("path", { fillRule: "evenodd", d: "M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z", clipRule: "evenodd" }) }), warning] })), error && (jsxRuntimeExports$1.jsxs("p", { className: styles$2.error, children: [jsxRuntimeExports$1.jsx("svg", { className: styles$2.errorIcon, fill: "currentColor", viewBox: "0 0 20 20", children: jsxRuntimeExports$1.jsx("path", { fillRule: "evenodd", d: "M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z", clipRule: "evenodd" }) }), error] }))] }));
1563
- };
1609
+ styles$2.createOptionHighlighted), "data-testid": "autocomplete-create", children: [jsxRuntimeExports$1.jsx("span", { className: styles$2.createIcon, children: "+" }), jsxRuntimeExports$1.jsxs("span", { className: styles$2.createText, children: [createLabel, " \"", searchTerm, "\""] })] })), !loading && filteredOptions.length === 0 && !onCreate && (jsxRuntimeExports$1.jsx("div", { className: styles$2.noResults, children: noResultsText }))] }))] }), hint && !error && !warning && (jsxRuntimeExports$1.jsx("p", { id: field.hintId, className: styles$2.hint, children: hint })), warning && !error && (jsxRuntimeExports$1.jsxs("p", { id: field.warningId, className: styles$2.warning, children: [jsxRuntimeExports$1.jsx("svg", { "aria-hidden": "true", className: styles$2.warningIcon, fill: "currentColor", viewBox: "0 0 20 20", children: jsxRuntimeExports$1.jsx("path", { fillRule: "evenodd", d: "M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z", clipRule: "evenodd" }) }), warning] })), error && (jsxRuntimeExports$1.jsxs("p", { id: field.errorId, className: styles$2.error, role: "alert", children: [jsxRuntimeExports$1.jsx("svg", { "aria-hidden": "true", className: styles$2.errorIcon, fill: "currentColor", viewBox: "0 0 20 20", children: jsxRuntimeExports$1.jsx("path", { fillRule: "evenodd", d: "M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z", clipRule: "evenodd" }) }), error] }))] }));
1610
+ });
1611
+ Autocomplete.displayName = "Autocomplete";
1564
1612
 
1565
1613
  var a,l={exports:{}},s={};var i,u,c={};
1566
1614
  /**
@@ -1571,7 +1619,16 @@ var a,l={exports:{}},s={};var i,u,c={};
1571
1619
  *
1572
1620
  * This source code is licensed under the MIT license found in the
1573
1621
  * LICENSE file in the root directory of this source tree.
1574
- */function m(){return i||(i=1,"production"!==process.env.NODE_ENV&&function(){function e(n){if(null==n)return null;if("function"==typeof n)return n.$$typeof===S?null:n.displayName||n.name||null;if("string"==typeof n)return n;switch(n){case g:return "Fragment";case h:return "Profiler";case f:return "StrictMode";case v:return "Suspense";case T:return "SuspenseList";case k:return "Activity"}if("object"==typeof n)switch("number"==typeof n.tag&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),n.$$typeof){case _:return "Portal";case b:return n.displayName||"Context";case x:return (n._context.displayName||"Context")+".Consumer";case y:var t=n.render;return (n=n.displayName)||(n=""!==(n=t.displayName||t.name||"")?"ForwardRef("+n+")":"ForwardRef"),n;case I:return null!==(t=n.displayName||null)?t:e(n.type)||"Memo";case j:t=n._payload,n=n._init;try{return e(n(t))}catch(e){}}return null}function t(e){return ""+e}function r(e){try{t(e);var n=!1;}catch(e){n=true;}if(n){var r=(n=console).error,o="function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return r.call(n,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",o),t(e)}}function o(n){if(n===g)return "<>";if("object"==typeof n&&null!==n&&n.$$typeof===j)return "<...>";try{var t=e(n);return t?"<"+t+">":"<...>"}catch(e){return "<...>"}}function a(){return Error("react-stack-top-frame")}function l(){var n=e(this.type);return C[n]||(C[n]=true,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),void 0!==(n=this.props.ref)?n:null}function s(n,t,o,a,s,u){var c,d=t.children;if(void 0!==d)if(a)if(O(d)){for(a=0;a<d.length;a++)i(d[a]);Object.freeze&&Object.freeze(d);}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else i(d);if(N.call(t,"key")){d=e(n);var _=Object.keys(t).filter(function(e){return "key"!==e});a=0<_.length?"{key: someKey, "+_.join(": ..., ")+": ...}":"{key: someKey}",A[d+a]||(_=0<_.length?"{"+_.join(": ..., ")+": ...}":"{}",console.error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',a,d,_,d),A[d+a]=true);}if(d=null,void 0!==o&&(r(o),d=""+o),function(e){if(N.call(e,"key")){var n=Object.getOwnPropertyDescriptor(e,"key").get;if(n&&n.isReactWarning)return false}return void 0!==e.key}(t)&&(r(t.key),d=""+t.key),"key"in t)for(var g in o={},t)"key"!==g&&(o[g]=t[g]);else o=t;return d&&function(e,n){function t(){m||(m=true,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",n));}t.isReactWarning=true,Object.defineProperty(e,"key",{get:t,configurable:true});}(o,"function"==typeof n?n.displayName||n.name||"Unknown":n),function(e,n,t,r,o,a){var s=t.ref;return e={$$typeof:p,type:e,key:n,props:t,_owner:r},null!==(void 0!==s?s:null)?Object.defineProperty(e,"ref",{enumerable:false,get:l}):Object.defineProperty(e,"ref",{enumerable:false,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:false,enumerable:false,writable:true,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:false,enumerable:false,writable:true,value:null}),Object.defineProperty(e,"_debugStack",{configurable:false,enumerable:false,writable:true,value:o}),Object.defineProperty(e,"_debugTask",{configurable:false,enumerable:false,writable:true,value:a}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}(n,d,o,null===(c=w.A)?null:c.getOwner(),s,u)}function i(e){u(e)?e._store&&(e._store.validated=1):"object"==typeof e&&null!==e&&e.$$typeof===j&&("fulfilled"===e._payload.status?u(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1));}function u(e){return "object"==typeof e&&null!==e&&e.$$typeof===p}var m,d=require$$0__default__default,p=Symbol.for("react.transitional.element"),_=Symbol.for("react.portal"),g=Symbol.for("react.fragment"),f=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),x=Symbol.for("react.consumer"),b=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),k=Symbol.for("react.activity"),S=Symbol.for("react.client.reference"),w=d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,N=Object.prototype.hasOwnProperty,O=Array.isArray,z=console.createTask?console.createTask:function(){return null},C={},R=(d={react_stack_bottom_frame:function(e){return e()}}).react_stack_bottom_frame.bind(d,a)(),$=z(o(a)),A={};c.Fragment=g,c.jsx=function(e,n,t){var r=1e4>w.recentlyCreatedOwnerStacks++;return s(e,n,t,false,r?Error("react-stack-top-frame"):R,r?z(o(e)):$)},c.jsxs=function(e,n,t){var r=1e4>w.recentlyCreatedOwnerStacks++;return s(e,n,t,true,r?Error("react-stack-top-frame"):R,r?z(o(e)):$)};}()),c}var d,p,_,g=(u||(u=1,"production"===process.env.NODE_ENV?l.exports=function(){if(a)return s;a=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function t(n,t,r){var o=null;if(void 0!==r&&(o=""+r),void 0!==t.key&&(o=""+t.key),"key"in t)for(var a in r={},t)"key"!==a&&(r[a]=t[a]);else r=t;return t=r.ref,{$$typeof:e,type:n,key:o,ref:void 0!==t?t:null,props:r}}return s.Fragment=n,s.jsx=t,s.jsxs=t,s}():l.exports=m()),l.exports),f={exports:{}},h={},x={};var b=(_||(_=1,"production"===process.env.NODE_ENV?f.exports=function(){if(d)return h;d=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function t(n,t,r){var o=null;if(void 0!==r&&(o=""+r),void 0!==t.key&&(o=""+t.key),"key"in t)for(var a in r={},t)"key"!==a&&(r[a]=t[a]);else r=t;return t=r.ref,{$$typeof:e,type:n,key:o,ref:void 0!==t?t:null,props:r}}return h.Fragment=n,h.jsx=t,h.jsxs=t,h}():f.exports=(p||(p=1,"production"!==process.env.NODE_ENV&&function(){function e(n){if(null==n)return null;if("function"==typeof n)return n.$$typeof===S?null:n.displayName||n.name||null;if("string"==typeof n)return n;switch(n){case _:return "Fragment";case f:return "Profiler";case g:return "StrictMode";case v:return "Suspense";case T:return "SuspenseList";case k:return "Activity"}if("object"==typeof n)switch("number"==typeof n.tag&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),n.$$typeof){case p:return "Portal";case b:return n.displayName||"Context";case h:return (n._context.displayName||"Context")+".Consumer";case y:var t=n.render;return (n=n.displayName)||(n=""!==(n=t.displayName||t.name||"")?"ForwardRef("+n+")":"ForwardRef"),n;case I:return null!==(t=n.displayName||null)?t:e(n.type)||"Memo";case j:t=n._payload,n=n._init;try{return e(n(t))}catch(e){}}return null}function t(e){return ""+e}function r(e){try{t(e);var n=!1;}catch(e){n=true;}if(n){var r=(n=console).error,o="function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return r.call(n,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",o),t(e)}}function o(n){if(n===_)return "<>";if("object"==typeof n&&null!==n&&n.$$typeof===j)return "<...>";try{var t=e(n);return t?"<"+t+">":"<...>"}catch(e){return "<...>"}}function a(){return Error("react-stack-top-frame")}function l(){var n=e(this.type);return C[n]||(C[n]=true,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),void 0!==(n=this.props.ref)?n:null}function s(n,t,o,a,s,u){var m,p=t.children;if(void 0!==p)if(a)if(O(p)){for(a=0;a<p.length;a++)i(p[a]);Object.freeze&&Object.freeze(p);}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else i(p);if(N.call(t,"key")){p=e(n);var _=Object.keys(t).filter(function(e){return "key"!==e});a=0<_.length?"{key: someKey, "+_.join(": ..., ")+": ...}":"{key: someKey}",A[p+a]||(_=0<_.length?"{"+_.join(": ..., ")+": ...}":"{}",console.error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',a,p,_,p),A[p+a]=true);}if(p=null,void 0!==o&&(r(o),p=""+o),function(e){if(N.call(e,"key")){var n=Object.getOwnPropertyDescriptor(e,"key").get;if(n&&n.isReactWarning)return false}return void 0!==e.key}(t)&&(r(t.key),p=""+t.key),"key"in t)for(var g in o={},t)"key"!==g&&(o[g]=t[g]);else o=t;return p&&function(e,n){function t(){c||(c=true,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",n));}t.isReactWarning=true,Object.defineProperty(e,"key",{get:t,configurable:true});}(o,"function"==typeof n?n.displayName||n.name||"Unknown":n),function(e,n,t,r,o,a){var s=t.ref;return e={$$typeof:d,type:e,key:n,props:t,_owner:r},null!==(void 0!==s?s:null)?Object.defineProperty(e,"ref",{enumerable:false,get:l}):Object.defineProperty(e,"ref",{enumerable:false,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:false,enumerable:false,writable:true,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:false,enumerable:false,writable:true,value:null}),Object.defineProperty(e,"_debugStack",{configurable:false,enumerable:false,writable:true,value:o}),Object.defineProperty(e,"_debugTask",{configurable:false,enumerable:false,writable:true,value:a}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}(n,p,o,null===(m=w.A)?null:m.getOwner(),s,u)}function i(e){u(e)?e._store&&(e._store.validated=1):"object"==typeof e&&null!==e&&e.$$typeof===j&&("fulfilled"===e._payload.status?u(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1));}function u(e){return "object"==typeof e&&null!==e&&e.$$typeof===d}var c,m=require$$0__default__default,d=Symbol.for("react.transitional.element"),p=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),g=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),h=Symbol.for("react.consumer"),b=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),k=Symbol.for("react.activity"),S=Symbol.for("react.client.reference"),w=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,N=Object.prototype.hasOwnProperty,O=Array.isArray,z=console.createTask?console.createTask:function(){return null},C={},R=(m={react_stack_bottom_frame:function(e){return e()}}).react_stack_bottom_frame.bind(m,a)(),$=z(o(a)),A={};x.Fragment=_,x.jsx=function(e,n,t){var r=1e4>w.recentlyCreatedOwnerStacks++;return s(e,n,t,false,r?Error("react-stack-top-frame"):R,r?z(o(e)):$)},x.jsxs=function(e,n,t){var r=1e4>w.recentlyCreatedOwnerStacks++;return s(e,n,t,true,r?Error("react-stack-top-frame"):R,r?z(o(e)):$)};}()),x)),f.exports);function y({className:e="",size:n="md"}){const t=`${{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"}[n]} ${e}`;return b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:t,"aria-label":"Check",children:b.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})})}const v=({className:e="",size:n="md"})=>{const t=`${{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"}[n]} ${e}`;return b.jsx("svg",{className:t,viewBox:"0 0 20 20",fill:"currentColor","aria-label":"Error",children:b.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})})},T=({className:e="",size:n="md"})=>{const t=`${{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"}[n]} ${e}`;return b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,"aria-label":"Info",children:b.jsx("path",{d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})},I={outlined:"material-symbols-outlined",rounded:"material-symbols-rounded",sharp:"material-symbols-sharp"},j=require$$0__default.forwardRef(({name:e,variant:n="outlined",size:t="md",fill:r=0,weight:o=400,grade:a=0,opticalSize:l=24,style:s,className:i,...u},c)=>{const m=(e=>"number"==typeof e?e:"sm"===e?16:"md"===e?20:24)(t),d=`"FILL" ${r}, "wght" ${o}, "GRAD" ${a}, "opsz" ${l}`;return b.jsx("span",{ref:c,"aria-hidden":"true",className:I[n]+(i?` ${i}`:""),style:{fontVariationSettings:d,fontSize:m,lineHeight:1,display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",...s},...u,children:e})});j.displayName="MaterialIcon";var k="TextInput-module_container__QXVA9",S="TextInput-module_label__GGFxk",w="TextInput-module_required__qlHAH",N="TextInput-module_inputContainer__-zaWR",O="TextInput-module_icon__F1AYg",z="TextInput-module_input__I8TSn",C="TextInput-module_inputWithIcon__TDgMC",R="TextInput-module_inputWithCharCount__qgvqA",$="TextInput-module_inputError__-Ga78",A="TextInput-module_inputSuccess__xsjt7",E="TextInput-module_charCount__RyuVm",P="TextInput-module_charCountNormal__LCUr7",L="TextInput-module_charCountNear__OKroK",q="TextInput-module_charCountLimit__iaB20",V="TextInput-module_charCountIcon__lRD-4",F="TextInput-module_charProgressBar__Wva8D",M="TextInput-module_charProgress__ZUsGs",B="TextInput-module_charProgressNormal__TdFY4",U="TextInput-module_charProgressNear__beyMs",Z="TextInput-module_charProgressLimit__Vr6d-",D="TextInput-module_hint__iZiig",G="TextInput-module_requiredHelper__TUGsU",W="TextInput-module_validationMessage__3g-wc",Y="TextInput-module_validationIcon__q5LT6",K="TextInput-module_validationText__-qAuu",J="TextInput-module_validEmail__Ya1tf",Q="TextInput-module_emailSuggestion__ZzQkZ",H="TextInput-module_suggestionButton__Rsxt8",X="TextInput-module_error__ewnmB",ee="TextInput-module_errorIcon__JkIpb",ne="TextInput-module_errorText__ba7lR",te="TextInput-module_passwordStrength__ICyJU",re="TextInput-module_strengthBar__3c8Yf",oe="TextInput-module_strengthSegment__76ih4",ae="TextInput-module_strengthSegmentInactive__RK1Q8",le="TextInput-module_strengthSegmentWeak__BFvgT",se="TextInput-module_strengthSegmentFair__AOJW5",ie="TextInput-module_strengthSegmentGood__uGgTx",ue="TextInput-module_strengthSegmentStrong__vP5Yi",ce="TextInput-module_strengthSegmentVeryStrong__4Tull",me="TextInput-module_strengthLabel__PpEO9",de="TextInput-module_strengthText__jfVUh",pe="TextInput-module_strengthValue__04hhw",_e="TextInput-module_strengthValueWeak__8Ek8Q",ge="TextInput-module_strengthValueFair__70N63",fe="TextInput-module_strengthValueGood__NgsOd",he="TextInput-module_strengthValueStrong__qaKsi",xe="TextInput-module_strengthValueVeryStrong__80d9m",be="TextInput-module_requirements__eD6oz",ye="TextInput-module_requirement__KoZx2",ve="TextInput-module_requirementIcon__VjQXJ",Te="TextInput-module_requirementIconMet__UNZFD",Ie="TextInput-module_requirementIconUnmet__1MF9h",je="TextInput-module_requirementText__fFcdn",ke="TextInput-module_requirementTextMet__eGbSi";!function(e,n){ void 0===n&&(n={});var t=n.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===t&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e));}}("/* Container */\n.TextInput-module_container__QXVA9 {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n}\n\n/* Label */\n.TextInput-module_label__GGFxk {\n display: block;\n font-size: var(--lb-font-size-sm);\n line-height: 1.25rem;\n font-weight: var(--lb-font-weight-medium);\n color: var(--lb-color-neutral-700);\n}\n\n.TextInput-module_required__qlHAH {\n color: var(--lb-color-danger);\n margin-left: 0.25rem;\n}\n\n/* Input container */\n.TextInput-module_inputContainer__-zaWR {\n position: relative;\n}\n\n/* Icon */\n.TextInput-module_icon__F1AYg {\n position: absolute;\n left: 0.75rem;\n top: 50%;\n transform: translateY(-50%);\n color: var(--lb-color-neutral-400);\n pointer-events: none;\n display: flex;\n align-items: center;\n}\n\n/* Input */\n.TextInput-module_input__I8TSn {\n width: 100%;\n box-sizing: border-box;\n padding: 0.5rem 1rem;\n border-radius: var(--lb-radius-md);\n border: 2px solid var(--lb-color-neutral-300);\n transition: all 150ms ease;\n outline: none;\n font-family: var(--lb-font-sans);\n font-weight: var(--lb-font-weight-medium);\n color: var(--lb-color-foreground);\n}\n\n.TextInput-module_input__I8TSn::-moz-placeholder {\n color: var(--lb-color-neutral-400);\n}\n\n.TextInput-module_input__I8TSn::placeholder {\n color: var(--lb-color-neutral-400);\n}\n\n.TextInput-module_inputWithIcon__TDgMC {\n padding-left: 2.5rem;\n}\n\n.TextInput-module_inputWithCharCount__qgvqA {\n padding-right: 5rem;\n}\n\n.TextInput-module_input__I8TSn:hover:not(:disabled) {\n border-color: var(--lb-color-neutral-400);\n}\n\n.TextInput-module_input__I8TSn:focus {\n border-color: var(--lb-color-primary);\n box-shadow: 0 0 0 2px\n color-mix(in srgb, var(--lb-color-ring) 25%, transparent);\n}\n\n.TextInput-module_input__I8TSn:disabled {\n background: var(--lb-color-muted);\n color: var(--lb-color-muted-foreground);\n cursor: not-allowed;\n}\n\n.TextInput-module_inputError__-Ga78 {\n border-color: var(--lb-color-danger);\n}\n\n.TextInput-module_inputError__-Ga78:focus {\n border-color: var(--lb-color-danger);\n box-shadow: 0 0 0 2px\n color-mix(in srgb, var(--lb-color-danger) 25%, transparent);\n}\n\n.TextInput-module_inputSuccess__xsjt7 {\n border-color: var(--lb-color-success);\n}\n\n.TextInput-module_inputSuccess__xsjt7:focus {\n border-color: var(--lb-color-success);\n box-shadow: 0 0 0 2px\n color-mix(in srgb, var(--lb-color-success) 25%, transparent);\n}\n\n/* Character count */\n.TextInput-module_charCount__RyuVm {\n position: absolute;\n right: 0.75rem;\n top: 50%;\n transform: translateY(-50%);\n font-size: 0.75rem;\n line-height: 1rem;\n font-weight: 500;\n display: flex;\n align-items: center;\n gap: 0.25rem;\n}\n\n.TextInput-module_charCountNormal__LCUr7 {\n color: var(--lb-color-muted-foreground);\n}\n\n.TextInput-module_charCountNear__OKroK {\n color: var(--lb-color-warning);\n}\n\n.TextInput-module_charCountLimit__iaB20 {\n color: var(--lb-color-danger);\n}\n\n.TextInput-module_charCountIcon__lRD-4 {\n width: 1rem;\n height: 1rem;\n}\n\n/* Progress bar */\n.TextInput-module_charProgressBar__Wva8D {\n width: 100%;\n height: 0.25rem;\n background: var(--lb-color-neutral-200);\n border-radius: 9999px;\n overflow: hidden;\n}\n\n.TextInput-module_charProgress__ZUsGs {\n height: 100%;\n transition: all 150ms ease;\n border-radius: 9999px;\n}\n\n.TextInput-module_charProgressNormal__TdFY4 {\n background: var(--lb-color-primary);\n}\n\n.TextInput-module_charProgressNear__beyMs {\n background: var(--lb-color-warning);\n}\n\n.TextInput-module_charProgressLimit__Vr6d- {\n background: var(--lb-color-danger);\n}\n\n/* Hint text */\n.TextInput-module_hint__iZiig {\n font-size: 0.75rem;\n line-height: 1rem;\n color: var(--lb-color-muted-foreground);\n margin-top: 0.25rem;\n}\n\n.TextInput-module_requiredHelper__TUGsU {\n font-size: 0.75rem;\n line-height: 1rem;\n color: var(--lb-color-muted-foreground);\n margin-top: 0.25rem;\n}\n\n/* Validation messages */\n.TextInput-module_validationMessage__3g-wc {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n margin-top: 0.25rem;\n}\n\n.TextInput-module_validationIcon__q5LT6 {\n width: 1rem;\n height: 1rem;\n flex-shrink: 0;\n}\n\n.TextInput-module_validationText__-qAuu {\n font-size: 0.75rem;\n line-height: 1rem;\n}\n\n.TextInput-module_validEmail__Ya1tf .TextInput-module_validationIcon__q5LT6 {\n color: var(--lb-color-success);\n}\n\n.TextInput-module_validEmail__Ya1tf .TextInput-module_validationText__-qAuu {\n color: var(--lb-color-success);\n}\n\n.TextInput-module_emailSuggestion__ZzQkZ .TextInput-module_validationIcon__q5LT6 {\n color: var(--lb-color-primary);\n}\n\n.TextInput-module_emailSuggestion__ZzQkZ .TextInput-module_validationText__-qAuu {\n color: var(--lb-color-primary);\n}\n\n.TextInput-module_suggestionButton__Rsxt8 {\n font-weight: 600;\n text-decoration: underline;\n background: none;\n border: none;\n color: inherit;\n cursor: pointer;\n padding: 0;\n}\n\n.TextInput-module_suggestionButton__Rsxt8:hover {\n color: var(--lb-color-primary-hover);\n}\n\n/* Error message */\n.TextInput-module_error__ewnmB {\n display: flex;\n align-items: flex-start;\n gap: 0.5rem;\n margin-top: 0.25rem;\n}\n\n.TextInput-module_errorIcon__JkIpb {\n width: 1rem;\n height: 1rem;\n color: var(--lb-color-danger);\n flex-shrink: 0;\n margin-top: 0.125rem;\n}\n\n.TextInput-module_errorText__ba7lR {\n font-size: 0.875rem;\n line-height: 1.25rem;\n color: var(--lb-color-danger);\n}\n\n/* Password strength */\n.TextInput-module_passwordStrength__ICyJU {\n margin-top: 0.5rem;\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n}\n\n.TextInput-module_strengthBar__3c8Yf {\n display: flex;\n gap: 0.25rem;\n}\n\n.TextInput-module_strengthSegment__76ih4 {\n height: 0.375rem;\n flex: 1;\n border-radius: 9999px;\n transition: background-color 150ms ease;\n}\n\n.TextInput-module_strengthSegmentInactive__RK1Q8 {\n background: var(--lb-color-neutral-200);\n}\n\n.TextInput-module_strengthSegmentWeak__BFvgT {\n background: var(--lb-color-danger);\n}\n\n.TextInput-module_strengthSegmentFair__AOJW5 {\n background: var(--lb-color-warning);\n}\n\n.TextInput-module_strengthSegmentGood__uGgTx {\n background: var(--lb-color-warning);\n}\n\n.TextInput-module_strengthSegmentStrong__vP5Yi {\n background: #84cc16;\n}\n\n.TextInput-module_strengthSegmentVeryStrong__4Tull {\n background: var(--lb-color-success);\n}\n\n.TextInput-module_strengthLabel__PpEO9 {\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n\n.TextInput-module_strengthText__jfVUh {\n font-size: 0.75rem;\n line-height: 1rem;\n color: var(--lb-color-neutral-600);\n}\n\n.TextInput-module_strengthValue__04hhw {\n font-weight: 600;\n}\n\n.TextInput-module_strengthValueWeak__8Ek8Q {\n color: var(--lb-color-danger);\n}\n\n.TextInput-module_strengthValueFair__70N63 {\n color: var(--lb-color-warning);\n}\n\n.TextInput-module_strengthValueGood__NgsOd {\n color: var(--lb-color-amber-accent);\n}\n\n.TextInput-module_strengthValueStrong__qaKsi {\n color: #65a30d;\n}\n\n.TextInput-module_strengthValueVeryStrong__80d9m {\n color: var(--lb-color-success);\n}\n\n/* Requirements checklist */\n.TextInput-module_requirements__eD6oz {\n font-size: 0.75rem;\n line-height: 1rem;\n display: flex;\n flex-direction: column;\n gap: 0.25rem;\n padding: 0.5rem;\n background: var(--lb-color-neutral-50);\n border-radius: 0.375rem;\n border: 1px solid var(--lb-color-neutral-200);\n}\n\n.TextInput-module_requirement__KoZx2 {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n}\n\n.TextInput-module_requirementIcon__VjQXJ {\n width: 0.875rem;\n height: 0.875rem;\n flex-shrink: 0;\n}\n\n.TextInput-module_requirementIconMet__UNZFD {\n color: var(--lb-color-emerald-accent);\n}\n\n.TextInput-module_requirementIconUnmet__1MF9h {\n color: var(--lb-color-neutral-300);\n}\n\n.TextInput-module_requirementText__fFcdn {\n color: var(--lb-color-neutral-500);\n}\n\n.TextInput-module_requirementTextMet__eGbSi {\n color: var(--lb-color-neutral-700);\n}\n");const Se=(...e)=>e.filter(Boolean).join(" "),we=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Ne=({label:e,value:n,onChange:a,placeholder:l,error:s,required:i=false,disabled:u=false,type:c="text",className:m="",hint:d,maxLength:p,minLength:_,minLengthMessage:f,pattern:h,icon:x,onBlur:b,onFocus:I,onValidityChange:j,autoComplete:Ne,validateEmail:Oe=false,showPasswordStrength:ze=false,requiredMessage:Ce,emailValidMessage:Re,emailInvalidMessage:$e,emailSuggestionMessage:Ae,strengthLabels:Ee,strengthLabelPrefix:Pe,requirementsLabels:Le})=>{const[qe,Ve]=useState(false),Fe=useMemo(()=>Oe&&n?(e=>{if(!e||!e.includes("@"))return null;const[n,t]=e.split("@");if(!t)return null;const r={"gmial.com":"gmail.com","gmai.com":"gmail.com","gmil.com":"gmail.com","hotmial.com":"hotmail.com","hotmal.com":"hotmail.com","outlok.com":"outlook.com","yahooo.com":"yahoo.com","yaho.com":"yahoo.com"};return r[t.toLowerCase()]?`${n}@${r[t.toLowerCase()]}`:null})(n):null,[Oe,n]),Me=useMemo(()=>{if(!Oe||!n)return null;return we.test(n)&&!(null!==Fe)},[Oe,n,Fe]),Be=Oe&&n&&!Me&&!Fe,Ue=Be&&$e||null,Ze=Boolean(_&&n.length>0&&n.length<_),De=!_||n.length>=_,Ge=!p||n.length<=p,We=!h||new RegExp(h).test(n),Ye=Boolean(n&&!s&&!Be&&!Fe&&(!i||n.length>0)&&(!Oe||Me)&&De&&Ge&&We),Ke=useMemo(()=>"password"===c&&ze?(e=>{if(!e)return {score:0,strength:"none"};let n=0;const t=/[A-Z]/.test(e);return /[a-z]/.test(e)&&n++,t&&n++,/\d/.test(e)&&n++,/[!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?]/.test(e)&&n++,e.length>=8&&n++,n<=1?{score:n,strength:"weak"}:n<=2?{score:n,strength:"fair"}:n<=3?{score:n,strength:"good"}:4===n?{score:n,strength:"strong"}:{score:n,strength:"very-strong"}})(n):null,[c,n,ze]),Je=Boolean(!u&&!s&&(!i||n.trim().length>0)&&(!Oe||Me)&&De&&Ge&&We);useEffect(()=>{j?.(Je);},[Je,j]);const Qe=p&&"text"===c&&n,He=n.length,Xe=p?He/p*100:0,en=Xe>80,nn=Xe>=100;return g.jsxs("div",{className:Se(k,m),"data-testid":"text-input",children:[e&&g.jsxs("label",{className:S,children:[e,i&&g.jsx("span",{className:w,children:"*"})]}),g.jsxs("div",{className:N,children:[x&&!qe&&g.jsx("div",{className:O,children:x}),g.jsx("input",{type:Oe?"text":c,inputMode:Oe?"email":void 0,value:n,onChange:e=>a(e.target.value),onFocus:()=>{Ve(true),I?.();},onBlur:()=>{Ve(false),b?.();},placeholder:l,disabled:u,maxLength:p,minLength:_,pattern:h,autoComplete:Ne,className:Se(z,x?C:void 0,Qe?R:void 0,s||Be||Ze?$:void 0,u||s||Ue||!Ye?void 0:A),"data-testid":"input-field","data-error":!!s||!!Be||Ze}),Qe&&g.jsxs("div",{className:Se(E,nn?q:en?L:P),"data-testid":"char-count",children:[g.jsxs("div",{children:[He,"/",p]}),nn&&g.jsx(v,{className:V,size:"sm"})]})]}),Qe&&p>20&&g.jsx("div",{className:F,children:g.jsx("div",{className:Se(M,nn?Z:en?U:B),style:{width:`${Math.min(Xe,100)}%`}})}),d&&!s&&!Be&&g.jsx("p",{className:D,children:d}),i&&!n&&!s&&!Be&&Ce&&g.jsx("p",{className:G,children:Ce}),Oe&&n&&Me&&Re&&g.jsxs("div",{className:Se(W,J),children:[g.jsx(y,{className:Y,size:"sm"}),g.jsx("p",{className:K,children:Re})]}),Fe&&!s&&Ae&&g.jsxs("div",{className:Se(W,Q),children:[g.jsx(T,{className:Y,size:"sm"}),g.jsxs("p",{className:K,children:[Ae.replace("{suggestion}",Fe),g.jsx("button",{type:"button",onClick:()=>a(Fe),className:H,children:Fe})]})]}),Ke&&Ke.score>0&&g.jsxs("div",{className:te,children:[g.jsx("div",{className:re,children:[0,1,2,3,4].map(e=>g.jsx("div",{className:Se(oe,e<Ke.score?"weak"===Ke.strength?le:"fair"===Ke.strength?se:"good"===Ke.strength?ie:"strong"===Ke.strength?ue:ce:ae)},e))}),(Pe||Ee?.[Ke.strength])&&g.jsx("div",{className:me,children:g.jsxs("p",{className:de,children:[Pe&&`${Pe} `,g.jsx("span",{className:Se(pe,"weak"===Ke.strength?_e:"fair"===Ke.strength?ge:"good"===Ke.strength?fe:"strong"===Ke.strength?he:xe),children:Ee?.[Ke.strength]})]})}),Le&&g.jsxs("div",{className:be,children:[Le.lowercase&&g.jsxs("div",{className:ye,children:[g.jsx(y,{className:Se(ve,/[a-z]/.test(n)?Te:Ie),size:"sm"}),g.jsx("span",{className:Se(je,/[a-z]/.test(n)&&ke),children:Le.lowercase})]}),Le.uppercase&&g.jsxs("div",{className:ye,children:[g.jsx(y,{className:Se(ve,/[A-Z]/.test(n)?Te:Ie),size:"sm"}),g.jsx("span",{className:Se(je,/[A-Z]/.test(n)&&ke),children:Le.uppercase})]}),Le.number&&g.jsxs("div",{className:ye,children:[g.jsx(y,{className:Se(ve,/\d/.test(n)?Te:Ie),size:"sm"}),g.jsx("span",{className:Se(je,/\d/.test(n)&&ke),children:Le.number})]}),Le.special&&g.jsxs("div",{className:ye,children:[g.jsx(y,{className:Se(ve,/[!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?]/.test(n)?Te:Ie),size:"sm"}),g.jsx("span",{className:Se(je,/[!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?]/.test(n)&&ke),children:Le.special})]}),Le.minLength&&g.jsxs("div",{className:ye,children:[g.jsx(y,{className:Se(ve,n.length>=8?Te:Ie),size:"sm"}),g.jsx("span",{className:Se(je,n.length>=8&&ke),children:Le.minLength})]})]})]}),(s||Be&&$e||Ze&&f)&&g.jsxs("div",{className:X,children:[g.jsx(v,{className:ee,size:"sm"}),g.jsx("p",{className:ne,children:s||(Be?$e:f)})]})]})};
1622
+ */function d(){return i||(i=1,"production"!==process.env.NODE_ENV&&function(){function n(e){if(null==e)return null;if("function"==typeof e)return e.$$typeof===k?null:e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case g:return "Fragment";case h:return "Profiler";case f:return "StrictMode";case v:return "Suspense";case T:return "SuspenseList";case w:return "Activity"}if("object"==typeof e)switch("number"==typeof e.tag&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case _:return "Portal";case b:return e.displayName||"Context";case x:return (e._context.displayName||"Context")+".Consumer";case y:var t=e.render;return (e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case I:return null!==(t=e.displayName||null)?t:n(e.type)||"Memo";case j:t=e._payload,e=e._init;try{return n(e(t))}catch(e){}}return null}function t(e){return ""+e}function r(e){try{t(e);var n=!1;}catch(e){n=true;}if(n){var r=(n=console).error,o="function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return r.call(n,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",o),t(e)}}function o(e){if(e===g)return "<>";if("object"==typeof e&&null!==e&&e.$$typeof===j)return "<...>";try{var t=n(e);return t?"<"+t+">":"<...>"}catch(e){return "<...>"}}function a(){return Error("react-stack-top-frame")}function l(){var e=n(this.type);return C[e]||(C[e]=true,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),void 0!==(e=this.props.ref)?e:null}function s(e,t,o,a,s,u){var c,m=t.children;if(void 0!==m)if(a)if(O(m)){for(a=0;a<m.length;a++)i(m[a]);Object.freeze&&Object.freeze(m);}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else i(m);if(N.call(t,"key")){m=n(e);var _=Object.keys(t).filter(function(e){return "key"!==e});a=0<_.length?"{key: someKey, "+_.join(": ..., ")+": ...}":"{key: someKey}",E[m+a]||(_=0<_.length?"{"+_.join(": ..., ")+": ...}":"{}",console.error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',a,m,_,m),E[m+a]=true);}if(m=null,void 0!==o&&(r(o),m=""+o),function(e){if(N.call(e,"key")){var n=Object.getOwnPropertyDescriptor(e,"key").get;if(n&&n.isReactWarning)return false}return void 0!==e.key}(t)&&(r(t.key),m=""+t.key),"key"in t)for(var g in o={},t)"key"!==g&&(o[g]=t[g]);else o=t;return m&&function(e,n){function t(){d||(d=true,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",n));}t.isReactWarning=true,Object.defineProperty(e,"key",{get:t,configurable:true});}(o,"function"==typeof e?e.displayName||e.name||"Unknown":e),function(e,n,t,r,o,a){var s=t.ref;return e={$$typeof:p,type:e,key:n,props:t,_owner:r},null!==(void 0!==s?s:null)?Object.defineProperty(e,"ref",{enumerable:false,get:l}):Object.defineProperty(e,"ref",{enumerable:false,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:false,enumerable:false,writable:true,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:false,enumerable:false,writable:true,value:null}),Object.defineProperty(e,"_debugStack",{configurable:false,enumerable:false,writable:true,value:o}),Object.defineProperty(e,"_debugTask",{configurable:false,enumerable:false,writable:true,value:a}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}(e,m,o,null===(c=S.A)?null:c.getOwner(),s,u)}function i(e){u(e)?e._store&&(e._store.validated=1):"object"==typeof e&&null!==e&&e.$$typeof===j&&("fulfilled"===e._payload.status?u(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1));}function u(e){return "object"==typeof e&&null!==e&&e.$$typeof===p}var d,m=require$$0__default__default,p=Symbol.for("react.transitional.element"),_=Symbol.for("react.portal"),g=Symbol.for("react.fragment"),f=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),x=Symbol.for("react.consumer"),b=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),w=Symbol.for("react.activity"),k=Symbol.for("react.client.reference"),S=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,N=Object.prototype.hasOwnProperty,O=Array.isArray,z=console.createTask?console.createTask:function(){return null},C={},R=(m={react_stack_bottom_frame:function(e){return e()}}).react_stack_bottom_frame.bind(m,a)(),A=z(o(a)),E={};c.Fragment=g,c.jsx=function(e,n,t){var r=1e4>S.recentlyCreatedOwnerStacks++;return s(e,n,t,false,r?Error("react-stack-top-frame"):R,r?z(o(e)):A)},c.jsxs=function(e,n,t){var r=1e4>S.recentlyCreatedOwnerStacks++;return s(e,n,t,true,r?Error("react-stack-top-frame"):R,r?z(o(e)):A)};}()),c}var m,p=(u||(u=1,"production"===process.env.NODE_ENV?l.exports=function(){if(a)return s;a=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function t(n,t,r){var o=null;if(void 0!==r&&(o=""+r),void 0!==t.key&&(o=""+t.key),"key"in t)for(var a in r={},t)"key"!==a&&(r[a]=t[a]);else r=t;return t=r.ref,{$$typeof:e,type:n,key:o,ref:void 0!==t?t:null,props:r}}return s.Fragment=n,s.jsx=t,s.jsxs=t,s}():l.exports=d()),l.exports),_={exports:{}},g={};var f,h,x={};
1623
+ /**
1624
+ * @license React
1625
+ * react-jsx-runtime.development.js
1626
+ *
1627
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
1628
+ *
1629
+ * This source code is licensed under the MIT license found in the
1630
+ * LICENSE file in the root directory of this source tree.
1631
+ */var b=(h||(h=1,"production"===process.env.NODE_ENV?_.exports=function(){if(m)return g;m=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function t(n,t,r){var o=null;if(void 0!==r&&(o=""+r),void 0!==t.key&&(o=""+t.key),"key"in t)for(var a in r={},t)"key"!==a&&(r[a]=t[a]);else r=t;return t=r.ref,{$$typeof:e,type:n,key:o,ref:void 0!==t?t:null,props:r}}return g.Fragment=n,g.jsx=t,g.jsxs=t,g}():_.exports=(f||(f=1,"production"!==process.env.NODE_ENV&&function(){function n(e){if(null==e)return null;if("function"==typeof e)return e.$$typeof===k?null:e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case _:return "Fragment";case f:return "Profiler";case g:return "StrictMode";case v:return "Suspense";case T:return "SuspenseList";case w:return "Activity"}if("object"==typeof e)switch("number"==typeof e.tag&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case p:return "Portal";case b:return e.displayName||"Context";case h:return (e._context.displayName||"Context")+".Consumer";case y:var t=e.render;return (e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case I:return null!==(t=e.displayName||null)?t:n(e.type)||"Memo";case j:t=e._payload,e=e._init;try{return n(e(t))}catch(e){}}return null}function t(e){return ""+e}function r(e){try{t(e);var n=!1;}catch(e){n=true;}if(n){var r=(n=console).error,o="function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return r.call(n,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",o),t(e)}}function o(e){if(e===_)return "<>";if("object"==typeof e&&null!==e&&e.$$typeof===j)return "<...>";try{var t=n(e);return t?"<"+t+">":"<...>"}catch(e){return "<...>"}}function a(){return Error("react-stack-top-frame")}function l(){var e=n(this.type);return C[e]||(C[e]=true,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),void 0!==(e=this.props.ref)?e:null}function s(e,t,o,a,s,u){var d,p=t.children;if(void 0!==p)if(a)if(O(p)){for(a=0;a<p.length;a++)i(p[a]);Object.freeze&&Object.freeze(p);}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else i(p);if(N.call(t,"key")){p=n(e);var _=Object.keys(t).filter(function(e){return "key"!==e});a=0<_.length?"{key: someKey, "+_.join(": ..., ")+": ...}":"{key: someKey}",E[p+a]||(_=0<_.length?"{"+_.join(": ..., ")+": ...}":"{}",console.error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',a,p,_,p),E[p+a]=true);}if(p=null,void 0!==o&&(r(o),p=""+o),function(e){if(N.call(e,"key")){var n=Object.getOwnPropertyDescriptor(e,"key").get;if(n&&n.isReactWarning)return false}return void 0!==e.key}(t)&&(r(t.key),p=""+t.key),"key"in t)for(var g in o={},t)"key"!==g&&(o[g]=t[g]);else o=t;return p&&function(e,n){function t(){c||(c=true,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",n));}t.isReactWarning=true,Object.defineProperty(e,"key",{get:t,configurable:true});}(o,"function"==typeof e?e.displayName||e.name||"Unknown":e),function(e,n,t,r,o,a){var s=t.ref;return e={$$typeof:m,type:e,key:n,props:t,_owner:r},null!==(void 0!==s?s:null)?Object.defineProperty(e,"ref",{enumerable:false,get:l}):Object.defineProperty(e,"ref",{enumerable:false,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:false,enumerable:false,writable:true,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:false,enumerable:false,writable:true,value:null}),Object.defineProperty(e,"_debugStack",{configurable:false,enumerable:false,writable:true,value:o}),Object.defineProperty(e,"_debugTask",{configurable:false,enumerable:false,writable:true,value:a}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}(e,p,o,null===(d=S.A)?null:d.getOwner(),s,u)}function i(e){u(e)?e._store&&(e._store.validated=1):"object"==typeof e&&null!==e&&e.$$typeof===j&&("fulfilled"===e._payload.status?u(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1));}function u(e){return "object"==typeof e&&null!==e&&e.$$typeof===m}var c,d=require$$0__default__default,m=Symbol.for("react.transitional.element"),p=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),g=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),h=Symbol.for("react.consumer"),b=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),w=Symbol.for("react.activity"),k=Symbol.for("react.client.reference"),S=d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,N=Object.prototype.hasOwnProperty,O=Array.isArray,z=console.createTask?console.createTask:function(){return null},C={},R=(d={react_stack_bottom_frame:function(e){return e()}}).react_stack_bottom_frame.bind(d,a)(),A=z(o(a)),E={};x.Fragment=_,x.jsx=function(e,n,t){var r=1e4>S.recentlyCreatedOwnerStacks++;return s(e,n,t,false,r?Error("react-stack-top-frame"):R,r?z(o(e)):A)},x.jsxs=function(e,n,t){var r=1e4>S.recentlyCreatedOwnerStacks++;return s(e,n,t,true,r?Error("react-stack-top-frame"):R,r?z(o(e)):A)};}()),x)),_.exports);function y({className:e="",size:n="md"}){const t={sm:16,md:20,lg:24},r=`${{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"}[n]} ${e}`;return b.jsx("svg",{width:t[n],height:t[n],xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:r,"aria-hidden":"true",children:b.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})})}const v=({className:e="",size:n="md"})=>{const t={sm:16,md:20,lg:24},r=`${{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"}[n]} ${e}`;return b.jsx("svg",{width:t[n],height:t[n],className:r,viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:b.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})})},T=({className:e="",size:n="md"})=>{const t={sm:16,md:20,lg:24},r=`${{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"}[n]} ${e}`;return b.jsx("svg",{width:t[n],height:t[n],xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:r,"aria-hidden":"true",children:b.jsx("path",{d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})};var I="TextInput-module_container__QXVA9",j="TextInput-module_label__GGFxk",w="TextInput-module_required__qlHAH",k="TextInput-module_inputContainer__-zaWR",S="TextInput-module_icon__F1AYg",N="TextInput-module_input__I8TSn",O="TextInput-module_inputWithIcon__TDgMC",z="TextInput-module_inputWithCharCount__qgvqA",C="TextInput-module_inputError__-Ga78",R="TextInput-module_inputSuccess__xsjt7",A="TextInput-module_charCount__RyuVm",E="TextInput-module_charCountNormal__LCUr7",P="TextInput-module_charCountNear__OKroK",$="TextInput-module_charCountLimit__iaB20",q="TextInput-module_charCountIcon__lRD-4",L="TextInput-module_charProgressBar__Wva8D",F="TextInput-module_charProgress__ZUsGs",V="TextInput-module_charProgressNormal__TdFY4",M="TextInput-module_charProgressNear__beyMs",B="TextInput-module_charProgressLimit__Vr6d-",U="TextInput-module_hint__iZiig",Z="TextInput-module_requiredHelper__TUGsU",D="TextInput-module_validationMessage__3g-wc",G="TextInput-module_validationIcon__q5LT6",W="TextInput-module_validationText__-qAuu",Y="TextInput-module_validEmail__Ya1tf",K="TextInput-module_emailSuggestion__ZzQkZ",J="TextInput-module_suggestionButton__Rsxt8",Q="TextInput-module_error__ewnmB",X="TextInput-module_errorIcon__JkIpb",H="TextInput-module_errorText__ba7lR",ee="TextInput-module_passwordStrength__ICyJU",ne="TextInput-module_strengthBar__3c8Yf",te="TextInput-module_strengthSegment__76ih4",re="TextInput-module_strengthSegmentInactive__RK1Q8",oe="TextInput-module_strengthSegmentWeak__BFvgT",ae="TextInput-module_strengthSegmentFair__AOJW5",le="TextInput-module_strengthSegmentGood__uGgTx",se="TextInput-module_strengthSegmentStrong__vP5Yi",ie="TextInput-module_strengthSegmentVeryStrong__4Tull",ue="TextInput-module_strengthLabel__PpEO9",ce="TextInput-module_strengthText__jfVUh",de="TextInput-module_strengthValue__04hhw",me="TextInput-module_strengthValueWeak__8Ek8Q",pe="TextInput-module_strengthValueFair__70N63",_e="TextInput-module_strengthValueGood__NgsOd",ge="TextInput-module_strengthValueStrong__qaKsi",fe="TextInput-module_strengthValueVeryStrong__80d9m",he="TextInput-module_requirements__eD6oz",xe="TextInput-module_requirement__KoZx2",be="TextInput-module_requirementIcon__VjQXJ",ye="TextInput-module_requirementIconMet__UNZFD",ve="TextInput-module_requirementIconUnmet__1MF9h",Te="TextInput-module_requirementText__fFcdn",Ie="TextInput-module_requirementTextMet__eGbSi",je="TextInput-module_warning__ywIFl";!function(e,n){ void 0===n&&(n={});var t=n.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===t&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e));}}("/* Container */\n.TextInput-module_container__QXVA9 {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n}\n\n/* Label */\n.TextInput-module_label__GGFxk {\n display: block;\n font-size: var(--lb-font-size-sm);\n line-height: 1.25rem;\n font-weight: var(--lb-font-weight-medium);\n color: var(--lb-color-neutral-700);\n}\n\n.TextInput-module_required__qlHAH {\n color: var(--lb-color-danger);\n margin-left: 0.25rem;\n}\n\n/* Input container */\n.TextInput-module_inputContainer__-zaWR {\n position: relative;\n}\n\n/* Icon */\n.TextInput-module_icon__F1AYg {\n position: absolute;\n left: 0.75rem;\n top: 50%;\n transform: translateY(-50%);\n color: var(--lb-color-neutral-400);\n pointer-events: none;\n display: flex;\n align-items: center;\n}\n\n/* Input */\n.TextInput-module_input__I8TSn {\n width: 100%;\n box-sizing: border-box;\n padding: 0.5rem 1rem;\n border-radius: var(--lb-radius-md);\n border: 2px solid var(--lb-color-neutral-300);\n transition: all 150ms ease;\n outline: none;\n font-family: var(--lb-font-sans);\n font-weight: var(--lb-font-weight-medium);\n color: var(--lb-color-foreground);\n}\n\n.TextInput-module_input__I8TSn::-moz-placeholder {\n color: var(--lb-color-neutral-400);\n}\n\n.TextInput-module_input__I8TSn::placeholder {\n color: var(--lb-color-neutral-400);\n}\n\n.TextInput-module_inputWithIcon__TDgMC {\n padding-left: 2.5rem;\n}\n\n.TextInput-module_inputWithCharCount__qgvqA {\n padding-right: 5rem;\n}\n\n.TextInput-module_input__I8TSn:hover:not(:disabled) {\n border-color: var(--lb-color-neutral-400);\n}\n\n.TextInput-module_input__I8TSn:focus {\n border-color: var(--lb-color-primary);\n box-shadow: 0 0 0 2px\n color-mix(in srgb, var(--lb-color-ring) 25%, transparent);\n}\n\n.TextInput-module_input__I8TSn:disabled {\n background: var(--lb-color-muted);\n color: var(--lb-color-muted-foreground);\n cursor: not-allowed;\n}\n\n.TextInput-module_inputError__-Ga78 {\n border-color: var(--lb-color-danger);\n}\n\n.TextInput-module_inputError__-Ga78:focus {\n border-color: var(--lb-color-danger);\n box-shadow: 0 0 0 2px\n color-mix(in srgb, var(--lb-color-danger) 25%, transparent);\n}\n\n.TextInput-module_inputSuccess__xsjt7 {\n border-color: var(--lb-color-success);\n}\n\n.TextInput-module_inputSuccess__xsjt7:focus {\n border-color: var(--lb-color-success);\n box-shadow: 0 0 0 2px\n color-mix(in srgb, var(--lb-color-success) 25%, transparent);\n}\n\n/* Character count */\n.TextInput-module_charCount__RyuVm {\n position: absolute;\n right: 0.75rem;\n top: 50%;\n transform: translateY(-50%);\n font-size: 0.75rem;\n line-height: 1rem;\n font-weight: 500;\n display: flex;\n align-items: center;\n gap: 0.25rem;\n}\n\n.TextInput-module_charCountNormal__LCUr7 {\n color: var(--lb-color-muted-foreground);\n}\n\n.TextInput-module_charCountNear__OKroK {\n color: var(--lb-color-warning);\n}\n\n.TextInput-module_charCountLimit__iaB20 {\n color: var(--lb-color-danger);\n}\n\n.TextInput-module_charCountIcon__lRD-4 {\n width: 1rem;\n height: 1rem;\n}\n\n/* Progress bar */\n.TextInput-module_charProgressBar__Wva8D {\n width: 100%;\n height: 0.25rem;\n background: var(--lb-color-neutral-200);\n border-radius: 9999px;\n overflow: hidden;\n}\n\n.TextInput-module_charProgress__ZUsGs {\n height: 100%;\n transition: all 150ms ease;\n border-radius: 9999px;\n}\n\n.TextInput-module_charProgressNormal__TdFY4 {\n background: var(--lb-color-primary);\n}\n\n.TextInput-module_charProgressNear__beyMs {\n background: var(--lb-color-warning);\n}\n\n.TextInput-module_charProgressLimit__Vr6d- {\n background: var(--lb-color-danger);\n}\n\n/* Hint text */\n.TextInput-module_hint__iZiig {\n font-size: 0.75rem;\n line-height: 1rem;\n color: var(--lb-color-muted-foreground);\n margin-top: 0.25rem;\n}\n\n.TextInput-module_requiredHelper__TUGsU {\n font-size: 0.75rem;\n line-height: 1rem;\n color: var(--lb-color-muted-foreground);\n margin-top: 0.25rem;\n}\n\n/* Validation messages */\n.TextInput-module_validationMessage__3g-wc {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n margin-top: 0.25rem;\n}\n\n.TextInput-module_validationIcon__q5LT6 {\n width: 1rem;\n height: 1rem;\n flex-shrink: 0;\n}\n\n.TextInput-module_validationText__-qAuu {\n font-size: 0.75rem;\n line-height: 1rem;\n}\n\n.TextInput-module_validEmail__Ya1tf .TextInput-module_validationIcon__q5LT6 {\n color: var(--lb-color-success);\n}\n\n.TextInput-module_validEmail__Ya1tf .TextInput-module_validationText__-qAuu {\n color: var(--lb-color-success);\n}\n\n.TextInput-module_emailSuggestion__ZzQkZ .TextInput-module_validationIcon__q5LT6 {\n color: var(--lb-color-primary);\n}\n\n.TextInput-module_emailSuggestion__ZzQkZ .TextInput-module_validationText__-qAuu {\n color: var(--lb-color-primary);\n}\n\n.TextInput-module_suggestionButton__Rsxt8 {\n font-weight: 600;\n text-decoration: underline;\n background: none;\n border: none;\n color: inherit;\n cursor: pointer;\n padding: 0;\n}\n\n.TextInput-module_suggestionButton__Rsxt8:hover {\n color: var(--lb-color-primary-hover);\n}\n\n/* Error message */\n.TextInput-module_error__ewnmB {\n display: flex;\n align-items: flex-start;\n gap: 0.5rem;\n margin-top: 0.25rem;\n}\n\n.TextInput-module_errorIcon__JkIpb {\n width: 1rem;\n height: 1rem;\n color: var(--lb-color-danger);\n flex-shrink: 0;\n margin-top: 0.125rem;\n}\n\n.TextInput-module_errorText__ba7lR {\n font-size: 0.875rem;\n line-height: 1.25rem;\n color: var(--lb-color-danger);\n}\n\n/* Password strength */\n.TextInput-module_passwordStrength__ICyJU {\n margin-top: 0.5rem;\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n}\n\n.TextInput-module_strengthBar__3c8Yf {\n display: flex;\n gap: 0.25rem;\n}\n\n.TextInput-module_strengthSegment__76ih4 {\n height: 0.375rem;\n flex: 1;\n border-radius: 9999px;\n transition: background-color 150ms ease;\n}\n\n.TextInput-module_strengthSegmentInactive__RK1Q8 {\n background: var(--lb-color-neutral-200);\n}\n\n.TextInput-module_strengthSegmentWeak__BFvgT {\n background: var(--lb-color-danger);\n}\n\n.TextInput-module_strengthSegmentFair__AOJW5 {\n background: var(--lb-color-warning);\n}\n\n.TextInput-module_strengthSegmentGood__uGgTx {\n background: var(--lb-color-warning);\n}\n\n.TextInput-module_strengthSegmentStrong__vP5Yi {\n background: var(--lb-color-emerald-accent);\n}\n\n.TextInput-module_strengthSegmentVeryStrong__4Tull {\n background: var(--lb-color-success);\n}\n\n.TextInput-module_strengthLabel__PpEO9 {\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n\n.TextInput-module_strengthText__jfVUh {\n font-size: 0.75rem;\n line-height: 1rem;\n color: var(--lb-color-neutral-600);\n}\n\n.TextInput-module_strengthValue__04hhw {\n font-weight: 600;\n}\n\n.TextInput-module_strengthValueWeak__8Ek8Q {\n color: var(--lb-color-danger);\n}\n\n.TextInput-module_strengthValueFair__70N63 {\n color: var(--lb-color-warning);\n}\n\n.TextInput-module_strengthValueGood__NgsOd {\n color: var(--lb-color-amber-accent);\n}\n\n.TextInput-module_strengthValueStrong__qaKsi {\n color: var(--lb-color-emerald-strong);\n}\n\n.TextInput-module_strengthValueVeryStrong__80d9m {\n color: var(--lb-color-success);\n}\n\n/* Requirements checklist */\n.TextInput-module_requirements__eD6oz {\n font-size: 0.75rem;\n line-height: 1rem;\n display: flex;\n flex-direction: column;\n gap: 0.25rem;\n padding: 0.5rem;\n background: var(--lb-color-neutral-50);\n border-radius: 0.375rem;\n border: 1px solid var(--lb-color-neutral-200);\n}\n\n.TextInput-module_requirement__KoZx2 {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n}\n\n.TextInput-module_requirementIcon__VjQXJ {\n width: 0.875rem;\n height: 0.875rem;\n flex-shrink: 0;\n}\n\n.TextInput-module_requirementIconMet__UNZFD {\n color: var(--lb-color-emerald-accent);\n}\n\n.TextInput-module_requirementIconUnmet__1MF9h {\n color: var(--lb-color-neutral-300);\n}\n\n.TextInput-module_requirementText__fFcdn {\n color: var(--lb-color-neutral-500);\n}\n\n.TextInput-module_requirementTextMet__eGbSi {\n color: var(--lb-color-neutral-700);\n}\n\n/* Advertencia (no bloquea el envío) */\n.TextInput-module_warning__ywIFl {\n font-size: var(--lb-font-size-xs);\n line-height: var(--lb-line-height-normal);\n color: var(--lb-color-amber-strong);\n margin-top: var(--lb-space-1);\n}\n");const we=(...e)=>e.filter(Boolean).join(" "),ke=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Se=require$$0__default__default.forwardRef(function({id:e,name:a,label:l,value:s,onChange:i,placeholder:u,error:c,warning:d,required:m=false,disabled:_=false,type:g="text",className:f="",hint:h,maxLength:x,minLength:b,minLengthMessage:Se,pattern:Ne,icon:Oe,onBlur:ze,onFocus:Ce,onValidityChange:Re,autoComplete:Ae,validateEmail:Ee=false,showPasswordStrength:Pe=false,requiredMessage:$e,emailValidMessage:qe,emailInvalidMessage:Le,emailSuggestionMessage:Fe,strengthLabels:Ve,strengthLabelPrefix:Me,requirementsLabels:Be},Ue){const[Ze,De]=useState(false),Ge=useMemo(()=>Ee&&s?(e=>{if(!e||!e.includes("@"))return null;const[n,t]=e.split("@");if(!t)return null;const r={"gmial.com":"gmail.com","gmai.com":"gmail.com","gmil.com":"gmail.com","hotmial.com":"hotmail.com","hotmal.com":"hotmail.com","outlok.com":"outlook.com","yahooo.com":"yahoo.com","yaho.com":"yahoo.com"};return r[t.toLowerCase()]?`${n}@${r[t.toLowerCase()]}`:null})(s):null,[Ee,s]),We=useMemo(()=>{if(!Ee||!s)return null;return ke.test(s)&&!(null!==Ge)},[Ee,s,Ge]),Ye=Ee&&s&&!We&&!Ge,Ke=Ye&&Le||null,Je=Boolean(b&&s.length>0&&s.length<b),Qe=!b||s.length>=b,Xe=!x||s.length<=x,He=!Ne||new RegExp(Ne).test(s),en=Boolean(s&&!c&&!Ye&&!Ge&&(!m||s.length>0)&&(!Ee||We)&&Qe&&Xe&&He),nn=useMemo(()=>"password"===g&&Pe?(e=>{if(!e)return {score:0,strength:"none"};let n=0;const t=/[A-Z]/.test(e);return /[a-z]/.test(e)&&n++,t&&n++,/\d/.test(e)&&n++,/[!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?]/.test(e)&&n++,e.length>=8&&n++,n<=1?{score:n,strength:"weak"}:n<=2?{score:n,strength:"fair"}:n<=3?{score:n,strength:"good"}:4===n?{score:n,strength:"strong"}:{score:n,strength:"very-strong"}})(s):null,[g,s,Pe]),tn=Boolean(!_&&!c&&(!m||s.trim().length>0)&&(!Ee||We)&&Qe&&Xe&&He);useEffect(()=>{Re?.(tn);},[tn,Re]);const rn=x&&"text"===g&&s,on=s.length,an=x?on/x*100:0,ln=an>80,sn=an>=100,un=c||Ye&&Le||Je&&Se||void 0,cn=Boolean(h&&!c&&!Ye),dn=useFieldIds({id:e,name:a,required:m,error:un||void 0,warning:un?void 0:d,hint:cn?h:void 0});return p.jsxs("div",{className:we(I,f),"data-testid":"text-input",children:[l&&p.jsxs("label",{htmlFor:dn.inputId,className:j,children:[l,m&&p.jsx("span",{className:w,"aria-hidden":"true",children:"*"})]}),p.jsxs("div",{className:k,children:[Oe&&!Ze&&p.jsx("div",{className:S,children:Oe}),p.jsx("input",{ref:Ue,...dn.controlProps,name:a,required:m,type:Ee?"text":g,inputMode:Ee?"email":void 0,value:s,onChange:e=>i(e.target.value),onFocus:()=>{De(true),Ce?.();},onBlur:()=>{De(false),ze?.();},placeholder:u,disabled:_,maxLength:x,minLength:b,pattern:Ne,autoComplete:Ae,className:we(N,Oe?O:void 0,rn?z:void 0,c||Ye||Je?C:void 0,_||c||Ke||!en?void 0:R),"data-testid":"input-field","data-error":!!c||!!Ye||Je}),rn&&p.jsxs("div",{className:we(A,sn?$:ln?P:E),"data-testid":"char-count",children:[p.jsxs("div",{children:[on,"/",x]}),sn&&p.jsx(v,{className:q,size:"sm"})]})]}),rn&&x>20&&p.jsx("div",{className:L,children:p.jsx("div",{className:we(F,sn?B:ln?M:V),style:{width:`${Math.min(an,100)}%`}})}),cn&&p.jsx("p",{id:dn.hintId,className:U,children:h}),d&&!un&&p.jsx("p",{id:dn.warningId,className:je,children:d}),m&&!s&&!c&&!Ye&&$e&&p.jsx("p",{className:Z,children:$e}),Ee&&s&&We&&qe&&p.jsxs("div",{className:we(D,Y),children:[p.jsx(y,{className:G,size:"sm"}),p.jsx("p",{className:W,children:qe})]}),Ge&&!c&&Fe&&p.jsxs("div",{className:we(D,K),children:[p.jsx(T,{className:G,size:"sm"}),p.jsxs("p",{className:W,children:[Fe.replace("{suggestion}",Ge),p.jsx("button",{type:"button",onClick:()=>i(Ge),className:J,children:Ge})]})]}),nn&&nn.score>0&&p.jsxs("div",{className:ee,children:[p.jsx("div",{className:ne,children:[0,1,2,3,4].map(e=>p.jsx("div",{className:we(te,e<nn.score?"weak"===nn.strength?oe:"fair"===nn.strength?ae:"good"===nn.strength?le:"strong"===nn.strength?se:ie:re)},e))}),(Me||Ve?.[nn.strength])&&p.jsx("div",{className:ue,children:p.jsxs("p",{className:ce,children:[Me&&`${Me} `,p.jsx("span",{className:we(de,"weak"===nn.strength?me:"fair"===nn.strength?pe:"good"===nn.strength?_e:"strong"===nn.strength?ge:fe),children:Ve?.[nn.strength]})]})}),Be&&p.jsxs("div",{className:he,children:[Be.lowercase&&p.jsxs("div",{className:xe,children:[p.jsx(y,{className:we(be,/[a-z]/.test(s)?ye:ve),size:"sm"}),p.jsx("span",{className:we(Te,/[a-z]/.test(s)&&Ie),children:Be.lowercase})]}),Be.uppercase&&p.jsxs("div",{className:xe,children:[p.jsx(y,{className:we(be,/[A-Z]/.test(s)?ye:ve),size:"sm"}),p.jsx("span",{className:we(Te,/[A-Z]/.test(s)&&Ie),children:Be.uppercase})]}),Be.number&&p.jsxs("div",{className:xe,children:[p.jsx(y,{className:we(be,/\d/.test(s)?ye:ve),size:"sm"}),p.jsx("span",{className:we(Te,/\d/.test(s)&&Ie),children:Be.number})]}),Be.special&&p.jsxs("div",{className:xe,children:[p.jsx(y,{className:we(be,/[!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?]/.test(s)?ye:ve),size:"sm"}),p.jsx("span",{className:we(Te,/[!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?]/.test(s)&&Ie),children:Be.special})]}),Be.minLength&&p.jsxs("div",{className:xe,children:[p.jsx(y,{className:we(be,s.length>=8?ye:ve),size:"sm"}),p.jsx("span",{className:we(Te,s.length>=8&&Ie),children:Be.minLength})]})]})]}),un&&p.jsxs("div",{id:dn.errorId,className:Q,role:"alert",children:[p.jsx(v,{className:X,size:"sm"}),p.jsx("p",{className:H,children:un})]})]})});Se.displayName="TextInput";
1575
1632
 
1576
1633
  function styleInject(css, ref) {
1577
1634
  if ( ref === void 0 ) ref = {};
@@ -1649,7 +1706,17 @@ const getIdentificationHint = (type) => {
1649
1706
  return PERU_IDENTIFICATION_DOCS[type]?.hint ?? "";
1650
1707
  };
1651
1708
 
1652
- const IdentificationInput = ({ documentType, onDocumentTypeChange, identificationNumber, onIdentificationNumberChange, documentTypeError, identificationNumberError, required = false, disabled = false, labels, className = "", }) => {
1709
+ const DEFAULT_IDENTIFICATION_LABELS = {
1710
+ documentType: "Tipo de documento",
1711
+ selectDocumentType: "Selecciona el tipo de documento",
1712
+ documentTypeHint: "DNI, carné de extranjería, RUC o pasaporte",
1713
+ identificationNumber: "Número de documento",
1714
+ };
1715
+ /** El `ref` apunta al campo del número de documento. */
1716
+ const IdentificationInput = require$$0__default__default.forwardRef(function IdentificationInput({ documentType, onDocumentTypeChange, identificationNumber, onIdentificationNumberChange, documentTypeError, identificationNumberError, required = false, disabled = false, labels: labelsProp, id, name, className = "", }, ref) {
1717
+ const labels = { ...DEFAULT_IDENTIFICATION_LABELS, ...labelsProp };
1718
+ const generatedId = require$$0__default__default.useId();
1719
+ const baseId = id ?? generatedId;
1653
1720
  const selectedDoc = documentType
1654
1721
  ? PERU_IDENTIFICATION_DOCS[documentType]
1655
1722
  : null;
@@ -1668,11 +1735,11 @@ const IdentificationInput = ({ documentType, onDocumentTypeChange, identificatio
1668
1735
  label: doc.label,
1669
1736
  description: doc.description,
1670
1737
  }));
1671
- return (jsxRuntimeExports$2.jsxs("div", { className: [styles.container, className].filter(Boolean).join(" "), "data-testid": "identification-input", children: [jsxRuntimeExports$2.jsx(Autocomplete, { label: labels.documentType, value: documentType, onChange: (value) => {
1738
+ return (jsxRuntimeExports$2.jsxs("div", { className: [styles.container, className].filter(Boolean).join(" "), "data-testid": "identification-input", children: [jsxRuntimeExports$2.jsx(Autocomplete, { id: `${baseId}-tipo`, name: name ? `${name}-tipo` : undefined, label: labels.documentType, value: documentType, onChange: (value) => {
1672
1739
  onDocumentTypeChange(value);
1673
1740
  // Reset identification number when changing document type
1674
1741
  onIdentificationNumberChange("");
1675
- }, options: documentTypeOptions, placeholder: labels.selectDocumentType, error: documentTypeError, required: required, disabled: disabled, hint: labels.documentTypeHint, searchable: false, clearable: true }), documentType && selectedDoc && (jsxRuntimeExports$2.jsx(Ne, { label: `${labels.identificationNumber} - ${selectedDoc.label}`, value: identificationNumber, onChange: handleIdentificationChange, placeholder: getIdentificationPlaceholder(documentType), error: identificationNumberError, hint: getIdentificationHint(documentType), required: required, disabled: disabled, maxLength: selectedDoc.maxLength, type: selectedDoc.alphanumeric ? "text" : "tel", autoComplete: "off" }))] }));
1676
- };
1742
+ }, options: documentTypeOptions, placeholder: labels.selectDocumentType, error: documentTypeError, required: required, disabled: disabled, hint: labels.documentTypeHint, searchable: false, clearable: true }), documentType && selectedDoc && (jsxRuntimeExports$2.jsx(Se, { ref: ref, id: `${baseId}-numero`, name: name, label: `${labels.identificationNumber} - ${selectedDoc.label}`, value: identificationNumber, onChange: handleIdentificationChange, placeholder: getIdentificationPlaceholder(documentType), error: identificationNumberError, hint: getIdentificationHint(documentType), required: required, disabled: disabled, maxLength: selectedDoc.maxLength, type: selectedDoc.alphanumeric ? "text" : "tel", autoComplete: "off" }))] }));
1743
+ });
1677
1744
 
1678
- export { IdentificationInput as default };
1745
+ export { DEFAULT_IDENTIFICATION_LABELS, IdentificationInput as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rubenpazch/identification-input",
3
- "version": "2.0.2",
3
+ "version": "2.1.0",
4
4
  "description": "IdentificationInput component",
5
5
  "private": false,
6
6
  "main": "dist/index.cjs.js",
@@ -31,8 +31,8 @@
31
31
  "react-dom": "^19.0.0"
32
32
  },
33
33
  "dependencies": {
34
- "@rubenpazch/autocomplete": "^5.0.0",
35
- "@rubenpazch/text-input": "^6.1.0"
34
+ "@rubenpazch/autocomplete": "^5.1.1",
35
+ "@rubenpazch/text-input": "^6.2.1"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@rubenpazch/typescript-config": "3.0.0"
@@ -40,6 +40,12 @@
40
40
  "publishConfig": {
41
41
  "access": "public"
42
42
  },
43
+ "lbyte": {
44
+ "categoria": "salud",
45
+ "resumen": "Tipo y número de documento peruano (DNI, CE, pasaporte) con validación de longitud y formato.",
46
+ "usarCuando": "Registrar el documento de identidad de una persona en Perú.",
47
+ "evitarCuando": "Otros países o identificadores que no son documentos de identidad."
48
+ },
43
49
  "scripts": {
44
50
  "build": "rollup -c",
45
51
  "test": "jest --passWithNoTests"