@rubenpazch/phone-input 1.2.0 → 1.3.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 +20 -20
- package/dist/PhoneInput.d.ts +5 -0
- package/dist/PhoneInput.d.ts.map +1 -1
- package/dist/index.cjs.js +22 -6
- package/dist/index.d.ts +5 -0
- package/dist/index.esm.js +23 -7
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -20,26 +20,26 @@ mientras se escribe con la máscara del país. Valida la cantidad de dígitos
|
|
|
20
20
|
y, si es válido, muestra el número internacional. En el celular el selector
|
|
21
21
|
va arriba del número.
|
|
22
22
|
|
|
23
|
-
| Prop | Tipo | Req. | Por defecto
|
|
24
|
-
| ------------------- | --------------------------- | ---- |
|
|
25
|
-
| `country` | `string` | sí |
|
|
26
|
-
| `onChange` | `(value: string) => void` | sí |
|
|
27
|
-
| `onCountryChange` | `(country: string) => void` | sí |
|
|
28
|
-
| `value` | `string` | sí |
|
|
29
|
-
| `className` | `string` | |
|
|
30
|
-
| `countries` | `PhoneCountry[]` | | `[ {
|
|
31
|
-
| `disabled` | `boolean` | | `false`
|
|
32
|
-
| `error` | `string` | |
|
|
33
|
-
| `hint` | `string` | |
|
|
34
|
-
| `id` | `string` | |
|
|
35
|
-
| `label` | `string` | |
|
|
36
|
-
| `labels` | `Partial<PhoneInputLabels>` | |
|
|
37
|
-
| `name` | `string` | |
|
|
38
|
-
| `onBlur` | `() => void` | |
|
|
39
|
-
| `onFocus` | `() => void` | |
|
|
40
|
-
| `required` | `boolean` | | `false`
|
|
41
|
-
| `showInternational` | `boolean` | | `true`
|
|
42
|
-
| `warning` | `string` | |
|
|
23
|
+
| Prop | Tipo | Req. | Por defecto | Descripción |
|
|
24
|
+
| ------------------- | --------------------------- | ---- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ |
|
|
25
|
+
| `country` | `string` | sí | | Código del país elegido (`"PE"`). |
|
|
26
|
+
| `onChange` | `(value: string) => void` | sí | | Recibe el número formateado con la máscara del país. |
|
|
27
|
+
| `onCountryChange` | `(country: string) => void` | sí | | |
|
|
28
|
+
| `value` | `string` | sí | | Número nacional ya formateado (lo que devuelve `onChange`). |
|
|
29
|
+
| `className` | `string` | | | |
|
|
30
|
+
| `countries` | `PhoneCountry[]` | | `[ { code: "PE", dialCode: "+51", digits: 9, mask: "### ### ###", example: "912345678", }, { code: "MX", dialCode: "+52", digits: 10, mask: "### ### ####", example: "5551234567", }, { code: "CO", dialCode: "+57", digits: 10, mask: "### ### ####", example: "3001234567", }, { code: "CL", dialCode: "+56", digits: 9, mask: "# #### ####", example: "912345678", }, { code: "AR", dialCode: "+54", digits: 10, mask: "### ### ####", example: "9112345678", }, { code: "BR", dialCode: "+55", digits: 11, mask: "(##) ##### ####", example: "11999998888", }, { code: "ES", dialCode: "+34", digits: 9, mask: "### ### ###", example: "612345678", }, { code: "US", dialCode: "+1", digits: 10, mask: "(###) ###-####", example: "2015550123", }, { code: "CA", dialCode: "+1", digits: 10, mask: "(###) ###-####", example: "2015550123", }, ]` | Países del selector; por defecto `PHONE_COUNTRIES`. |
|
|
31
|
+
| `disabled` | `boolean` | | `false` | |
|
|
32
|
+
| `error` | `string` | | | Error externo; tiene prioridad sobre el de formato. |
|
|
33
|
+
| `hint` | `string` | | | Ayuda bajo el campo; por defecto, los dígitos que pide el país. |
|
|
34
|
+
| `id` | `string` | | | |
|
|
35
|
+
| `label` | `string` | | | |
|
|
36
|
+
| `labels` | `Partial<PhoneInputLabels>` | | | Textos de la interfaz; por defecto en español. |
|
|
37
|
+
| `name` | `string` | | | `name` del campo del número (el país va en `${name}-pais`). |
|
|
38
|
+
| `onBlur` | `() => void` | | | Al salir del campo del número (para marcarlo como "tocado"). |
|
|
39
|
+
| `onFocus` | `() => void` | | | |
|
|
40
|
+
| `required` | `boolean` | | `false` | |
|
|
41
|
+
| `showInternational` | `boolean` | | `true` | Muestra el número completo con prefijo ("+51 912 345 678") cuando es válido. Por defecto `true`. |
|
|
42
|
+
| `warning` | `string` | | | Advertencia que no bloquea el envío. |
|
|
43
43
|
|
|
44
44
|
## DEFAULT_PHONE_INPUT_LABELS
|
|
45
45
|
|
package/dist/PhoneInput.d.ts
CHANGED
|
@@ -13,6 +13,11 @@ export interface PhoneCountry {
|
|
|
13
13
|
digits: number;
|
|
14
14
|
/** Máscara de presentación: cada `#` es un dígito. */
|
|
15
15
|
mask: string;
|
|
16
|
+
/**
|
|
17
|
+
* Número de ejemplo, solo dígitos (`"912345678"`): se muestra con la máscara
|
|
18
|
+
* como guía en el campo vacío. Sin él, la máscara con ceros.
|
|
19
|
+
*/
|
|
20
|
+
example?: string;
|
|
16
21
|
}
|
|
17
22
|
/** Países disponibles por defecto. Perú primero. */
|
|
18
23
|
export declare const PHONE_COUNTRIES: PhoneCountry[];
|
package/dist/PhoneInput.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PhoneInput.d.ts","sourceRoot":"","sources":["../src/PhoneInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAY1B,MAAM,WAAW,YAAY;IAC3B,4CAA4C;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,oCAAoC;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB,iDAAiD;IACjD,MAAM,EAAE,MAAM,CAAC;IACf,sDAAsD;IACtD,IAAI,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"PhoneInput.d.ts","sourceRoot":"","sources":["../src/PhoneInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAY1B,MAAM,WAAW,YAAY;IAC3B,4CAA4C;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,oCAAoC;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB,iDAAiD;IACjD,MAAM,EAAE,MAAM,CAAC;IACf,sDAAsD;IACtD,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,oDAAoD;AACpD,eAAO,MAAM,eAAe,EAAE,YAAY,EAgEzC,CAAC;AAKF,8FAA8F;AAC9F,eAAO,MAAM,WAAW,GACtB,SAAS,IAAI,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAAC,EAC5C,aAAY,MAA4B,KACvC,MAWF,CAAC;AAEF,gFAAgF;AAChF,eAAO,MAAM,WAAW,GAAI,OAAO,MAAM,WAA6B,CAAC;AAEvE;;;GAGG;AACH,eAAO,MAAM,WAAW,GACtB,OAAO,MAAM,EACb,aAAa,MAAM,EACnB,YAAW,YAAY,EAAoB,KAC1C,MAgBF,CAAC;AAEF,kEAAkE;AAClE,eAAO,MAAM,YAAY,GACvB,OAAO,MAAM,EACb,aAAa,MAAM,EACnB,YAAW,YAAY,EAAoB,KAC1C,OACuE,CAAC;AAE3E,MAAM,WAAW,gBAAgB;IAC/B,6DAA6D;IAC7D,KAAK,EAAE,MAAM,CAAC;IACd,qCAAqC;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,sDAAsD;IACtD,OAAO,EAAE,MAAM,CAAC;IAChB,yCAAyC;IACzC,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,6FAA6F;AAC7F,eAAO,MAAM,0BAA0B,EAAE,gBAChB,CAAC;AAO1B,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kEAAkE;IAClE,KAAK,EAAE,MAAM,CAAC;IACd,wCAAwC;IACxC,OAAO,EAAE,MAAM,CAAC;IAChB,2DAA2D;IAC3D,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,0DAA0D;IAC1D,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;IAC3B,0DAA0D;IAC1D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2CAA2C;IAC3C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sEAAsE;IACtE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,kEAAkE;IAClE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,mEAAmE;IACnE,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qDAAqD;IACrD,MAAM,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC;CACpC;AAED;;;;;GAKG;AACH,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAgGzC,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
package/dist/index.cjs.js
CHANGED
|
@@ -427,7 +427,7 @@ function requireJsxRuntime () {
|
|
|
427
427
|
|
|
428
428
|
var jsxRuntimeExports = requireJsxRuntime();
|
|
429
429
|
|
|
430
|
-
var
|
|
430
|
+
var n$1,o={exports:{}},t$3={};var a,l$1,i$1={};
|
|
431
431
|
/**
|
|
432
432
|
* @license React
|
|
433
433
|
* react-jsx-runtime.development.js
|
|
@@ -436,7 +436,7 @@ var r$3,n$1={exports:{}},o={};var t$3,a,l$1={};
|
|
|
436
436
|
*
|
|
437
437
|
* This source code is licensed under the MIT license found in the
|
|
438
438
|
* LICENSE file in the root directory of this source tree.
|
|
439
|
-
*/function i$1(){return t$3||(t$3=1,"production"!==process.env.NODE_ENV&&function(){function r(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 b:return "Fragment";case _:return "Profiler";case y: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 h:var n=e.render;return (e=e.displayName)||(e=""!==(e=n.displayName||n.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case k:return null!==(n=e.displayName||null)?n:r(e.type)||"Memo";case x:n=e._payload,e=e._init;try{return r(e(n))}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 o=(r=console).error,t="function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return o.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",t),n(e)}}function t(e){if(e===b)return "<>";if("object"==typeof e&&null!==e&&e.$$typeof===x)return "<...>";try{var n=r(e);return n?"<"+n+">":"<...>"}catch(e){return "<...>"}}function a(){return Error("react-stack-top-frame")}function i(){var e=r(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 c(e,n,t,a,l,c){var u,f=n.children;if(void 0!==f)if(a)if(E(f)){for(a=0;a<f.length;a++)s(f[a]);Object.freeze&&Object.freeze(f);}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(f);if(T.call(n,"key")){f=r(e);var m=Object.keys(n).filter(function(e){return "key"!==e});a=0<m.length?"{key: someKey, "+m.join(": ..., ")+": ...}":"{key: someKey}",$[f+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,f,m,f),$[f+a]=true);}if(f=null,void 0!==t&&(o(t),f=""+t),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}(n)&&(o(n.key),f=""+n.key),"key"in n)for(var b in t={},n)"key"!==b&&(t[b]=n[b]);else t=n;return f&&function(e,r){function n(){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)",r));}n.isReactWarning=true,Object.defineProperty(e,"key",{get:n,configurable:true});}(t,"function"==typeof e?e.displayName||e.name||"Unknown":e),function(e,r,n,o,t,a){var l=n.ref;return e={$$typeof:p,type:e,key:r,props:n,_owner:o},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:t}),Object.defineProperty(e,"_debugTask",{configurable:false,enumerable:false,writable:true,value:a}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}(e,f,t,null===(u=O.A)?null:u.getOwner(),l,c)}function s(e){u(e)?e._store&&(e._store.validated=1):"object"==typeof e&&null!==e&&e.$$typeof===x&&("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,f=e$2,p=Symbol.for("react.transitional.element"),m=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),v=Symbol.for("react.consumer"),g=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),S=Symbol.for("react.suspense"),j=Symbol.for("react.suspense_list"),k=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),w=Symbol.for("react.activity"),N=Symbol.for("react.client.reference"),O=f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,T=Object.prototype.hasOwnProperty,E=Array.isArray,R=console.createTask?console.createTask:function(){return null},C={},A=(f={react_stack_bottom_frame:function(e){return e()}}).react_stack_bottom_frame.bind(f,a)(),z=R(t(a)),$={};l$1.Fragment=b,l$1.jsx=function(e,r,n){var o=1e4>O.recentlyCreatedOwnerStacks++;return c(e,r,n,false,o?Error("react-stack-top-frame"):A,o?R(t(e)):z)},l$1.jsxs=function(e,r,n){var o=1e4>O.recentlyCreatedOwnerStacks++;return c(e,r,n,true,o?Error("react-stack-top-frame"):A,o?R(t(e)):z)};}()),l$1}var c$1=(a||(a=1,"production"===process.env.NODE_ENV?n$1.exports=function(){if(r$3)return o;r$3=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function t(r,n,o){var t=null;if(void 0!==o&&(t=""+o),void 0!==n.key&&(t=""+n.key),"key"in n)for(var a in o={},n)"key"!==a&&(o[a]=n[a]);else o=n;return n=o.ref,{$$typeof:e,type:r,key:t,ref:void 0!==n?n:null,props:o}}return o.Fragment=n,o.jsx=t,o.jsxs=t,o}():n$1.exports=i$1()),n$1.exports);var s$2="Select-module_field__Ib-hj",u$1="Select-module_label__dU5a8",d$1="Select-module_required__aINgC",f$1="Select-module_select__jkWCR",p$1="Select-module_selectError__r5GRT",m$1="Select-module_error__oELij",b$1="Select-module_hint__xTI1C",y$1="Select-module_labelRow__c2lUI",_$1="Select-module_labelAction__s6AaT",v$1="Select-module_selectWarning__zVgPA",g$1="Select-module_warning__T5-yO";!function(e,r){ void 0===r&&(r={});var n=r.insertAt;if("undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css","top"===n&&o.firstChild?o.insertBefore(t,o.firstChild):o.appendChild(t),t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e));}}(".Select-module_field__Ib-hj {\n display: flex;\n flex-direction: column;\n gap: var(--lb-space-1);\n}\n\n.Select-module_label__dU5a8 {\n font-size: var(--lb-font-size-sm);\n font-weight: var(--lb-font-weight-medium);\n color: var(--lb-color-neutral-700);\n}\n\n.Select-module_required__aINgC {\n color: var(--lb-color-danger);\n}\n\n.Select-module_select__jkWCR {\n appearance: none;\n width: 100%;\n padding: var(--lb-space-2) var(--lb-space-8) var(--lb-space-2)\n var(--lb-space-3);\n font-family: var(--lb-font-sans);\n font-size: var(--lb-font-size-md);\n font-weight: var(--lb-font-weight-medium);\n color: var(--lb-color-foreground);\n background-color: var(--lb-color-background);\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n background-position: right var(--lb-space-3) center;\n border: 2px solid var(--lb-color-neutral-300);\n border-radius: var(--lb-radius-md);\n cursor: pointer;\n transition:\n border-color 0.15s ease,\n box-shadow 0.15s ease;\n}\n\n.Select-module_select__jkWCR:focus {\n outline: none;\n border-color: var(--lb-color-primary);\n box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);\n}\n\n.Select-module_select__jkWCR:disabled {\n cursor: not-allowed;\n opacity: 0.6;\n}\n\n.Select-module_selectError__r5GRT {\n border-color: var(--lb-color-danger);\n}\n\n.Select-module_selectError__r5GRT:focus {\n border-color: var(--lb-color-danger);\n box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);\n}\n\n.Select-module_error__oELij {\n margin: 0;\n font-size: var(--lb-font-size-sm);\n color: var(--lb-color-danger);\n}\n\n.Select-module_hint__xTI1C {\n margin: 0;\n font-size: var(--lb-font-size-xs);\n color: var(--lb-color-muted-foreground);\n}\n\n/* Etiqueta con acción a la derecha (ayuda, enlace) */\n.Select-module_labelRow__c2lUI {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--lb-space-2);\n}\n\n.Select-module_labelAction__s6AaT {\n display: inline-flex;\n align-items: center;\n flex: none;\n}\n\n/* Advertencia (no bloquea el envío) */\n.Select-module_selectWarning__zVgPA {\n border-color: var(--lb-color-warning);\n}\n\n.Select-module_warning__T5-yO {\n margin: 0;\n font-size: var(--lb-font-size-xs);\n color: var(--lb-color-amber-strong);\n}\n");const h$1=(...e)=>e.filter(Boolean).join(" "),S$1=e$2.forwardRef(function({label:r,labelAction:n,value:o,onChange:t,options:a,placeholder:l,hint:i,error:S,warning:j,onBlur:k,onFocus:x,required:w=false,disabled:N=false,id:O,name:T,className:E},R){const C=e$2.useId(),A=O??T??C,z=`${A}-error`,$=`${A}-ayuda`,P=`${A}-advertencia`,I=S?void 0:j,F=[i&&$,S&&z,I&&P].filter(Boolean).join(" ")||void 0;return c$1.jsxs("div",{className:h$1(s$2,E),children:[r&&(()=>{const e=c$1.jsxs("label",{htmlFor:A,className:u$1,children:[r,w&&c$1.jsxs("span",{className:d$1,"aria-hidden":"true",children:[" ","*"]})]});return n?c$1.jsxs("div",{className:y$1,children:[e,c$1.jsx("span",{className:_$1,children:n})]}):e})(),c$1.jsxs("select",{ref:R,id:A,name:T,className:h$1(f$1,S&&p$1,I&&v$1),value:o,required:w,disabled:N,"aria-invalid":!!S||void 0,"aria-describedby":F,onChange:e=>t(e.target.value),onBlur:k,onFocus:x,children:[l&&c$1.jsx("option",{value:"",disabled:true,children:l}),a.map(e=>c$1.jsx("option",{value:e.value,children:e.label},e.value))]}),i&&c$1.jsx("p",{id:$,className:b$1,children:i}),S&&c$1.jsx("p",{id:z,className:m$1,role:"alert",children:S}),I&&c$1.jsx("p",{id:P,className:g$1,children:I})]})});
|
|
439
|
+
*/function c$1(){return a||(a=1,"production"!==process.env.NODE_ENV&&function(){function r(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 b:return "Fragment";case _:return "Profiler";case y: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 h:var n=e.render;return (e=e.displayName)||(e=""!==(e=n.displayName||n.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case k:return null!==(n=e.displayName||null)?n:r(e.type)||"Memo";case x:n=e._payload,e=e._init;try{return r(e(n))}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 o=(r=console).error,t="function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return o.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",t),n(e)}}function t(e){if(e===b)return "<>";if("object"==typeof e&&null!==e&&e.$$typeof===x)return "<...>";try{var n=r(e);return n?"<"+n+">":"<...>"}catch(e){return "<...>"}}function a(){return Error("react-stack-top-frame")}function l(){var e=r(this.type);return E[e]||(E[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,n,t,a,i,c){var u,f=n.children;if(void 0!==f)if(a)if(C(f)){for(a=0;a<f.length;a++)s(f[a]);Object.freeze&&Object.freeze(f);}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(f);if(O.call(n,"key")){f=r(e);var m=Object.keys(n).filter(function(e){return "key"!==e});a=0<m.length?"{key: someKey, "+m.join(": ..., ")+": ...}":"{key: someKey}",$[f+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,f,m,f),$[f+a]=true);}if(f=null,void 0!==t&&(o(t),f=""+t),function(e){if(O.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return false}return void 0!==e.key}(n)&&(o(n.key),f=""+n.key),"key"in n)for(var b in t={},n)"key"!==b&&(t[b]=n[b]);else t=n;return f&&function(e,r){function n(){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)",r));}n.isReactWarning=true,Object.defineProperty(e,"key",{get:n,configurable:true});}(t,"function"==typeof e?e.displayName||e.name||"Unknown":e),function(e,r,n,o,t,a){var i=n.ref;return e={$$typeof:p,type:e,key:r,props:n,_owner:o},null!==(void 0!==i?i: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:t}),Object.defineProperty(e,"_debugTask",{configurable:false,enumerable:false,writable:true,value:a}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}(e,f,t,null===(u=z.A)?null:u.getOwner(),i,c)}function s(e){u(e)?e._store&&(e._store.validated=1):"object"==typeof e&&null!==e&&e.$$typeof===x&&("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,f=e$2,p=Symbol.for("react.transitional.element"),m=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),v=Symbol.for("react.consumer"),g=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),S=Symbol.for("react.suspense"),j=Symbol.for("react.suspense_list"),k=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),w=Symbol.for("react.activity"),N=Symbol.for("react.client.reference"),z=f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,O=Object.prototype.hasOwnProperty,C=Array.isArray,T=console.createTask?console.createTask:function(){return null},E={},R=(f={react_stack_bottom_frame:function(e){return e()}}).react_stack_bottom_frame.bind(f,a)(),A=T(t(a)),$={};i$1.Fragment=b,i$1.jsx=function(e,r,n){var o=1e4>z.recentlyCreatedOwnerStacks++;return c(e,r,n,false,o?Error("react-stack-top-frame"):R,o?T(t(e)):A)},i$1.jsxs=function(e,r,n){var o=1e4>z.recentlyCreatedOwnerStacks++;return c(e,r,n,true,o?Error("react-stack-top-frame"):R,o?T(t(e)):A)};}()),i$1}var s$2=(l$1||(l$1=1,"production"===process.env.NODE_ENV?o.exports=function(){if(n$1)return t$3;n$1=1;var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function o(r,n,o){var t=null;if(void 0!==o&&(t=""+o),void 0!==n.key&&(t=""+n.key),"key"in n)for(var a in o={},n)"key"!==a&&(o[a]=n[a]);else o=n;return n=o.ref,{$$typeof:e,type:r,key:t,ref:void 0!==n?n:null,props:o}}return t$3.Fragment=r,t$3.jsx=o,t$3.jsxs=o,t$3}():o.exports=c$1()),o.exports);var u$1="Select-module_field__Ib-hj",d$1="Select-module_label__dU5a8",f$1="Select-module_required__aINgC",p$1="Select-module_select__jkWCR",m$1="Select-module_sizeSm__o8JKe",b$1="Select-module_sizeLg__hypCf",y$1="Select-module_selectError__r5GRT",_$1="Select-module_error__oELij",v$1="Select-module_hint__xTI1C",g$1="Select-module_labelRow__c2lUI",h$1="Select-module_labelAction__s6AaT",S$1="Select-module_selectWarning__zVgPA",j$1="Select-module_warning__T5-yO";!function(e,r){ void 0===r&&(r={});var n=r.insertAt;if("undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css","top"===n&&o.firstChild?o.insertBefore(t,o.firstChild):o.appendChild(t),t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e));}}(".Select-module_field__Ib-hj {\n display: flex;\n flex-direction: column;\n gap: var(--lb-space-1);\n}\n\n.Select-module_label__dU5a8 {\n font-size: var(--lb-font-size-sm);\n font-weight: var(--lb-font-weight-medium);\n color: var(--lb-color-neutral-700);\n}\n\n.Select-module_required__aINgC {\n color: var(--lb-color-danger);\n}\n\n.Select-module_select__jkWCR {\n appearance: none;\n width: 100%;\n padding: var(--lb-space-2) var(--lb-space-8) var(--lb-space-2)\n var(--lb-space-3);\n font-family: var(--lb-font-sans);\n font-size: var(--lb-font-size-md);\n font-weight: var(--lb-font-weight-medium);\n color: var(--lb-color-foreground);\n background-color: var(--lb-color-background);\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n background-position: right var(--lb-space-3) center;\n border: 2px solid var(--lb-color-neutral-300);\n border-radius: var(--lb-radius-md);\n cursor: pointer;\n transition:\n border-color 0.15s ease,\n box-shadow 0.15s ease;\n}\n\n.Select-module_sizeSm__o8JKe {\n padding: var(--lb-space-1) var(--lb-space-6) var(--lb-space-1)\n var(--lb-space-2);\n font-size: var(--lb-font-size-sm);\n background-position: right var(--lb-space-2) center;\n}\n\n.Select-module_sizeLg__hypCf {\n padding: var(--lb-space-3) var(--lb-space-10) var(--lb-space-3)\n var(--lb-space-4);\n font-size: var(--lb-font-size-lg);\n}\n\n.Select-module_select__jkWCR:focus {\n outline: none;\n border-color: var(--lb-color-primary);\n box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);\n}\n\n.Select-module_select__jkWCR:disabled {\n cursor: not-allowed;\n opacity: 0.6;\n}\n\n.Select-module_selectError__r5GRT {\n border-color: var(--lb-color-danger);\n}\n\n.Select-module_selectError__r5GRT:focus {\n border-color: var(--lb-color-danger);\n box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);\n}\n\n.Select-module_error__oELij {\n margin: 0;\n font-size: var(--lb-font-size-sm);\n color: var(--lb-color-danger);\n}\n\n.Select-module_hint__xTI1C {\n margin: 0;\n font-size: var(--lb-font-size-xs);\n color: var(--lb-color-muted-foreground);\n}\n\n/* Etiqueta con acción a la derecha (ayuda, enlace) */\n.Select-module_labelRow__c2lUI {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--lb-space-2);\n}\n\n.Select-module_labelAction__s6AaT {\n display: inline-flex;\n align-items: center;\n flex: none;\n}\n\n/* Advertencia (no bloquea el envío) */\n.Select-module_selectWarning__zVgPA {\n border-color: var(--lb-color-warning);\n}\n\n.Select-module_warning__T5-yO {\n margin: 0;\n font-size: var(--lb-font-size-xs);\n color: var(--lb-color-amber-strong);\n}\n");const k$1=(...e)=>e.filter(Boolean).join(" "),x$1=e$2.forwardRef(function({label:n,labelAction:o,value:t,onChange:a,options:l,placeholder:i,hint:c,error:x,warning:w,onBlur:N,onFocus:z,required:O=false,disabled:C=false,id:T,name:E,className:R,size:A},$){const P=shared.normalizeSize(A),I={sm:m$1,md:void 0,lg:b$1}[P],F=e$2.useId(),U=T??E??F,W=`${U}-error`,B=`${U}-ayuda`,L=`${U}-advertencia`,q=x?void 0:w,D=[c&&B,x&&W,q&&L].filter(Boolean).join(" ")||void 0;return s$2.jsxs("div",{className:k$1(u$1,R),children:[n&&(()=>{const e=s$2.jsxs("label",{htmlFor:U,className:d$1,children:[n,O&&s$2.jsxs("span",{className:f$1,"aria-hidden":"true",children:[" ","*"]})]});return o?s$2.jsxs("div",{className:g$1,children:[e,s$2.jsx("span",{className:h$1,children:o})]}):e})(),s$2.jsxs("select",{ref:$,id:U,name:E,className:k$1(p$1,I,x&&y$1,q&&S$1),value:t,"data-size":P,required:O,disabled:C,"aria-invalid":!!x||void 0,"aria-describedby":D,onChange:e=>a(e.target.value),onBlur:N,onFocus:z,children:[i&&s$2.jsx("option",{value:"",disabled:true,children:i}),l.map(e=>s$2.jsx("option",{value:e.value,children:e.label},e.value))]}),c&&s$2.jsx("p",{id:B,className:v$1,children:c}),x&&s$2.jsx("p",{id:W,className:_$1,role:"alert",children:x}),q&&s$2.jsx("p",{id:L,className:j$1,children:q})]})});
|
|
440
440
|
|
|
441
441
|
var s$1,i={exports:{}},u={};var d,c,m={};
|
|
442
442
|
/**
|
|
@@ -456,7 +456,7 @@ var s$1,i={exports:{}},u={};var d,c,m={};
|
|
|
456
456
|
*
|
|
457
457
|
* This source code is licensed under the MIT license found in the
|
|
458
458
|
* LICENSE file in the root directory of this source tree.
|
|
459
|
-
*/var v=(b||(b=1,"production"===process.env.NODE_ENV?h.exports=function(){if(_)return f;_=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 l in r={},t)"key"!==l&&(r[l]=t[l]);else r=t;return t=r.ref,{$$typeof:e,type:n,key:o,ref:void 0!==t?t:null,props:r}}return f.Fragment=n,f.jsx=t,f.jsxs=t,f}():h.exports=(x||(x=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 h:return "Profiler";case g:return "StrictMode";case v:return "Suspense";case T:return "SuspenseList";case j: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 x:return e.displayName||"Context";case f:return (e._context.displayName||"Context")+".Consumer";case b: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 w: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===w)return "<...>";try{var t=n(e);return t?"<"+t+">":"<...>"}catch(e){return "<...>"}}function l(){return Error("react-stack-top-frame")}function a(){var e=n(this.type);return R[e]||(R[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,l,s,u){var c,p=t.children;if(void 0!==p)if(l)if(z(p)){for(l=0;l<p.length;l++)i(p[l]);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(S.call(t,"key")){p=n(e);var _=Object.keys(t).filter(function(e){return "key"!==e});l=0<_.length?"{key: someKey, "+_.join(": ..., ")+": ...}":"{key: someKey}",E[p+l]||(_=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} />',l,p,_,p),E[p+l]=true);}if(p=null,void 0!==o&&(r(o),p=""+o),function(e){if(S.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(){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,l){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:a}):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:l}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}(e,p,o,null===(c=N.A)?null:c.getOwner(),s,u)}function i(e){u(e)?e._store&&(e._store.validated=1):"object"==typeof e&&null!==e&&e.$$typeof===w&&("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 d,c=e$2,m=Symbol.for("react.transitional.element"),p=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),g=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),x=Symbol.for("react.context"),b=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),j=Symbol.for("react.activity"),k=Symbol.for("react.client.reference"),N=c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,S=Object.prototype.hasOwnProperty,z=Array.isArray,O=console.createTask?console.createTask:function(){return null},R={},A=(c={react_stack_bottom_frame:function(e){return e()}}).react_stack_bottom_frame.bind(c,l)(),C=O(o(l)),E={};y.Fragment=_,y.jsx=function(e,n,t){var r=1e4>N.recentlyCreatedOwnerStacks++;return s(e,n,t,false,r?Error("react-stack-top-frame"):A,r?O(o(e)):C)},y.jsxs=function(e,n,t){var r=1e4>N.recentlyCreatedOwnerStacks++;return s(e,n,t,true,r?Error("react-stack-top-frame"):A,r?O(o(e)):C)};}()),y)),h.exports);function 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 v.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:v.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 I=({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 v.jsx("svg",{width:t[n],height:t[n],className:r,viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:v.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"})})},w=({className:e="",size:n="md",color:t="currentColor"})=>{const r={sm:16,md:20,lg:24};return v.jsxs("svg",{width:r[n],height:r[n],className:`${{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"}[n]} ${e}`,fill:"none",stroke:t,viewBox:"0 0 24 24",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[v.jsx("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),v.jsx("circle",{cx:"12",cy:"12",r:"3"})]})},j=({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 v.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:v.jsx("path",{d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})},k={sm:16,md:20,lg:24};function N({size:e="md",title:n,...t}){return v.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:k[e],height:k[e],fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",role:n?"img":void 0,"aria-hidden":!n||void 0,focusable:"false",...t,children:[n&&v.jsx("title",{children:n}),v.jsx("path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49"}),v.jsx("path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242"}),v.jsx("path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143"}),v.jsx("path",{d:"m2 2 20 20"})]})}var S="TextInput-module_container__QXVA9",z="TextInput-module_label__GGFxk",O="TextInput-module_required__qlHAH",R="TextInput-module_inputContainer__-zaWR",A="TextInput-module_icon__F1AYg",C="TextInput-module_input__I8TSn",E="TextInput-module_inputWithIcon__TDgMC",P="TextInput-module_inputWithCharCount__qgvqA",$="TextInput-module_inputError__-Ga78",L="TextInput-module_inputSuccess__xsjt7",q="TextInput-module_charCount__RyuVm",M="TextInput-module_charCountNormal__LCUr7",U="TextInput-module_charCountNear__OKroK",B="TextInput-module_charCountLimit__iaB20",F="TextInput-module_charCountIcon__lRD-4",V="TextInput-module_charProgressBar__Wva8D",W="TextInput-module_charProgress__ZUsGs",Z="TextInput-module_charProgressNormal__TdFY4",D="TextInput-module_charProgressNear__beyMs",J="TextInput-module_charProgressLimit__Vr6d-",G="TextInput-module_hint__iZiig",H="TextInput-module_requiredHelper__TUGsU",X="TextInput-module_validationMessage__3g-wc",Y="TextInput-module_validationIcon__q5LT6",K="TextInput-module_validationText__-qAuu",Q="TextInput-module_validEmail__Ya1tf",ee="TextInput-module_emailSuggestion__ZzQkZ",ne="TextInput-module_suggestionButton__Rsxt8",te="TextInput-module_error__ewnmB",re="TextInput-module_errorIcon__JkIpb",oe="TextInput-module_errorText__ba7lR",le="TextInput-module_passwordStrength__ICyJU",ae="TextInput-module_strengthBar__3c8Yf",se="TextInput-module_strengthSegment__76ih4",ie="TextInput-module_strengthSegmentInactive__RK1Q8",ue="TextInput-module_strengthSegmentWeak__BFvgT",de="TextInput-module_strengthSegmentFair__AOJW5",ce="TextInput-module_strengthSegmentGood__uGgTx",me="TextInput-module_strengthSegmentStrong__vP5Yi",pe="TextInput-module_strengthSegmentVeryStrong__4Tull",_e="TextInput-module_strengthLabel__PpEO9",ge="TextInput-module_strengthText__jfVUh",he="TextInput-module_strengthValue__04hhw",fe="TextInput-module_strengthValueWeak__8Ek8Q",xe="TextInput-module_strengthValueFair__70N63",be="TextInput-module_strengthValueGood__NgsOd",ye="TextInput-module_strengthValueStrong__qaKsi",ve="TextInput-module_strengthValueVeryStrong__80d9m",Te="TextInput-module_requirements__eD6oz",Ie="TextInput-module_requirement__KoZx2",we="TextInput-module_requirementIcon__VjQXJ",je="TextInput-module_requirementIconMet__UNZFD",ke="TextInput-module_requirementIconUnmet__1MF9h",Ne="TextInput-module_requirementText__fFcdn",Se="TextInput-module_requirementTextMet__eGbSi",ze="TextInput-module_warning__ywIFl",Oe="TextInput-module_labelRow__DHwBZ",Re="TextInput-module_labelAction__gSIJc",Ae="TextInput-module_inputWithToggle__ACEsI",Ce="TextInput-module_passwordToggle__691M2",Ee="TextInput-module_groupless__8WgfT",Pe="TextInput-module_group__ZT9UR",$e="TextInput-module_addon__eHX4J",Le="TextInput-module_addonStart__8MNaQ",qe="TextInput-module_addonEnd__29ckI",Me="TextInput-module_inputAfterAddon__UEdes",Ue="TextInput-module_inputBeforeAddon__kFHUQ",Be="TextInput-module_groupError__GmXum",Fe="TextInput-module_groupDisabled__iehsu",Ve="TextInput-module_rulesTitle__8Ib6c",We="TextInput-module_rulesList__E1UOW",Ze="TextInput-module_srOnly__thTJl";!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\n/* Etiqueta con acción a la derecha (ayuda, enlace) */\n.TextInput-module_labelRow__DHwBZ {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--lb-space-2);\n}\n\n.TextInput-module_labelAction__gSIJc {\n display: inline-flex;\n align-items: center;\n flex: none;\n}\n\n/* Ver / ocultar contraseña */\n.TextInput-module_inputWithToggle__ACEsI {\n padding-right: 2.75rem;\n}\n\n.TextInput-module_passwordToggle__691M2 {\n position: absolute;\n top: 50%;\n right: 0.5rem;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 2rem;\n height: 2rem;\n padding: 0;\n border: 0;\n border-radius: var(--lb-radius-sm);\n background: transparent;\n color: var(--lb-color-muted-foreground);\n cursor: pointer;\n transform: translateY(-50%);\n}\n\n.TextInput-module_passwordToggle__691M2:hover:not(:disabled) {\n color: var(--lb-color-foreground);\n}\n\n.TextInput-module_passwordToggle__691M2:focus-visible {\n outline: 2px solid var(--lb-color-ring);\n outline-offset: 1px;\n}\n\n.TextInput-module_passwordToggle__691M2:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n/* Bloques pegados al campo (startAddon / endAddon) */\n.TextInput-module_groupless__8WgfT {\n display: contents;\n}\n\n.TextInput-module_group__ZT9UR {\n display: flex;\n align-items: stretch;\n}\n\n.TextInput-module_group__ZT9UR > .TextInput-module_inputContainer__-zaWR {\n flex: 1 1 auto;\n min-width: 0;\n}\n\n.TextInput-module_addon__eHX4J {\n display: flex;\n flex: none;\n align-items: center;\n padding: 0 var(--lb-space-3);\n border: 2px solid var(--lb-color-neutral-300);\n background: var(--lb-color-muted);\n color: var(--lb-color-muted-foreground);\n font-family: var(--lb-font-sans);\n font-size: var(--lb-font-size-sm);\n font-weight: var(--lb-font-weight-medium);\n white-space: nowrap;\n transition: border-color 150ms ease;\n}\n\n/* Un botón dentro del bloque lo ocupa entero. */\n.TextInput-module_addon__eHX4J:has(> button) {\n padding: 0;\n background: transparent;\n}\n\n.TextInput-module_addon__eHX4J > button {\n align-self: stretch;\n height: auto;\n border-radius: 0;\n}\n\n.TextInput-module_addonStart__8MNaQ {\n border-right: 0;\n border-radius: var(--lb-radius-md) 0 0 var(--lb-radius-md);\n}\n\n.TextInput-module_addonEnd__29ckI {\n border-left: 0;\n border-radius: 0 var(--lb-radius-md) var(--lb-radius-md) 0;\n}\n\n.TextInput-module_addonStart__8MNaQ > button {\n border-radius: calc(var(--lb-radius-md) - 2px) 0 0\n calc(var(--lb-radius-md) - 2px);\n}\n\n.TextInput-module_addonEnd__29ckI > button {\n border-radius: 0 calc(var(--lb-radius-md) - 2px)\n calc(var(--lb-radius-md) - 2px) 0;\n}\n\n.TextInput-module_inputAfterAddon__UEdes {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n}\n\n.TextInput-module_inputBeforeAddon__kFHUQ {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n\n.TextInput-module_group__ZT9UR:focus-within .TextInput-module_addon__eHX4J {\n border-color: var(--lb-color-primary);\n}\n\n.TextInput-module_groupError__GmXum .TextInput-module_addon__eHX4J,\n.TextInput-module_groupError__GmXum:focus-within .TextInput-module_addon__eHX4J {\n border-color: var(--lb-color-danger);\n}\n\n.TextInput-module_groupDisabled__iehsu .TextInput-module_addon__eHX4J {\n opacity: 0.7;\n}\n\n/* Reglas propias de la contraseña (passwordRules) */\n.TextInput-module_rulesTitle__8Ib6c {\n margin: 0;\n font-weight: var(--lb-font-weight-medium);\n color: var(--lb-color-neutral-700);\n}\n\n.TextInput-module_rulesList__E1UOW {\n list-style: none;\n margin: 0;\n padding: 0;\n display: flex;\n flex-direction: column;\n gap: var(--lb-space-1);\n}\n\n.TextInput-module_srOnly__thTJl {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n}\n");const De=(...e)=>e.filter(Boolean).join(" "),Je=/^[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])?)*$/,Ge=e$2.forwardRef(function({id:e,name:s,label:i,value:u,onChange:d,placeholder:c,error:m,warning:p,required:_=false,disabled:h=false,type:f="text",className:x="",hint:b,maxLength:y,minLength:v,minLengthMessage:k,pattern:Ge,icon:He,onBlur:Xe,onFocus:Ye,onValidityChange:Ke,autoComplete:Qe,validateEmail:en=false,showPasswordStrength:nn=false,requiredMessage:tn,emailValidMessage:rn,emailInvalidMessage:on,emailSuggestionMessage:ln,strengthLabels:an,strengthLabelPrefix:sn,requirementsLabels:un,passwordRules:dn,passwordRulesLabels:cn,showPasswordToggle:mn=true,passwordToggleLabels:pn,labels:_n,labelAction:gn,startAddon:hn,endAddon:fn,...xn},bn){const[yn,vn]=e$2.useState(false),[Tn,In]=e$2.useState(false),wn="password"===f&&mn&&!en,jn=e$2.useMemo(()=>en&&u?(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})(u):null,[en,u]),kn=e$2.useMemo(()=>{if(!en||!u)return null;return Je.test(u)&&!(null!==jn)},[en,u,jn]),Nn=en&&u&&!kn&&!jn,Sn=Nn&&on||null,zn=Boolean(v&&u.length>0&&u.length<v),On=!v||u.length>=v,Rn=!y||u.length<=y,An=!Ge||new RegExp(Ge).test(u),Cn=e$2.useMemo(()=>"password"===f&&dn?.length?dn.map(e=>({...e,met:e.test(u)})):null,[f,dn,u]),En=!Cn||Cn.every(e=>e.met),Pn=shared.useUiMessages("textInput",_n,{showPassword:pn?.show,hidePassword:pn?.hide,passwordRulesTitle:cn?.title,ruleMet:cn?.met,ruleUnmet:cn?.unmet}),$n={title:Pn.passwordRulesTitle,met:Pn.ruleMet,unmet:Pn.ruleUnmet},Ln=Boolean(u&&!m&&!Nn&&!jn&&(!_||u.length>0)&&(!en||kn)&&On&&Rn&&An&&En),qn=e$2.useMemo(()=>"password"!==f||!nn||Cn?null:(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"}})(u),[f,u,nn,Cn]),Mn=Boolean(!h&&!m&&(!_||u.trim().length>0)&&(!en||kn)&&On&&Rn&&An&&En);e$2.useEffect(()=>{Ke?.(Mn);},[Mn,Ke]);const Un=y&&"text"===f&&u,Bn=u.length,Fn=y?Bn/y*100:0,Vn=Fn>80,Wn=Fn>=100,Zn=m||Nn&&on||zn&&k||void 0,Dn=Boolean(b&&!m&&!Nn),Jn=shared.useFieldIds({id:e,name:s,required:_,error:Zn||void 0,warning:Zn?void 0:p,hint:Dn?b:void 0}),Gn=e$2.useId(),Hn=Boolean(hn||fn),Xn=["string"==typeof hn||"number"==typeof hn?`${Gn}-start`:null,"string"==typeof fn||"number"==typeof fn?`${Gn}-end`:null].filter(Boolean),Yn=`${Gn}-rules`,Kn=[Jn.controlProps["aria-describedby"],...Xn,Cn?Yn:null].filter(Boolean).join(" ")||void 0,Qn=Boolean(m||Nn||zn);return g.jsxs("div",{className:De(S,x),"data-testid":"text-input",children:[i&&(()=>{const e=g.jsxs("label",{htmlFor:Jn.inputId,className:z,children:[i,_&&g.jsx("span",{className:O,"aria-hidden":"true",children:"*"})]});return gn?g.jsxs("div",{className:Oe,children:[e,g.jsx("span",{className:Re,children:gn})]}):e})(),g.jsxs("div",{className:Hn?De(Pe,Qn?Be:void 0,h?Fe:void 0):Ee,children:[hn&&g.jsx("div",{id:`${Gn}-start`,className:De($e,Le),"data-testid":"start-addon",children:hn}),g.jsxs("div",{className:R,children:[He&&!yn&&g.jsx("div",{className:A,children:He}),g.jsx("input",{...xn,ref:bn,...Jn.controlProps,"aria-describedby":Kn,name:s,required:_,type:en||wn&&Tn?"text":f,inputMode:en?"email":xn.inputMode,value:u,onChange:e=>d(e.target.value),onFocus:()=>{vn(true),Ye?.();},onBlur:()=>{vn(false),Xe?.();},placeholder:c,disabled:h,maxLength:y,minLength:v,pattern:Ge,autoComplete:Qe,className:De(C,He?E:void 0,hn?Me:void 0,fn?Ue:void 0,Un?P:void 0,wn?Ae:void 0,m||Nn||zn?$:void 0,h||m||Sn||!Ln?void 0:L),"data-testid":"input-field","data-error":!!m||!!Nn||zn}),wn&&g.jsx("button",{type:"button",className:Ce,onClick:()=>In(e=>!e),"aria-label":Tn?Pn.hidePassword:Pn.showPassword,"aria-pressed":Tn,"aria-controls":Jn.inputId,disabled:h,children:Tn?g.jsx(N,{size:"sm"}):g.jsx(w,{size:"sm"})}),Un&&g.jsxs("div",{className:De(q,Wn?B:Vn?U:M),"data-testid":"char-count",children:[g.jsxs("div",{children:[Bn,"/",y]}),Wn&&g.jsx(I,{className:F,size:"sm"})]})]}),fn&&g.jsx("div",{id:`${Gn}-end`,className:De($e,qe),"data-testid":"end-addon",children:fn})]}),Un&&y>20&&g.jsx("div",{className:V,children:g.jsx("div",{className:De(W,Wn?J:Vn?D:Z),style:{width:`${Math.min(Fn,100)}%`}})}),Dn&&g.jsx("p",{id:Jn.hintId,className:G,children:b}),p&&!Zn&&g.jsx("p",{id:Jn.warningId,className:ze,children:p}),_&&!u&&!m&&!Nn&&tn&&g.jsx("p",{className:H,children:tn}),en&&u&&kn&&rn&&g.jsxs("div",{className:De(X,Q),children:[g.jsx(T,{className:Y,size:"sm"}),g.jsx("p",{className:K,children:rn})]}),jn&&!m&&ln&&g.jsxs("div",{className:De(X,ee),children:[g.jsx(j,{className:Y,size:"sm"}),g.jsxs("p",{className:K,children:[ln.replace("{suggestion}",jn),g.jsx("button",{type:"button",onClick:()=>d(jn),className:ne,children:jn})]})]}),Cn&&g.jsxs("div",{id:Yn,className:Te,"data-testid":"password-rules",children:[g.jsx("p",{className:Ve,children:$n.title}),g.jsx("ul",{className:We,children:Cn.map(e=>g.jsxs("li",{className:Ie,"data-met":e.met,children:[g.jsx(T,{"aria-hidden":"true",className:De(we,e.met?je:ke),size:"sm"}),g.jsx("span",{className:De(Ne,e.met&&Se),children:e.label}),g.jsx("span",{className:Ze,children:` (${e.met?$n.met:$n.unmet})`})]},e.id))})]}),qn&&qn.score>0&&g.jsxs("div",{className:le,children:[g.jsx("div",{className:ae,children:[0,1,2,3,4].map(e=>g.jsx("div",{className:De(se,e<qn.score?"weak"===qn.strength?ue:"fair"===qn.strength?de:"good"===qn.strength?ce:"strong"===qn.strength?me:pe:ie)},e))}),(sn||an?.[qn.strength])&&g.jsx("div",{className:_e,children:g.jsxs("p",{className:ge,children:[sn&&`${sn} `,g.jsx("span",{className:De(he,"weak"===qn.strength?fe:"fair"===qn.strength?xe:"good"===qn.strength?be:"strong"===qn.strength?ye:ve),children:an?.[qn.strength]})]})}),un&&g.jsxs("div",{className:Te,children:[un.lowercase&&g.jsxs("div",{className:Ie,children:[g.jsx(T,{className:De(we,/[a-z]/.test(u)?je:ke),size:"sm"}),g.jsx("span",{className:De(Ne,/[a-z]/.test(u)&&Se),children:un.lowercase})]}),un.uppercase&&g.jsxs("div",{className:Ie,children:[g.jsx(T,{className:De(we,/[A-Z]/.test(u)?je:ke),size:"sm"}),g.jsx("span",{className:De(Ne,/[A-Z]/.test(u)&&Se),children:un.uppercase})]}),un.number&&g.jsxs("div",{className:Ie,children:[g.jsx(T,{className:De(we,/\d/.test(u)?je:ke),size:"sm"}),g.jsx("span",{className:De(Ne,/\d/.test(u)&&Se),children:un.number})]}),un.special&&g.jsxs("div",{className:Ie,children:[g.jsx(T,{className:De(we,/[!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?]/.test(u)?je:ke),size:"sm"}),g.jsx("span",{className:De(Ne,/[!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?]/.test(u)&&Se),children:un.special})]}),un.minLength&&g.jsxs("div",{className:Ie,children:[g.jsx(T,{className:De(we,u.length>=8?je:ke),size:"sm"}),g.jsx("span",{className:De(Ne,u.length>=8&&Se),children:un.minLength})]})]})]}),Zn&&g.jsxs("div",{id:Jn.errorId,className:te,role:"alert",children:[g.jsx(I,{className:re,size:"sm"}),g.jsx("p",{className:oe,children:Zn})]})]})});Ge.displayName="TextInput";
|
|
459
|
+
*/var v=(b||(b=1,"production"===process.env.NODE_ENV?h.exports=function(){if(_)return f;_=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 l in r={},t)"key"!==l&&(r[l]=t[l]);else r=t;return t=r.ref,{$$typeof:e,type:n,key:o,ref:void 0!==t?t:null,props:r}}return f.Fragment=n,f.jsx=t,f.jsxs=t,f}():h.exports=(x||(x=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 h:return "Profiler";case g:return "StrictMode";case v:return "Suspense";case T:return "SuspenseList";case j: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 x:return e.displayName||"Context";case f:return (e._context.displayName||"Context")+".Consumer";case b: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 w: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===w)return "<...>";try{var t=n(e);return t?"<"+t+">":"<...>"}catch(e){return "<...>"}}function l(){return Error("react-stack-top-frame")}function a(){var e=n(this.type);return R[e]||(R[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,l,s,u){var c,p=t.children;if(void 0!==p)if(l)if(z(p)){for(l=0;l<p.length;l++)i(p[l]);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(S.call(t,"key")){p=n(e);var _=Object.keys(t).filter(function(e){return "key"!==e});l=0<_.length?"{key: someKey, "+_.join(": ..., ")+": ...}":"{key: someKey}",E[p+l]||(_=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} />',l,p,_,p),E[p+l]=true);}if(p=null,void 0!==o&&(r(o),p=""+o),function(e){if(S.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(){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,l){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:a}):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:l}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}(e,p,o,null===(c=N.A)?null:c.getOwner(),s,u)}function i(e){u(e)?e._store&&(e._store.validated=1):"object"==typeof e&&null!==e&&e.$$typeof===w&&("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 d,c=e$2,m=Symbol.for("react.transitional.element"),p=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),g=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),x=Symbol.for("react.context"),b=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),j=Symbol.for("react.activity"),k=Symbol.for("react.client.reference"),N=c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,S=Object.prototype.hasOwnProperty,z=Array.isArray,O=console.createTask?console.createTask:function(){return null},R={},A=(c={react_stack_bottom_frame:function(e){return e()}}).react_stack_bottom_frame.bind(c,l)(),C=O(o(l)),E={};y.Fragment=_,y.jsx=function(e,n,t){var r=1e4>N.recentlyCreatedOwnerStacks++;return s(e,n,t,false,r?Error("react-stack-top-frame"):A,r?O(o(e)):C)},y.jsxs=function(e,n,t){var r=1e4>N.recentlyCreatedOwnerStacks++;return s(e,n,t,true,r?Error("react-stack-top-frame"):A,r?O(o(e)):C)};}()),y)),h.exports);function 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 v.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:v.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 I=({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 v.jsx("svg",{width:t[n],height:t[n],className:r,viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:v.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"})})},w=({className:e="",size:n="md",color:t="currentColor"})=>{const r={sm:16,md:20,lg:24};return v.jsxs("svg",{width:r[n],height:r[n],className:`${{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"}[n]} ${e}`,fill:"none",stroke:t,viewBox:"0 0 24 24",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[v.jsx("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),v.jsx("circle",{cx:"12",cy:"12",r:"3"})]})},j=({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 v.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:v.jsx("path",{d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})},k={sm:16,md:20,lg:24};function N({size:e="md",title:n,...t}){return v.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:k[e],height:k[e],fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",role:n?"img":void 0,"aria-hidden":!n||void 0,focusable:"false",...t,children:[n&&v.jsx("title",{children:n}),v.jsx("path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49"}),v.jsx("path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242"}),v.jsx("path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143"}),v.jsx("path",{d:"m2 2 20 20"})]})}var S="TextInput-module_container__QXVA9",z="TextInput-module_label__GGFxk",O="TextInput-module_required__qlHAH",R="TextInput-module_inputContainer__-zaWR",A="TextInput-module_icon__F1AYg",C="TextInput-module_input__I8TSn",E="TextInput-module_inputWithIcon__TDgMC",P="TextInput-module_inputWithCharCount__qgvqA",$="TextInput-module_inputError__-Ga78",L="TextInput-module_inputSuccess__xsjt7",q="TextInput-module_charCount__RyuVm",M="TextInput-module_charCountNormal__LCUr7",U="TextInput-module_charCountNear__OKroK",B="TextInput-module_charCountLimit__iaB20",F="TextInput-module_charCountIcon__lRD-4",V="TextInput-module_charProgressBar__Wva8D",W="TextInput-module_charProgress__ZUsGs",Z="TextInput-module_charProgressNormal__TdFY4",D="TextInput-module_charProgressNear__beyMs",J="TextInput-module_charProgressLimit__Vr6d-",G="TextInput-module_hint__iZiig",H="TextInput-module_requiredHelper__TUGsU",X="TextInput-module_validationMessage__3g-wc",Y="TextInput-module_validationIcon__q5LT6",K="TextInput-module_validationText__-qAuu",Q="TextInput-module_validEmail__Ya1tf",ee="TextInput-module_emailSuggestion__ZzQkZ",ne="TextInput-module_suggestionButton__Rsxt8",te="TextInput-module_error__ewnmB",re="TextInput-module_errorIcon__JkIpb",oe="TextInput-module_errorText__ba7lR",le="TextInput-module_passwordStrength__ICyJU",ae="TextInput-module_strengthBar__3c8Yf",se="TextInput-module_strengthSegment__76ih4",ie="TextInput-module_strengthSegmentInactive__RK1Q8",ue="TextInput-module_strengthSegmentWeak__BFvgT",de="TextInput-module_strengthSegmentFair__AOJW5",ce="TextInput-module_strengthSegmentGood__uGgTx",me="TextInput-module_strengthSegmentStrong__vP5Yi",pe="TextInput-module_strengthSegmentVeryStrong__4Tull",_e="TextInput-module_strengthLabel__PpEO9",ge="TextInput-module_strengthText__jfVUh",he="TextInput-module_strengthValue__04hhw",fe="TextInput-module_strengthValueWeak__8Ek8Q",xe="TextInput-module_strengthValueFair__70N63",be="TextInput-module_strengthValueGood__NgsOd",ye="TextInput-module_strengthValueStrong__qaKsi",ve="TextInput-module_strengthValueVeryStrong__80d9m",Te="TextInput-module_requirements__eD6oz",Ie="TextInput-module_requirement__KoZx2",we="TextInput-module_requirementIcon__VjQXJ",je="TextInput-module_requirementIconMet__UNZFD",ke="TextInput-module_requirementIconUnmet__1MF9h",Ne="TextInput-module_requirementText__fFcdn",Se="TextInput-module_requirementTextMet__eGbSi",ze="TextInput-module_warning__ywIFl",Oe="TextInput-module_labelRow__DHwBZ",Re="TextInput-module_labelAction__gSIJc",Ae="TextInput-module_inputWithToggle__ACEsI",Ce="TextInput-module_passwordToggle__691M2",Ee="TextInput-module_groupless__8WgfT",Pe="TextInput-module_group__ZT9UR",$e="TextInput-module_addon__eHX4J",Le="TextInput-module_addonStart__8MNaQ",qe="TextInput-module_addonEnd__29ckI",Me="TextInput-module_inputAfterAddon__UEdes",Ue="TextInput-module_inputBeforeAddon__kFHUQ",Be="TextInput-module_groupError__GmXum",Fe="TextInput-module_groupDisabled__iehsu",Ve="TextInput-module_rulesTitle__8Ib6c",We="TextInput-module_rulesList__E1UOW",Ze="TextInput-module_srOnly__thTJl";!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\n/* Etiqueta con acción a la derecha (ayuda, enlace) */\n.TextInput-module_labelRow__DHwBZ {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--lb-space-2);\n}\n\n.TextInput-module_labelAction__gSIJc {\n display: inline-flex;\n align-items: center;\n flex: none;\n}\n\n/* Ver / ocultar contraseña */\n.TextInput-module_inputWithToggle__ACEsI {\n padding-right: 2.75rem;\n}\n\n.TextInput-module_passwordToggle__691M2 {\n position: absolute;\n top: 50%;\n right: 0.5rem;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 2rem;\n height: 2rem;\n padding: 0;\n border: 0;\n border-radius: var(--lb-radius-sm);\n background: transparent;\n color: var(--lb-color-muted-foreground);\n cursor: pointer;\n transform: translateY(-50%);\n}\n\n.TextInput-module_passwordToggle__691M2:hover:not(:disabled) {\n color: var(--lb-color-foreground);\n}\n\n.TextInput-module_passwordToggle__691M2:focus-visible {\n outline: 2px solid var(--lb-color-ring);\n outline-offset: 1px;\n}\n\n.TextInput-module_passwordToggle__691M2:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n/* Bloques pegados al campo (startAddon / endAddon) */\n.TextInput-module_groupless__8WgfT {\n display: contents;\n}\n\n.TextInput-module_group__ZT9UR {\n display: flex;\n align-items: stretch;\n}\n\n.TextInput-module_group__ZT9UR > .TextInput-module_inputContainer__-zaWR {\n flex: 1 1 auto;\n min-width: 0;\n}\n\n.TextInput-module_addon__eHX4J {\n display: flex;\n flex: none;\n align-items: center;\n padding: 0 var(--lb-space-3);\n border: 2px solid var(--lb-color-neutral-300);\n background: var(--lb-color-muted);\n color: var(--lb-color-muted-foreground);\n font-family: var(--lb-font-sans);\n font-size: var(--lb-font-size-sm);\n font-weight: var(--lb-font-weight-medium);\n white-space: nowrap;\n transition: border-color 150ms ease;\n}\n\n/* Un botón dentro del bloque lo ocupa entero. */\n.TextInput-module_addon__eHX4J:has(> button) {\n padding: 0;\n background: transparent;\n}\n\n.TextInput-module_addon__eHX4J > button {\n align-self: stretch;\n height: auto;\n border-radius: 0;\n}\n\n.TextInput-module_addonStart__8MNaQ {\n border-right: 0;\n border-radius: var(--lb-radius-md) 0 0 var(--lb-radius-md);\n}\n\n.TextInput-module_addonEnd__29ckI {\n border-left: 0;\n border-radius: 0 var(--lb-radius-md) var(--lb-radius-md) 0;\n}\n\n.TextInput-module_addonStart__8MNaQ > button {\n border-radius: calc(var(--lb-radius-md) - 2px) 0 0\n calc(var(--lb-radius-md) - 2px);\n}\n\n.TextInput-module_addonEnd__29ckI > button {\n border-radius: 0 calc(var(--lb-radius-md) - 2px)\n calc(var(--lb-radius-md) - 2px) 0;\n}\n\n.TextInput-module_inputAfterAddon__UEdes {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n}\n\n.TextInput-module_inputBeforeAddon__kFHUQ {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n\n.TextInput-module_group__ZT9UR:focus-within .TextInput-module_addon__eHX4J {\n border-color: var(--lb-color-primary);\n}\n\n.TextInput-module_groupError__GmXum .TextInput-module_addon__eHX4J,\n.TextInput-module_groupError__GmXum:focus-within .TextInput-module_addon__eHX4J {\n border-color: var(--lb-color-danger);\n}\n\n.TextInput-module_groupDisabled__iehsu .TextInput-module_addon__eHX4J {\n opacity: 0.7;\n}\n\n/* Reglas propias de la contraseña (passwordRules) */\n.TextInput-module_rulesTitle__8Ib6c {\n margin: 0;\n font-weight: var(--lb-font-weight-medium);\n color: var(--lb-color-neutral-700);\n}\n\n.TextInput-module_rulesList__E1UOW {\n list-style: none;\n margin: 0;\n padding: 0;\n display: flex;\n flex-direction: column;\n gap: var(--lb-space-1);\n}\n\n.TextInput-module_srOnly__thTJl {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n}\n");const De=(...e)=>e.filter(Boolean).join(" "),Je=/^[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])?)*$/,Ge=e$2.forwardRef(function({id:e,name:s,label:i,value:u,onChange:d,placeholder:c,error:m,warning:p,required:_=false,disabled:h=false,type:f="text",className:x="",hint:b,maxLength:y,minLength:v,minLengthMessage:k,pattern:Ge,icon:He,onBlur:Xe,onFocus:Ye,onValidityChange:Ke,autoComplete:Qe,validateEmail:en=false,showPasswordStrength:nn=false,requiredMessage:tn,emailValidMessage:rn,emailInvalidMessage:on,emailSuggestionMessage:ln,strengthLabels:an,strengthLabelPrefix:sn,requirementsLabels:un,passwordRules:dn,passwordRulesLabels:cn,showPasswordToggle:mn=true,passwordToggleLabels:pn,labels:_n,labelAction:gn,startAddon:hn,endAddon:fn,...xn},bn){const[yn,vn]=e$2.useState(false),[Tn,In]=e$2.useState(false),wn="password"===f&&mn&&!en,jn=e$2.useMemo(()=>en&&u?(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})(u):null,[en,u]),kn=e$2.useMemo(()=>{if(!en||!u)return null;return Je.test(u)&&!(null!==jn)},[en,u,jn]),Nn=en&&u&&!kn&&!jn,Sn=Nn&&on||null,zn=Boolean(v&&u.length>0&&u.length<v),On=!v||u.length>=v,Rn=!y||u.length<=y,An=!Ge||new RegExp(Ge).test(u),Cn=e$2.useMemo(()=>"password"===f&&dn?.length?dn.map(e=>({...e,met:e.test(u)})):null,[f,dn,u]),En=!Cn||Cn.every(e=>e.met),Pn=shared.useUiMessages("textInput",_n,{showPassword:pn?.show,hidePassword:pn?.hide,passwordRulesTitle:cn?.title,ruleMet:cn?.met,ruleUnmet:cn?.unmet}),$n={title:Pn.passwordRulesTitle,met:Pn.ruleMet,unmet:Pn.ruleUnmet},Ln=Boolean(u&&!m&&!Nn&&!jn&&(!_||u.length>0)&&(!en||kn)&&On&&Rn&&An&&En),qn=e$2.useMemo(()=>"password"!==f||!nn||Cn?null:(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"}})(u),[f,u,nn,Cn]),Mn=Boolean(!h&&!m&&(!_||u.trim().length>0)&&(!en||kn)&&On&&Rn&&An&&En);e$2.useEffect(()=>{Ke?.(Mn);},[Mn,Ke]);const Un=y&&"text"===f&&u,Bn=u.length,Fn=y?Bn/y*100:0,Vn=Fn>80,Wn=Fn>=100,Zn=m||Nn&&on||zn&&k||void 0,Dn=Boolean(b&&!m&&!Nn),Jn=shared.useFieldIds({id:e,name:s,required:_,error:Zn||void 0,warning:Zn?void 0:p,hint:Dn?b:void 0}),Gn=e$2.useId(),Hn=Boolean(hn||fn),Xn=["string"==typeof hn||"number"==typeof hn?`${Gn}-start`:null,"string"==typeof fn||"number"==typeof fn?`${Gn}-end`:null].filter(Boolean),Yn=`${Gn}-rules`,Kn=[Jn.controlProps["aria-describedby"],...Xn,Cn?Yn:null].filter(Boolean).join(" ")||void 0,Qn=Boolean(m||Nn||zn);return g.jsxs("div",{className:De(S,x),"data-testid":"text-input",children:[i&&(()=>{const e=g.jsxs("label",{htmlFor:Jn.inputId,className:z,children:[i,_&&g.jsx("span",{className:O,"aria-hidden":"true",children:"*"})]});return gn?g.jsxs("div",{className:Oe,children:[e,g.jsx("span",{className:Re,children:gn})]}):e})(),g.jsxs("div",{className:Hn?De(Pe,Qn?Be:void 0,h?Fe:void 0):Ee,children:[hn&&g.jsx("div",{id:`${Gn}-start`,className:De($e,Le),"data-testid":"start-addon",children:hn}),g.jsxs("div",{className:R,children:[He&&!yn&&g.jsx("div",{className:A,children:He}),g.jsx("input",{"data-testid":"input-field",...xn,ref:bn,...Jn.controlProps,"aria-describedby":Kn,name:s,required:_,type:en||wn&&Tn?"text":f,inputMode:en?"email":xn.inputMode,value:u,onChange:e=>d(e.target.value),onFocus:()=>{vn(true),Ye?.();},onBlur:()=>{vn(false),Xe?.();},placeholder:c,disabled:h,maxLength:y,minLength:v,pattern:Ge,autoComplete:Qe,className:De(C,He?E:void 0,hn?Me:void 0,fn?Ue:void 0,Un?P:void 0,wn?Ae:void 0,m||Nn||zn?$:void 0,h||m||Sn||!Ln?void 0:L),"data-error":!!m||!!Nn||zn}),wn&&g.jsx("button",{type:"button",className:Ce,onClick:()=>In(e=>!e),"aria-label":Tn?Pn.hidePassword:Pn.showPassword,"aria-pressed":Tn,"aria-controls":Jn.inputId,disabled:h,children:Tn?g.jsx(N,{size:"sm"}):g.jsx(w,{size:"sm"})}),Un&&g.jsxs("div",{className:De(q,Wn?B:Vn?U:M),"data-testid":"char-count",children:[g.jsxs("div",{children:[Bn,"/",y]}),Wn&&g.jsx(I,{className:F,size:"sm"})]})]}),fn&&g.jsx("div",{id:`${Gn}-end`,className:De($e,qe),"data-testid":"end-addon",children:fn})]}),Un&&y>20&&g.jsx("div",{className:V,children:g.jsx("div",{className:De(W,Wn?J:Vn?D:Z),style:{width:`${Math.min(Fn,100)}%`}})}),Dn&&g.jsx("p",{id:Jn.hintId,className:G,children:b}),p&&!Zn&&g.jsx("p",{id:Jn.warningId,className:ze,children:p}),_&&!u&&!m&&!Nn&&tn&&g.jsx("p",{className:H,children:tn}),en&&u&&kn&&rn&&g.jsxs("div",{className:De(X,Q),children:[g.jsx(T,{className:Y,size:"sm"}),g.jsx("p",{className:K,children:rn})]}),jn&&!m&&ln&&g.jsxs("div",{className:De(X,ee),children:[g.jsx(j,{className:Y,size:"sm"}),g.jsxs("p",{className:K,children:[ln.replace("{suggestion}",jn),g.jsx("button",{type:"button",onClick:()=>d(jn),className:ne,children:jn})]})]}),Cn&&g.jsxs("div",{id:Yn,className:Te,"data-testid":"password-rules",children:[g.jsx("p",{className:Ve,children:$n.title}),g.jsx("ul",{className:We,children:Cn.map(e=>g.jsxs("li",{className:Ie,"data-met":e.met,children:[g.jsx(T,{"aria-hidden":"true",className:De(we,e.met?je:ke),size:"sm"}),g.jsx("span",{className:De(Ne,e.met&&Se),children:e.label}),g.jsx("span",{className:Ze,children:` (${e.met?$n.met:$n.unmet})`})]},e.id))})]}),qn&&qn.score>0&&g.jsxs("div",{className:le,children:[g.jsx("div",{className:ae,children:[0,1,2,3,4].map(e=>g.jsx("div",{className:De(se,e<qn.score?"weak"===qn.strength?ue:"fair"===qn.strength?de:"good"===qn.strength?ce:"strong"===qn.strength?me:pe:ie)},e))}),(sn||an?.[qn.strength])&&g.jsx("div",{className:_e,children:g.jsxs("p",{className:ge,children:[sn&&`${sn} `,g.jsx("span",{className:De(he,"weak"===qn.strength?fe:"fair"===qn.strength?xe:"good"===qn.strength?be:"strong"===qn.strength?ye:ve),children:an?.[qn.strength]})]})}),un&&g.jsxs("div",{className:Te,children:[un.lowercase&&g.jsxs("div",{className:Ie,children:[g.jsx(T,{className:De(we,/[a-z]/.test(u)?je:ke),size:"sm"}),g.jsx("span",{className:De(Ne,/[a-z]/.test(u)&&Se),children:un.lowercase})]}),un.uppercase&&g.jsxs("div",{className:Ie,children:[g.jsx(T,{className:De(we,/[A-Z]/.test(u)?je:ke),size:"sm"}),g.jsx("span",{className:De(Ne,/[A-Z]/.test(u)&&Se),children:un.uppercase})]}),un.number&&g.jsxs("div",{className:Ie,children:[g.jsx(T,{className:De(we,/\d/.test(u)?je:ke),size:"sm"}),g.jsx("span",{className:De(Ne,/\d/.test(u)&&Se),children:un.number})]}),un.special&&g.jsxs("div",{className:Ie,children:[g.jsx(T,{className:De(we,/[!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?]/.test(u)?je:ke),size:"sm"}),g.jsx("span",{className:De(Ne,/[!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?]/.test(u)&&Se),children:un.special})]}),un.minLength&&g.jsxs("div",{className:Ie,children:[g.jsx(T,{className:De(we,u.length>=8?je:ke),size:"sm"}),g.jsx("span",{className:De(Ne,u.length>=8&&Se),children:un.minLength})]})]})]}),Zn&&g.jsxs("div",{id:Jn.errorId,className:te,role:"alert",children:[g.jsx(I,{className:re,size:"sm"}),g.jsx("p",{className:oe,children:Zn})]})]})});Ge.displayName="TextInput";
|
|
460
460
|
|
|
461
461
|
var e$1={exports:{}};
|
|
462
462
|
|
|
@@ -523,54 +523,68 @@ styleInject(css_248z);
|
|
|
523
523
|
|
|
524
524
|
/** Países disponibles por defecto. Perú primero. */
|
|
525
525
|
const PHONE_COUNTRIES = [
|
|
526
|
-
{
|
|
526
|
+
{
|
|
527
|
+
code: "PE",
|
|
528
|
+
dialCode: "+51",
|
|
529
|
+
digits: 9,
|
|
530
|
+
mask: "### ### ###",
|
|
531
|
+
example: "912345678",
|
|
532
|
+
},
|
|
527
533
|
{
|
|
528
534
|
code: "MX",
|
|
529
535
|
dialCode: "+52",
|
|
530
536
|
digits: 10,
|
|
531
537
|
mask: "### ### ####",
|
|
538
|
+
example: "5551234567",
|
|
532
539
|
},
|
|
533
540
|
{
|
|
534
541
|
code: "CO",
|
|
535
542
|
dialCode: "+57",
|
|
536
543
|
digits: 10,
|
|
537
544
|
mask: "### ### ####",
|
|
545
|
+
example: "3001234567",
|
|
538
546
|
},
|
|
539
547
|
{
|
|
540
548
|
code: "CL",
|
|
541
549
|
dialCode: "+56",
|
|
542
550
|
digits: 9,
|
|
543
551
|
mask: "# #### ####",
|
|
552
|
+
example: "912345678",
|
|
544
553
|
},
|
|
545
554
|
{
|
|
546
555
|
code: "AR",
|
|
547
556
|
dialCode: "+54",
|
|
548
557
|
digits: 10,
|
|
549
558
|
mask: "### ### ####",
|
|
559
|
+
example: "9112345678",
|
|
550
560
|
},
|
|
551
561
|
{
|
|
552
562
|
code: "BR",
|
|
553
563
|
dialCode: "+55",
|
|
554
564
|
digits: 11,
|
|
555
565
|
mask: "(##) ##### ####",
|
|
566
|
+
example: "11999998888",
|
|
556
567
|
},
|
|
557
568
|
{
|
|
558
569
|
code: "ES",
|
|
559
570
|
dialCode: "+34",
|
|
560
571
|
digits: 9,
|
|
561
572
|
mask: "### ### ###",
|
|
573
|
+
example: "612345678",
|
|
562
574
|
},
|
|
563
575
|
{
|
|
564
576
|
code: "US",
|
|
565
577
|
dialCode: "+1",
|
|
566
578
|
digits: 10,
|
|
567
579
|
mask: "(###) ###-####",
|
|
580
|
+
example: "2015550123",
|
|
568
581
|
},
|
|
569
582
|
{
|
|
570
583
|
code: "CA",
|
|
571
584
|
dialCode: "+1",
|
|
572
585
|
digits: 10,
|
|
573
586
|
mask: "(###) ###-####",
|
|
587
|
+
example: "2015550123",
|
|
574
588
|
},
|
|
575
589
|
];
|
|
576
590
|
const findCountry = (code, countries) => countries.find((country) => country.code === code) ?? countries[0];
|
|
@@ -640,12 +654,14 @@ const PhoneInput = ({ label, value, country, onChange, onCountryChange, countrie
|
|
|
640
654
|
value: item.code,
|
|
641
655
|
label: `${countryName(item, intlLocale)} (${item.dialCode})`,
|
|
642
656
|
}));
|
|
643
|
-
return (jsxRuntimeExports.jsxs("div", { className: [styles.field, className].filter(Boolean).join(" "), children: [jsxRuntimeExports.jsxs("div", { className: styles.row, children: [jsxRuntimeExports.jsx("div", { className: styles.country, children: jsxRuntimeExports.jsx(
|
|
657
|
+
return (jsxRuntimeExports.jsxs("div", { className: [styles.field, className].filter(Boolean).join(" "), children: [jsxRuntimeExports.jsxs("div", { className: styles.row, children: [jsxRuntimeExports.jsx("div", { className: styles.country, children: jsxRuntimeExports.jsx(x$1, { label: labels.country, id: `${inputId}-pais`, name: name ? `${name}-pais` : undefined, value: selected.code, onChange: (code) => {
|
|
644
658
|
onCountryChange(code);
|
|
645
659
|
// Mismos dígitos con la máscara del nuevo país
|
|
646
660
|
if (value)
|
|
647
661
|
onChange(formatPhone(value, code, countries));
|
|
648
|
-
}, options: options, disabled: disabled }) }), jsxRuntimeExports.jsx("div", { className: styles.number, children: jsxRuntimeExports.jsx(Ge, { id: inputId, name: name, label: label ?? labels.label, type: "tel", inputMode: "tel", autoComplete: "tel-national", value: value, onChange: (next) => onChange(formatPhone(next, selected.code, countries)), placeholder: selected.
|
|
662
|
+
}, options: options, disabled: disabled }) }), jsxRuntimeExports.jsx("div", { className: styles.number, children: jsxRuntimeExports.jsx(Ge, { id: inputId, name: name, label: label ?? labels.label, type: "tel", inputMode: "tel", autoComplete: "tel-national", value: value, onChange: (next) => onChange(formatPhone(next, selected.code, countries)), placeholder: selected.example
|
|
663
|
+
? formatPhone(selected.example, selected.code, countries)
|
|
664
|
+
: selected.mask.replace(/#/g, "0"), error: shownError, warning: shownError ? undefined : warning, hint: hint ??
|
|
649
665
|
interpolate(labels.digitsHint, { digits: selected.digits }), required: required, disabled: disabled, onBlur: onBlur, onFocus: onFocus }) })] }), showInternational && valid && !shownError && (jsxRuntimeExports.jsxs("p", { className: styles.international, "aria-live": "polite", children: [jsxRuntimeExports.jsx(l, { size: "sm" }), selected.dialCode, " ", value] }))] }));
|
|
650
666
|
};
|
|
651
667
|
|
package/dist/index.d.ts
CHANGED
|
@@ -14,6 +14,11 @@ interface PhoneCountry {
|
|
|
14
14
|
digits: number;
|
|
15
15
|
/** Máscara de presentación: cada `#` es un dígito. */
|
|
16
16
|
mask: string;
|
|
17
|
+
/**
|
|
18
|
+
* Número de ejemplo, solo dígitos (`"912345678"`): se muestra con la máscara
|
|
19
|
+
* como guía en el campo vacío. Sin él, la máscara con ceros.
|
|
20
|
+
*/
|
|
21
|
+
example?: string;
|
|
17
22
|
}
|
|
18
23
|
/** Países disponibles por defecto. Perú primero. */
|
|
19
24
|
declare const PHONE_COUNTRIES: PhoneCountry[];
|
package/dist/index.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import e$2, { useState, useMemo, useEffect, useId } from 'react';
|
|
2
|
-
import { useUiMessages, useFieldIds, uiMessagesEs, DEFAULT_INTL_LOCALE, useUiLocale } from '@rubenpazch/shared';
|
|
2
|
+
import { normalizeSize, useUiMessages, useFieldIds, uiMessagesEs, DEFAULT_INTL_LOCALE, useUiLocale } from '@rubenpazch/shared';
|
|
3
3
|
|
|
4
4
|
var jsxRuntime = {exports: {}};
|
|
5
5
|
|
|
@@ -423,7 +423,7 @@ function requireJsxRuntime () {
|
|
|
423
423
|
|
|
424
424
|
var jsxRuntimeExports = requireJsxRuntime();
|
|
425
425
|
|
|
426
|
-
var
|
|
426
|
+
var n$1,o={exports:{}},t$3={};var a,l$1,i$1={};
|
|
427
427
|
/**
|
|
428
428
|
* @license React
|
|
429
429
|
* react-jsx-runtime.development.js
|
|
@@ -432,7 +432,7 @@ var r$3,n$1={exports:{}},o={};var t$3,a,l$1={};
|
|
|
432
432
|
*
|
|
433
433
|
* This source code is licensed under the MIT license found in the
|
|
434
434
|
* LICENSE file in the root directory of this source tree.
|
|
435
|
-
*/function i$1(){return t$3||(t$3=1,"production"!==process.env.NODE_ENV&&function(){function r(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 b:return "Fragment";case _:return "Profiler";case y: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 h:var n=e.render;return (e=e.displayName)||(e=""!==(e=n.displayName||n.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case k:return null!==(n=e.displayName||null)?n:r(e.type)||"Memo";case x:n=e._payload,e=e._init;try{return r(e(n))}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 o=(r=console).error,t="function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return o.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",t),n(e)}}function t(e){if(e===b)return "<>";if("object"==typeof e&&null!==e&&e.$$typeof===x)return "<...>";try{var n=r(e);return n?"<"+n+">":"<...>"}catch(e){return "<...>"}}function a(){return Error("react-stack-top-frame")}function i(){var e=r(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 c(e,n,t,a,l,c){var u,f=n.children;if(void 0!==f)if(a)if(E(f)){for(a=0;a<f.length;a++)s(f[a]);Object.freeze&&Object.freeze(f);}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(f);if(T.call(n,"key")){f=r(e);var m=Object.keys(n).filter(function(e){return "key"!==e});a=0<m.length?"{key: someKey, "+m.join(": ..., ")+": ...}":"{key: someKey}",$[f+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,f,m,f),$[f+a]=true);}if(f=null,void 0!==t&&(o(t),f=""+t),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}(n)&&(o(n.key),f=""+n.key),"key"in n)for(var b in t={},n)"key"!==b&&(t[b]=n[b]);else t=n;return f&&function(e,r){function n(){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)",r));}n.isReactWarning=true,Object.defineProperty(e,"key",{get:n,configurable:true});}(t,"function"==typeof e?e.displayName||e.name||"Unknown":e),function(e,r,n,o,t,a){var l=n.ref;return e={$$typeof:p,type:e,key:r,props:n,_owner:o},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:t}),Object.defineProperty(e,"_debugTask",{configurable:false,enumerable:false,writable:true,value:a}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}(e,f,t,null===(u=O.A)?null:u.getOwner(),l,c)}function s(e){u(e)?e._store&&(e._store.validated=1):"object"==typeof e&&null!==e&&e.$$typeof===x&&("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,f=e$2,p=Symbol.for("react.transitional.element"),m=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),v=Symbol.for("react.consumer"),g=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),S=Symbol.for("react.suspense"),j=Symbol.for("react.suspense_list"),k=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),w=Symbol.for("react.activity"),N=Symbol.for("react.client.reference"),O=f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,T=Object.prototype.hasOwnProperty,E=Array.isArray,R=console.createTask?console.createTask:function(){return null},C={},A=(f={react_stack_bottom_frame:function(e){return e()}}).react_stack_bottom_frame.bind(f,a)(),z=R(t(a)),$={};l$1.Fragment=b,l$1.jsx=function(e,r,n){var o=1e4>O.recentlyCreatedOwnerStacks++;return c(e,r,n,false,o?Error("react-stack-top-frame"):A,o?R(t(e)):z)},l$1.jsxs=function(e,r,n){var o=1e4>O.recentlyCreatedOwnerStacks++;return c(e,r,n,true,o?Error("react-stack-top-frame"):A,o?R(t(e)):z)};}()),l$1}var c$1=(a||(a=1,"production"===process.env.NODE_ENV?n$1.exports=function(){if(r$3)return o;r$3=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function t(r,n,o){var t=null;if(void 0!==o&&(t=""+o),void 0!==n.key&&(t=""+n.key),"key"in n)for(var a in o={},n)"key"!==a&&(o[a]=n[a]);else o=n;return n=o.ref,{$$typeof:e,type:r,key:t,ref:void 0!==n?n:null,props:o}}return o.Fragment=n,o.jsx=t,o.jsxs=t,o}():n$1.exports=i$1()),n$1.exports);var s$2="Select-module_field__Ib-hj",u$1="Select-module_label__dU5a8",d$1="Select-module_required__aINgC",f$1="Select-module_select__jkWCR",p$1="Select-module_selectError__r5GRT",m$1="Select-module_error__oELij",b$1="Select-module_hint__xTI1C",y$1="Select-module_labelRow__c2lUI",_$1="Select-module_labelAction__s6AaT",v$1="Select-module_selectWarning__zVgPA",g$1="Select-module_warning__T5-yO";!function(e,r){ void 0===r&&(r={});var n=r.insertAt;if("undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css","top"===n&&o.firstChild?o.insertBefore(t,o.firstChild):o.appendChild(t),t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e));}}(".Select-module_field__Ib-hj {\n display: flex;\n flex-direction: column;\n gap: var(--lb-space-1);\n}\n\n.Select-module_label__dU5a8 {\n font-size: var(--lb-font-size-sm);\n font-weight: var(--lb-font-weight-medium);\n color: var(--lb-color-neutral-700);\n}\n\n.Select-module_required__aINgC {\n color: var(--lb-color-danger);\n}\n\n.Select-module_select__jkWCR {\n appearance: none;\n width: 100%;\n padding: var(--lb-space-2) var(--lb-space-8) var(--lb-space-2)\n var(--lb-space-3);\n font-family: var(--lb-font-sans);\n font-size: var(--lb-font-size-md);\n font-weight: var(--lb-font-weight-medium);\n color: var(--lb-color-foreground);\n background-color: var(--lb-color-background);\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n background-position: right var(--lb-space-3) center;\n border: 2px solid var(--lb-color-neutral-300);\n border-radius: var(--lb-radius-md);\n cursor: pointer;\n transition:\n border-color 0.15s ease,\n box-shadow 0.15s ease;\n}\n\n.Select-module_select__jkWCR:focus {\n outline: none;\n border-color: var(--lb-color-primary);\n box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);\n}\n\n.Select-module_select__jkWCR:disabled {\n cursor: not-allowed;\n opacity: 0.6;\n}\n\n.Select-module_selectError__r5GRT {\n border-color: var(--lb-color-danger);\n}\n\n.Select-module_selectError__r5GRT:focus {\n border-color: var(--lb-color-danger);\n box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);\n}\n\n.Select-module_error__oELij {\n margin: 0;\n font-size: var(--lb-font-size-sm);\n color: var(--lb-color-danger);\n}\n\n.Select-module_hint__xTI1C {\n margin: 0;\n font-size: var(--lb-font-size-xs);\n color: var(--lb-color-muted-foreground);\n}\n\n/* Etiqueta con acción a la derecha (ayuda, enlace) */\n.Select-module_labelRow__c2lUI {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--lb-space-2);\n}\n\n.Select-module_labelAction__s6AaT {\n display: inline-flex;\n align-items: center;\n flex: none;\n}\n\n/* Advertencia (no bloquea el envío) */\n.Select-module_selectWarning__zVgPA {\n border-color: var(--lb-color-warning);\n}\n\n.Select-module_warning__T5-yO {\n margin: 0;\n font-size: var(--lb-font-size-xs);\n color: var(--lb-color-amber-strong);\n}\n");const h$1=(...e)=>e.filter(Boolean).join(" "),S$1=e$2.forwardRef(function({label:r,labelAction:n,value:o,onChange:t,options:a,placeholder:l,hint:i,error:S,warning:j,onBlur:k,onFocus:x,required:w=false,disabled:N=false,id:O,name:T,className:E},R){const C=e$2.useId(),A=O??T??C,z=`${A}-error`,$=`${A}-ayuda`,P=`${A}-advertencia`,I=S?void 0:j,F=[i&&$,S&&z,I&&P].filter(Boolean).join(" ")||void 0;return c$1.jsxs("div",{className:h$1(s$2,E),children:[r&&(()=>{const e=c$1.jsxs("label",{htmlFor:A,className:u$1,children:[r,w&&c$1.jsxs("span",{className:d$1,"aria-hidden":"true",children:[" ","*"]})]});return n?c$1.jsxs("div",{className:y$1,children:[e,c$1.jsx("span",{className:_$1,children:n})]}):e})(),c$1.jsxs("select",{ref:R,id:A,name:T,className:h$1(f$1,S&&p$1,I&&v$1),value:o,required:w,disabled:N,"aria-invalid":!!S||void 0,"aria-describedby":F,onChange:e=>t(e.target.value),onBlur:k,onFocus:x,children:[l&&c$1.jsx("option",{value:"",disabled:true,children:l}),a.map(e=>c$1.jsx("option",{value:e.value,children:e.label},e.value))]}),i&&c$1.jsx("p",{id:$,className:b$1,children:i}),S&&c$1.jsx("p",{id:z,className:m$1,role:"alert",children:S}),I&&c$1.jsx("p",{id:P,className:g$1,children:I})]})});
|
|
435
|
+
*/function c$1(){return a||(a=1,"production"!==process.env.NODE_ENV&&function(){function r(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 b:return "Fragment";case _:return "Profiler";case y: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 h:var n=e.render;return (e=e.displayName)||(e=""!==(e=n.displayName||n.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case k:return null!==(n=e.displayName||null)?n:r(e.type)||"Memo";case x:n=e._payload,e=e._init;try{return r(e(n))}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 o=(r=console).error,t="function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return o.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",t),n(e)}}function t(e){if(e===b)return "<>";if("object"==typeof e&&null!==e&&e.$$typeof===x)return "<...>";try{var n=r(e);return n?"<"+n+">":"<...>"}catch(e){return "<...>"}}function a(){return Error("react-stack-top-frame")}function l(){var e=r(this.type);return E[e]||(E[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,n,t,a,i,c){var u,f=n.children;if(void 0!==f)if(a)if(C(f)){for(a=0;a<f.length;a++)s(f[a]);Object.freeze&&Object.freeze(f);}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(f);if(O.call(n,"key")){f=r(e);var m=Object.keys(n).filter(function(e){return "key"!==e});a=0<m.length?"{key: someKey, "+m.join(": ..., ")+": ...}":"{key: someKey}",$[f+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,f,m,f),$[f+a]=true);}if(f=null,void 0!==t&&(o(t),f=""+t),function(e){if(O.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return false}return void 0!==e.key}(n)&&(o(n.key),f=""+n.key),"key"in n)for(var b in t={},n)"key"!==b&&(t[b]=n[b]);else t=n;return f&&function(e,r){function n(){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)",r));}n.isReactWarning=true,Object.defineProperty(e,"key",{get:n,configurable:true});}(t,"function"==typeof e?e.displayName||e.name||"Unknown":e),function(e,r,n,o,t,a){var i=n.ref;return e={$$typeof:p,type:e,key:r,props:n,_owner:o},null!==(void 0!==i?i: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:t}),Object.defineProperty(e,"_debugTask",{configurable:false,enumerable:false,writable:true,value:a}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}(e,f,t,null===(u=z.A)?null:u.getOwner(),i,c)}function s(e){u(e)?e._store&&(e._store.validated=1):"object"==typeof e&&null!==e&&e.$$typeof===x&&("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,f=e$2,p=Symbol.for("react.transitional.element"),m=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),v=Symbol.for("react.consumer"),g=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),S=Symbol.for("react.suspense"),j=Symbol.for("react.suspense_list"),k=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),w=Symbol.for("react.activity"),N=Symbol.for("react.client.reference"),z=f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,O=Object.prototype.hasOwnProperty,C=Array.isArray,T=console.createTask?console.createTask:function(){return null},E={},R=(f={react_stack_bottom_frame:function(e){return e()}}).react_stack_bottom_frame.bind(f,a)(),A=T(t(a)),$={};i$1.Fragment=b,i$1.jsx=function(e,r,n){var o=1e4>z.recentlyCreatedOwnerStacks++;return c(e,r,n,false,o?Error("react-stack-top-frame"):R,o?T(t(e)):A)},i$1.jsxs=function(e,r,n){var o=1e4>z.recentlyCreatedOwnerStacks++;return c(e,r,n,true,o?Error("react-stack-top-frame"):R,o?T(t(e)):A)};}()),i$1}var s$2=(l$1||(l$1=1,"production"===process.env.NODE_ENV?o.exports=function(){if(n$1)return t$3;n$1=1;var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function o(r,n,o){var t=null;if(void 0!==o&&(t=""+o),void 0!==n.key&&(t=""+n.key),"key"in n)for(var a in o={},n)"key"!==a&&(o[a]=n[a]);else o=n;return n=o.ref,{$$typeof:e,type:r,key:t,ref:void 0!==n?n:null,props:o}}return t$3.Fragment=r,t$3.jsx=o,t$3.jsxs=o,t$3}():o.exports=c$1()),o.exports);var u$1="Select-module_field__Ib-hj",d$1="Select-module_label__dU5a8",f$1="Select-module_required__aINgC",p$1="Select-module_select__jkWCR",m$1="Select-module_sizeSm__o8JKe",b$1="Select-module_sizeLg__hypCf",y$1="Select-module_selectError__r5GRT",_$1="Select-module_error__oELij",v$1="Select-module_hint__xTI1C",g$1="Select-module_labelRow__c2lUI",h$1="Select-module_labelAction__s6AaT",S$1="Select-module_selectWarning__zVgPA",j$1="Select-module_warning__T5-yO";!function(e,r){ void 0===r&&(r={});var n=r.insertAt;if("undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css","top"===n&&o.firstChild?o.insertBefore(t,o.firstChild):o.appendChild(t),t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e));}}(".Select-module_field__Ib-hj {\n display: flex;\n flex-direction: column;\n gap: var(--lb-space-1);\n}\n\n.Select-module_label__dU5a8 {\n font-size: var(--lb-font-size-sm);\n font-weight: var(--lb-font-weight-medium);\n color: var(--lb-color-neutral-700);\n}\n\n.Select-module_required__aINgC {\n color: var(--lb-color-danger);\n}\n\n.Select-module_select__jkWCR {\n appearance: none;\n width: 100%;\n padding: var(--lb-space-2) var(--lb-space-8) var(--lb-space-2)\n var(--lb-space-3);\n font-family: var(--lb-font-sans);\n font-size: var(--lb-font-size-md);\n font-weight: var(--lb-font-weight-medium);\n color: var(--lb-color-foreground);\n background-color: var(--lb-color-background);\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n background-position: right var(--lb-space-3) center;\n border: 2px solid var(--lb-color-neutral-300);\n border-radius: var(--lb-radius-md);\n cursor: pointer;\n transition:\n border-color 0.15s ease,\n box-shadow 0.15s ease;\n}\n\n.Select-module_sizeSm__o8JKe {\n padding: var(--lb-space-1) var(--lb-space-6) var(--lb-space-1)\n var(--lb-space-2);\n font-size: var(--lb-font-size-sm);\n background-position: right var(--lb-space-2) center;\n}\n\n.Select-module_sizeLg__hypCf {\n padding: var(--lb-space-3) var(--lb-space-10) var(--lb-space-3)\n var(--lb-space-4);\n font-size: var(--lb-font-size-lg);\n}\n\n.Select-module_select__jkWCR:focus {\n outline: none;\n border-color: var(--lb-color-primary);\n box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);\n}\n\n.Select-module_select__jkWCR:disabled {\n cursor: not-allowed;\n opacity: 0.6;\n}\n\n.Select-module_selectError__r5GRT {\n border-color: var(--lb-color-danger);\n}\n\n.Select-module_selectError__r5GRT:focus {\n border-color: var(--lb-color-danger);\n box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);\n}\n\n.Select-module_error__oELij {\n margin: 0;\n font-size: var(--lb-font-size-sm);\n color: var(--lb-color-danger);\n}\n\n.Select-module_hint__xTI1C {\n margin: 0;\n font-size: var(--lb-font-size-xs);\n color: var(--lb-color-muted-foreground);\n}\n\n/* Etiqueta con acción a la derecha (ayuda, enlace) */\n.Select-module_labelRow__c2lUI {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--lb-space-2);\n}\n\n.Select-module_labelAction__s6AaT {\n display: inline-flex;\n align-items: center;\n flex: none;\n}\n\n/* Advertencia (no bloquea el envío) */\n.Select-module_selectWarning__zVgPA {\n border-color: var(--lb-color-warning);\n}\n\n.Select-module_warning__T5-yO {\n margin: 0;\n font-size: var(--lb-font-size-xs);\n color: var(--lb-color-amber-strong);\n}\n");const k$1=(...e)=>e.filter(Boolean).join(" "),x$1=e$2.forwardRef(function({label:n,labelAction:o,value:t,onChange:a,options:l,placeholder:i,hint:c,error:x,warning:w,onBlur:N,onFocus:z,required:O=false,disabled:C=false,id:T,name:E,className:R,size:A},$){const P=normalizeSize(A),I={sm:m$1,md:void 0,lg:b$1}[P],F=e$2.useId(),U=T??E??F,W=`${U}-error`,B=`${U}-ayuda`,L=`${U}-advertencia`,q=x?void 0:w,D=[c&&B,x&&W,q&&L].filter(Boolean).join(" ")||void 0;return s$2.jsxs("div",{className:k$1(u$1,R),children:[n&&(()=>{const e=s$2.jsxs("label",{htmlFor:U,className:d$1,children:[n,O&&s$2.jsxs("span",{className:f$1,"aria-hidden":"true",children:[" ","*"]})]});return o?s$2.jsxs("div",{className:g$1,children:[e,s$2.jsx("span",{className:h$1,children:o})]}):e})(),s$2.jsxs("select",{ref:$,id:U,name:E,className:k$1(p$1,I,x&&y$1,q&&S$1),value:t,"data-size":P,required:O,disabled:C,"aria-invalid":!!x||void 0,"aria-describedby":D,onChange:e=>a(e.target.value),onBlur:N,onFocus:z,children:[i&&s$2.jsx("option",{value:"",disabled:true,children:i}),l.map(e=>s$2.jsx("option",{value:e.value,children:e.label},e.value))]}),c&&s$2.jsx("p",{id:B,className:v$1,children:c}),x&&s$2.jsx("p",{id:W,className:_$1,role:"alert",children:x}),q&&s$2.jsx("p",{id:L,className:j$1,children:q})]})});
|
|
436
436
|
|
|
437
437
|
var s$1,i={exports:{}},u={};var d,c,m={};
|
|
438
438
|
/**
|
|
@@ -452,7 +452,7 @@ var s$1,i={exports:{}},u={};var d,c,m={};
|
|
|
452
452
|
*
|
|
453
453
|
* This source code is licensed under the MIT license found in the
|
|
454
454
|
* LICENSE file in the root directory of this source tree.
|
|
455
|
-
*/var v=(b||(b=1,"production"===process.env.NODE_ENV?h.exports=function(){if(_)return f;_=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 l in r={},t)"key"!==l&&(r[l]=t[l]);else r=t;return t=r.ref,{$$typeof:e,type:n,key:o,ref:void 0!==t?t:null,props:r}}return f.Fragment=n,f.jsx=t,f.jsxs=t,f}():h.exports=(x||(x=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 h:return "Profiler";case g:return "StrictMode";case v:return "Suspense";case T:return "SuspenseList";case j: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 x:return e.displayName||"Context";case f:return (e._context.displayName||"Context")+".Consumer";case b: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 w: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===w)return "<...>";try{var t=n(e);return t?"<"+t+">":"<...>"}catch(e){return "<...>"}}function l(){return Error("react-stack-top-frame")}function a(){var e=n(this.type);return R[e]||(R[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,l,s,u){var c,p=t.children;if(void 0!==p)if(l)if(z(p)){for(l=0;l<p.length;l++)i(p[l]);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(S.call(t,"key")){p=n(e);var _=Object.keys(t).filter(function(e){return "key"!==e});l=0<_.length?"{key: someKey, "+_.join(": ..., ")+": ...}":"{key: someKey}",E[p+l]||(_=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} />',l,p,_,p),E[p+l]=true);}if(p=null,void 0!==o&&(r(o),p=""+o),function(e){if(S.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(){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,l){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:a}):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:l}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}(e,p,o,null===(c=N.A)?null:c.getOwner(),s,u)}function i(e){u(e)?e._store&&(e._store.validated=1):"object"==typeof e&&null!==e&&e.$$typeof===w&&("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 d,c=e$2,m=Symbol.for("react.transitional.element"),p=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),g=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),x=Symbol.for("react.context"),b=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),j=Symbol.for("react.activity"),k=Symbol.for("react.client.reference"),N=c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,S=Object.prototype.hasOwnProperty,z=Array.isArray,O=console.createTask?console.createTask:function(){return null},R={},A=(c={react_stack_bottom_frame:function(e){return e()}}).react_stack_bottom_frame.bind(c,l)(),C=O(o(l)),E={};y.Fragment=_,y.jsx=function(e,n,t){var r=1e4>N.recentlyCreatedOwnerStacks++;return s(e,n,t,false,r?Error("react-stack-top-frame"):A,r?O(o(e)):C)},y.jsxs=function(e,n,t){var r=1e4>N.recentlyCreatedOwnerStacks++;return s(e,n,t,true,r?Error("react-stack-top-frame"):A,r?O(o(e)):C)};}()),y)),h.exports);function 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 v.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:v.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 I=({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 v.jsx("svg",{width:t[n],height:t[n],className:r,viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:v.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"})})},w=({className:e="",size:n="md",color:t="currentColor"})=>{const r={sm:16,md:20,lg:24};return v.jsxs("svg",{width:r[n],height:r[n],className:`${{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"}[n]} ${e}`,fill:"none",stroke:t,viewBox:"0 0 24 24",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[v.jsx("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),v.jsx("circle",{cx:"12",cy:"12",r:"3"})]})},j=({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 v.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:v.jsx("path",{d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})},k={sm:16,md:20,lg:24};function N({size:e="md",title:n,...t}){return v.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:k[e],height:k[e],fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",role:n?"img":void 0,"aria-hidden":!n||void 0,focusable:"false",...t,children:[n&&v.jsx("title",{children:n}),v.jsx("path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49"}),v.jsx("path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242"}),v.jsx("path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143"}),v.jsx("path",{d:"m2 2 20 20"})]})}var S="TextInput-module_container__QXVA9",z="TextInput-module_label__GGFxk",O="TextInput-module_required__qlHAH",R="TextInput-module_inputContainer__-zaWR",A="TextInput-module_icon__F1AYg",C="TextInput-module_input__I8TSn",E="TextInput-module_inputWithIcon__TDgMC",P="TextInput-module_inputWithCharCount__qgvqA",$="TextInput-module_inputError__-Ga78",L="TextInput-module_inputSuccess__xsjt7",q="TextInput-module_charCount__RyuVm",M="TextInput-module_charCountNormal__LCUr7",U="TextInput-module_charCountNear__OKroK",B="TextInput-module_charCountLimit__iaB20",F="TextInput-module_charCountIcon__lRD-4",V="TextInput-module_charProgressBar__Wva8D",W="TextInput-module_charProgress__ZUsGs",Z="TextInput-module_charProgressNormal__TdFY4",D="TextInput-module_charProgressNear__beyMs",J="TextInput-module_charProgressLimit__Vr6d-",G="TextInput-module_hint__iZiig",H="TextInput-module_requiredHelper__TUGsU",X="TextInput-module_validationMessage__3g-wc",Y="TextInput-module_validationIcon__q5LT6",K="TextInput-module_validationText__-qAuu",Q="TextInput-module_validEmail__Ya1tf",ee="TextInput-module_emailSuggestion__ZzQkZ",ne="TextInput-module_suggestionButton__Rsxt8",te="TextInput-module_error__ewnmB",re="TextInput-module_errorIcon__JkIpb",oe="TextInput-module_errorText__ba7lR",le="TextInput-module_passwordStrength__ICyJU",ae="TextInput-module_strengthBar__3c8Yf",se="TextInput-module_strengthSegment__76ih4",ie="TextInput-module_strengthSegmentInactive__RK1Q8",ue="TextInput-module_strengthSegmentWeak__BFvgT",de="TextInput-module_strengthSegmentFair__AOJW5",ce="TextInput-module_strengthSegmentGood__uGgTx",me="TextInput-module_strengthSegmentStrong__vP5Yi",pe="TextInput-module_strengthSegmentVeryStrong__4Tull",_e="TextInput-module_strengthLabel__PpEO9",ge="TextInput-module_strengthText__jfVUh",he="TextInput-module_strengthValue__04hhw",fe="TextInput-module_strengthValueWeak__8Ek8Q",xe="TextInput-module_strengthValueFair__70N63",be="TextInput-module_strengthValueGood__NgsOd",ye="TextInput-module_strengthValueStrong__qaKsi",ve="TextInput-module_strengthValueVeryStrong__80d9m",Te="TextInput-module_requirements__eD6oz",Ie="TextInput-module_requirement__KoZx2",we="TextInput-module_requirementIcon__VjQXJ",je="TextInput-module_requirementIconMet__UNZFD",ke="TextInput-module_requirementIconUnmet__1MF9h",Ne="TextInput-module_requirementText__fFcdn",Se="TextInput-module_requirementTextMet__eGbSi",ze="TextInput-module_warning__ywIFl",Oe="TextInput-module_labelRow__DHwBZ",Re="TextInput-module_labelAction__gSIJc",Ae="TextInput-module_inputWithToggle__ACEsI",Ce="TextInput-module_passwordToggle__691M2",Ee="TextInput-module_groupless__8WgfT",Pe="TextInput-module_group__ZT9UR",$e="TextInput-module_addon__eHX4J",Le="TextInput-module_addonStart__8MNaQ",qe="TextInput-module_addonEnd__29ckI",Me="TextInput-module_inputAfterAddon__UEdes",Ue="TextInput-module_inputBeforeAddon__kFHUQ",Be="TextInput-module_groupError__GmXum",Fe="TextInput-module_groupDisabled__iehsu",Ve="TextInput-module_rulesTitle__8Ib6c",We="TextInput-module_rulesList__E1UOW",Ze="TextInput-module_srOnly__thTJl";!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\n/* Etiqueta con acción a la derecha (ayuda, enlace) */\n.TextInput-module_labelRow__DHwBZ {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--lb-space-2);\n}\n\n.TextInput-module_labelAction__gSIJc {\n display: inline-flex;\n align-items: center;\n flex: none;\n}\n\n/* Ver / ocultar contraseña */\n.TextInput-module_inputWithToggle__ACEsI {\n padding-right: 2.75rem;\n}\n\n.TextInput-module_passwordToggle__691M2 {\n position: absolute;\n top: 50%;\n right: 0.5rem;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 2rem;\n height: 2rem;\n padding: 0;\n border: 0;\n border-radius: var(--lb-radius-sm);\n background: transparent;\n color: var(--lb-color-muted-foreground);\n cursor: pointer;\n transform: translateY(-50%);\n}\n\n.TextInput-module_passwordToggle__691M2:hover:not(:disabled) {\n color: var(--lb-color-foreground);\n}\n\n.TextInput-module_passwordToggle__691M2:focus-visible {\n outline: 2px solid var(--lb-color-ring);\n outline-offset: 1px;\n}\n\n.TextInput-module_passwordToggle__691M2:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n/* Bloques pegados al campo (startAddon / endAddon) */\n.TextInput-module_groupless__8WgfT {\n display: contents;\n}\n\n.TextInput-module_group__ZT9UR {\n display: flex;\n align-items: stretch;\n}\n\n.TextInput-module_group__ZT9UR > .TextInput-module_inputContainer__-zaWR {\n flex: 1 1 auto;\n min-width: 0;\n}\n\n.TextInput-module_addon__eHX4J {\n display: flex;\n flex: none;\n align-items: center;\n padding: 0 var(--lb-space-3);\n border: 2px solid var(--lb-color-neutral-300);\n background: var(--lb-color-muted);\n color: var(--lb-color-muted-foreground);\n font-family: var(--lb-font-sans);\n font-size: var(--lb-font-size-sm);\n font-weight: var(--lb-font-weight-medium);\n white-space: nowrap;\n transition: border-color 150ms ease;\n}\n\n/* Un botón dentro del bloque lo ocupa entero. */\n.TextInput-module_addon__eHX4J:has(> button) {\n padding: 0;\n background: transparent;\n}\n\n.TextInput-module_addon__eHX4J > button {\n align-self: stretch;\n height: auto;\n border-radius: 0;\n}\n\n.TextInput-module_addonStart__8MNaQ {\n border-right: 0;\n border-radius: var(--lb-radius-md) 0 0 var(--lb-radius-md);\n}\n\n.TextInput-module_addonEnd__29ckI {\n border-left: 0;\n border-radius: 0 var(--lb-radius-md) var(--lb-radius-md) 0;\n}\n\n.TextInput-module_addonStart__8MNaQ > button {\n border-radius: calc(var(--lb-radius-md) - 2px) 0 0\n calc(var(--lb-radius-md) - 2px);\n}\n\n.TextInput-module_addonEnd__29ckI > button {\n border-radius: 0 calc(var(--lb-radius-md) - 2px)\n calc(var(--lb-radius-md) - 2px) 0;\n}\n\n.TextInput-module_inputAfterAddon__UEdes {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n}\n\n.TextInput-module_inputBeforeAddon__kFHUQ {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n\n.TextInput-module_group__ZT9UR:focus-within .TextInput-module_addon__eHX4J {\n border-color: var(--lb-color-primary);\n}\n\n.TextInput-module_groupError__GmXum .TextInput-module_addon__eHX4J,\n.TextInput-module_groupError__GmXum:focus-within .TextInput-module_addon__eHX4J {\n border-color: var(--lb-color-danger);\n}\n\n.TextInput-module_groupDisabled__iehsu .TextInput-module_addon__eHX4J {\n opacity: 0.7;\n}\n\n/* Reglas propias de la contraseña (passwordRules) */\n.TextInput-module_rulesTitle__8Ib6c {\n margin: 0;\n font-weight: var(--lb-font-weight-medium);\n color: var(--lb-color-neutral-700);\n}\n\n.TextInput-module_rulesList__E1UOW {\n list-style: none;\n margin: 0;\n padding: 0;\n display: flex;\n flex-direction: column;\n gap: var(--lb-space-1);\n}\n\n.TextInput-module_srOnly__thTJl {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n}\n");const De=(...e)=>e.filter(Boolean).join(" "),Je=/^[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])?)*$/,Ge=e$2.forwardRef(function({id:e,name:s,label:i,value:u,onChange:d,placeholder:c,error:m,warning:p,required:_=false,disabled:h=false,type:f="text",className:x="",hint:b,maxLength:y,minLength:v,minLengthMessage:k,pattern:Ge,icon:He,onBlur:Xe,onFocus:Ye,onValidityChange:Ke,autoComplete:Qe,validateEmail:en=false,showPasswordStrength:nn=false,requiredMessage:tn,emailValidMessage:rn,emailInvalidMessage:on,emailSuggestionMessage:ln,strengthLabels:an,strengthLabelPrefix:sn,requirementsLabels:un,passwordRules:dn,passwordRulesLabels:cn,showPasswordToggle:mn=true,passwordToggleLabels:pn,labels:_n,labelAction:gn,startAddon:hn,endAddon:fn,...xn},bn){const[yn,vn]=useState(false),[Tn,In]=useState(false),wn="password"===f&&mn&&!en,jn=useMemo(()=>en&&u?(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})(u):null,[en,u]),kn=useMemo(()=>{if(!en||!u)return null;return Je.test(u)&&!(null!==jn)},[en,u,jn]),Nn=en&&u&&!kn&&!jn,Sn=Nn&&on||null,zn=Boolean(v&&u.length>0&&u.length<v),On=!v||u.length>=v,Rn=!y||u.length<=y,An=!Ge||new RegExp(Ge).test(u),Cn=useMemo(()=>"password"===f&&dn?.length?dn.map(e=>({...e,met:e.test(u)})):null,[f,dn,u]),En=!Cn||Cn.every(e=>e.met),Pn=useUiMessages("textInput",_n,{showPassword:pn?.show,hidePassword:pn?.hide,passwordRulesTitle:cn?.title,ruleMet:cn?.met,ruleUnmet:cn?.unmet}),$n={title:Pn.passwordRulesTitle,met:Pn.ruleMet,unmet:Pn.ruleUnmet},Ln=Boolean(u&&!m&&!Nn&&!jn&&(!_||u.length>0)&&(!en||kn)&&On&&Rn&&An&&En),qn=useMemo(()=>"password"!==f||!nn||Cn?null:(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"}})(u),[f,u,nn,Cn]),Mn=Boolean(!h&&!m&&(!_||u.trim().length>0)&&(!en||kn)&&On&&Rn&&An&&En);useEffect(()=>{Ke?.(Mn);},[Mn,Ke]);const Un=y&&"text"===f&&u,Bn=u.length,Fn=y?Bn/y*100:0,Vn=Fn>80,Wn=Fn>=100,Zn=m||Nn&&on||zn&&k||void 0,Dn=Boolean(b&&!m&&!Nn),Jn=useFieldIds({id:e,name:s,required:_,error:Zn||void 0,warning:Zn?void 0:p,hint:Dn?b:void 0}),Gn=useId(),Hn=Boolean(hn||fn),Xn=["string"==typeof hn||"number"==typeof hn?`${Gn}-start`:null,"string"==typeof fn||"number"==typeof fn?`${Gn}-end`:null].filter(Boolean),Yn=`${Gn}-rules`,Kn=[Jn.controlProps["aria-describedby"],...Xn,Cn?Yn:null].filter(Boolean).join(" ")||void 0,Qn=Boolean(m||Nn||zn);return g.jsxs("div",{className:De(S,x),"data-testid":"text-input",children:[i&&(()=>{const e=g.jsxs("label",{htmlFor:Jn.inputId,className:z,children:[i,_&&g.jsx("span",{className:O,"aria-hidden":"true",children:"*"})]});return gn?g.jsxs("div",{className:Oe,children:[e,g.jsx("span",{className:Re,children:gn})]}):e})(),g.jsxs("div",{className:Hn?De(Pe,Qn?Be:void 0,h?Fe:void 0):Ee,children:[hn&&g.jsx("div",{id:`${Gn}-start`,className:De($e,Le),"data-testid":"start-addon",children:hn}),g.jsxs("div",{className:R,children:[He&&!yn&&g.jsx("div",{className:A,children:He}),g.jsx("input",{...xn,ref:bn,...Jn.controlProps,"aria-describedby":Kn,name:s,required:_,type:en||wn&&Tn?"text":f,inputMode:en?"email":xn.inputMode,value:u,onChange:e=>d(e.target.value),onFocus:()=>{vn(true),Ye?.();},onBlur:()=>{vn(false),Xe?.();},placeholder:c,disabled:h,maxLength:y,minLength:v,pattern:Ge,autoComplete:Qe,className:De(C,He?E:void 0,hn?Me:void 0,fn?Ue:void 0,Un?P:void 0,wn?Ae:void 0,m||Nn||zn?$:void 0,h||m||Sn||!Ln?void 0:L),"data-testid":"input-field","data-error":!!m||!!Nn||zn}),wn&&g.jsx("button",{type:"button",className:Ce,onClick:()=>In(e=>!e),"aria-label":Tn?Pn.hidePassword:Pn.showPassword,"aria-pressed":Tn,"aria-controls":Jn.inputId,disabled:h,children:Tn?g.jsx(N,{size:"sm"}):g.jsx(w,{size:"sm"})}),Un&&g.jsxs("div",{className:De(q,Wn?B:Vn?U:M),"data-testid":"char-count",children:[g.jsxs("div",{children:[Bn,"/",y]}),Wn&&g.jsx(I,{className:F,size:"sm"})]})]}),fn&&g.jsx("div",{id:`${Gn}-end`,className:De($e,qe),"data-testid":"end-addon",children:fn})]}),Un&&y>20&&g.jsx("div",{className:V,children:g.jsx("div",{className:De(W,Wn?J:Vn?D:Z),style:{width:`${Math.min(Fn,100)}%`}})}),Dn&&g.jsx("p",{id:Jn.hintId,className:G,children:b}),p&&!Zn&&g.jsx("p",{id:Jn.warningId,className:ze,children:p}),_&&!u&&!m&&!Nn&&tn&&g.jsx("p",{className:H,children:tn}),en&&u&&kn&&rn&&g.jsxs("div",{className:De(X,Q),children:[g.jsx(T,{className:Y,size:"sm"}),g.jsx("p",{className:K,children:rn})]}),jn&&!m&&ln&&g.jsxs("div",{className:De(X,ee),children:[g.jsx(j,{className:Y,size:"sm"}),g.jsxs("p",{className:K,children:[ln.replace("{suggestion}",jn),g.jsx("button",{type:"button",onClick:()=>d(jn),className:ne,children:jn})]})]}),Cn&&g.jsxs("div",{id:Yn,className:Te,"data-testid":"password-rules",children:[g.jsx("p",{className:Ve,children:$n.title}),g.jsx("ul",{className:We,children:Cn.map(e=>g.jsxs("li",{className:Ie,"data-met":e.met,children:[g.jsx(T,{"aria-hidden":"true",className:De(we,e.met?je:ke),size:"sm"}),g.jsx("span",{className:De(Ne,e.met&&Se),children:e.label}),g.jsx("span",{className:Ze,children:` (${e.met?$n.met:$n.unmet})`})]},e.id))})]}),qn&&qn.score>0&&g.jsxs("div",{className:le,children:[g.jsx("div",{className:ae,children:[0,1,2,3,4].map(e=>g.jsx("div",{className:De(se,e<qn.score?"weak"===qn.strength?ue:"fair"===qn.strength?de:"good"===qn.strength?ce:"strong"===qn.strength?me:pe:ie)},e))}),(sn||an?.[qn.strength])&&g.jsx("div",{className:_e,children:g.jsxs("p",{className:ge,children:[sn&&`${sn} `,g.jsx("span",{className:De(he,"weak"===qn.strength?fe:"fair"===qn.strength?xe:"good"===qn.strength?be:"strong"===qn.strength?ye:ve),children:an?.[qn.strength]})]})}),un&&g.jsxs("div",{className:Te,children:[un.lowercase&&g.jsxs("div",{className:Ie,children:[g.jsx(T,{className:De(we,/[a-z]/.test(u)?je:ke),size:"sm"}),g.jsx("span",{className:De(Ne,/[a-z]/.test(u)&&Se),children:un.lowercase})]}),un.uppercase&&g.jsxs("div",{className:Ie,children:[g.jsx(T,{className:De(we,/[A-Z]/.test(u)?je:ke),size:"sm"}),g.jsx("span",{className:De(Ne,/[A-Z]/.test(u)&&Se),children:un.uppercase})]}),un.number&&g.jsxs("div",{className:Ie,children:[g.jsx(T,{className:De(we,/\d/.test(u)?je:ke),size:"sm"}),g.jsx("span",{className:De(Ne,/\d/.test(u)&&Se),children:un.number})]}),un.special&&g.jsxs("div",{className:Ie,children:[g.jsx(T,{className:De(we,/[!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?]/.test(u)?je:ke),size:"sm"}),g.jsx("span",{className:De(Ne,/[!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?]/.test(u)&&Se),children:un.special})]}),un.minLength&&g.jsxs("div",{className:Ie,children:[g.jsx(T,{className:De(we,u.length>=8?je:ke),size:"sm"}),g.jsx("span",{className:De(Ne,u.length>=8&&Se),children:un.minLength})]})]})]}),Zn&&g.jsxs("div",{id:Jn.errorId,className:te,role:"alert",children:[g.jsx(I,{className:re,size:"sm"}),g.jsx("p",{className:oe,children:Zn})]})]})});Ge.displayName="TextInput";
|
|
455
|
+
*/var v=(b||(b=1,"production"===process.env.NODE_ENV?h.exports=function(){if(_)return f;_=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 l in r={},t)"key"!==l&&(r[l]=t[l]);else r=t;return t=r.ref,{$$typeof:e,type:n,key:o,ref:void 0!==t?t:null,props:r}}return f.Fragment=n,f.jsx=t,f.jsxs=t,f}():h.exports=(x||(x=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 h:return "Profiler";case g:return "StrictMode";case v:return "Suspense";case T:return "SuspenseList";case j: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 x:return e.displayName||"Context";case f:return (e._context.displayName||"Context")+".Consumer";case b: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 w: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===w)return "<...>";try{var t=n(e);return t?"<"+t+">":"<...>"}catch(e){return "<...>"}}function l(){return Error("react-stack-top-frame")}function a(){var e=n(this.type);return R[e]||(R[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,l,s,u){var c,p=t.children;if(void 0!==p)if(l)if(z(p)){for(l=0;l<p.length;l++)i(p[l]);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(S.call(t,"key")){p=n(e);var _=Object.keys(t).filter(function(e){return "key"!==e});l=0<_.length?"{key: someKey, "+_.join(": ..., ")+": ...}":"{key: someKey}",E[p+l]||(_=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} />',l,p,_,p),E[p+l]=true);}if(p=null,void 0!==o&&(r(o),p=""+o),function(e){if(S.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(){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,l){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:a}):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:l}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}(e,p,o,null===(c=N.A)?null:c.getOwner(),s,u)}function i(e){u(e)?e._store&&(e._store.validated=1):"object"==typeof e&&null!==e&&e.$$typeof===w&&("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 d,c=e$2,m=Symbol.for("react.transitional.element"),p=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),g=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),x=Symbol.for("react.context"),b=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),j=Symbol.for("react.activity"),k=Symbol.for("react.client.reference"),N=c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,S=Object.prototype.hasOwnProperty,z=Array.isArray,O=console.createTask?console.createTask:function(){return null},R={},A=(c={react_stack_bottom_frame:function(e){return e()}}).react_stack_bottom_frame.bind(c,l)(),C=O(o(l)),E={};y.Fragment=_,y.jsx=function(e,n,t){var r=1e4>N.recentlyCreatedOwnerStacks++;return s(e,n,t,false,r?Error("react-stack-top-frame"):A,r?O(o(e)):C)},y.jsxs=function(e,n,t){var r=1e4>N.recentlyCreatedOwnerStacks++;return s(e,n,t,true,r?Error("react-stack-top-frame"):A,r?O(o(e)):C)};}()),y)),h.exports);function 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 v.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:v.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 I=({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 v.jsx("svg",{width:t[n],height:t[n],className:r,viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:v.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"})})},w=({className:e="",size:n="md",color:t="currentColor"})=>{const r={sm:16,md:20,lg:24};return v.jsxs("svg",{width:r[n],height:r[n],className:`${{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"}[n]} ${e}`,fill:"none",stroke:t,viewBox:"0 0 24 24",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[v.jsx("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),v.jsx("circle",{cx:"12",cy:"12",r:"3"})]})},j=({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 v.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:v.jsx("path",{d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})},k={sm:16,md:20,lg:24};function N({size:e="md",title:n,...t}){return v.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:k[e],height:k[e],fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",role:n?"img":void 0,"aria-hidden":!n||void 0,focusable:"false",...t,children:[n&&v.jsx("title",{children:n}),v.jsx("path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49"}),v.jsx("path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242"}),v.jsx("path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143"}),v.jsx("path",{d:"m2 2 20 20"})]})}var S="TextInput-module_container__QXVA9",z="TextInput-module_label__GGFxk",O="TextInput-module_required__qlHAH",R="TextInput-module_inputContainer__-zaWR",A="TextInput-module_icon__F1AYg",C="TextInput-module_input__I8TSn",E="TextInput-module_inputWithIcon__TDgMC",P="TextInput-module_inputWithCharCount__qgvqA",$="TextInput-module_inputError__-Ga78",L="TextInput-module_inputSuccess__xsjt7",q="TextInput-module_charCount__RyuVm",M="TextInput-module_charCountNormal__LCUr7",U="TextInput-module_charCountNear__OKroK",B="TextInput-module_charCountLimit__iaB20",F="TextInput-module_charCountIcon__lRD-4",V="TextInput-module_charProgressBar__Wva8D",W="TextInput-module_charProgress__ZUsGs",Z="TextInput-module_charProgressNormal__TdFY4",D="TextInput-module_charProgressNear__beyMs",J="TextInput-module_charProgressLimit__Vr6d-",G="TextInput-module_hint__iZiig",H="TextInput-module_requiredHelper__TUGsU",X="TextInput-module_validationMessage__3g-wc",Y="TextInput-module_validationIcon__q5LT6",K="TextInput-module_validationText__-qAuu",Q="TextInput-module_validEmail__Ya1tf",ee="TextInput-module_emailSuggestion__ZzQkZ",ne="TextInput-module_suggestionButton__Rsxt8",te="TextInput-module_error__ewnmB",re="TextInput-module_errorIcon__JkIpb",oe="TextInput-module_errorText__ba7lR",le="TextInput-module_passwordStrength__ICyJU",ae="TextInput-module_strengthBar__3c8Yf",se="TextInput-module_strengthSegment__76ih4",ie="TextInput-module_strengthSegmentInactive__RK1Q8",ue="TextInput-module_strengthSegmentWeak__BFvgT",de="TextInput-module_strengthSegmentFair__AOJW5",ce="TextInput-module_strengthSegmentGood__uGgTx",me="TextInput-module_strengthSegmentStrong__vP5Yi",pe="TextInput-module_strengthSegmentVeryStrong__4Tull",_e="TextInput-module_strengthLabel__PpEO9",ge="TextInput-module_strengthText__jfVUh",he="TextInput-module_strengthValue__04hhw",fe="TextInput-module_strengthValueWeak__8Ek8Q",xe="TextInput-module_strengthValueFair__70N63",be="TextInput-module_strengthValueGood__NgsOd",ye="TextInput-module_strengthValueStrong__qaKsi",ve="TextInput-module_strengthValueVeryStrong__80d9m",Te="TextInput-module_requirements__eD6oz",Ie="TextInput-module_requirement__KoZx2",we="TextInput-module_requirementIcon__VjQXJ",je="TextInput-module_requirementIconMet__UNZFD",ke="TextInput-module_requirementIconUnmet__1MF9h",Ne="TextInput-module_requirementText__fFcdn",Se="TextInput-module_requirementTextMet__eGbSi",ze="TextInput-module_warning__ywIFl",Oe="TextInput-module_labelRow__DHwBZ",Re="TextInput-module_labelAction__gSIJc",Ae="TextInput-module_inputWithToggle__ACEsI",Ce="TextInput-module_passwordToggle__691M2",Ee="TextInput-module_groupless__8WgfT",Pe="TextInput-module_group__ZT9UR",$e="TextInput-module_addon__eHX4J",Le="TextInput-module_addonStart__8MNaQ",qe="TextInput-module_addonEnd__29ckI",Me="TextInput-module_inputAfterAddon__UEdes",Ue="TextInput-module_inputBeforeAddon__kFHUQ",Be="TextInput-module_groupError__GmXum",Fe="TextInput-module_groupDisabled__iehsu",Ve="TextInput-module_rulesTitle__8Ib6c",We="TextInput-module_rulesList__E1UOW",Ze="TextInput-module_srOnly__thTJl";!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\n/* Etiqueta con acción a la derecha (ayuda, enlace) */\n.TextInput-module_labelRow__DHwBZ {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--lb-space-2);\n}\n\n.TextInput-module_labelAction__gSIJc {\n display: inline-flex;\n align-items: center;\n flex: none;\n}\n\n/* Ver / ocultar contraseña */\n.TextInput-module_inputWithToggle__ACEsI {\n padding-right: 2.75rem;\n}\n\n.TextInput-module_passwordToggle__691M2 {\n position: absolute;\n top: 50%;\n right: 0.5rem;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 2rem;\n height: 2rem;\n padding: 0;\n border: 0;\n border-radius: var(--lb-radius-sm);\n background: transparent;\n color: var(--lb-color-muted-foreground);\n cursor: pointer;\n transform: translateY(-50%);\n}\n\n.TextInput-module_passwordToggle__691M2:hover:not(:disabled) {\n color: var(--lb-color-foreground);\n}\n\n.TextInput-module_passwordToggle__691M2:focus-visible {\n outline: 2px solid var(--lb-color-ring);\n outline-offset: 1px;\n}\n\n.TextInput-module_passwordToggle__691M2:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n/* Bloques pegados al campo (startAddon / endAddon) */\n.TextInput-module_groupless__8WgfT {\n display: contents;\n}\n\n.TextInput-module_group__ZT9UR {\n display: flex;\n align-items: stretch;\n}\n\n.TextInput-module_group__ZT9UR > .TextInput-module_inputContainer__-zaWR {\n flex: 1 1 auto;\n min-width: 0;\n}\n\n.TextInput-module_addon__eHX4J {\n display: flex;\n flex: none;\n align-items: center;\n padding: 0 var(--lb-space-3);\n border: 2px solid var(--lb-color-neutral-300);\n background: var(--lb-color-muted);\n color: var(--lb-color-muted-foreground);\n font-family: var(--lb-font-sans);\n font-size: var(--lb-font-size-sm);\n font-weight: var(--lb-font-weight-medium);\n white-space: nowrap;\n transition: border-color 150ms ease;\n}\n\n/* Un botón dentro del bloque lo ocupa entero. */\n.TextInput-module_addon__eHX4J:has(> button) {\n padding: 0;\n background: transparent;\n}\n\n.TextInput-module_addon__eHX4J > button {\n align-self: stretch;\n height: auto;\n border-radius: 0;\n}\n\n.TextInput-module_addonStart__8MNaQ {\n border-right: 0;\n border-radius: var(--lb-radius-md) 0 0 var(--lb-radius-md);\n}\n\n.TextInput-module_addonEnd__29ckI {\n border-left: 0;\n border-radius: 0 var(--lb-radius-md) var(--lb-radius-md) 0;\n}\n\n.TextInput-module_addonStart__8MNaQ > button {\n border-radius: calc(var(--lb-radius-md) - 2px) 0 0\n calc(var(--lb-radius-md) - 2px);\n}\n\n.TextInput-module_addonEnd__29ckI > button {\n border-radius: 0 calc(var(--lb-radius-md) - 2px)\n calc(var(--lb-radius-md) - 2px) 0;\n}\n\n.TextInput-module_inputAfterAddon__UEdes {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n}\n\n.TextInput-module_inputBeforeAddon__kFHUQ {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n\n.TextInput-module_group__ZT9UR:focus-within .TextInput-module_addon__eHX4J {\n border-color: var(--lb-color-primary);\n}\n\n.TextInput-module_groupError__GmXum .TextInput-module_addon__eHX4J,\n.TextInput-module_groupError__GmXum:focus-within .TextInput-module_addon__eHX4J {\n border-color: var(--lb-color-danger);\n}\n\n.TextInput-module_groupDisabled__iehsu .TextInput-module_addon__eHX4J {\n opacity: 0.7;\n}\n\n/* Reglas propias de la contraseña (passwordRules) */\n.TextInput-module_rulesTitle__8Ib6c {\n margin: 0;\n font-weight: var(--lb-font-weight-medium);\n color: var(--lb-color-neutral-700);\n}\n\n.TextInput-module_rulesList__E1UOW {\n list-style: none;\n margin: 0;\n padding: 0;\n display: flex;\n flex-direction: column;\n gap: var(--lb-space-1);\n}\n\n.TextInput-module_srOnly__thTJl {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n}\n");const De=(...e)=>e.filter(Boolean).join(" "),Je=/^[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])?)*$/,Ge=e$2.forwardRef(function({id:e,name:s,label:i,value:u,onChange:d,placeholder:c,error:m,warning:p,required:_=false,disabled:h=false,type:f="text",className:x="",hint:b,maxLength:y,minLength:v,minLengthMessage:k,pattern:Ge,icon:He,onBlur:Xe,onFocus:Ye,onValidityChange:Ke,autoComplete:Qe,validateEmail:en=false,showPasswordStrength:nn=false,requiredMessage:tn,emailValidMessage:rn,emailInvalidMessage:on,emailSuggestionMessage:ln,strengthLabels:an,strengthLabelPrefix:sn,requirementsLabels:un,passwordRules:dn,passwordRulesLabels:cn,showPasswordToggle:mn=true,passwordToggleLabels:pn,labels:_n,labelAction:gn,startAddon:hn,endAddon:fn,...xn},bn){const[yn,vn]=useState(false),[Tn,In]=useState(false),wn="password"===f&&mn&&!en,jn=useMemo(()=>en&&u?(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})(u):null,[en,u]),kn=useMemo(()=>{if(!en||!u)return null;return Je.test(u)&&!(null!==jn)},[en,u,jn]),Nn=en&&u&&!kn&&!jn,Sn=Nn&&on||null,zn=Boolean(v&&u.length>0&&u.length<v),On=!v||u.length>=v,Rn=!y||u.length<=y,An=!Ge||new RegExp(Ge).test(u),Cn=useMemo(()=>"password"===f&&dn?.length?dn.map(e=>({...e,met:e.test(u)})):null,[f,dn,u]),En=!Cn||Cn.every(e=>e.met),Pn=useUiMessages("textInput",_n,{showPassword:pn?.show,hidePassword:pn?.hide,passwordRulesTitle:cn?.title,ruleMet:cn?.met,ruleUnmet:cn?.unmet}),$n={title:Pn.passwordRulesTitle,met:Pn.ruleMet,unmet:Pn.ruleUnmet},Ln=Boolean(u&&!m&&!Nn&&!jn&&(!_||u.length>0)&&(!en||kn)&&On&&Rn&&An&&En),qn=useMemo(()=>"password"!==f||!nn||Cn?null:(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"}})(u),[f,u,nn,Cn]),Mn=Boolean(!h&&!m&&(!_||u.trim().length>0)&&(!en||kn)&&On&&Rn&&An&&En);useEffect(()=>{Ke?.(Mn);},[Mn,Ke]);const Un=y&&"text"===f&&u,Bn=u.length,Fn=y?Bn/y*100:0,Vn=Fn>80,Wn=Fn>=100,Zn=m||Nn&&on||zn&&k||void 0,Dn=Boolean(b&&!m&&!Nn),Jn=useFieldIds({id:e,name:s,required:_,error:Zn||void 0,warning:Zn?void 0:p,hint:Dn?b:void 0}),Gn=useId(),Hn=Boolean(hn||fn),Xn=["string"==typeof hn||"number"==typeof hn?`${Gn}-start`:null,"string"==typeof fn||"number"==typeof fn?`${Gn}-end`:null].filter(Boolean),Yn=`${Gn}-rules`,Kn=[Jn.controlProps["aria-describedby"],...Xn,Cn?Yn:null].filter(Boolean).join(" ")||void 0,Qn=Boolean(m||Nn||zn);return g.jsxs("div",{className:De(S,x),"data-testid":"text-input",children:[i&&(()=>{const e=g.jsxs("label",{htmlFor:Jn.inputId,className:z,children:[i,_&&g.jsx("span",{className:O,"aria-hidden":"true",children:"*"})]});return gn?g.jsxs("div",{className:Oe,children:[e,g.jsx("span",{className:Re,children:gn})]}):e})(),g.jsxs("div",{className:Hn?De(Pe,Qn?Be:void 0,h?Fe:void 0):Ee,children:[hn&&g.jsx("div",{id:`${Gn}-start`,className:De($e,Le),"data-testid":"start-addon",children:hn}),g.jsxs("div",{className:R,children:[He&&!yn&&g.jsx("div",{className:A,children:He}),g.jsx("input",{"data-testid":"input-field",...xn,ref:bn,...Jn.controlProps,"aria-describedby":Kn,name:s,required:_,type:en||wn&&Tn?"text":f,inputMode:en?"email":xn.inputMode,value:u,onChange:e=>d(e.target.value),onFocus:()=>{vn(true),Ye?.();},onBlur:()=>{vn(false),Xe?.();},placeholder:c,disabled:h,maxLength:y,minLength:v,pattern:Ge,autoComplete:Qe,className:De(C,He?E:void 0,hn?Me:void 0,fn?Ue:void 0,Un?P:void 0,wn?Ae:void 0,m||Nn||zn?$:void 0,h||m||Sn||!Ln?void 0:L),"data-error":!!m||!!Nn||zn}),wn&&g.jsx("button",{type:"button",className:Ce,onClick:()=>In(e=>!e),"aria-label":Tn?Pn.hidePassword:Pn.showPassword,"aria-pressed":Tn,"aria-controls":Jn.inputId,disabled:h,children:Tn?g.jsx(N,{size:"sm"}):g.jsx(w,{size:"sm"})}),Un&&g.jsxs("div",{className:De(q,Wn?B:Vn?U:M),"data-testid":"char-count",children:[g.jsxs("div",{children:[Bn,"/",y]}),Wn&&g.jsx(I,{className:F,size:"sm"})]})]}),fn&&g.jsx("div",{id:`${Gn}-end`,className:De($e,qe),"data-testid":"end-addon",children:fn})]}),Un&&y>20&&g.jsx("div",{className:V,children:g.jsx("div",{className:De(W,Wn?J:Vn?D:Z),style:{width:`${Math.min(Fn,100)}%`}})}),Dn&&g.jsx("p",{id:Jn.hintId,className:G,children:b}),p&&!Zn&&g.jsx("p",{id:Jn.warningId,className:ze,children:p}),_&&!u&&!m&&!Nn&&tn&&g.jsx("p",{className:H,children:tn}),en&&u&&kn&&rn&&g.jsxs("div",{className:De(X,Q),children:[g.jsx(T,{className:Y,size:"sm"}),g.jsx("p",{className:K,children:rn})]}),jn&&!m&&ln&&g.jsxs("div",{className:De(X,ee),children:[g.jsx(j,{className:Y,size:"sm"}),g.jsxs("p",{className:K,children:[ln.replace("{suggestion}",jn),g.jsx("button",{type:"button",onClick:()=>d(jn),className:ne,children:jn})]})]}),Cn&&g.jsxs("div",{id:Yn,className:Te,"data-testid":"password-rules",children:[g.jsx("p",{className:Ve,children:$n.title}),g.jsx("ul",{className:We,children:Cn.map(e=>g.jsxs("li",{className:Ie,"data-met":e.met,children:[g.jsx(T,{"aria-hidden":"true",className:De(we,e.met?je:ke),size:"sm"}),g.jsx("span",{className:De(Ne,e.met&&Se),children:e.label}),g.jsx("span",{className:Ze,children:` (${e.met?$n.met:$n.unmet})`})]},e.id))})]}),qn&&qn.score>0&&g.jsxs("div",{className:le,children:[g.jsx("div",{className:ae,children:[0,1,2,3,4].map(e=>g.jsx("div",{className:De(se,e<qn.score?"weak"===qn.strength?ue:"fair"===qn.strength?de:"good"===qn.strength?ce:"strong"===qn.strength?me:pe:ie)},e))}),(sn||an?.[qn.strength])&&g.jsx("div",{className:_e,children:g.jsxs("p",{className:ge,children:[sn&&`${sn} `,g.jsx("span",{className:De(he,"weak"===qn.strength?fe:"fair"===qn.strength?xe:"good"===qn.strength?be:"strong"===qn.strength?ye:ve),children:an?.[qn.strength]})]})}),un&&g.jsxs("div",{className:Te,children:[un.lowercase&&g.jsxs("div",{className:Ie,children:[g.jsx(T,{className:De(we,/[a-z]/.test(u)?je:ke),size:"sm"}),g.jsx("span",{className:De(Ne,/[a-z]/.test(u)&&Se),children:un.lowercase})]}),un.uppercase&&g.jsxs("div",{className:Ie,children:[g.jsx(T,{className:De(we,/[A-Z]/.test(u)?je:ke),size:"sm"}),g.jsx("span",{className:De(Ne,/[A-Z]/.test(u)&&Se),children:un.uppercase})]}),un.number&&g.jsxs("div",{className:Ie,children:[g.jsx(T,{className:De(we,/\d/.test(u)?je:ke),size:"sm"}),g.jsx("span",{className:De(Ne,/\d/.test(u)&&Se),children:un.number})]}),un.special&&g.jsxs("div",{className:Ie,children:[g.jsx(T,{className:De(we,/[!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?]/.test(u)?je:ke),size:"sm"}),g.jsx("span",{className:De(Ne,/[!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?]/.test(u)&&Se),children:un.special})]}),un.minLength&&g.jsxs("div",{className:Ie,children:[g.jsx(T,{className:De(we,u.length>=8?je:ke),size:"sm"}),g.jsx("span",{className:De(Ne,u.length>=8&&Se),children:un.minLength})]})]})]}),Zn&&g.jsxs("div",{id:Jn.errorId,className:te,role:"alert",children:[g.jsx(I,{className:re,size:"sm"}),g.jsx("p",{className:oe,children:Zn})]})]})});Ge.displayName="TextInput";
|
|
456
456
|
|
|
457
457
|
var e$1={exports:{}};
|
|
458
458
|
|
|
@@ -519,54 +519,68 @@ styleInject(css_248z);
|
|
|
519
519
|
|
|
520
520
|
/** Países disponibles por defecto. Perú primero. */
|
|
521
521
|
const PHONE_COUNTRIES = [
|
|
522
|
-
{
|
|
522
|
+
{
|
|
523
|
+
code: "PE",
|
|
524
|
+
dialCode: "+51",
|
|
525
|
+
digits: 9,
|
|
526
|
+
mask: "### ### ###",
|
|
527
|
+
example: "912345678",
|
|
528
|
+
},
|
|
523
529
|
{
|
|
524
530
|
code: "MX",
|
|
525
531
|
dialCode: "+52",
|
|
526
532
|
digits: 10,
|
|
527
533
|
mask: "### ### ####",
|
|
534
|
+
example: "5551234567",
|
|
528
535
|
},
|
|
529
536
|
{
|
|
530
537
|
code: "CO",
|
|
531
538
|
dialCode: "+57",
|
|
532
539
|
digits: 10,
|
|
533
540
|
mask: "### ### ####",
|
|
541
|
+
example: "3001234567",
|
|
534
542
|
},
|
|
535
543
|
{
|
|
536
544
|
code: "CL",
|
|
537
545
|
dialCode: "+56",
|
|
538
546
|
digits: 9,
|
|
539
547
|
mask: "# #### ####",
|
|
548
|
+
example: "912345678",
|
|
540
549
|
},
|
|
541
550
|
{
|
|
542
551
|
code: "AR",
|
|
543
552
|
dialCode: "+54",
|
|
544
553
|
digits: 10,
|
|
545
554
|
mask: "### ### ####",
|
|
555
|
+
example: "9112345678",
|
|
546
556
|
},
|
|
547
557
|
{
|
|
548
558
|
code: "BR",
|
|
549
559
|
dialCode: "+55",
|
|
550
560
|
digits: 11,
|
|
551
561
|
mask: "(##) ##### ####",
|
|
562
|
+
example: "11999998888",
|
|
552
563
|
},
|
|
553
564
|
{
|
|
554
565
|
code: "ES",
|
|
555
566
|
dialCode: "+34",
|
|
556
567
|
digits: 9,
|
|
557
568
|
mask: "### ### ###",
|
|
569
|
+
example: "612345678",
|
|
558
570
|
},
|
|
559
571
|
{
|
|
560
572
|
code: "US",
|
|
561
573
|
dialCode: "+1",
|
|
562
574
|
digits: 10,
|
|
563
575
|
mask: "(###) ###-####",
|
|
576
|
+
example: "2015550123",
|
|
564
577
|
},
|
|
565
578
|
{
|
|
566
579
|
code: "CA",
|
|
567
580
|
dialCode: "+1",
|
|
568
581
|
digits: 10,
|
|
569
582
|
mask: "(###) ###-####",
|
|
583
|
+
example: "2015550123",
|
|
570
584
|
},
|
|
571
585
|
];
|
|
572
586
|
const findCountry = (code, countries) => countries.find((country) => country.code === code) ?? countries[0];
|
|
@@ -636,12 +650,14 @@ const PhoneInput = ({ label, value, country, onChange, onCountryChange, countrie
|
|
|
636
650
|
value: item.code,
|
|
637
651
|
label: `${countryName(item, intlLocale)} (${item.dialCode})`,
|
|
638
652
|
}));
|
|
639
|
-
return (jsxRuntimeExports.jsxs("div", { className: [styles.field, className].filter(Boolean).join(" "), children: [jsxRuntimeExports.jsxs("div", { className: styles.row, children: [jsxRuntimeExports.jsx("div", { className: styles.country, children: jsxRuntimeExports.jsx(
|
|
653
|
+
return (jsxRuntimeExports.jsxs("div", { className: [styles.field, className].filter(Boolean).join(" "), children: [jsxRuntimeExports.jsxs("div", { className: styles.row, children: [jsxRuntimeExports.jsx("div", { className: styles.country, children: jsxRuntimeExports.jsx(x$1, { label: labels.country, id: `${inputId}-pais`, name: name ? `${name}-pais` : undefined, value: selected.code, onChange: (code) => {
|
|
640
654
|
onCountryChange(code);
|
|
641
655
|
// Mismos dígitos con la máscara del nuevo país
|
|
642
656
|
if (value)
|
|
643
657
|
onChange(formatPhone(value, code, countries));
|
|
644
|
-
}, options: options, disabled: disabled }) }), jsxRuntimeExports.jsx("div", { className: styles.number, children: jsxRuntimeExports.jsx(Ge, { id: inputId, name: name, label: label ?? labels.label, type: "tel", inputMode: "tel", autoComplete: "tel-national", value: value, onChange: (next) => onChange(formatPhone(next, selected.code, countries)), placeholder: selected.
|
|
658
|
+
}, options: options, disabled: disabled }) }), jsxRuntimeExports.jsx("div", { className: styles.number, children: jsxRuntimeExports.jsx(Ge, { id: inputId, name: name, label: label ?? labels.label, type: "tel", inputMode: "tel", autoComplete: "tel-national", value: value, onChange: (next) => onChange(formatPhone(next, selected.code, countries)), placeholder: selected.example
|
|
659
|
+
? formatPhone(selected.example, selected.code, countries)
|
|
660
|
+
: selected.mask.replace(/#/g, "0"), error: shownError, warning: shownError ? undefined : warning, hint: hint ??
|
|
645
661
|
interpolate(labels.digitsHint, { digits: selected.digits }), required: required, disabled: disabled, onBlur: onBlur, onFocus: onFocus }) })] }), showInternational && valid && !shownError && (jsxRuntimeExports.jsxs("p", { className: styles.international, "aria-live": "polite", children: [jsxRuntimeExports.jsx(l, { size: "sm" }), selected.dialCode, " ", value] }))] }));
|
|
646
662
|
};
|
|
647
663
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rubenpazch/phone-input",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "PhoneInput component",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "dist/index.cjs.js",
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@rubenpazch/icons": "^6.6.1",
|
|
36
|
-
"@rubenpazch/select": "^1.
|
|
36
|
+
"@rubenpazch/select": "^1.5.0",
|
|
37
37
|
"@rubenpazch/shared": "5.4.0",
|
|
38
|
-
"@rubenpazch/text-input": "^6.
|
|
38
|
+
"@rubenpazch/text-input": "^6.8.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@rubenpazch/eslint-config": "4.0.0",
|