@rubenpazch/identification-input 2.0.3 → 2.2.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 +22 -12
- package/dist/IdentificationInput.d.ts +20 -2
- package/dist/IdentificationInput.d.ts.map +1 -1
- package/dist/index.cjs.js +129 -46
- package/dist/index.d.ts +21 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +128 -48
- package/dist/peruvianIdentification.d.ts.map +1 -1
- package/package.json +4 -3
package/dist/index.cjs.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
3
5
|
var require$$0__default = require('react');
|
|
4
6
|
var shared = require('@rubenpazch/shared');
|
|
5
7
|
|
|
@@ -866,7 +868,22 @@ function requireJsxRuntime$1 () {
|
|
|
866
868
|
|
|
867
869
|
var jsxRuntimeExports$1 = requireJsxRuntime$1();
|
|
868
870
|
|
|
869
|
-
var
|
|
871
|
+
var e$2={exports:{}};
|
|
872
|
+
|
|
873
|
+
var r$2={};
|
|
874
|
+
|
|
875
|
+
/**
|
|
876
|
+
* @license React
|
|
877
|
+
* react-jsx-runtime.production.js
|
|
878
|
+
*
|
|
879
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
880
|
+
*
|
|
881
|
+
* This source code is licensed under the MIT license found in the
|
|
882
|
+
* LICENSE file in the root directory of this source tree.
|
|
883
|
+
*/var e$1;function t$2(){if(e$1)return r$2;e$1=1;var t=Symbol.for("react.transitional.element"),o=Symbol.for("react.fragment");function n(r,e,o){var n=null;if(void 0!==o&&(n=""+o),void 0!==e.key&&(n=""+e.key),"key"in e)for(var i in o={},e)"key"!==i&&(o[i]=e[i]);else o=e;return e=o.ref,{$$typeof:t,type:r,key:n,ref:void 0!==e?e:null,props:o}}return r$2.Fragment=o,r$2.jsx=n,r$2.jsxs=n,r$2}
|
|
884
|
+
|
|
885
|
+
var r$1={};
|
|
886
|
+
|
|
870
887
|
/**
|
|
871
888
|
* @license React
|
|
872
889
|
* react-jsx-runtime.development.js
|
|
@@ -875,7 +892,17 @@ var t,r={exports:{}},o={};var l$1,n,a={};
|
|
|
875
892
|
*
|
|
876
893
|
* This source code is licensed under the MIT license found in the
|
|
877
894
|
* LICENSE file in the root directory of this source tree.
|
|
878
|
-
*/
|
|
895
|
+
*/var t$1;function n(){return t$1||(t$1=1,"production"!==process.env.NODE_ENV&&function(){function t(e){if(null==e)return null;if("function"==typeof e)return e.$$typeof===N?null:e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case d:return "Fragment";case _:return "Profiler";case b:return "StrictMode";case S:return "Suspense";case j:return "SuspenseList";case w:return "Activity"}if("object"==typeof e)switch("number"==typeof e.tag&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case m:return "Portal";case g:return e.displayName||"Context";case v:return (e._context.displayName||"Context")+".Consumer";case k:var r=e.render;return (e=e.displayName)||(e=""!==(e=r.displayName||r.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case h:return null!==(r=e.displayName||null)?r:t(e.type)||"Memo";case O:r=e._payload,e=e._init;try{return t(e(r))}catch(e){}}return null}function n(e){return ""+e}function o(e){try{n(e);var r=!1;}catch(e){r=true;}if(r){var t=(r=console).error,o="function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",o),n(e)}}function a(e){if(e===d)return "<>";if("object"==typeof e&&null!==e&&e.$$typeof===O)return "<...>";try{var r=t(e);return r?"<"+r+">":"<...>"}catch(e){return "<...>"}}function l(){return Error("react-stack-top-frame")}function i(){var e=t(this.type);return P[e]||(P[e]=true,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),void 0!==(e=this.props.ref)?e:null}function c(e,r,n,a,l,c){var u,y=r.children;if(void 0!==y)if(a)if(x(y)){for(a=0;a<y.length;a++)s(y[a]);Object.freeze&&Object.freeze(y);}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else s(y);if(T.call(r,"key")){y=t(e);var m=Object.keys(r).filter(function(e){return "key"!==e});a=0<m.length?"{key: someKey, "+m.join(": ..., ")+": ...}":"{key: someKey}",C[y+a]||(m=0<m.length?"{"+m.join(": ..., ")+": ...}":"{}",console.error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',a,y,m,y),C[y+a]=true);}if(y=null,void 0!==n&&(o(n),y=""+n),function(e){if(T.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return false}return void 0!==e.key}(r)&&(o(r.key),y=""+r.key),"key"in r)for(var d in n={},r)"key"!==d&&(n[d]=r[d]);else n=r;return y&&function(e,r){function t(){f||(f=true,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",r));}t.isReactWarning=true,Object.defineProperty(e,"key",{get:t,configurable:true});}(n,"function"==typeof e?e.displayName||e.name||"Unknown":e),function(e,r,t,n,o,a){var l=t.ref;return e={$$typeof:p,type:e,key:r,props:t,_owner:n},null!==(void 0!==l?l:null)?Object.defineProperty(e,"ref",{enumerable:false,get:i}):Object.defineProperty(e,"ref",{enumerable:false,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:false,enumerable:false,writable:true,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:false,enumerable:false,writable:true,value:null}),Object.defineProperty(e,"_debugStack",{configurable:false,enumerable:false,writable:true,value:o}),Object.defineProperty(e,"_debugTask",{configurable:false,enumerable:false,writable:true,value:a}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}(e,y,n,null===(u=R.A)?null:u.getOwner(),l,c)}function s(e){u(e)?e._store&&(e._store.validated=1):"object"==typeof e&&null!==e&&e.$$typeof===O&&("fulfilled"===e._payload.status?u(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1));}function u(e){return "object"==typeof e&&null!==e&&e.$$typeof===p}var f,y=require$$0__default,p=Symbol.for("react.transitional.element"),m=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),v=Symbol.for("react.consumer"),g=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),S=Symbol.for("react.suspense"),j=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),w=Symbol.for("react.activity"),N=Symbol.for("react.client.reference"),R=y.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,T=Object.prototype.hasOwnProperty,x=Array.isArray,E=console.createTask?console.createTask:function(){return null},P={},$=(y={react_stack_bottom_frame:function(e){return e()}}).react_stack_bottom_frame.bind(y,l)(),A=E(a(l)),C={};r$1.Fragment=d,r$1.jsx=function(e,r,t){var n=1e4>R.recentlyCreatedOwnerStacks++;return c(e,r,t,false,n?Error("react-stack-top-frame"):$,n?E(a(e)):A)},r$1.jsxs=function(e,r,t){var n=1e4>R.recentlyCreatedOwnerStacks++;return c(e,r,t,true,n?Error("react-stack-top-frame"):$,n?E(a(e)):A)};}()),r$1}
|
|
896
|
+
|
|
897
|
+
var t;function s$1(){return t||(t=1,"production"===process.env.NODE_ENV?e$2.exports=t$2():e$2.exports=n()),e$2.exports}
|
|
898
|
+
|
|
899
|
+
var r=s$1();
|
|
900
|
+
|
|
901
|
+
function l({className:l="",size:s="md"}){const a={sm:16,md:20,lg:24},t=`${{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"}[s]} ${l}`;return r.jsx("svg",{width:a[s],height:a[s],xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:t,"aria-hidden":"true",children:r.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})})}
|
|
902
|
+
|
|
903
|
+
const o=({className:o="",size:e="md",color:r$1="currentColor",direction:s="down"})=>{const i={sm:16,md:20,lg:24};return r.jsx("svg",{width:i[e],height:i[e],className:`${{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"}[e]} ${{up:"rotate-180",down:"",left:"rotate-90",right:"-rotate-90"}[s]} ${o}`,fill:"none",stroke:r$1,viewBox:"0 0 24 24",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("path",{d:"M6 9l6 6 6-6"})})};
|
|
904
|
+
|
|
905
|
+
function e({className:e="",size:o="md",color:r$1="currentColor"}){const t={sm:16,md:20,lg:24};return r.jsx("svg",{width:t[o],height:t[o],className:`${{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"}[o]} ${e}`,fill:"none",stroke:r$1,viewBox:"0 0 24 24",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("path",{d:"M6 18L18 6M6 6l12 12"})})}
|
|
879
906
|
|
|
880
907
|
var jsxRuntime = {exports: {}};
|
|
881
908
|
|
|
@@ -1339,9 +1366,11 @@ function classNames$1(...classes) {
|
|
|
1339
1366
|
*
|
|
1340
1367
|
* @param variant - 'spinner' (default circular spinner), 'dots' (three bouncing dots), 'pulse' (pulsing circle), 'ring' (rotating ring)
|
|
1341
1368
|
* @param inline - If true, removes centering and margins for inline use (e.g., in buttons or inputs)
|
|
1342
|
-
* @param color -
|
|
1369
|
+
* @param color - 'primary' (por defecto, color de la marca), 'gray', 'white'; 'blue' = alias de 'primary'
|
|
1343
1370
|
*/
|
|
1344
|
-
const LoadingSpinner = ({ message, size = "md", className = "", variant = "spinner", inline = false, color = "
|
|
1371
|
+
const LoadingSpinner = ({ message, size = "md", className = "", variant = "spinner", inline = false, color: colorProp = "primary", }) => {
|
|
1372
|
+
// Las clases CSS se llaman "Blue" por historia, pero usan --lb-color-primary (siguen la marca).
|
|
1373
|
+
const color = colorProp === "primary" ? "blue" : colorProp;
|
|
1345
1374
|
const sizeClass = styles$1[`size${size.charAt(0).toUpperCase() + size.slice(1)}`];
|
|
1346
1375
|
const colorClass = styles$1[`color${color.charAt(0).toUpperCase() + color.slice(1)}`];
|
|
1347
1376
|
const dotColorClass = styles$1[`dotColor${color.charAt(0).toUpperCase() + color.slice(1)}`];
|
|
@@ -1393,8 +1422,8 @@ function styleInject$2(css, ref) {
|
|
|
1393
1422
|
}
|
|
1394
1423
|
}
|
|
1395
1424
|
|
|
1396
|
-
var css_248z$2 = ".Autocomplete-module_container__Qc33j {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n}\n\n.Autocomplete-module_label__-7YPH {\n display: block;\n font-size: 0.875rem;\n line-height: 1.25rem;\n font-weight: 500;\n color: var(--lb-color-neutral-700);\n}\n\n.Autocomplete-module_required__N3ZwR {\n color: var(--lb-color-red-accent);\n margin-left: 0.25rem;\n}\n\n.Autocomplete-module_inputWrapper__NS450 {\n position: relative;\n}\n\n.Autocomplete-module_iconLeft__gee-m {\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.Autocomplete-module_input__ZShCt {\n width: 100%;\n padding: 0.5rem 1rem;\n border-radius: 0.5rem;\n border: 2px solid var(--lb-color-neutral-300);\n transition:\n border-color 150ms ease,\n box-shadow 150ms ease;\n outline: none;\n font-weight: 500;\n color: var(--lb-color-foreground);\n}\n\n.Autocomplete-module_input__ZShCt::placeholder {\n color: var(--lb-color-neutral-400);\n}\n\n.Autocomplete-module_input__ZShCt:disabled {\n background: var(--lb-color-neutral-100);\n color: var(--lb-color-neutral-500);\n cursor: not-allowed;\n}\n\n.Autocomplete-module_input__ZShCt:hover:not(:disabled):not(:focus) {\n border-color: var(--lb-color-neutral-400);\n}\n\n.Autocomplete-module_input__ZShCt:focus {\n border-color: var(--lb-color-
|
|
1397
|
-
var styles$2 = {"container":"Autocomplete-module_container__Qc33j","label":"Autocomplete-module_label__-7YPH","required":"Autocomplete-module_required__N3ZwR","inputWrapper":"Autocomplete-module_inputWrapper__NS450","iconLeft":"Autocomplete-module_iconLeft__gee-m","input":"Autocomplete-module_input__ZShCt","inputWithIcon":"Autocomplete-module_inputWithIcon__-qV4P","inputWithClear":"Autocomplete-module_inputWithClear__a8C83","inputWithoutClear":"Autocomplete-module_inputWithoutClear__LN8yW","inputReadOnly":"Autocomplete-module_inputReadOnly__dG7ZO","inputError":"Autocomplete-module_inputError__Kdk14","inputWarning":"Autocomplete-module_inputWarning__XTQux","inputFocused":"Autocomplete-module_inputFocused__1zKVR","rightIcons":"Autocomplete-module_rightIcons__ygVzq","clearButton":"Autocomplete-module_clearButton__tVaO9","clearIcon":"Autocomplete-module_clearIcon__qoaOE","toggleButton":"Autocomplete-module_toggleButton__nxFFh","toggleIcon":"Autocomplete-module_toggleIcon__fD90b","toggleIconOpen":"Autocomplete-module_toggleIconOpen__aFQVZ","dropdown":"Autocomplete-module_dropdown__oT12R","dropdownTop":"Autocomplete-module_dropdownTop__yN9gw","dropdownContent":"Autocomplete-module_dropdownContent__0RNSN","loadingState":"Autocomplete-module_loadingState__HQ2Vq","loadingSpinner":"Autocomplete-module_loadingSpinner__9qSHW","loadingText":"Autocomplete-module_loadingText__6g6Qb","option":"Autocomplete-module_option__O2-MC","optionDisabled":"Autocomplete-module_optionDisabled__kkjS2","optionHighlighted":"Autocomplete-module_optionHighlighted__WpIwj","optionSelected":"Autocomplete-module_optionSelected__CeDeN","optionContent":"Autocomplete-module_optionContent__TzYTm","optionLabel":"Autocomplete-module_optionLabel__5FOIH","optionDescription":"Autocomplete-module_optionDescription__0HEsl","optionCheckIcon":"Autocomplete-module_optionCheckIcon__MEavu","highlight":"Autocomplete-module_highlight__MW3bw","createOption":"Autocomplete-module_createOption__xIHDz","createOptionWithBorder":"Autocomplete-module_createOptionWithBorder__BX0mv","createOptionHighlighted":"Autocomplete-module_createOptionHighlighted__-3e6V","createIcon":"Autocomplete-module_createIcon__wh5Nu","createText":"Autocomplete-module_createText__V9uqQ","noResults":"Autocomplete-module_noResults__rAoto","hint":"Autocomplete-module_hint__E-DXp","warning":"Autocomplete-module_warning__6-JRr","warningIcon":"Autocomplete-module_warningIcon__gEaAt","error":"Autocomplete-module_error__XLtyW","errorIcon":"Autocomplete-module_errorIcon__Ftizo"};
|
|
1425
|
+
var css_248z$2 = ".Autocomplete-module_container__Qc33j {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n}\n\n.Autocomplete-module_label__-7YPH {\n display: block;\n font-size: 0.875rem;\n line-height: 1.25rem;\n font-weight: 500;\n color: var(--lb-color-neutral-700);\n}\n\n.Autocomplete-module_required__N3ZwR {\n color: var(--lb-color-red-accent);\n margin-left: 0.25rem;\n}\n\n.Autocomplete-module_inputWrapper__NS450 {\n position: relative;\n}\n\n.Autocomplete-module_iconLeft__gee-m {\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.Autocomplete-module_input__ZShCt {\n width: 100%;\n padding: 0.5rem 1rem;\n border-radius: 0.5rem;\n border: 2px solid var(--lb-color-neutral-300);\n transition:\n border-color 150ms ease,\n box-shadow 150ms ease;\n outline: none;\n font-weight: 500;\n color: var(--lb-color-foreground);\n}\n\n.Autocomplete-module_input__ZShCt::placeholder {\n color: var(--lb-color-neutral-400);\n}\n\n.Autocomplete-module_input__ZShCt:disabled {\n background: var(--lb-color-neutral-100);\n color: var(--lb-color-neutral-500);\n cursor: not-allowed;\n}\n\n.Autocomplete-module_input__ZShCt:hover:not(:disabled):not(:focus) {\n border-color: var(--lb-color-neutral-400);\n}\n\n.Autocomplete-module_input__ZShCt:focus {\n border-color: var(--lb-color-primary-accent);\n box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);\n}\n\n.Autocomplete-module_inputWithIcon__-qV4P {\n padding-left: 2.5rem;\n}\n\n.Autocomplete-module_inputWithClear__a8C83 {\n padding-right: 5rem;\n}\n\n.Autocomplete-module_inputWithoutClear__LN8yW {\n padding-right: 3rem;\n}\n\n.Autocomplete-module_inputReadOnly__dG7ZO {\n background: var(--lb-color-neutral-50);\n cursor: default;\n}\n\n.Autocomplete-module_inputError__Kdk14 {\n border-color: var(--lb-color-red-accent);\n}\n\n.Autocomplete-module_inputError__Kdk14:focus {\n border-color: var(--lb-color-red-accent);\n box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);\n}\n\n.Autocomplete-module_inputWarning__XTQux {\n border-color: var(--lb-color-warning);\n}\n\n.Autocomplete-module_inputWarning__XTQux:focus {\n border-color: var(--lb-color-warning);\n box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.1);\n}\n\n.Autocomplete-module_inputFocused__1zKVR {\n border-color: var(--lb-color-primary-accent);\n box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);\n}\n\n.Autocomplete-module_rightIcons__ygVzq {\n position: absolute;\n right: 0.75rem;\n top: 50%;\n transform: translateY(-50%);\n display: flex;\n align-items: center;\n gap: 0.5rem;\n}\n\n.Autocomplete-module_clearButton__tVaO9 {\n color: var(--lb-color-neutral-400);\n background: transparent;\n border: none;\n cursor: pointer;\n padding: 0;\n transition: color 150ms ease;\n}\n\n.Autocomplete-module_clearButton__tVaO9:hover {\n color: var(--lb-color-neutral-600);\n}\n\n.Autocomplete-module_clearIcon__qoaOE {\n width: 1rem;\n height: 1rem;\n}\n\n.Autocomplete-module_toggleButton__nxFFh {\n color: var(--lb-color-neutral-400);\n background: transparent;\n border: none;\n cursor: pointer;\n padding: 0;\n transition: color 150ms ease;\n}\n\n.Autocomplete-module_toggleButton__nxFFh:hover:not(:disabled) {\n color: var(--lb-color-neutral-600);\n}\n\n.Autocomplete-module_toggleButton__nxFFh:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n.Autocomplete-module_toggleIcon__fD90b {\n width: 1.25rem;\n height: 1.25rem;\n transition: transform 200ms ease;\n}\n\n.Autocomplete-module_toggleIconOpen__aFQVZ {\n transform: rotate(180deg);\n}\n\n.Autocomplete-module_dropdown__oT12R {\n position: absolute;\n z-index: 50;\n left: 0;\n right: 0;\n margin-top: 0.25rem;\n background: var(--lb-color-background);\n border: 2px solid var(--lb-color-neutral-200);\n border-radius: 0.5rem;\n box-shadow:\n 0 10px 15px -3px rgba(0, 0, 0, 0.1),\n 0 4px 6px -2px rgba(0, 0, 0, 0.05);\n overflow: hidden;\n}\n\n.Autocomplete-module_dropdownTop__yN9gw {\n bottom: 100%;\n top: auto;\n margin-top: 0;\n margin-bottom: 0.25rem;\n}\n\n.Autocomplete-module_dropdownContent__0RNSN {\n overflow-y: auto;\n max-height: 100%;\n}\n\n.Autocomplete-module_loadingState__HQ2Vq {\n padding: 0.75rem 1rem;\n text-align: center;\n color: var(--lb-color-neutral-500);\n}\n\n.Autocomplete-module_loadingSpinner__9qSHW {\n margin: 0 auto;\n}\n\n.Autocomplete-module_loadingText__6g6Qb {\n display: block;\n margin-top: 0.5rem;\n font-size: 0.875rem;\n}\n\n.Autocomplete-module_option__O2-MC {\n padding: 0.75rem 1rem;\n cursor: pointer;\n transition: background-color 150ms ease;\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n\n.Autocomplete-module_option__O2-MC:hover:not(.Autocomplete-module_optionDisabled__kkjS2) {\n background: var(--lb-color-neutral-50);\n}\n\n.Autocomplete-module_optionDisabled__kkjS2 {\n opacity: 0.5;\n cursor: not-allowed;\n background: var(--lb-color-neutral-50);\n}\n\n.Autocomplete-module_optionHighlighted__WpIwj:not(.Autocomplete-module_optionDisabled__kkjS2) {\n background: var(--lb-color-primary-subtle);\n}\n\n.Autocomplete-module_optionSelected__CeDeN:not(.Autocomplete-module_optionDisabled__kkjS2) {\n background: var(--lb-color-primary-subtle);\n}\n\n.Autocomplete-module_optionContent__TzYTm {\n flex: 1;\n}\n\n.Autocomplete-module_optionLabel__5FOIH {\n font-weight: 500;\n color: var(--lb-color-foreground);\n}\n\n.Autocomplete-module_optionDescription__0HEsl {\n font-size: 0.75rem;\n line-height: 1rem;\n color: var(--lb-color-neutral-500);\n margin-top: 0.125rem;\n}\n\n.Autocomplete-module_optionCheckIcon__MEavu {\n width: 1.25rem;\n height: 1.25rem;\n color: var(--lb-color-primary-accent);\n flex-shrink: 0;\n}\n\n.Autocomplete-module_highlight__MW3bw {\n background: var(--lb-color-amber-border);\n font-weight: 600;\n color: var(--lb-color-foreground);\n}\n\n.Autocomplete-module_createOption__xIHDz {\n padding: 0.75rem 1rem;\n cursor: pointer;\n display: flex;\n align-items: center;\n gap: 0.5rem;\n transition: background-color 150ms ease;\n}\n\n.Autocomplete-module_createOption__xIHDz:hover {\n background: var(--lb-color-neutral-50);\n}\n\n.Autocomplete-module_createOptionWithBorder__BX0mv {\n border-top: 1px solid var(--lb-color-neutral-200);\n}\n\n.Autocomplete-module_createOptionHighlighted__-3e6V {\n background: var(--lb-color-primary-subtle);\n}\n\n.Autocomplete-module_createIcon__wh5Nu {\n color: var(--lb-color-primary-accent);\n font-weight: 500;\n}\n\n.Autocomplete-module_createText__V9uqQ {\n color: var(--lb-color-foreground);\n}\n\n.Autocomplete-module_noResults__rAoto {\n padding: 0.75rem 1rem;\n text-align: center;\n color: var(--lb-color-neutral-500);\n font-size: 0.875rem;\n}\n\n.Autocomplete-module_hint__E-DXp {\n font-size: 0.75rem;\n line-height: 1rem;\n color: var(--lb-color-neutral-500);\n}\n\n.Autocomplete-module_warning__6-JRr {\n font-size: 0.75rem;\n line-height: 1rem;\n color: var(--lb-color-amber-accent);\n display: flex;\n align-items: center;\n gap: 0.25rem;\n}\n\n.Autocomplete-module_warningIcon__gEaAt {\n width: 1rem;\n height: 1rem;\n}\n\n.Autocomplete-module_error__XLtyW {\n font-size: 0.75rem;\n line-height: 1rem;\n color: var(--lb-color-danger);\n display: flex;\n align-items: center;\n gap: 0.25rem;\n}\n\n.Autocomplete-module_errorIcon__Ftizo {\n width: 1rem;\n height: 1rem;\n}\n\n/* Etiqueta con acción a la derecha (ayuda, enlace) */\n.Autocomplete-module_labelRow__gVBvZ {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--lb-space-2);\n}\n\n.Autocomplete-module_labelAction__Or23K {\n display: inline-flex;\n align-items: center;\n flex: none;\n}\n";
|
|
1426
|
+
var styles$2 = {"container":"Autocomplete-module_container__Qc33j","label":"Autocomplete-module_label__-7YPH","required":"Autocomplete-module_required__N3ZwR","inputWrapper":"Autocomplete-module_inputWrapper__NS450","iconLeft":"Autocomplete-module_iconLeft__gee-m","input":"Autocomplete-module_input__ZShCt","inputWithIcon":"Autocomplete-module_inputWithIcon__-qV4P","inputWithClear":"Autocomplete-module_inputWithClear__a8C83","inputWithoutClear":"Autocomplete-module_inputWithoutClear__LN8yW","inputReadOnly":"Autocomplete-module_inputReadOnly__dG7ZO","inputError":"Autocomplete-module_inputError__Kdk14","inputWarning":"Autocomplete-module_inputWarning__XTQux","inputFocused":"Autocomplete-module_inputFocused__1zKVR","rightIcons":"Autocomplete-module_rightIcons__ygVzq","clearButton":"Autocomplete-module_clearButton__tVaO9","clearIcon":"Autocomplete-module_clearIcon__qoaOE","toggleButton":"Autocomplete-module_toggleButton__nxFFh","toggleIcon":"Autocomplete-module_toggleIcon__fD90b","toggleIconOpen":"Autocomplete-module_toggleIconOpen__aFQVZ","dropdown":"Autocomplete-module_dropdown__oT12R","dropdownTop":"Autocomplete-module_dropdownTop__yN9gw","dropdownContent":"Autocomplete-module_dropdownContent__0RNSN","loadingState":"Autocomplete-module_loadingState__HQ2Vq","loadingSpinner":"Autocomplete-module_loadingSpinner__9qSHW","loadingText":"Autocomplete-module_loadingText__6g6Qb","option":"Autocomplete-module_option__O2-MC","optionDisabled":"Autocomplete-module_optionDisabled__kkjS2","optionHighlighted":"Autocomplete-module_optionHighlighted__WpIwj","optionSelected":"Autocomplete-module_optionSelected__CeDeN","optionContent":"Autocomplete-module_optionContent__TzYTm","optionLabel":"Autocomplete-module_optionLabel__5FOIH","optionDescription":"Autocomplete-module_optionDescription__0HEsl","optionCheckIcon":"Autocomplete-module_optionCheckIcon__MEavu","highlight":"Autocomplete-module_highlight__MW3bw","createOption":"Autocomplete-module_createOption__xIHDz","createOptionWithBorder":"Autocomplete-module_createOptionWithBorder__BX0mv","createOptionHighlighted":"Autocomplete-module_createOptionHighlighted__-3e6V","createIcon":"Autocomplete-module_createIcon__wh5Nu","createText":"Autocomplete-module_createText__V9uqQ","noResults":"Autocomplete-module_noResults__rAoto","hint":"Autocomplete-module_hint__E-DXp","warning":"Autocomplete-module_warning__6-JRr","warningIcon":"Autocomplete-module_warningIcon__gEaAt","error":"Autocomplete-module_error__XLtyW","errorIcon":"Autocomplete-module_errorIcon__Ftizo","labelRow":"Autocomplete-module_labelRow__gVBvZ","labelAction":"Autocomplete-module_labelAction__Or23K"};
|
|
1398
1427
|
styleInject$2(css_248z$2);
|
|
1399
1428
|
|
|
1400
1429
|
const classNames = (...classes) => classes.filter(Boolean).join(" ");
|
|
@@ -1407,13 +1436,13 @@ const highlightMatchText = (text, search, shouldHighlight = true) => {
|
|
|
1407
1436
|
return (jsxRuntimeExports$1.jsx(jsxRuntimeExports$1.Fragment, { children: parts.map((part, index) => regex.test(part) ? (jsxRuntimeExports$1.jsx("mark", { className: styles$2.highlight, children: part }, index)) : (jsxRuntimeExports$1.jsx("span", { children: part }, index))) }));
|
|
1408
1437
|
};
|
|
1409
1438
|
/** Selector con búsqueda (combobox accesible): filtra mientras se escribe, teclado completo. */
|
|
1410
|
-
const Autocomplete = require$$0__default__namespace.forwardRef(function Autocomplete({ id, name, labels, label, value, onChange, options = [], placeholder
|
|
1411
|
-
const text = {
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
};
|
|
1439
|
+
const Autocomplete = require$$0__default__namespace.forwardRef(function Autocomplete({ id, name, labels, label, labelAction, freeSolo = false, value, onChange, options = [], placeholder, error, warning, hint, required = false, disabled = false, loading = false, searchable = true, clearable = true, icon, className = "", maxHeight = "300px", onCreate, onSearch, readOnly = false, renderOption, onBlur, onFocus, createLabel, noResultsText, loadingText, highlightMatch = true, minSearchLength = 0, debounceMs = 300, keepListOpen = false, position = "bottom", }, forwardedRef) {
|
|
1440
|
+
const text = shared.useUiMessages("autocomplete", labels, {
|
|
1441
|
+
placeholder,
|
|
1442
|
+
create: createLabel,
|
|
1443
|
+
noResults: noResultsText,
|
|
1444
|
+
loading: loadingText,
|
|
1445
|
+
});
|
|
1417
1446
|
const field = shared.useFieldIds({
|
|
1418
1447
|
id,
|
|
1419
1448
|
name,
|
|
@@ -1448,10 +1477,23 @@ const Autocomplete = require$$0__default__namespace.forwardRef(function Autocomp
|
|
|
1448
1477
|
}, [options, searchTerm, searchable, minSearchLength, onSearch]);
|
|
1449
1478
|
// Display value in input
|
|
1450
1479
|
const displayValue = require$$0__default.useMemo(() => {
|
|
1480
|
+
if (freeSolo) {
|
|
1481
|
+
if (isFocused || isOpen)
|
|
1482
|
+
return searchTerm;
|
|
1483
|
+
return selectedOption?.label ?? (value == null ? "" : String(value));
|
|
1484
|
+
}
|
|
1451
1485
|
if (searchable && isOpen)
|
|
1452
1486
|
return searchTerm;
|
|
1453
1487
|
return selectedOption?.label || "";
|
|
1454
|
-
}, [
|
|
1488
|
+
}, [
|
|
1489
|
+
freeSolo,
|
|
1490
|
+
isFocused,
|
|
1491
|
+
isOpen,
|
|
1492
|
+
searchable,
|
|
1493
|
+
searchTerm,
|
|
1494
|
+
selectedOption,
|
|
1495
|
+
value,
|
|
1496
|
+
]);
|
|
1455
1497
|
// Call onSearch with debounce
|
|
1456
1498
|
require$$0__default.useEffect(() => {
|
|
1457
1499
|
if (!onSearch || searchTerm.length < minSearchLength)
|
|
@@ -1468,14 +1510,14 @@ const Autocomplete = require$$0__default__namespace.forwardRef(function Autocomp
|
|
|
1468
1510
|
!containerRef.current.contains(event.target)) {
|
|
1469
1511
|
setIsOpen(false);
|
|
1470
1512
|
setIsFocused(false);
|
|
1471
|
-
if (!keepListOpen) {
|
|
1513
|
+
if (!keepListOpen && !freeSolo) {
|
|
1472
1514
|
setSearchTerm("");
|
|
1473
1515
|
}
|
|
1474
1516
|
}
|
|
1475
1517
|
};
|
|
1476
1518
|
document.addEventListener("mousedown", handleClickOutside);
|
|
1477
1519
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
1478
|
-
}, [keepListOpen]);
|
|
1520
|
+
}, [keepListOpen, freeSolo]);
|
|
1479
1521
|
// Scroll highlighted option into view
|
|
1480
1522
|
require$$0__default.useEffect(() => {
|
|
1481
1523
|
if (highlightedIndex >= 0 && optionRefs.current[highlightedIndex]) {
|
|
@@ -1488,6 +1530,9 @@ const Autocomplete = require$$0__default__namespace.forwardRef(function Autocomp
|
|
|
1488
1530
|
const handleInputChange = (e) => {
|
|
1489
1531
|
const newValue = e.target.value;
|
|
1490
1532
|
setSearchTerm(newValue);
|
|
1533
|
+
// Texto libre: lo escrito es el valor.
|
|
1534
|
+
if (freeSolo)
|
|
1535
|
+
onChange(newValue === "" ? null : newValue);
|
|
1491
1536
|
if (!isOpen) {
|
|
1492
1537
|
setIsOpen(true);
|
|
1493
1538
|
}
|
|
@@ -1496,6 +1541,9 @@ const Autocomplete = require$$0__default__namespace.forwardRef(function Autocomp
|
|
|
1496
1541
|
const handleInputFocus = () => {
|
|
1497
1542
|
if (disabled || readOnly)
|
|
1498
1543
|
return;
|
|
1544
|
+
// Texto libre: se sigue editando lo que ya hay, no se empieza en blanco.
|
|
1545
|
+
if (freeSolo)
|
|
1546
|
+
setSearchTerm(value == null ? "" : String(value));
|
|
1499
1547
|
setIsFocused(true);
|
|
1500
1548
|
setIsOpen(true);
|
|
1501
1549
|
onFocus?.();
|
|
@@ -1505,7 +1553,9 @@ const Autocomplete = require$$0__default__namespace.forwardRef(function Autocomp
|
|
|
1505
1553
|
setTimeout(() => {
|
|
1506
1554
|
if (!containerRef.current?.contains(document.activeElement)) {
|
|
1507
1555
|
setIsFocused(false);
|
|
1508
|
-
if (
|
|
1556
|
+
if (freeSolo)
|
|
1557
|
+
setIsOpen(false);
|
|
1558
|
+
if (!keepListOpen && !freeSolo) {
|
|
1509
1559
|
setSearchTerm("");
|
|
1510
1560
|
}
|
|
1511
1561
|
onBlur?.();
|
|
@@ -1516,7 +1566,10 @@ const Autocomplete = require$$0__default__namespace.forwardRef(function Autocomp
|
|
|
1516
1566
|
if (option.disabled)
|
|
1517
1567
|
return;
|
|
1518
1568
|
onChange(option.value, option);
|
|
1519
|
-
setSearchTerm("");
|
|
1569
|
+
setSearchTerm(freeSolo ? String(option.value) : "");
|
|
1570
|
+
// Texto libre: tras elegir se muestra la etiqueta de la opción.
|
|
1571
|
+
if (freeSolo)
|
|
1572
|
+
setIsFocused(false);
|
|
1520
1573
|
setHighlightedIndex(-1);
|
|
1521
1574
|
if (!keepListOpen) {
|
|
1522
1575
|
setIsOpen(false);
|
|
@@ -1565,6 +1618,9 @@ const Autocomplete = require$$0__default__namespace.forwardRef(function Autocomp
|
|
|
1565
1618
|
filteredOptions[highlightedIndex]) {
|
|
1566
1619
|
handleSelect(filteredOptions[highlightedIndex]);
|
|
1567
1620
|
}
|
|
1621
|
+
else if (freeSolo) {
|
|
1622
|
+
setIsOpen(false);
|
|
1623
|
+
}
|
|
1568
1624
|
else if (isOpen && onCreate && searchTerm.trim()) {
|
|
1569
1625
|
onCreate(searchTerm.trim());
|
|
1570
1626
|
setIsOpen(false);
|
|
@@ -1574,38 +1630,44 @@ const Autocomplete = require$$0__default__namespace.forwardRef(function Autocomp
|
|
|
1574
1630
|
case "Escape":
|
|
1575
1631
|
e.preventDefault();
|
|
1576
1632
|
setIsOpen(false);
|
|
1577
|
-
|
|
1633
|
+
if (!freeSolo)
|
|
1634
|
+
setSearchTerm("");
|
|
1578
1635
|
inputRef.current?.blur();
|
|
1579
1636
|
break;
|
|
1580
1637
|
case "Tab":
|
|
1581
1638
|
setIsOpen(false);
|
|
1582
|
-
|
|
1639
|
+
if (!freeSolo)
|
|
1640
|
+
setSearchTerm("");
|
|
1583
1641
|
break;
|
|
1584
1642
|
}
|
|
1585
1643
|
};
|
|
1586
1644
|
const getInputClassName = () => {
|
|
1587
1645
|
return classNames(styles$2.input, icon ? styles$2.inputWithIcon : undefined, clearable && value ? styles$2.inputWithClear : styles$2.inputWithoutClear, readOnly ? styles$2.inputReadOnly : undefined, error ? styles$2.inputError : undefined, warning && !error ? styles$2.inputWarning : undefined, isFocused && !error && !warning ? styles$2.inputFocused : undefined);
|
|
1588
1646
|
};
|
|
1589
|
-
return (jsxRuntimeExports$1.jsxs("div", { className: classNames(styles$2.container, className), children: [label &&
|
|
1647
|
+
return (jsxRuntimeExports$1.jsxs("div", { className: classNames(styles$2.container, className), children: [label &&
|
|
1648
|
+
(() => {
|
|
1649
|
+
const labelEl = (jsxRuntimeExports$1.jsxs("label", { htmlFor: field.inputId, className: styles$2.label, children: [label, required && (jsxRuntimeExports$1.jsx("span", { className: styles$2.required, "aria-hidden": "true", children: "*" }))] }));
|
|
1650
|
+
return labelAction ? (jsxRuntimeExports$1.jsxs("div", { className: styles$2.labelRow, children: [labelEl, jsxRuntimeExports$1.jsx("span", { className: styles$2.labelAction, children: labelAction })] })) : (labelEl);
|
|
1651
|
+
})(), jsxRuntimeExports$1.jsxs("div", { ref: containerRef, className: styles$2.inputWrapper, children: [icon && jsxRuntimeExports$1.jsx("div", { className: styles$2.iconLeft, children: icon }), jsxRuntimeExports$1.jsx("input", { ref: shared.mergeRefs(inputRef, forwardedRef), ...field.controlProps, name: name, required: required, role: "combobox", "aria-expanded": isOpen && !disabled && !readOnly, "aria-controls": listboxId, "aria-autocomplete": "list", "aria-activedescendant": isOpen &&
|
|
1590
1652
|
highlightedIndex >= 0 &&
|
|
1591
1653
|
highlightedIndex < filteredOptions.length
|
|
1592
1654
|
? optionId(highlightedIndex)
|
|
1593
|
-
: undefined, autoComplete: "off", type: "text", value: displayValue, onChange: handleInputChange, onFocus: handleInputFocus, onBlur: handleInputBlur, onKeyDown: handleKeyDown, placeholder: placeholder, disabled: disabled, readOnly: readOnly || !searchable, className: getInputClassName(), "data-testid": "autocomplete-input", "data-has-error": error ? "true" : "false", "data-has-warning": warning ? "true" : "false", "data-is-focused": isFocused ? "true" : "false" }), jsxRuntimeExports$1.jsxs("div", { className: styles$2.rightIcons, children: [loading && jsxRuntimeExports$1.jsx(LoadingSpinner, { size: "sm", variant: "dots", inline: true }), clearable && value && !loading && !disabled && (jsxRuntimeExports$1.jsx("button", { type: "button", onClick: handleClear, className: styles$2.clearButton, "data-testid": "autocomplete-clear", "aria-label": text.clear, children: jsxRuntimeExports$1.jsx(
|
|
1655
|
+
: undefined, autoComplete: "off", type: "text", value: displayValue, onChange: handleInputChange, onFocus: handleInputFocus, onBlur: handleInputBlur, onKeyDown: handleKeyDown, placeholder: text.placeholder, disabled: disabled, readOnly: readOnly || !searchable, className: getInputClassName(), "data-testid": "autocomplete-input", "data-has-error": error ? "true" : "false", "data-has-warning": warning ? "true" : "false", "data-is-focused": isFocused ? "true" : "false" }), jsxRuntimeExports$1.jsxs("div", { className: styles$2.rightIcons, children: [loading && jsxRuntimeExports$1.jsx(LoadingSpinner, { size: "sm", variant: "dots", inline: true }), clearable && value && !loading && !disabled && (jsxRuntimeExports$1.jsx("button", { type: "button", onClick: handleClear, className: styles$2.clearButton, "data-testid": "autocomplete-clear", "aria-label": text.clear, children: jsxRuntimeExports$1.jsx(e, { className: styles$2.clearIcon }) })), jsxRuntimeExports$1.jsx("button", { type: "button", onClick: handleToggle, className: styles$2.toggleButton, disabled: disabled, "data-testid": "autocomplete-toggle", "aria-label": isOpen ? text.close : text.open, "aria-expanded": isOpen, tabIndex: -1, children: jsxRuntimeExports$1.jsx(o, { className: classNames(styles$2.toggleIcon, isOpen && styles$2.toggleIconOpen) }) })] }), isOpen && !disabled && !readOnly && (jsxRuntimeExports$1.jsxs("div", { ref: dropdownRef, className: classNames(styles$2.dropdown, position === "top" && styles$2.dropdownTop), style: { maxHeight }, "data-testid": "autocomplete-dropdown", children: [loading && filteredOptions.length === 0 && (jsxRuntimeExports$1.jsxs("div", { className: styles$2.loadingState, children: [jsxRuntimeExports$1.jsx(LoadingSpinner, { size: "sm", variant: "spinner", className: styles$2.loadingSpinner }), jsxRuntimeExports$1.jsx("span", { className: styles$2.loadingText, children: text.loading })] })), jsxRuntimeExports$1.jsx("div", { id: listboxId, role: "listbox", "aria-label": label, className: styles$2.dropdownContent, children: !loading && filteredOptions.length > 0 && (jsxRuntimeExports$1.jsx(jsxRuntimeExports$1.Fragment, { children: filteredOptions.map((option, index) => {
|
|
1594
1656
|
const isSelected = option.value === value;
|
|
1595
1657
|
const isHighlighted = index === highlightedIndex;
|
|
1596
1658
|
return (jsxRuntimeExports$1.jsx("div", { id: optionId(index), role: "option", "aria-selected": isSelected, "aria-disabled": option.disabled || undefined, ref: (el) => {
|
|
1597
1659
|
optionRefs.current[index] = el;
|
|
1598
|
-
}, onClick: () => handleSelect(option), onMouseEnter: () => setHighlightedIndex(index), className: classNames(styles$2.option, option.disabled && styles$2.optionDisabled, isHighlighted && styles$2.optionHighlighted, isSelected && styles$2.optionSelected), "data-testid": `autocomplete-option-${option.value}`, "data-disabled": option.disabled ? "true" : "false", "data-selected": isSelected ? "true" : "false", "data-highlighted": isHighlighted ? "true" : "false", children: renderOption ? (renderOption(option, isSelected)) : (jsxRuntimeExports$1.jsxs(jsxRuntimeExports$1.Fragment, { children: [jsxRuntimeExports$1.jsxs("div", { className: styles$2.optionContent, children: [jsxRuntimeExports$1.jsx("div", { className: styles$2.optionLabel, children: highlightMatchText(option.label, searchTerm, highlightMatch) }), option.description && (jsxRuntimeExports$1.jsx("div", { className: styles$2.optionDescription, children: option.description }))] }), isSelected && (jsxRuntimeExports$1.jsx(
|
|
1599
|
-
}) })) }), onCreate && searchTerm && (jsxRuntimeExports$1.jsxs("div", { onClick: () => {
|
|
1660
|
+
}, onClick: () => handleSelect(option), onMouseEnter: () => setHighlightedIndex(index), className: classNames(styles$2.option, option.disabled && styles$2.optionDisabled, isHighlighted && styles$2.optionHighlighted, isSelected && styles$2.optionSelected), "data-testid": `autocomplete-option-${option.value}`, "data-disabled": option.disabled ? "true" : "false", "data-selected": isSelected ? "true" : "false", "data-highlighted": isHighlighted ? "true" : "false", children: renderOption ? (renderOption(option, isSelected)) : (jsxRuntimeExports$1.jsxs(jsxRuntimeExports$1.Fragment, { children: [jsxRuntimeExports$1.jsxs("div", { className: styles$2.optionContent, children: [jsxRuntimeExports$1.jsx("div", { className: styles$2.optionLabel, children: highlightMatchText(option.label, searchTerm, highlightMatch) }), option.description && (jsxRuntimeExports$1.jsx("div", { className: styles$2.optionDescription, children: option.description }))] }), isSelected && (jsxRuntimeExports$1.jsx(l, { className: styles$2.optionCheckIcon }))] })) }, option.value));
|
|
1661
|
+
}) })) }), onCreate && !freeSolo && searchTerm && (jsxRuntimeExports$1.jsxs("div", { onClick: () => {
|
|
1600
1662
|
onCreate(searchTerm.trim());
|
|
1601
1663
|
setIsOpen(false);
|
|
1602
1664
|
setSearchTerm("");
|
|
1603
1665
|
}, className: classNames(styles$2.createOption, filteredOptions.length > 0 && styles$2.createOptionWithBorder, highlightedIndex === filteredOptions.length &&
|
|
1604
|
-
styles$2.createOptionHighlighted), "data-testid": "autocomplete-create", children: [jsxRuntimeExports$1.jsx("span", { className: styles$2.createIcon, children: "+" }), jsxRuntimeExports$1.jsxs("span", { className: styles$2.createText, children: [
|
|
1666
|
+
styles$2.createOptionHighlighted), "data-testid": "autocomplete-create", children: [jsxRuntimeExports$1.jsx("span", { className: styles$2.createIcon, children: "+" }), jsxRuntimeExports$1.jsxs("span", { className: styles$2.createText, children: [text.create, " \"", searchTerm, "\""] })] })), !loading && filteredOptions.length === 0 && !onCreate && (jsxRuntimeExports$1.jsx("div", { className: styles$2.noResults, children: text.noResults }))] }))] }), hint && !error && !warning && (jsxRuntimeExports$1.jsx("p", { id: field.hintId, className: styles$2.hint, children: hint })), warning && !error && (jsxRuntimeExports$1.jsxs("p", { id: field.warningId, className: styles$2.warning, children: [jsxRuntimeExports$1.jsx("svg", { "aria-hidden": "true", className: styles$2.warningIcon, fill: "currentColor", viewBox: "0 0 20 20", children: jsxRuntimeExports$1.jsx("path", { fillRule: "evenodd", d: "M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z", clipRule: "evenodd" }) }), warning] })), error && (jsxRuntimeExports$1.jsxs("p", { id: field.errorId, className: styles$2.error, role: "alert", children: [jsxRuntimeExports$1.jsx("svg", { "aria-hidden": "true", className: styles$2.errorIcon, fill: "currentColor", viewBox: "0 0 20 20", children: jsxRuntimeExports$1.jsx("path", { fillRule: "evenodd", d: "M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z", clipRule: "evenodd" }) }), error] }))] }));
|
|
1605
1667
|
});
|
|
1606
1668
|
Autocomplete.displayName = "Autocomplete";
|
|
1607
1669
|
|
|
1608
|
-
var
|
|
1670
|
+
var s,i={exports:{}},u={};var d,c,m={};
|
|
1609
1671
|
/**
|
|
1610
1672
|
* @license React
|
|
1611
1673
|
* react-jsx-runtime.development.js
|
|
@@ -1614,7 +1676,16 @@ var l,s={exports:{}},i={};var u,c,d={};
|
|
|
1614
1676
|
*
|
|
1615
1677
|
* This source code is licensed under the MIT license found in the
|
|
1616
1678
|
* LICENSE file in the root directory of this source tree.
|
|
1617
|
-
*/function m(){return u||(u=1,"production"!==process.env.NODE_ENV&&function(){function e(n){if(null==n)return null;if("function"==typeof n)return n.$$typeof===k?null:n.displayName||n.name||null;if("string"==typeof n)return n;switch(n){case g:return "Fragment";case h:return "Profiler";case f:return "StrictMode";case v:return "Suspense";case T:return "SuspenseList";case w:return "Activity"}if("object"==typeof n)switch("number"==typeof n.tag&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),n.$$typeof){case _:return "Portal";case b:return n.displayName||"Context";case x:return (n._context.displayName||"Context")+".Consumer";case y:var t=n.render;return (n=n.displayName)||(n=""!==(n=t.displayName||t.name||"")?"ForwardRef("+n+")":"ForwardRef"),n;case I:return null!==(t=n.displayName||null)?t:e(n.type)||"Memo";case j:t=n._payload,n=n._init;try{return e(n(t))}catch(e){}}return null}function t(e){return ""+e}function r(e){try{t(e);var n=!1;}catch(e){n=true;}if(n){var r=(n=console).error,o="function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return r.call(n,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",o),t(e)}}function o(n){if(n===g)return "<>";if("object"==typeof n&&null!==n&&n.$$typeof===j)return "<...>";try{var t=e(n);return t?"<"+t+">":"<...>"}catch(e){return "<...>"}}function a(){return Error("react-stack-top-frame")}function l(){var n=e(this.type);return C[n]||(C[n]=true,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),void 0!==(n=this.props.ref)?n:null}function s(n,t,o,a,s,u){var d,m=t.children;if(void 0!==m)if(a)if(z(m)){for(a=0;a<m.length;a++)i(m[a]);Object.freeze&&Object.freeze(m);}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else i(m);if(N.call(t,"key")){m=e(n);var _=Object.keys(t).filter(function(e){return "key"!==e});a=0<_.length?"{key: someKey, "+_.join(": ..., ")+": ...}":"{key: someKey}",$[m+a]||(_=0<_.length?"{"+_.join(": ..., ")+": ...}":"{}",console.error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',a,m,_,m),$[m+a]=true);}if(m=null,void 0!==o&&(r(o),m=""+o),function(e){if(N.call(e,"key")){var n=Object.getOwnPropertyDescriptor(e,"key").get;if(n&&n.isReactWarning)return false}return void 0!==e.key}(t)&&(r(t.key),m=""+t.key),"key"in t)for(var g in o={},t)"key"!==g&&(o[g]=t[g]);else o=t;return m&&function(e,n){function t(){c||(c=true,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",n));}t.isReactWarning=true,Object.defineProperty(e,"key",{get:t,configurable:true});}(o,"function"==typeof n?n.displayName||n.name||"Unknown":n),function(e,n,t,r,o,a){var s=t.ref;return e={$$typeof:p,type:e,key:n,props:t,_owner:r},null!==(void 0!==s?s:null)?Object.defineProperty(e,"ref",{enumerable:false,get:l}):Object.defineProperty(e,"ref",{enumerable:false,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:false,enumerable:false,writable:true,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:false,enumerable:false,writable:true,value:null}),Object.defineProperty(e,"_debugStack",{configurable:false,enumerable:false,writable:true,value:o}),Object.defineProperty(e,"_debugTask",{configurable:false,enumerable:false,writable:true,value:a}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}(n,m,o,null===(d=S.A)?null:d.getOwner(),s,u)}function i(e){u(e)?e._store&&(e._store.validated=1):"object"==typeof e&&null!==e&&e.$$typeof===j&&("fulfilled"===e._payload.status?u(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1));}function u(e){return "object"==typeof e&&null!==e&&e.$$typeof===p}var c,m=require$$0__default,p=Symbol.for("react.transitional.element"),_=Symbol.for("react.portal"),g=Symbol.for("react.fragment"),f=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),x=Symbol.for("react.consumer"),b=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),w=Symbol.for("react.activity"),k=Symbol.for("react.client.reference"),S=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,N=Object.prototype.hasOwnProperty,z=Array.isArray,O=console.createTask?console.createTask:function(){return null},C={},R=(m={react_stack_bottom_frame:function(e){return e()}}).react_stack_bottom_frame.bind(m,a)(),A=O(o(a)),$={};d.Fragment=g,d.jsx=function(e,n,t){var r=1e4>S.recentlyCreatedOwnerStacks++;return s(e,n,t,false,r?Error("react-stack-top-frame"):R,r?O(o(e)):A)},d.jsxs=function(e,n,t){var r=1e4>S.recentlyCreatedOwnerStacks++;return s(e,n,t,true,r?Error("react-stack-top-frame"):R,r?O(o(e)):A)};}()),d}var p,_,g,f=(c||(c=1,"production"===process.env.NODE_ENV?s.exports=function(){if(l)return i;l=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function t(n,t,r){var o=null;if(void 0!==r&&(o=""+r),void 0!==t.key&&(o=""+t.key),"key"in t)for(var a in r={},t)"key"!==a&&(r[a]=t[a]);else r=t;return t=r.ref,{$$typeof:e,type:n,key:o,ref:void 0!==t?t:null,props:r}}return i.Fragment=n,i.jsx=t,i.jsxs=t,i}():s.exports=m()),s.exports),h={exports:{}},x={},b={};var y=(g||(g=1,"production"===process.env.NODE_ENV?h.exports=function(){if(p)return x;p=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function t(n,t,r){var o=null;if(void 0!==r&&(o=""+r),void 0!==t.key&&(o=""+t.key),"key"in t)for(var a in r={},t)"key"!==a&&(r[a]=t[a]);else r=t;return t=r.ref,{$$typeof:e,type:n,key:o,ref:void 0!==t?t:null,props:r}}return x.Fragment=n,x.jsx=t,x.jsxs=t,x}():h.exports=(_||(_=1,"production"!==process.env.NODE_ENV&&function(){function e(n){if(null==n)return null;if("function"==typeof n)return n.$$typeof===k?null:n.displayName||n.name||null;if("string"==typeof n)return n;switch(n){case _:return "Fragment";case f:return "Profiler";case g:return "StrictMode";case v:return "Suspense";case T:return "SuspenseList";case w:return "Activity"}if("object"==typeof n)switch("number"==typeof n.tag&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),n.$$typeof){case p:return "Portal";case x:return n.displayName||"Context";case h:return (n._context.displayName||"Context")+".Consumer";case y:var t=n.render;return (n=n.displayName)||(n=""!==(n=t.displayName||t.name||"")?"ForwardRef("+n+")":"ForwardRef"),n;case I:return null!==(t=n.displayName||null)?t:e(n.type)||"Memo";case j:t=n._payload,n=n._init;try{return e(n(t))}catch(e){}}return null}function t(e){return ""+e}function r(e){try{t(e);var n=!1;}catch(e){n=true;}if(n){var r=(n=console).error,o="function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return r.call(n,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",o),t(e)}}function o(n){if(n===_)return "<>";if("object"==typeof n&&null!==n&&n.$$typeof===j)return "<...>";try{var t=e(n);return t?"<"+t+">":"<...>"}catch(e){return "<...>"}}function a(){return Error("react-stack-top-frame")}function l(){var n=e(this.type);return C[n]||(C[n]=true,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),void 0!==(n=this.props.ref)?n:null}function s(n,t,o,a,s,u){var d,p=t.children;if(void 0!==p)if(a)if(z(p)){for(a=0;a<p.length;a++)i(p[a]);Object.freeze&&Object.freeze(p);}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else i(p);if(N.call(t,"key")){p=e(n);var _=Object.keys(t).filter(function(e){return "key"!==e});a=0<_.length?"{key: someKey, "+_.join(": ..., ")+": ...}":"{key: someKey}",$[p+a]||(_=0<_.length?"{"+_.join(": ..., ")+": ...}":"{}",console.error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',a,p,_,p),$[p+a]=true);}if(p=null,void 0!==o&&(r(o),p=""+o),function(e){if(N.call(e,"key")){var n=Object.getOwnPropertyDescriptor(e,"key").get;if(n&&n.isReactWarning)return false}return void 0!==e.key}(t)&&(r(t.key),p=""+t.key),"key"in t)for(var g in o={},t)"key"!==g&&(o[g]=t[g]);else o=t;return p&&function(e,n){function t(){c||(c=true,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",n));}t.isReactWarning=true,Object.defineProperty(e,"key",{get:t,configurable:true});}(o,"function"==typeof n?n.displayName||n.name||"Unknown":n),function(e,n,t,r,o,a){var s=t.ref;return e={$$typeof:m,type:e,key:n,props:t,_owner:r},null!==(void 0!==s?s:null)?Object.defineProperty(e,"ref",{enumerable:false,get:l}):Object.defineProperty(e,"ref",{enumerable:false,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:false,enumerable:false,writable:true,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:false,enumerable:false,writable:true,value:null}),Object.defineProperty(e,"_debugStack",{configurable:false,enumerable:false,writable:true,value:o}),Object.defineProperty(e,"_debugTask",{configurable:false,enumerable:false,writable:true,value:a}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}(n,p,o,null===(d=S.A)?null:d.getOwner(),s,u)}function i(e){u(e)?e._store&&(e._store.validated=1):"object"==typeof e&&null!==e&&e.$$typeof===j&&("fulfilled"===e._payload.status?u(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1));}function u(e){return "object"==typeof e&&null!==e&&e.$$typeof===m}var c,d=require$$0__default,m=Symbol.for("react.transitional.element"),p=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),g=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),h=Symbol.for("react.consumer"),x=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),w=Symbol.for("react.activity"),k=Symbol.for("react.client.reference"),S=d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,N=Object.prototype.hasOwnProperty,z=Array.isArray,O=console.createTask?console.createTask:function(){return null},C={},R=(d={react_stack_bottom_frame:function(e){return e()}}).react_stack_bottom_frame.bind(d,a)(),A=O(o(a)),$={};b.Fragment=_,b.jsx=function(e,n,t){var r=1e4>S.recentlyCreatedOwnerStacks++;return s(e,n,t,false,r?Error("react-stack-top-frame"):R,r?O(o(e)):A)},b.jsxs=function(e,n,t){var r=1e4>S.recentlyCreatedOwnerStacks++;return s(e,n,t,true,r?Error("react-stack-top-frame"):R,r?O(o(e)):A)};}()),b)),h.exports);function v({className:e="",size:n="md"}){const t={sm:16,md:20,lg:24},r=`${{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"}[n]} ${e}`;return y.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-label":"Check",children:y.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 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 y.jsx("svg",{width:t[n],height:t[n],className:r,viewBox:"0 0 20 20",fill:"currentColor","aria-label":"Error",children:y.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"})})},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 y.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-label":"Info",children:y.jsx("path",{d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})},j={outlined:"material-symbols-outlined",rounded:"material-symbols-rounded",sharp:"material-symbols-sharp"},w=require$$0__default__namespace.forwardRef(({name:e,variant:n="outlined",size:t="md",fill:r=0,weight:o=400,grade:a=0,opticalSize:l=24,style:s,className:i,...u},c)=>{const d=(e=>"number"==typeof e?e:"sm"===e?16:"md"===e?20:24)(t),m=`"FILL" ${r}, "wght" ${o}, "GRAD" ${a}, "opsz" ${l}`;return y.jsx("span",{ref:c,"aria-hidden":"true",className:j[n]+(i?` ${i}`:""),style:{fontVariationSettings:m,fontSize:d,lineHeight:1,display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",...s},...u,children:e})});w.displayName="MaterialIcon";var k="TextInput-module_container__QXVA9",S="TextInput-module_label__GGFxk",N="TextInput-module_required__qlHAH",z="TextInput-module_inputContainer__-zaWR",O="TextInput-module_icon__F1AYg",C="TextInput-module_input__I8TSn",R="TextInput-module_inputWithIcon__TDgMC",A="TextInput-module_inputWithCharCount__qgvqA",$="TextInput-module_inputError__-Ga78",E="TextInput-module_inputSuccess__xsjt7",P="TextInput-module_charCount__RyuVm",q="TextInput-module_charCountNormal__LCUr7",L="TextInput-module_charCountNear__OKroK",F="TextInput-module_charCountLimit__iaB20",V="TextInput-module_charCountIcon__lRD-4",M="TextInput-module_charProgressBar__Wva8D",B="TextInput-module_charProgress__ZUsGs",U="TextInput-module_charProgressNormal__TdFY4",Z="TextInput-module_charProgressNear__beyMs",D="TextInput-module_charProgressLimit__Vr6d-",G="TextInput-module_hint__iZiig",W="TextInput-module_requiredHelper__TUGsU",Y="TextInput-module_validationMessage__3g-wc",K="TextInput-module_validationIcon__q5LT6",J="TextInput-module_validationText__-qAuu",Q="TextInput-module_validEmail__Ya1tf",H="TextInput-module_emailSuggestion__ZzQkZ",X="TextInput-module_suggestionButton__Rsxt8",ee="TextInput-module_error__ewnmB",ne="TextInput-module_errorIcon__JkIpb",te="TextInput-module_errorText__ba7lR",re="TextInput-module_passwordStrength__ICyJU",oe="TextInput-module_strengthBar__3c8Yf",ae="TextInput-module_strengthSegment__76ih4",le="TextInput-module_strengthSegmentInactive__RK1Q8",se="TextInput-module_strengthSegmentWeak__BFvgT",ie="TextInput-module_strengthSegmentFair__AOJW5",ue="TextInput-module_strengthSegmentGood__uGgTx",ce="TextInput-module_strengthSegmentStrong__vP5Yi",de="TextInput-module_strengthSegmentVeryStrong__4Tull",me="TextInput-module_strengthLabel__PpEO9",pe="TextInput-module_strengthText__jfVUh",_e="TextInput-module_strengthValue__04hhw",ge="TextInput-module_strengthValueWeak__8Ek8Q",fe="TextInput-module_strengthValueFair__70N63",he="TextInput-module_strengthValueGood__NgsOd",xe="TextInput-module_strengthValueStrong__qaKsi",be="TextInput-module_strengthValueVeryStrong__80d9m",ye="TextInput-module_requirements__eD6oz",ve="TextInput-module_requirement__KoZx2",Te="TextInput-module_requirementIcon__VjQXJ",Ie="TextInput-module_requirementIconMet__UNZFD",je="TextInput-module_requirementIconUnmet__1MF9h",we="TextInput-module_requirementText__fFcdn",ke="TextInput-module_requirementTextMet__eGbSi",Se="TextInput-module_warning__ywIFl";!function(e,n){ void 0===n&&(n={});var t=n.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===t&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e));}}("/* Container */\n.TextInput-module_container__QXVA9 {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n}\n\n/* Label */\n.TextInput-module_label__GGFxk {\n display: block;\n font-size: var(--lb-font-size-sm);\n line-height: 1.25rem;\n font-weight: var(--lb-font-weight-medium);\n color: var(--lb-color-neutral-700);\n}\n\n.TextInput-module_required__qlHAH {\n color: var(--lb-color-danger);\n margin-left: 0.25rem;\n}\n\n/* Input container */\n.TextInput-module_inputContainer__-zaWR {\n position: relative;\n}\n\n/* Icon */\n.TextInput-module_icon__F1AYg {\n position: absolute;\n left: 0.75rem;\n top: 50%;\n transform: translateY(-50%);\n color: var(--lb-color-neutral-400);\n pointer-events: none;\n display: flex;\n align-items: center;\n}\n\n/* Input */\n.TextInput-module_input__I8TSn {\n width: 100%;\n box-sizing: border-box;\n padding: 0.5rem 1rem;\n border-radius: var(--lb-radius-md);\n border: 2px solid var(--lb-color-neutral-300);\n transition: all 150ms ease;\n outline: none;\n font-family: var(--lb-font-sans);\n font-weight: var(--lb-font-weight-medium);\n color: var(--lb-color-foreground);\n}\n\n.TextInput-module_input__I8TSn::-moz-placeholder {\n color: var(--lb-color-neutral-400);\n}\n\n.TextInput-module_input__I8TSn::placeholder {\n color: var(--lb-color-neutral-400);\n}\n\n.TextInput-module_inputWithIcon__TDgMC {\n padding-left: 2.5rem;\n}\n\n.TextInput-module_inputWithCharCount__qgvqA {\n padding-right: 5rem;\n}\n\n.TextInput-module_input__I8TSn:hover:not(:disabled) {\n border-color: var(--lb-color-neutral-400);\n}\n\n.TextInput-module_input__I8TSn:focus {\n border-color: var(--lb-color-primary);\n box-shadow: 0 0 0 2px\n color-mix(in srgb, var(--lb-color-ring) 25%, transparent);\n}\n\n.TextInput-module_input__I8TSn:disabled {\n background: var(--lb-color-muted);\n color: var(--lb-color-muted-foreground);\n cursor: not-allowed;\n}\n\n.TextInput-module_inputError__-Ga78 {\n border-color: var(--lb-color-danger);\n}\n\n.TextInput-module_inputError__-Ga78:focus {\n border-color: var(--lb-color-danger);\n box-shadow: 0 0 0 2px\n color-mix(in srgb, var(--lb-color-danger) 25%, transparent);\n}\n\n.TextInput-module_inputSuccess__xsjt7 {\n border-color: var(--lb-color-success);\n}\n\n.TextInput-module_inputSuccess__xsjt7:focus {\n border-color: var(--lb-color-success);\n box-shadow: 0 0 0 2px\n color-mix(in srgb, var(--lb-color-success) 25%, transparent);\n}\n\n/* Character count */\n.TextInput-module_charCount__RyuVm {\n position: absolute;\n right: 0.75rem;\n top: 50%;\n transform: translateY(-50%);\n font-size: 0.75rem;\n line-height: 1rem;\n font-weight: 500;\n display: flex;\n align-items: center;\n gap: 0.25rem;\n}\n\n.TextInput-module_charCountNormal__LCUr7 {\n color: var(--lb-color-muted-foreground);\n}\n\n.TextInput-module_charCountNear__OKroK {\n color: var(--lb-color-warning);\n}\n\n.TextInput-module_charCountLimit__iaB20 {\n color: var(--lb-color-danger);\n}\n\n.TextInput-module_charCountIcon__lRD-4 {\n width: 1rem;\n height: 1rem;\n}\n\n/* Progress bar */\n.TextInput-module_charProgressBar__Wva8D {\n width: 100%;\n height: 0.25rem;\n background: var(--lb-color-neutral-200);\n border-radius: 9999px;\n overflow: hidden;\n}\n\n.TextInput-module_charProgress__ZUsGs {\n height: 100%;\n transition: all 150ms ease;\n border-radius: 9999px;\n}\n\n.TextInput-module_charProgressNormal__TdFY4 {\n background: var(--lb-color-primary);\n}\n\n.TextInput-module_charProgressNear__beyMs {\n background: var(--lb-color-warning);\n}\n\n.TextInput-module_charProgressLimit__Vr6d- {\n background: var(--lb-color-danger);\n}\n\n/* Hint text */\n.TextInput-module_hint__iZiig {\n font-size: 0.75rem;\n line-height: 1rem;\n color: var(--lb-color-muted-foreground);\n margin-top: 0.25rem;\n}\n\n.TextInput-module_requiredHelper__TUGsU {\n font-size: 0.75rem;\n line-height: 1rem;\n color: var(--lb-color-muted-foreground);\n margin-top: 0.25rem;\n}\n\n/* Validation messages */\n.TextInput-module_validationMessage__3g-wc {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n margin-top: 0.25rem;\n}\n\n.TextInput-module_validationIcon__q5LT6 {\n width: 1rem;\n height: 1rem;\n flex-shrink: 0;\n}\n\n.TextInput-module_validationText__-qAuu {\n font-size: 0.75rem;\n line-height: 1rem;\n}\n\n.TextInput-module_validEmail__Ya1tf .TextInput-module_validationIcon__q5LT6 {\n color: var(--lb-color-success);\n}\n\n.TextInput-module_validEmail__Ya1tf .TextInput-module_validationText__-qAuu {\n color: var(--lb-color-success);\n}\n\n.TextInput-module_emailSuggestion__ZzQkZ .TextInput-module_validationIcon__q5LT6 {\n color: var(--lb-color-primary);\n}\n\n.TextInput-module_emailSuggestion__ZzQkZ .TextInput-module_validationText__-qAuu {\n color: var(--lb-color-primary);\n}\n\n.TextInput-module_suggestionButton__Rsxt8 {\n font-weight: 600;\n text-decoration: underline;\n background: none;\n border: none;\n color: inherit;\n cursor: pointer;\n padding: 0;\n}\n\n.TextInput-module_suggestionButton__Rsxt8:hover {\n color: var(--lb-color-primary-hover);\n}\n\n/* Error message */\n.TextInput-module_error__ewnmB {\n display: flex;\n align-items: flex-start;\n gap: 0.5rem;\n margin-top: 0.25rem;\n}\n\n.TextInput-module_errorIcon__JkIpb {\n width: 1rem;\n height: 1rem;\n color: var(--lb-color-danger);\n flex-shrink: 0;\n margin-top: 0.125rem;\n}\n\n.TextInput-module_errorText__ba7lR {\n font-size: 0.875rem;\n line-height: 1.25rem;\n color: var(--lb-color-danger);\n}\n\n/* Password strength */\n.TextInput-module_passwordStrength__ICyJU {\n margin-top: 0.5rem;\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n}\n\n.TextInput-module_strengthBar__3c8Yf {\n display: flex;\n gap: 0.25rem;\n}\n\n.TextInput-module_strengthSegment__76ih4 {\n height: 0.375rem;\n flex: 1;\n border-radius: 9999px;\n transition: background-color 150ms ease;\n}\n\n.TextInput-module_strengthSegmentInactive__RK1Q8 {\n background: var(--lb-color-neutral-200);\n}\n\n.TextInput-module_strengthSegmentWeak__BFvgT {\n background: var(--lb-color-danger);\n}\n\n.TextInput-module_strengthSegmentFair__AOJW5 {\n background: var(--lb-color-warning);\n}\n\n.TextInput-module_strengthSegmentGood__uGgTx {\n background: var(--lb-color-warning);\n}\n\n.TextInput-module_strengthSegmentStrong__vP5Yi {\n background: var(--lb-color-emerald-accent);\n}\n\n.TextInput-module_strengthSegmentVeryStrong__4Tull {\n background: var(--lb-color-success);\n}\n\n.TextInput-module_strengthLabel__PpEO9 {\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n\n.TextInput-module_strengthText__jfVUh {\n font-size: 0.75rem;\n line-height: 1rem;\n color: var(--lb-color-neutral-600);\n}\n\n.TextInput-module_strengthValue__04hhw {\n font-weight: 600;\n}\n\n.TextInput-module_strengthValueWeak__8Ek8Q {\n color: var(--lb-color-danger);\n}\n\n.TextInput-module_strengthValueFair__70N63 {\n color: var(--lb-color-warning);\n}\n\n.TextInput-module_strengthValueGood__NgsOd {\n color: var(--lb-color-amber-accent);\n}\n\n.TextInput-module_strengthValueStrong__qaKsi {\n color: var(--lb-color-emerald-strong);\n}\n\n.TextInput-module_strengthValueVeryStrong__80d9m {\n color: var(--lb-color-success);\n}\n\n/* Requirements checklist */\n.TextInput-module_requirements__eD6oz {\n font-size: 0.75rem;\n line-height: 1rem;\n display: flex;\n flex-direction: column;\n gap: 0.25rem;\n padding: 0.5rem;\n background: var(--lb-color-neutral-50);\n border-radius: 0.375rem;\n border: 1px solid var(--lb-color-neutral-200);\n}\n\n.TextInput-module_requirement__KoZx2 {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n}\n\n.TextInput-module_requirementIcon__VjQXJ {\n width: 0.875rem;\n height: 0.875rem;\n flex-shrink: 0;\n}\n\n.TextInput-module_requirementIconMet__UNZFD {\n color: var(--lb-color-emerald-accent);\n}\n\n.TextInput-module_requirementIconUnmet__1MF9h {\n color: var(--lb-color-neutral-300);\n}\n\n.TextInput-module_requirementText__fFcdn {\n color: var(--lb-color-neutral-500);\n}\n\n.TextInput-module_requirementTextMet__eGbSi {\n color: var(--lb-color-neutral-700);\n}\n\n/* Advertencia (no bloquea el envío) */\n.TextInput-module_warning__ywIFl {\n font-size: var(--lb-font-size-xs);\n line-height: var(--lb-line-height-normal);\n color: var(--lb-color-amber-strong);\n margin-top: var(--lb-space-1);\n}\n");const Ne=(...e)=>e.filter(Boolean).join(" "),ze=/^[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])?)*$/,Oe=require$$0__default.forwardRef(function({id:e,name:n,label:l,value:s,onChange:i,placeholder:u,error:c,warning:d,required:m=false,disabled:p=false,type:_="text",className:g="",hint:h,maxLength:x,minLength:b,minLengthMessage:y,pattern:j,icon:w,onBlur:Oe,onFocus:Ce,onValidityChange:Re,autoComplete:Ae,validateEmail:$e=false,showPasswordStrength:Ee=false,requiredMessage:Pe,emailValidMessage:qe,emailInvalidMessage:Le,emailSuggestionMessage:Fe,strengthLabels:Ve,strengthLabelPrefix:Me,requirementsLabels:Be},Ue){const[Ze,De]=require$$0__default.useState(false),Ge=require$$0__default.useMemo(()=>$e&&s?(e=>{if(!e||!e.includes("@"))return null;const[n,t]=e.split("@");if(!t)return null;const r={"gmial.com":"gmail.com","gmai.com":"gmail.com","gmil.com":"gmail.com","hotmial.com":"hotmail.com","hotmal.com":"hotmail.com","outlok.com":"outlook.com","yahooo.com":"yahoo.com","yaho.com":"yahoo.com"};return r[t.toLowerCase()]?`${n}@${r[t.toLowerCase()]}`:null})(s):null,[$e,s]),We=require$$0__default.useMemo(()=>{if(!$e||!s)return null;return ze.test(s)&&!(null!==Ge)},[$e,s,Ge]),Ye=$e&&s&&!We&&!Ge,Ke=Ye&&Le||null,Je=Boolean(b&&s.length>0&&s.length<b),Qe=!b||s.length>=b,He=!x||s.length<=x,Xe=!j||new RegExp(j).test(s),en=Boolean(s&&!c&&!Ye&&!Ge&&(!m||s.length>0)&&(!$e||We)&&Qe&&He&&Xe),nn=require$$0__default.useMemo(()=>"password"===_&&Ee?(e=>{if(!e)return {score:0,strength:"none"};let n=0;const t=/[A-Z]/.test(e);return /[a-z]/.test(e)&&n++,t&&n++,/\d/.test(e)&&n++,/[!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?]/.test(e)&&n++,e.length>=8&&n++,n<=1?{score:n,strength:"weak"}:n<=2?{score:n,strength:"fair"}:n<=3?{score:n,strength:"good"}:4===n?{score:n,strength:"strong"}:{score:n,strength:"very-strong"}})(s):null,[_,s,Ee]),tn=Boolean(!p&&!c&&(!m||s.trim().length>0)&&(!$e||We)&&Qe&&He&&Xe);require$$0__default.useEffect(()=>{Re?.(tn);},[tn,Re]);const rn=x&&"text"===_&&s,on=s.length,an=x?on/x*100:0,ln=an>80,sn=an>=100,un=c||Ye&&Le||Je&&y||void 0,cn=Boolean(h&&!c&&!Ye),dn=shared.useFieldIds({id:e,name:n,required:m,error:un||void 0,warning:un?void 0:d,hint:cn?h:void 0});return f.jsxs("div",{className:Ne(k,g),"data-testid":"text-input",children:[l&&f.jsxs("label",{htmlFor:dn.inputId,className:S,children:[l,m&&f.jsx("span",{className:N,"aria-hidden":"true",children:"*"})]}),f.jsxs("div",{className:z,children:[w&&!Ze&&f.jsx("div",{className:O,children:w}),f.jsx("input",{ref:Ue,...dn.controlProps,name:n,required:m,type:$e?"text":_,inputMode:$e?"email":void 0,value:s,onChange:e=>i(e.target.value),onFocus:()=>{De(true),Ce?.();},onBlur:()=>{De(false),Oe?.();},placeholder:u,disabled:p,maxLength:x,minLength:b,pattern:j,autoComplete:Ae,className:Ne(C,w?R:void 0,rn?A:void 0,c||Ye||Je?$:void 0,p||c||Ke||!en?void 0:E),"data-testid":"input-field","data-error":!!c||!!Ye||Je}),rn&&f.jsxs("div",{className:Ne(P,sn?F:ln?L:q),"data-testid":"char-count",children:[f.jsxs("div",{children:[on,"/",x]}),sn&&f.jsx(T,{className:V,size:"sm"})]})]}),rn&&x>20&&f.jsx("div",{className:M,children:f.jsx("div",{className:Ne(B,sn?D:ln?Z:U),style:{width:`${Math.min(an,100)}%`}})}),cn&&f.jsx("p",{id:dn.hintId,className:G,children:h}),d&&!un&&f.jsx("p",{id:dn.warningId,className:Se,children:d}),m&&!s&&!c&&!Ye&&Pe&&f.jsx("p",{className:W,children:Pe}),$e&&s&&We&&qe&&f.jsxs("div",{className:Ne(Y,Q),children:[f.jsx(v,{className:K,size:"sm"}),f.jsx("p",{className:J,children:qe})]}),Ge&&!c&&Fe&&f.jsxs("div",{className:Ne(Y,H),children:[f.jsx(I,{className:K,size:"sm"}),f.jsxs("p",{className:J,children:[Fe.replace("{suggestion}",Ge),f.jsx("button",{type:"button",onClick:()=>i(Ge),className:X,children:Ge})]})]}),nn&&nn.score>0&&f.jsxs("div",{className:re,children:[f.jsx("div",{className:oe,children:[0,1,2,3,4].map(e=>f.jsx("div",{className:Ne(ae,e<nn.score?"weak"===nn.strength?se:"fair"===nn.strength?ie:"good"===nn.strength?ue:"strong"===nn.strength?ce:de:le)},e))}),(Me||Ve?.[nn.strength])&&f.jsx("div",{className:me,children:f.jsxs("p",{className:pe,children:[Me&&`${Me} `,f.jsx("span",{className:Ne(_e,"weak"===nn.strength?ge:"fair"===nn.strength?fe:"good"===nn.strength?he:"strong"===nn.strength?xe:be),children:Ve?.[nn.strength]})]})}),Be&&f.jsxs("div",{className:ye,children:[Be.lowercase&&f.jsxs("div",{className:ve,children:[f.jsx(v,{className:Ne(Te,/[a-z]/.test(s)?Ie:je),size:"sm"}),f.jsx("span",{className:Ne(we,/[a-z]/.test(s)&&ke),children:Be.lowercase})]}),Be.uppercase&&f.jsxs("div",{className:ve,children:[f.jsx(v,{className:Ne(Te,/[A-Z]/.test(s)?Ie:je),size:"sm"}),f.jsx("span",{className:Ne(we,/[A-Z]/.test(s)&&ke),children:Be.uppercase})]}),Be.number&&f.jsxs("div",{className:ve,children:[f.jsx(v,{className:Ne(Te,/\d/.test(s)?Ie:je),size:"sm"}),f.jsx("span",{className:Ne(we,/\d/.test(s)&&ke),children:Be.number})]}),Be.special&&f.jsxs("div",{className:ve,children:[f.jsx(v,{className:Ne(Te,/[!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?]/.test(s)?Ie:je),size:"sm"}),f.jsx("span",{className:Ne(we,/[!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?]/.test(s)&&ke),children:Be.special})]}),Be.minLength&&f.jsxs("div",{className:ve,children:[f.jsx(v,{className:Ne(Te,s.length>=8?Ie:je),size:"sm"}),f.jsx("span",{className:Ne(we,s.length>=8&&ke),children:Be.minLength})]})]})]}),un&&f.jsxs("div",{id:dn.errorId,className:ee,role:"alert",children:[f.jsx(T,{className:ne,size:"sm"}),f.jsx("p",{className:te,children:un})]})]})});Oe.displayName="TextInput";
|
|
1679
|
+
*/function p(){return d||(d=1,"production"!==process.env.NODE_ENV&&function(){function n(e){if(null==e)return null;if("function"==typeof e)return e.$$typeof===k?null:e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case g:return "Fragment";case f:return "Profiler";case h: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 _:return "Portal";case b:return e.displayName||"Context";case x:return (e._context.displayName||"Context")+".Consumer";case y:var t=e.render;return (e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case I:return null!==(t=e.displayName||null)?t:n(e.type)||"Memo";case 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===g)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,m=t.children;if(void 0!==m)if(l)if(z(m)){for(l=0;l<m.length;l++)i(m[l]);Object.freeze&&Object.freeze(m);}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else i(m);if(S.call(t,"key")){m=n(e);var _=Object.keys(t).filter(function(e){return "key"!==e});l=0<_.length?"{key: someKey, "+_.join(": ..., ")+": ...}":"{key: someKey}",E[m+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,m,_,m),E[m+l]=true);}if(m=null,void 0!==o&&(r(o),m=""+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),m=""+t.key),"key"in t)for(var g in o={},t)"key"!==g&&(o[g]=t[g]);else o=t;return m&&function(e,n){function t(){d||(d=true,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",n));}t.isReactWarning=true,Object.defineProperty(e,"key",{get:t,configurable:true});}(o,"function"==typeof e?e.displayName||e.name||"Unknown":e),function(e,n,t,r,o,l){var s=t.ref;return e={$$typeof:p,type:e,key:n,props:t,_owner:r},null!==(void 0!==s?s:null)?Object.defineProperty(e,"ref",{enumerable:false,get: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,m,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===p}var d,c=require$$0__default,p=Symbol.for("react.transitional.element"),_=Symbol.for("react.portal"),g=Symbol.for("react.fragment"),h=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),x=Symbol.for("react.consumer"),b=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),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={};m.Fragment=g,m.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)},m.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)};}()),m}var _,g=(c||(c=1,"production"===process.env.NODE_ENV?i.exports=function(){if(s)return u;s=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 u.Fragment=n,u.jsx=t,u.jsxs=t,u}():i.exports=p()),i.exports),h={exports:{}},f={};var x,b,y={};
|
|
1680
|
+
/**
|
|
1681
|
+
* @license React
|
|
1682
|
+
* react-jsx-runtime.development.js
|
|
1683
|
+
*
|
|
1684
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
1685
|
+
*
|
|
1686
|
+
* This source code is licensed under the MIT license found in the
|
|
1687
|
+
* LICENSE file in the root directory of this source tree.
|
|
1688
|
+
*/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=require$$0__default,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=require$$0__default.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]=require$$0__default.useState(false),[Tn,In]=require$$0__default.useState(false),wn="password"===f&&mn&&!en,jn=require$$0__default.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=require$$0__default.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=require$$0__default.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=require$$0__default.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);require$$0__default.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=require$$0__default.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";
|
|
1618
1689
|
|
|
1619
1690
|
function styleInject(css, ref) {
|
|
1620
1691
|
if ( ref === void 0 ) ref = {};
|
|
@@ -1647,33 +1718,35 @@ var css_248z = ".IdentificationInput-module_container__-70Fo {\n display: flex;
|
|
|
1647
1718
|
var styles = {"container":"IdentificationInput-module_container__-70Fo"};
|
|
1648
1719
|
styleInject(css_248z);
|
|
1649
1720
|
|
|
1721
|
+
// Textos en castellano; el componente los toma del idioma activo.
|
|
1722
|
+
const textos = shared.uiMessagesEs.identificationInput;
|
|
1650
1723
|
const PERU_IDENTIFICATION_DOCS = {
|
|
1651
1724
|
dni: {
|
|
1652
1725
|
type: "dni",
|
|
1653
|
-
label:
|
|
1654
|
-
description:
|
|
1726
|
+
label: textos.dni,
|
|
1727
|
+
description: textos.dniDescription,
|
|
1655
1728
|
maxLength: 8,
|
|
1656
1729
|
alphanumeric: false,
|
|
1657
1730
|
placeholder: "12345678",
|
|
1658
|
-
hint:
|
|
1731
|
+
hint: textos.dniHint,
|
|
1659
1732
|
},
|
|
1660
1733
|
ce: {
|
|
1661
1734
|
type: "ce",
|
|
1662
|
-
label:
|
|
1663
|
-
description:
|
|
1735
|
+
label: textos.ce,
|
|
1736
|
+
description: textos.ceDescription,
|
|
1664
1737
|
maxLength: 9,
|
|
1665
1738
|
alphanumeric: false,
|
|
1666
1739
|
placeholder: "123456789",
|
|
1667
|
-
hint:
|
|
1740
|
+
hint: textos.ceHint,
|
|
1668
1741
|
},
|
|
1669
1742
|
passport: {
|
|
1670
1743
|
type: "passport",
|
|
1671
|
-
label:
|
|
1672
|
-
description:
|
|
1744
|
+
label: textos.passport,
|
|
1745
|
+
description: textos.passportDescription,
|
|
1673
1746
|
maxLength: 12,
|
|
1674
1747
|
alphanumeric: true,
|
|
1675
1748
|
placeholder: "A1234567",
|
|
1676
|
-
hint:
|
|
1749
|
+
hint: textos.passportHint,
|
|
1677
1750
|
},
|
|
1678
1751
|
};
|
|
1679
1752
|
const formatIdentificationInput = (type, value) => {
|
|
@@ -1688,11 +1761,20 @@ const formatIdentificationInput = (type, value) => {
|
|
|
1688
1761
|
const getIdentificationPlaceholder = (type) => {
|
|
1689
1762
|
return PERU_IDENTIFICATION_DOCS[type]?.placeholder ?? "";
|
|
1690
1763
|
};
|
|
1691
|
-
const getIdentificationHint = (type) => {
|
|
1692
|
-
return PERU_IDENTIFICATION_DOCS[type]?.hint ?? "";
|
|
1693
|
-
};
|
|
1694
1764
|
|
|
1695
|
-
|
|
1765
|
+
/** Textos en castellano (los del diccionario `es`). Con `UiLocaleProvider` cambian solos. */
|
|
1766
|
+
const DEFAULT_IDENTIFICATION_LABELS = shared.uiMessagesEs.identificationInput;
|
|
1767
|
+
/** El `ref` apunta al campo del número de documento. */
|
|
1768
|
+
const IdentificationInput = require$$0__default.forwardRef(function IdentificationInput({ documentType, onDocumentTypeChange, identificationNumber, onIdentificationNumberChange, documentTypeError, identificationNumberError, required = false, disabled = false, labels: labelsProp, id, name, className = "", }, ref) {
|
|
1769
|
+
const labels = shared.useUiMessages("identificationInput", labelsProp);
|
|
1770
|
+
// Textos de cada tipo en el idioma activo (los datos exportados quedan en castellano)
|
|
1771
|
+
const docText = (type) => ({
|
|
1772
|
+
label: labels[type],
|
|
1773
|
+
description: labels[`${type}Description`],
|
|
1774
|
+
hint: labels[`${type}Hint`],
|
|
1775
|
+
});
|
|
1776
|
+
const generatedId = require$$0__default.useId();
|
|
1777
|
+
const baseId = id ?? generatedId;
|
|
1696
1778
|
const selectedDoc = documentType
|
|
1697
1779
|
? PERU_IDENTIFICATION_DOCS[documentType]
|
|
1698
1780
|
: null;
|
|
@@ -1708,14 +1790,15 @@ const IdentificationInput = ({ documentType, onDocumentTypeChange, identificatio
|
|
|
1708
1790
|
};
|
|
1709
1791
|
const documentTypeOptions = Object.values(PERU_IDENTIFICATION_DOCS).map((doc) => ({
|
|
1710
1792
|
value: doc.type,
|
|
1711
|
-
label: doc.label,
|
|
1712
|
-
description: doc.description,
|
|
1793
|
+
label: docText(doc.type).label,
|
|
1794
|
+
description: docText(doc.type).description,
|
|
1713
1795
|
}));
|
|
1714
|
-
return (jsxRuntimeExports$2.jsxs("div", { className: [styles.container, className].filter(Boolean).join(" "), "data-testid": "identification-input", children: [jsxRuntimeExports$2.jsx(Autocomplete, { label: labels.documentType, value: documentType, onChange: (value) => {
|
|
1796
|
+
return (jsxRuntimeExports$2.jsxs("div", { className: [styles.container, className].filter(Boolean).join(" "), "data-testid": "identification-input", children: [jsxRuntimeExports$2.jsx(Autocomplete, { id: `${baseId}-tipo`, name: name ? `${name}-tipo` : undefined, label: labels.documentType, value: documentType, onChange: (value) => {
|
|
1715
1797
|
onDocumentTypeChange(value);
|
|
1716
1798
|
// Reset identification number when changing document type
|
|
1717
1799
|
onIdentificationNumberChange("");
|
|
1718
|
-
}, options: documentTypeOptions, placeholder: labels.selectDocumentType, error: documentTypeError, required: required, disabled: disabled, hint: labels.documentTypeHint, searchable: false, clearable: true }), documentType && selectedDoc && (jsxRuntimeExports$2.jsx(
|
|
1719
|
-
};
|
|
1800
|
+
}, options: documentTypeOptions, placeholder: labels.selectDocumentType, error: documentTypeError, required: required, disabled: disabled, hint: labels.documentTypeHint, searchable: false, clearable: true }), documentType && selectedDoc && (jsxRuntimeExports$2.jsx(Ge, { ref: ref, id: `${baseId}-numero`, name: name, label: `${labels.identificationNumber} - ${docText(selectedDoc.type).label}`, value: identificationNumber, onChange: handleIdentificationChange, placeholder: getIdentificationPlaceholder(documentType), error: identificationNumberError, hint: docText(documentType).hint, required: required, disabled: disabled, maxLength: selectedDoc.maxLength, type: selectedDoc.alphanumeric ? "text" : "tel", autoComplete: "off" }))] }));
|
|
1801
|
+
});
|
|
1720
1802
|
|
|
1721
|
-
|
|
1803
|
+
exports.DEFAULT_IDENTIFICATION_LABELS = DEFAULT_IDENTIFICATION_LABELS;
|
|
1804
|
+
exports.default = IdentificationInput;
|