@rubenpazch/autocomplete 2.0.5 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Autocomplete.d.ts.map +1 -1
- package/dist/index.cjs.js +103 -81
- package/dist/index.esm.js +88 -84
- package/package.json +6 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Autocomplete.d.ts","sourceRoot":"","sources":["../src/Autocomplete.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Autocomplete.d.ts","sourceRoot":"","sources":["../src/Autocomplete.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAS/B,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAChC;AAED,UAAU,iBAAiB;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAC9B,QAAQ,EAAE,CACR,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,EAC7B,MAAM,CAAC,EAAE,kBAAkB,KACxB,IAAI,CAAC;IACV,OAAO,EAAE,kBAAkB,EAAE,CAAC;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,QAAQ,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,CACb,MAAM,EAAE,kBAAkB,EAC1B,UAAU,EAAE,OAAO,KAChB,KAAK,CAAC,SAAS,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC;CAC7B;AA6BD,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAkc7C,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
package/dist/index.cjs.js
CHANGED
|
@@ -2,6 +2,25 @@
|
|
|
2
2
|
|
|
3
3
|
var require$$0 = require('react');
|
|
4
4
|
|
|
5
|
+
function _interopNamespaceDefault(e) {
|
|
6
|
+
var n = Object.create(null);
|
|
7
|
+
if (e) {
|
|
8
|
+
Object.keys(e).forEach(function (k) {
|
|
9
|
+
if (k !== 'default') {
|
|
10
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
11
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function () { return e[k]; }
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
n.default = e;
|
|
19
|
+
return Object.freeze(n);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
var require$$0__namespace = /*#__PURE__*/_interopNamespaceDefault(require$$0);
|
|
23
|
+
|
|
5
24
|
var jsxRuntime$1 = {exports: {}};
|
|
6
25
|
|
|
7
26
|
var reactJsxRuntime_production$1 = {};
|
|
@@ -424,7 +443,7 @@ function requireJsxRuntime$1 () {
|
|
|
424
443
|
|
|
425
444
|
var jsxRuntimeExports$1 = requireJsxRuntime$1();
|
|
426
445
|
|
|
427
|
-
var
|
|
446
|
+
var s,o={exports:{}},t={};var n,l,a={};
|
|
428
447
|
/**
|
|
429
448
|
* @license React
|
|
430
449
|
* react-jsx-runtime.development.js
|
|
@@ -433,7 +452,7 @@ var r,s={exports:{}},o={};var t,n,l={};
|
|
|
433
452
|
*
|
|
434
453
|
* This source code is licensed under the MIT license found in the
|
|
435
454
|
* LICENSE file in the root directory of this source tree.
|
|
436
|
-
*/function
|
|
455
|
+
*/function i(){return n||(n=1,"production"!==process.env.NODE_ENV&&function(){function e(r){if(null==r)return null;if("function"==typeof r)return r.$$typeof===M?null:r.displayName||r.name||null;if("string"==typeof r)return r;switch(r){case x:return "Fragment";case v:return "Profiler";case p:return "StrictMode";case k:return "Suspense";case C:return "SuspenseList";case N:return "Activity"}if("object"==typeof r)switch("number"==typeof r.tag&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),r.$$typeof){case u:return "Portal";case j:return r.displayName||"Context";case g:return (r._context.displayName||"Context")+".Consumer";case f:var s=r.render;return (r=r.displayName)||(r=""!==(r=s.displayName||s.name||"")?"ForwardRef("+r+")":"ForwardRef"),r;case y:return null!==(s=r.displayName||null)?s:e(r.type)||"Memo";case L:s=r._payload,r=r._init;try{return e(r(s))}catch(e){}}return null}function s(e){return ""+e}function o(e){try{s(e);var r=!1;}catch(e){r=true;}if(r){var o=(r=console).error,t="function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return o.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",t),s(e)}}function t(r){if(r===x)return "<>";if("object"==typeof r&&null!==r&&r.$$typeof===L)return "<...>";try{var s=e(r);return s?"<"+s+">":"<...>"}catch(e){return "<...>"}}function n(){return Error("react-stack-top-frame")}function l(){var r=e(this.type);return B[r]||(B[r]=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!==(r=this.props.ref)?r:null}function i(r,s,t,n,a,i){var h,m=s.children;if(void 0!==m)if(n)if(z(m)){for(n=0;n<m.length;n++)c(m[n]);Object.freeze&&Object.freeze(m);}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else c(m);if($.call(s,"key")){m=e(r);var u=Object.keys(s).filter(function(e){return "key"!==e});n=0<u.length?"{key: someKey, "+u.join(": ..., ")+": ...}":"{key: someKey}",_[m+n]||(u=0<u.length?"{"+u.join(": ..., ")+": ...}":"{}",console.error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',n,m,u,m),_[m+n]=true);}if(m=null,void 0!==t&&(o(t),m=""+t),function(e){if($.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return false}return void 0!==e.key}(s)&&(o(s.key),m=""+s.key),"key"in s)for(var x in t={},s)"key"!==x&&(t[x]=s[x]);else t=s;return m&&function(e,r){function s(){d||(d=true,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",r));}s.isReactWarning=true,Object.defineProperty(e,"key",{get:s,configurable:true});}(t,"function"==typeof r?r.displayName||r.name||"Unknown":r),function(e,r,s,o,t,n){var a=s.ref;return e={$$typeof:w,type:e,key:r,props:s,_owner:o},null!==(void 0!==a?a:null)?Object.defineProperty(e,"ref",{enumerable:false,get:l}):Object.defineProperty(e,"ref",{enumerable:false,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:false,enumerable:false,writable:true,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:false,enumerable:false,writable:true,value:null}),Object.defineProperty(e,"_debugStack",{configurable:false,enumerable:false,writable:true,value:t}),Object.defineProperty(e,"_debugTask",{configurable:false,enumerable:false,writable:true,value:n}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}(r,m,t,null===(h=b.A)?null:h.getOwner(),a,i)}function c(e){h(e)?e._store&&(e._store.validated=1):"object"==typeof e&&null!==e&&e.$$typeof===L&&("fulfilled"===e._payload.status?h(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1));}function h(e){return "object"==typeof e&&null!==e&&e.$$typeof===w}var d,m=require$$0,w=Symbol.for("react.transitional.element"),u=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),p=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),g=Symbol.for("react.consumer"),j=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),k=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),y=Symbol.for("react.memo"),L=Symbol.for("react.lazy"),N=Symbol.for("react.activity"),M=Symbol.for("react.client.reference"),b=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$=Object.prototype.hasOwnProperty,z=Array.isArray,H=console.createTask?console.createTask:function(){return null},B={},W=(m={react_stack_bottom_frame:function(e){return e()}}).react_stack_bottom_frame.bind(m,n)(),V=H(t(n)),_={};a.Fragment=x,a.jsx=function(e,r,s){var o=1e4>b.recentlyCreatedOwnerStacks++;return i(e,r,s,false,o?Error("react-stack-top-frame"):W,o?H(t(e)):V)},a.jsxs=function(e,r,s){var o=1e4>b.recentlyCreatedOwnerStacks++;return i(e,r,s,true,o?Error("react-stack-top-frame"):W,o?H(t(e)):V)};}()),a}var c=(l||(l=1,"production"===process.env.NODE_ENV?o.exports=function(){if(s)return t;s=1;var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function o(r,s,o){var t=null;if(void 0!==o&&(t=""+o),void 0!==s.key&&(t=""+s.key),"key"in s)for(var n in o={},s)"key"!==n&&(o[n]=s[n]);else o=s;return s=o.ref,{$$typeof:e,type:r,key:t,ref:void 0!==s?s:null,props:o}}return t.Fragment=r,t.jsx=o,t.jsxs=o,t}():o.exports=i()),o.exports);function v({className:e="",size:r="md"}){const s=`${{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"}[r]} ${e}`;return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:s,"aria-label":"Check",children:c.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 L=({className:e="",size:r="md",color:s="currentColor",direction:o="down"})=>c.jsx("svg",{className:`${{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"}[r]} ${{up:"rotate-180",down:"",left:"rotate-90",right:"-rotate-90"}[o]} ${e}`,fill:"none",stroke:s,viewBox:"0 0 24 24",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:c.jsx("path",{d:"M6 9l6 6 6-6"})});function z({className:e="",size:r="md",color:s="currentColor"}){return c.jsx("svg",{className:`${{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"}[r]} ${e}`,fill:"none",stroke:s,viewBox:"0 0 24 24",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:c.jsx("path",{d:"M6 18L18 6M6 6l12 12"})})}const Ae={outlined:"material-symbols-outlined",rounded:"material-symbols-rounded",sharp:"material-symbols-sharp"},Ee=require$$0__namespace.forwardRef(({name:e,variant:r="outlined",size:s="md",fill:o=0,weight:t=400,grade:n=0,opticalSize:l=24,style:a,className:i,...h},d)=>{const m=(e=>"number"==typeof e?e:"sm"===e?16:"md"===e?20:24)(s),w=`"FILL" ${o}, "wght" ${t}, "GRAD" ${n}, "opsz" ${l}`;return c.jsx("span",{ref:d,"aria-hidden":"true",className:Ae[r]+(i?` ${i}`:""),style:{fontVariationSettings:w,fontSize:m,lineHeight:1,display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",...a},...h,children:e})});Ee.displayName="MaterialIcon";
|
|
437
456
|
|
|
438
457
|
var jsxRuntime = {exports: {}};
|
|
439
458
|
|
|
@@ -857,6 +876,40 @@ function requireJsxRuntime () {
|
|
|
857
876
|
|
|
858
877
|
var jsxRuntimeExports = requireJsxRuntime();
|
|
859
878
|
|
|
879
|
+
function styleInject$1(css, ref) {
|
|
880
|
+
if ( ref === void 0 ) ref = {};
|
|
881
|
+
var insertAt = ref.insertAt;
|
|
882
|
+
|
|
883
|
+
if (typeof document === 'undefined') { return; }
|
|
884
|
+
|
|
885
|
+
var head = document.head || document.getElementsByTagName('head')[0];
|
|
886
|
+
var style = document.createElement('style');
|
|
887
|
+
style.type = 'text/css';
|
|
888
|
+
|
|
889
|
+
if (insertAt === 'top') {
|
|
890
|
+
if (head.firstChild) {
|
|
891
|
+
head.insertBefore(style, head.firstChild);
|
|
892
|
+
} else {
|
|
893
|
+
head.appendChild(style);
|
|
894
|
+
}
|
|
895
|
+
} else {
|
|
896
|
+
head.appendChild(style);
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
if (style.styleSheet) {
|
|
900
|
+
style.styleSheet.cssText = css;
|
|
901
|
+
} else {
|
|
902
|
+
style.appendChild(document.createTextNode(css));
|
|
903
|
+
}
|
|
904
|
+
}
|
|
905
|
+
|
|
906
|
+
var css_248z$1 = "/* Container */\n.LoadingSpinner-module_container__PHl1j {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.LoadingSpinner-module_containerInline__eD4FZ {\n display: inline-flex;\n}\n\n/* Inner wrapper */\n.LoadingSpinner-module_inner__SvATp {\n text-align: center;\n}\n\n.LoadingSpinner-module_innerInline__MPS3Y {\n display: inline-flex;\n}\n\n/* Spinner base */\n.LoadingSpinner-module_spinner__vu6Ri {\n border-radius: 9999px;\n border-width: 2px;\n animation: LoadingSpinner-module_spin__vEieX 1s linear infinite;\n}\n\n/* Sizes */\n.LoadingSpinner-module_sizeSm__tL-IR {\n height: 1rem;\n width: 1rem;\n}\n\n.LoadingSpinner-module_sizeMd__AT592 {\n height: 2rem;\n width: 2rem;\n}\n\n.LoadingSpinner-module_sizeLg__jyX27 {\n height: 3rem;\n width: 3rem;\n}\n\n/* Colors - spinner */\n.LoadingSpinner-module_colorBlue__Jtuu1 {\n border-color: #2563eb;\n}\n\n.LoadingSpinner-module_colorGray__-EMqs {\n border-color: #4b5563;\n}\n\n.LoadingSpinner-module_colorWhite__95Hoo {\n border-color: #ffffff;\n}\n\n/* Spinner transparent borders */\n.LoadingSpinner-module_spinnerTransparent__G3zcb {\n border-top-color: transparent;\n border-right-color: transparent;\n}\n\n/* Spacing */\n.LoadingSpinner-module_spacingDefault__8At6H {\n margin: 0 auto 1rem auto;\n}\n\n/* Dots container */\n.LoadingSpinner-module_dotsContainer__l3FsV {\n display: flex;\n gap: 0.25rem;\n}\n\n.LoadingSpinner-module_dotsContainerInline__Kl4Fz {\n display: flex;\n gap: 0.25rem;\n}\n\n/* Dot sizes */\n.LoadingSpinner-module_dotSizeSm__YuBra {\n height: 0.375rem;\n width: 0.375rem;\n}\n\n.LoadingSpinner-module_dotSizeMd__rXeyS {\n height: 0.625rem;\n width: 0.625rem;\n}\n\n.LoadingSpinner-module_dotSizeLg__M8etz {\n height: 0.875rem;\n width: 0.875rem;\n}\n\n/* Dot colors */\n.LoadingSpinner-module_dotColorBlue__5evmc {\n background-color: #2563eb;\n}\n\n.LoadingSpinner-module_dotColorGray__dr80J {\n background-color: #4b5563;\n}\n\n.LoadingSpinner-module_dotColorWhite__54ur- {\n background-color: #ffffff;\n}\n\n/* Dot */\n.LoadingSpinner-module_dot__tz0lA {\n border-radius: 9999px;\n animation: LoadingSpinner-module_bounce__7Raih 1s ease-in-out infinite;\n}\n\n.LoadingSpinner-module_dotDelay1__-94Os {\n animation-delay: 0ms;\n}\n\n.LoadingSpinner-module_dotDelay2__Oy8E- {\n animation-delay: 150ms;\n}\n\n.LoadingSpinner-module_dotDelay3__7EZYH {\n animation-delay: 300ms;\n}\n\n/* Pulse */\n.LoadingSpinner-module_pulse__gKUHJ {\n border-radius: 9999px;\n animation: LoadingSpinner-module_pulse__gKUHJ 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;\n}\n\n/* Ring */\n.LoadingSpinner-module_ringContainer__4p8NG {\n position: relative;\n}\n\n.LoadingSpinner-module_ringBackground__aF2w1 {\n position: absolute;\n inset: 0;\n border-radius: 9999px;\n border-width: 2px;\n opacity: 0.25;\n}\n\n.LoadingSpinner-module_ringSpinner__b92-S {\n position: absolute;\n inset: 0;\n border-radius: 9999px;\n border-width: 2px;\n border-color: transparent;\n animation: LoadingSpinner-module_spin__vEieX 1s linear infinite;\n}\n\n.LoadingSpinner-module_ringSpinnerBlue__zGTgw {\n border-top-color: #2563eb;\n}\n\n.LoadingSpinner-module_ringSpinnerGray__kHnkJ {\n border-top-color: #4b5563;\n}\n\n.LoadingSpinner-module_ringSpinnerWhite__yu8d0 {\n border-top-color: #ffffff;\n}\n\n.LoadingSpinner-module_ringTransparent__DTSbu {\n border-right-color: transparent;\n border-bottom-color: transparent;\n border-left-color: transparent;\n}\n\n/* Message */\n.LoadingSpinner-module_message__FoOvh {\n color: #4b5563;\n font-size: 0.875rem;\n line-height: 1.25rem;\n margin-top: 0.5rem;\n}\n\n/* Animations */\n@keyframes LoadingSpinner-module_spin__vEieX {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n\n@keyframes LoadingSpinner-module_bounce__7Raih {\n 0%,\n 100% {\n transform: translateY(0);\n animation-timing-function: cubic-bezier(0, 0, 0.2, 1);\n }\n 50% {\n transform: translateY(-25%);\n animation-timing-function: cubic-bezier(0.8, 0, 1, 1);\n }\n}\n\n@keyframes LoadingSpinner-module_pulse__gKUHJ {\n 0%,\n 100% {\n opacity: 1;\n }\n 50% {\n opacity: 0.5;\n }\n}\n";
|
|
907
|
+
var styles$1 = {"container":"LoadingSpinner-module_container__PHl1j","containerInline":"LoadingSpinner-module_containerInline__eD4FZ","inner":"LoadingSpinner-module_inner__SvATp","innerInline":"LoadingSpinner-module_innerInline__MPS3Y","spinner":"LoadingSpinner-module_spinner__vu6Ri","spin":"LoadingSpinner-module_spin__vEieX","sizeSm":"LoadingSpinner-module_sizeSm__tL-IR","sizeMd":"LoadingSpinner-module_sizeMd__AT592","sizeLg":"LoadingSpinner-module_sizeLg__jyX27","colorBlue":"LoadingSpinner-module_colorBlue__Jtuu1","colorGray":"LoadingSpinner-module_colorGray__-EMqs","colorWhite":"LoadingSpinner-module_colorWhite__95Hoo","spinnerTransparent":"LoadingSpinner-module_spinnerTransparent__G3zcb","spacingDefault":"LoadingSpinner-module_spacingDefault__8At6H","dotsContainer":"LoadingSpinner-module_dotsContainer__l3FsV","dotsContainerInline":"LoadingSpinner-module_dotsContainerInline__Kl4Fz","dotSizeSm":"LoadingSpinner-module_dotSizeSm__YuBra","dotSizeMd":"LoadingSpinner-module_dotSizeMd__rXeyS","dotSizeLg":"LoadingSpinner-module_dotSizeLg__M8etz","dotColorBlue":"LoadingSpinner-module_dotColorBlue__5evmc","dotColorGray":"LoadingSpinner-module_dotColorGray__dr80J","dotColorWhite":"LoadingSpinner-module_dotColorWhite__54ur-","dot":"LoadingSpinner-module_dot__tz0lA","bounce":"LoadingSpinner-module_bounce__7Raih","dotDelay1":"LoadingSpinner-module_dotDelay1__-94Os","dotDelay2":"LoadingSpinner-module_dotDelay2__Oy8E-","dotDelay3":"LoadingSpinner-module_dotDelay3__7EZYH","pulse":"LoadingSpinner-module_pulse__gKUHJ","ringContainer":"LoadingSpinner-module_ringContainer__4p8NG","ringBackground":"LoadingSpinner-module_ringBackground__aF2w1","ringSpinner":"LoadingSpinner-module_ringSpinner__b92-S","ringSpinnerBlue":"LoadingSpinner-module_ringSpinnerBlue__zGTgw","ringSpinnerGray":"LoadingSpinner-module_ringSpinnerGray__kHnkJ","ringSpinnerWhite":"LoadingSpinner-module_ringSpinnerWhite__yu8d0","ringTransparent":"LoadingSpinner-module_ringTransparent__DTSbu","message":"LoadingSpinner-module_message__FoOvh"};
|
|
908
|
+
styleInject$1(css_248z$1);
|
|
909
|
+
|
|
910
|
+
function classNames$1(...classes) {
|
|
911
|
+
return classes.filter(Boolean).join(" ");
|
|
912
|
+
}
|
|
860
913
|
/**
|
|
861
914
|
* LoadingSpinner component
|
|
862
915
|
* Displays a loading indicator with multiple style variants
|
|
@@ -866,65 +919,69 @@ var jsxRuntimeExports = requireJsxRuntime();
|
|
|
866
919
|
* @param color - Color scheme: 'blue' (default), 'gray', 'white'
|
|
867
920
|
*/
|
|
868
921
|
const LoadingSpinner = ({ message, size = "md", className = "", variant = "spinner", inline = false, color = "blue", }) => {
|
|
869
|
-
const
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
};
|
|
874
|
-
const colorClasses = {
|
|
875
|
-
blue: "border-blue-600",
|
|
876
|
-
gray: "border-gray-600",
|
|
877
|
-
white: "border-white",
|
|
878
|
-
};
|
|
879
|
-
const dotColorClasses = {
|
|
880
|
-
blue: "bg-blue-600",
|
|
881
|
-
gray: "bg-gray-600",
|
|
882
|
-
white: "bg-white",
|
|
883
|
-
};
|
|
884
|
-
const dotSizeClasses = {
|
|
885
|
-
sm: "h-1.5 w-1.5",
|
|
886
|
-
md: "h-2.5 w-2.5",
|
|
887
|
-
lg: "h-3.5 w-3.5",
|
|
888
|
-
};
|
|
922
|
+
const sizeClass = styles$1[`size${size.charAt(0).toUpperCase() + size.slice(1)}`];
|
|
923
|
+
const colorClass = styles$1[`color${color.charAt(0).toUpperCase() + color.slice(1)}`];
|
|
924
|
+
const dotColorClass = styles$1[`dotColor${color.charAt(0).toUpperCase() + color.slice(1)}`];
|
|
925
|
+
const dotSizeClass = styles$1[`dotSize${size.charAt(0).toUpperCase() + size.slice(1)}`];
|
|
889
926
|
// Spinner variant (circular border)
|
|
890
927
|
if (variant === "spinner") {
|
|
891
|
-
return (jsxRuntimeExports.jsx("div", { className: inline ? className :
|
|
892
|
-
borderTopColor: "transparent",
|
|
893
|
-
borderRightColor: "transparent",
|
|
894
|
-
} }), message && jsxRuntimeExports.jsx("p", { className: "text-gray-600 text-sm mt-2", children: message })] }) }));
|
|
928
|
+
return (jsxRuntimeExports.jsx("div", { className: classNames$1(inline ? styles$1.containerInline : styles$1.container, className), "data-testid": "loading-spinner", "data-variant": variant, "data-size": size, "data-color": color, children: jsxRuntimeExports.jsxs("div", { className: inline ? styles$1.innerInline : styles$1.inner, children: [jsxRuntimeExports.jsx("div", { className: classNames$1(styles$1.spinner, styles$1.spinnerTransparent, colorClass, sizeClass, !inline ? styles$1.spacingDefault : undefined) }), message && jsxRuntimeExports.jsx("p", { className: styles$1.message, children: message })] }) }));
|
|
895
929
|
}
|
|
896
930
|
// Dots variant (three bouncing dots)
|
|
897
931
|
if (variant === "dots") {
|
|
898
|
-
return (jsxRuntimeExports.jsx("div", { className: inline ? className :
|
|
932
|
+
return (jsxRuntimeExports.jsx("div", { className: classNames$1(inline ? styles$1.containerInline : styles$1.container, className), "data-testid": "loading-spinner", "data-variant": variant, "data-size": size, "data-color": color, children: jsxRuntimeExports.jsxs("div", { className: inline ? styles$1.innerInline : styles$1.inner, children: [jsxRuntimeExports.jsxs("div", { className: classNames$1(inline ? styles$1.dotsContainerInline : styles$1.dotsContainer, !inline ? styles$1.spacingDefault : undefined), children: [jsxRuntimeExports.jsx("div", { className: classNames$1(styles$1.dot, dotSizeClass, dotColorClass, styles$1.dotDelay1) }), jsxRuntimeExports.jsx("div", { className: classNames$1(styles$1.dot, dotSizeClass, dotColorClass, styles$1.dotDelay2) }), jsxRuntimeExports.jsx("div", { className: classNames$1(styles$1.dot, dotSizeClass, dotColorClass, styles$1.dotDelay3) })] }), message && jsxRuntimeExports.jsx("p", { className: styles$1.message, children: message })] }) }));
|
|
899
933
|
}
|
|
900
934
|
// Pulse variant (pulsing circle)
|
|
901
935
|
if (variant === "pulse") {
|
|
902
|
-
return (jsxRuntimeExports.jsx("div", { className: inline ? className :
|
|
936
|
+
return (jsxRuntimeExports.jsx("div", { className: classNames$1(inline ? styles$1.containerInline : styles$1.container, className), "data-testid": "loading-spinner", "data-variant": variant, "data-size": size, "data-color": color, children: jsxRuntimeExports.jsxs("div", { className: inline ? styles$1.innerInline : styles$1.inner, children: [jsxRuntimeExports.jsx("div", { className: classNames$1(styles$1.pulse, sizeClass, dotColorClass, !inline ? styles$1.spacingDefault : undefined) }), message && jsxRuntimeExports.jsx("p", { className: styles$1.message, children: message })] }) }));
|
|
903
937
|
}
|
|
904
938
|
// Ring variant (rotating ring with gradient)
|
|
905
939
|
if (variant === "ring") {
|
|
906
|
-
const
|
|
907
|
-
|
|
908
|
-
gray: "border-gray-600",
|
|
909
|
-
white: "border-white",
|
|
910
|
-
};
|
|
911
|
-
return (jsxRuntimeExports.jsx("div", { className: inline ? className : `flex justify-center items-center ${className}`, children: jsxRuntimeExports.jsxs("div", { className: inline ? "" : "text-center", children: [jsxRuntimeExports.jsxs("div", { className: `relative ${sizeClasses[size]} ${inline ? "" : "mx-auto mb-4"}`, children: [jsxRuntimeExports.jsx("div", { className: `absolute inset-0 rounded-full border-2 ${colorClasses[color]} opacity-25` }), jsxRuntimeExports.jsx("div", { className: `absolute inset-0 rounded-full border-2 border-transparent ${ringColorMap[color]} animate-spin`, style: {
|
|
912
|
-
borderTopColor: "currentColor",
|
|
913
|
-
borderRightColor: "transparent",
|
|
914
|
-
borderBottomColor: "transparent",
|
|
915
|
-
borderLeftColor: "transparent",
|
|
916
|
-
} })] }), message && jsxRuntimeExports.jsx("p", { className: "text-gray-600 text-sm mt-2", children: message })] }) }));
|
|
940
|
+
const ringSpinnerColorClass = styles$1[`ringSpinner${color.charAt(0).toUpperCase() + color.slice(1)}`];
|
|
941
|
+
return (jsxRuntimeExports.jsx("div", { className: classNames$1(inline ? styles$1.containerInline : styles$1.container, className), "data-testid": "loading-spinner", "data-variant": variant, "data-size": size, "data-color": color, children: jsxRuntimeExports.jsxs("div", { className: inline ? styles$1.innerInline : styles$1.inner, children: [jsxRuntimeExports.jsxs("div", { className: classNames$1(styles$1.ringContainer, sizeClass, !inline ? styles$1.spacingDefault : undefined), children: [jsxRuntimeExports.jsx("div", { className: classNames$1(styles$1.ringBackground, colorClass) }), jsxRuntimeExports.jsx("div", { className: classNames$1(styles$1.ringSpinner, styles$1.ringTransparent, ringSpinnerColorClass) })] }), message && jsxRuntimeExports.jsx("p", { className: styles$1.message, children: message })] }) }));
|
|
917
942
|
}
|
|
918
943
|
return null;
|
|
919
944
|
};
|
|
920
945
|
|
|
946
|
+
function styleInject(css, ref) {
|
|
947
|
+
if ( ref === void 0 ) ref = {};
|
|
948
|
+
var insertAt = ref.insertAt;
|
|
949
|
+
|
|
950
|
+
if (typeof document === 'undefined') { return; }
|
|
951
|
+
|
|
952
|
+
var head = document.head || document.getElementsByTagName('head')[0];
|
|
953
|
+
var style = document.createElement('style');
|
|
954
|
+
style.type = 'text/css';
|
|
955
|
+
|
|
956
|
+
if (insertAt === 'top') {
|
|
957
|
+
if (head.firstChild) {
|
|
958
|
+
head.insertBefore(style, head.firstChild);
|
|
959
|
+
} else {
|
|
960
|
+
head.appendChild(style);
|
|
961
|
+
}
|
|
962
|
+
} else {
|
|
963
|
+
head.appendChild(style);
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
if (style.styleSheet) {
|
|
967
|
+
style.styleSheet.cssText = css;
|
|
968
|
+
} else {
|
|
969
|
+
style.appendChild(document.createTextNode(css));
|
|
970
|
+
}
|
|
971
|
+
}
|
|
972
|
+
|
|
973
|
+
var css_248z = ".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: #374151;\n}\n\n.Autocomplete-module_required__N3ZwR {\n color: #ef4444;\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: #9ca3af;\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 #d1d5db;\n transition:\n border-color 150ms ease,\n box-shadow 150ms ease;\n outline: none;\n font-weight: 500;\n color: #111827;\n}\n\n.Autocomplete-module_input__ZShCt::placeholder {\n color: #9ca3af;\n}\n\n.Autocomplete-module_input__ZShCt:disabled {\n background: #f3f4f6;\n color: #6b7280;\n cursor: not-allowed;\n}\n\n.Autocomplete-module_input__ZShCt:hover:not(:disabled):not(:focus) {\n border-color: #9ca3af;\n}\n\n.Autocomplete-module_input__ZShCt:focus {\n border-color: #3b82f6;\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: #f9fafb;\n cursor: default;\n}\n\n.Autocomplete-module_inputError__Kdk14 {\n border-color: #ef4444;\n}\n\n.Autocomplete-module_inputError__Kdk14:focus {\n border-color: #ef4444;\n box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);\n}\n\n.Autocomplete-module_inputWarning__XTQux {\n border-color: #eab308;\n}\n\n.Autocomplete-module_inputWarning__XTQux:focus {\n border-color: #eab308;\n box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.1);\n}\n\n.Autocomplete-module_inputFocused__1zKVR {\n border-color: #3b82f6;\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: #9ca3af;\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: #4b5563;\n}\n\n.Autocomplete-module_toggleButton__nxFFh {\n color: #9ca3af;\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: #4b5563;\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: #ffffff;\n border: 2px solid #e5e7eb;\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: #6b7280;\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: #f9fafb;\n}\n\n.Autocomplete-module_optionDisabled__kkjS2 {\n opacity: 0.5;\n cursor: not-allowed;\n background: #f9fafb;\n}\n\n.Autocomplete-module_optionHighlighted__WpIwj:not(.Autocomplete-module_optionDisabled__kkjS2) {\n background: #eff6ff;\n}\n\n.Autocomplete-module_optionSelected__CeDeN:not(.Autocomplete-module_optionDisabled__kkjS2) {\n background: #dbeafe;\n}\n\n.Autocomplete-module_optionContent__TzYTm {\n flex: 1;\n}\n\n.Autocomplete-module_optionLabel__5FOIH {\n font-weight: 500;\n color: #111827;\n}\n\n.Autocomplete-module_optionDescription__0HEsl {\n font-size: 0.75rem;\n line-height: 1rem;\n color: #6b7280;\n margin-top: 0.125rem;\n}\n\n.Autocomplete-module_optionCheckIcon__MEavu {\n width: 1.25rem;\n height: 1.25rem;\n color: #3b82f6;\n flex-shrink: 0;\n}\n\n.Autocomplete-module_highlight__MW3bw {\n background: #fef08a;\n font-weight: 600;\n color: #111827;\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: #f9fafb;\n}\n\n.Autocomplete-module_createOptionWithBorder__BX0mv {\n border-top: 1px solid #e5e7eb;\n}\n\n.Autocomplete-module_createOptionHighlighted__-3e6V {\n background: #eff6ff;\n}\n\n.Autocomplete-module_createIcon__wh5Nu {\n color: #3b82f6;\n font-weight: 500;\n}\n\n.Autocomplete-module_createText__V9uqQ {\n color: #111827;\n}\n\n.Autocomplete-module_noResults__rAoto {\n padding: 0.75rem 1rem;\n text-align: center;\n color: #6b7280;\n font-size: 0.875rem;\n}\n\n.Autocomplete-module_hint__E-DXp {\n font-size: 0.75rem;\n line-height: 1rem;\n color: #6b7280;\n}\n\n.Autocomplete-module_warning__6-JRr {\n font-size: 0.75rem;\n line-height: 1rem;\n color: #ca8a04;\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: #dc2626;\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";
|
|
974
|
+
var styles = {"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","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"};
|
|
975
|
+
styleInject(css_248z);
|
|
976
|
+
|
|
977
|
+
const classNames = (...classes) => classes.filter(Boolean).join(" ");
|
|
921
978
|
// Helper function to highlight matching text
|
|
922
979
|
const highlightMatchText = (text, search, shouldHighlight = true) => {
|
|
923
980
|
if (!shouldHighlight || !search || !text)
|
|
924
981
|
return text;
|
|
925
982
|
const regex = new RegExp(`(${search.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")})`, "gi");
|
|
926
983
|
const parts = text.split(regex);
|
|
927
|
-
return (jsxRuntimeExports$1.jsx(jsxRuntimeExports$1.Fragment, { children: parts.map((part, index) => regex.test(part) ? (jsxRuntimeExports$1.jsx("mark", { className:
|
|
984
|
+
return (jsxRuntimeExports$1.jsx(jsxRuntimeExports$1.Fragment, { children: parts.map((part, index) => regex.test(part) ? (jsxRuntimeExports$1.jsx("mark", { className: styles.highlight, children: part }, index)) : (jsxRuntimeExports$1.jsx("span", { children: part }, index))) }));
|
|
928
985
|
};
|
|
929
986
|
const Autocomplete = ({ label, value, onChange, options = [], placeholder = "Search or select...", error, warning, hint, required = false, disabled = false, loading = false, searchable = true, clearable = true, icon, className = "", maxHeight = "300px", onCreate, onSearch, readOnly = false, renderOption, onBlur, onFocus, createLabel = "Create", noResultsText = "No results found", loadingText = "Loading...", highlightMatch = true, minSearchLength = 0, debounceMs = 300, keepListOpen = false, position = "bottom", }) => {
|
|
930
987
|
const [isOpen, setIsOpen] = require$$0.useState(false);
|
|
@@ -1086,56 +1143,21 @@ const Autocomplete = ({ label, value, onChange, options = [], placeholder = "Sea
|
|
|
1086
1143
|
break;
|
|
1087
1144
|
}
|
|
1088
1145
|
};
|
|
1089
|
-
const
|
|
1090
|
-
|
|
1091
|
-
return "border-red-500 focus:border-red-500 focus:ring-2 focus:ring-red-200";
|
|
1092
|
-
}
|
|
1093
|
-
if (warning) {
|
|
1094
|
-
return "border-yellow-500 focus:border-yellow-500 focus:ring-2 focus:ring-yellow-200";
|
|
1095
|
-
}
|
|
1096
|
-
if (isFocused) {
|
|
1097
|
-
return "border-blue-500 focus:ring-2 focus:ring-blue-200";
|
|
1098
|
-
}
|
|
1099
|
-
return "border-gray-300 hover:border-gray-400 focus:border-blue-500 focus:ring-2 focus:ring-blue-200";
|
|
1146
|
+
const getInputClassName = () => {
|
|
1147
|
+
return classNames(styles.input, icon ? styles.inputWithIcon : undefined, clearable && value ? styles.inputWithClear : styles.inputWithoutClear, readOnly ? styles.inputReadOnly : undefined, error ? styles.inputError : undefined, warning && !error ? styles.inputWarning : undefined, isFocused && !error && !warning ? styles.inputFocused : undefined);
|
|
1100
1148
|
};
|
|
1101
|
-
return (jsxRuntimeExports$1.jsxs("div", { className:
|
|
1102
|
-
w-full px-4 py-2 rounded-lg border-2 transition-all outline-none
|
|
1103
|
-
font-medium text-gray-900 placeholder-gray-400
|
|
1104
|
-
disabled:bg-gray-100 disabled:text-gray-500 disabled:cursor-not-allowed
|
|
1105
|
-
${icon ? "pl-10" : ""}
|
|
1106
|
-
${clearable && value ? "pr-20" : "pr-12"}
|
|
1107
|
-
${getBorderColor()}
|
|
1108
|
-
${readOnly ? "bg-gray-50 cursor-default" : ""}
|
|
1109
|
-
`, "data-testid": "autocomplete-input" }), jsxRuntimeExports$1.jsxs("div", { className: "absolute right-3 top-1/2 transform -translate-y-1/2 flex items-center gap-2", 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: "text-gray-400 hover:text-gray-600 transition-colors", "data-testid": "autocomplete-clear", "aria-label": "Clear selection", children: jsxRuntimeExports$1.jsx(M, { className: "w-4 h-4" }) })), jsxRuntimeExports$1.jsx("button", { type: "button", onClick: handleToggle, className: `text-gray-400 transition-all ${disabled || readOnly
|
|
1110
|
-
? "cursor-not-allowed opacity-50"
|
|
1111
|
-
: "hover:text-gray-600"}`, disabled: disabled, "data-testid": "autocomplete-toggle", "aria-label": isOpen ? "Close dropdown" : "Open dropdown", children: jsxRuntimeExports$1.jsx(f, { className: `w-5 h-5 transition-transform duration-200 ${isOpen ? "rotate-180" : ""}` }) })] }), isOpen && !disabled && !readOnly && (jsxRuntimeExports$1.jsxs("div", { ref: dropdownRef, className: `
|
|
1112
|
-
absolute z-50 left-0 right-0 mt-1
|
|
1113
|
-
bg-white border-2 border-gray-200 rounded-lg shadow-lg
|
|
1114
|
-
overflow-hidden
|
|
1115
|
-
${position === "top" ? "bottom-full mb-1" : "top-full"}
|
|
1116
|
-
`, style: { maxHeight }, "data-testid": "autocomplete-dropdown", children: [loading && filteredOptions.length === 0 && (jsxRuntimeExports$1.jsxs("div", { className: "px-4 py-3 text-center text-gray-500", children: [jsxRuntimeExports$1.jsx(LoadingSpinner, { size: "sm", variant: "spinner", className: "mx-auto" }), jsxRuntimeExports$1.jsx("span", { className: "block mt-2 text-sm", children: loadingText })] })), jsxRuntimeExports$1.jsx("div", { className: "overflow-y-auto max-h-full", children: !loading && filteredOptions.length > 0 && (jsxRuntimeExports$1.jsx(jsxRuntimeExports$1.Fragment, { children: filteredOptions.map((option, index) => {
|
|
1149
|
+
return (jsxRuntimeExports$1.jsxs("div", { className: classNames(styles.container, className), children: [label && (jsxRuntimeExports$1.jsxs("label", { className: styles.label, children: [label, required && jsxRuntimeExports$1.jsx("span", { className: styles.required, children: "*" })] })), jsxRuntimeExports$1.jsxs("div", { ref: containerRef, className: styles.inputWrapper, children: [icon && jsxRuntimeExports$1.jsx("div", { className: styles.iconLeft, children: icon }), jsxRuntimeExports$1.jsx("input", { ref: inputRef, type: "text", value: displayValue, onChange: handleInputChange, onFocus: handleInputFocus, onBlur: handleInputBlur, onKeyDown: handleKeyDown, placeholder: placeholder, disabled: disabled, readOnly: readOnly || !searchable, className: getInputClassName(), "data-testid": "autocomplete-input", "data-has-error": error ? "true" : "false", "data-has-warning": warning ? "true" : "false", "data-is-focused": isFocused ? "true" : "false" }), jsxRuntimeExports$1.jsxs("div", { className: styles.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.clearButton, "data-testid": "autocomplete-clear", "aria-label": "Clear selection", children: jsxRuntimeExports$1.jsx(z, { className: "w-4 h-4" }) })), jsxRuntimeExports$1.jsx("button", { type: "button", onClick: handleToggle, className: styles.toggleButton, disabled: disabled, "data-testid": "autocomplete-toggle", "aria-label": isOpen ? "Close dropdown" : "Open dropdown", children: jsxRuntimeExports$1.jsx(L, { className: classNames(styles.toggleIcon, isOpen && styles.toggleIconOpen) }) })] }), isOpen && !disabled && !readOnly && (jsxRuntimeExports$1.jsxs("div", { ref: dropdownRef, className: classNames(styles.dropdown, position === "top" && styles.dropdownTop), style: { maxHeight }, "data-testid": "autocomplete-dropdown", children: [loading && filteredOptions.length === 0 && (jsxRuntimeExports$1.jsxs("div", { className: styles.loadingState, children: [jsxRuntimeExports$1.jsx(LoadingSpinner, { size: "sm", variant: "spinner", className: styles.loadingSpinner }), jsxRuntimeExports$1.jsx("span", { className: styles.loadingText, children: loadingText })] })), jsxRuntimeExports$1.jsx("div", { className: styles.dropdownContent, children: !loading && filteredOptions.length > 0 && (jsxRuntimeExports$1.jsx(jsxRuntimeExports$1.Fragment, { children: filteredOptions.map((option, index) => {
|
|
1117
1150
|
const isSelected = option.value === value;
|
|
1118
1151
|
const isHighlighted = index === highlightedIndex;
|
|
1119
1152
|
return (jsxRuntimeExports$1.jsx("div", { ref: (el) => {
|
|
1120
1153
|
optionRefs.current[index] = el;
|
|
1121
|
-
}, onClick: () => handleSelect(option), onMouseEnter: () => setHighlightedIndex(index), className: `
|
|
1122
|
-
px-4 py-3 cursor-pointer transition-colors flex items-center justify-between
|
|
1123
|
-
${option.disabled ? "opacity-50 cursor-not-allowed bg-gray-50" : ""}
|
|
1124
|
-
${isHighlighted && !option.disabled ? "bg-blue-50" : ""}
|
|
1125
|
-
${isSelected && !option.disabled ? "bg-blue-100" : ""}
|
|
1126
|
-
${!isHighlighted && !isSelected && !option.disabled ? "hover:bg-gray-50" : ""}
|
|
1127
|
-
`, "data-testid": `autocomplete-option-${option.value}`, children: renderOption ? (renderOption(option, isSelected)) : (jsxRuntimeExports$1.jsxs(jsxRuntimeExports$1.Fragment, { children: [jsxRuntimeExports$1.jsxs("div", { className: "flex-1", children: [jsxRuntimeExports$1.jsx("div", { className: "font-medium text-gray-900", children: highlightMatchText(option.label, searchTerm, highlightMatch) }), option.description && (jsxRuntimeExports$1.jsx("div", { className: "text-xs text-gray-500 mt-0.5", children: option.description }))] }), isSelected && (jsxRuntimeExports$1.jsx(p, { className: "w-5 h-5 text-blue-600 flex-shrink-0" }))] })) }, option.value));
|
|
1154
|
+
}, onClick: () => handleSelect(option), onMouseEnter: () => setHighlightedIndex(index), className: classNames(styles.option, option.disabled && styles.optionDisabled, isHighlighted && styles.optionHighlighted, isSelected && styles.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.optionContent, children: [jsxRuntimeExports$1.jsx("div", { className: styles.optionLabel, children: highlightMatchText(option.label, searchTerm, highlightMatch) }), option.description && (jsxRuntimeExports$1.jsx("div", { className: styles.optionDescription, children: option.description }))] }), isSelected && (jsxRuntimeExports$1.jsx(v, { className: styles.optionCheckIcon }))] })) }, option.value));
|
|
1128
1155
|
}) })) }), onCreate && searchTerm && (jsxRuntimeExports$1.jsxs("div", { onClick: () => {
|
|
1129
1156
|
onCreate(searchTerm.trim());
|
|
1130
1157
|
setIsOpen(false);
|
|
1131
1158
|
setSearchTerm("");
|
|
1132
|
-
}, className:
|
|
1133
|
-
|
|
1134
|
-
flex items-center gap-2
|
|
1135
|
-
${filteredOptions.length > 0 ? "border-t border-gray-200" : ""}
|
|
1136
|
-
transition-colors
|
|
1137
|
-
${highlightedIndex === filteredOptions.length ? "bg-blue-50" : "hover:bg-gray-50"}
|
|
1138
|
-
`, "data-testid": "autocomplete-create", children: [jsxRuntimeExports$1.jsx("span", { className: "text-blue-600 font-medium", children: "+" }), jsxRuntimeExports$1.jsxs("span", { className: "text-gray-900", children: [createLabel, " \"", searchTerm, "\""] })] })), !loading && filteredOptions.length === 0 && !onCreate && (jsxRuntimeExports$1.jsx("div", { className: "px-4 py-3 text-center text-gray-500 text-sm", children: noResultsText }))] }))] }), hint && !error && !warning && (jsxRuntimeExports$1.jsx("p", { className: "text-xs text-gray-500", children: hint })), warning && !error && (jsxRuntimeExports$1.jsxs("p", { className: "text-xs text-yellow-600 flex items-center gap-1", children: [jsxRuntimeExports$1.jsx("svg", { className: "w-4 h-4", fill: "currentColor", viewBox: "0 0 20 20", children: jsxRuntimeExports$1.jsx("path", { fillRule: "evenodd", d: "M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z", clipRule: "evenodd" }) }), warning] })), error && (jsxRuntimeExports$1.jsxs("p", { className: "text-xs text-red-600 flex items-center gap-1", children: [jsxRuntimeExports$1.jsx("svg", { className: "w-4 h-4", 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] }))] }));
|
|
1159
|
+
}, className: classNames(styles.createOption, filteredOptions.length > 0 && styles.createOptionWithBorder, highlightedIndex === filteredOptions.length &&
|
|
1160
|
+
styles.createOptionHighlighted), "data-testid": "autocomplete-create", children: [jsxRuntimeExports$1.jsx("span", { className: styles.createIcon, children: "+" }), jsxRuntimeExports$1.jsxs("span", { className: styles.createText, children: [createLabel, " \"", searchTerm, "\""] })] })), !loading && filteredOptions.length === 0 && !onCreate && (jsxRuntimeExports$1.jsx("div", { className: styles.noResults, children: noResultsText }))] }))] }), hint && !error && !warning && jsxRuntimeExports$1.jsx("p", { className: styles.hint, children: hint }), warning && !error && (jsxRuntimeExports$1.jsxs("p", { className: styles.warning, children: [jsxRuntimeExports$1.jsx("svg", { className: styles.warningIcon, fill: "currentColor", viewBox: "0 0 20 20", children: jsxRuntimeExports$1.jsx("path", { fillRule: "evenodd", d: "M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z", clipRule: "evenodd" }) }), warning] })), error && (jsxRuntimeExports$1.jsxs("p", { className: styles.error, children: [jsxRuntimeExports$1.jsx("svg", { className: styles.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] }))] }));
|
|
1139
1161
|
};
|
|
1140
1162
|
|
|
1141
1163
|
module.exports = Autocomplete;
|
package/dist/index.esm.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import require$$0
|
|
1
|
+
import * as require$$0 from 'react';
|
|
2
|
+
import require$$0__default, { useState, useRef, useMemo, useEffect } from 'react';
|
|
2
3
|
|
|
3
4
|
var jsxRuntime$1 = {exports: {}};
|
|
4
5
|
|
|
@@ -336,7 +337,7 @@ function requireReactJsxRuntime_development$1 () {
|
|
|
336
337
|
object.$$typeof === REACT_ELEMENT_TYPE
|
|
337
338
|
);
|
|
338
339
|
}
|
|
339
|
-
var React = require$$
|
|
340
|
+
var React = require$$0__default,
|
|
340
341
|
REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
|
|
341
342
|
REACT_PORTAL_TYPE = Symbol.for("react.portal"),
|
|
342
343
|
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
|
|
@@ -422,7 +423,7 @@ function requireJsxRuntime$1 () {
|
|
|
422
423
|
|
|
423
424
|
var jsxRuntimeExports$1 = requireJsxRuntime$1();
|
|
424
425
|
|
|
425
|
-
var
|
|
426
|
+
var s,o={exports:{}},t={};var n,l,a={};
|
|
426
427
|
/**
|
|
427
428
|
* @license React
|
|
428
429
|
* react-jsx-runtime.development.js
|
|
@@ -431,7 +432,7 @@ var r,s={exports:{}},o={};var t,n,l={};
|
|
|
431
432
|
*
|
|
432
433
|
* This source code is licensed under the MIT license found in the
|
|
433
434
|
* LICENSE file in the root directory of this source tree.
|
|
434
|
-
*/function
|
|
435
|
+
*/function i(){return n||(n=1,"production"!==process.env.NODE_ENV&&function(){function e(r){if(null==r)return null;if("function"==typeof r)return r.$$typeof===M?null:r.displayName||r.name||null;if("string"==typeof r)return r;switch(r){case x:return "Fragment";case v:return "Profiler";case p:return "StrictMode";case k:return "Suspense";case C:return "SuspenseList";case N:return "Activity"}if("object"==typeof r)switch("number"==typeof r.tag&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),r.$$typeof){case u:return "Portal";case j:return r.displayName||"Context";case g:return (r._context.displayName||"Context")+".Consumer";case f:var s=r.render;return (r=r.displayName)||(r=""!==(r=s.displayName||s.name||"")?"ForwardRef("+r+")":"ForwardRef"),r;case y:return null!==(s=r.displayName||null)?s:e(r.type)||"Memo";case L:s=r._payload,r=r._init;try{return e(r(s))}catch(e){}}return null}function s(e){return ""+e}function o(e){try{s(e);var r=!1;}catch(e){r=true;}if(r){var o=(r=console).error,t="function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return o.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",t),s(e)}}function t(r){if(r===x)return "<>";if("object"==typeof r&&null!==r&&r.$$typeof===L)return "<...>";try{var s=e(r);return s?"<"+s+">":"<...>"}catch(e){return "<...>"}}function n(){return Error("react-stack-top-frame")}function l(){var r=e(this.type);return B[r]||(B[r]=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!==(r=this.props.ref)?r:null}function i(r,s,t,n,a,i){var h,m=s.children;if(void 0!==m)if(n)if(z(m)){for(n=0;n<m.length;n++)c(m[n]);Object.freeze&&Object.freeze(m);}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else c(m);if($.call(s,"key")){m=e(r);var u=Object.keys(s).filter(function(e){return "key"!==e});n=0<u.length?"{key: someKey, "+u.join(": ..., ")+": ...}":"{key: someKey}",_[m+n]||(u=0<u.length?"{"+u.join(": ..., ")+": ...}":"{}",console.error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',n,m,u,m),_[m+n]=true);}if(m=null,void 0!==t&&(o(t),m=""+t),function(e){if($.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return false}return void 0!==e.key}(s)&&(o(s.key),m=""+s.key),"key"in s)for(var x in t={},s)"key"!==x&&(t[x]=s[x]);else t=s;return m&&function(e,r){function s(){d||(d=true,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",r));}s.isReactWarning=true,Object.defineProperty(e,"key",{get:s,configurable:true});}(t,"function"==typeof r?r.displayName||r.name||"Unknown":r),function(e,r,s,o,t,n){var a=s.ref;return e={$$typeof:w,type:e,key:r,props:s,_owner:o},null!==(void 0!==a?a:null)?Object.defineProperty(e,"ref",{enumerable:false,get:l}):Object.defineProperty(e,"ref",{enumerable:false,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:false,enumerable:false,writable:true,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:false,enumerable:false,writable:true,value:null}),Object.defineProperty(e,"_debugStack",{configurable:false,enumerable:false,writable:true,value:t}),Object.defineProperty(e,"_debugTask",{configurable:false,enumerable:false,writable:true,value:n}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}(r,m,t,null===(h=b.A)?null:h.getOwner(),a,i)}function c(e){h(e)?e._store&&(e._store.validated=1):"object"==typeof e&&null!==e&&e.$$typeof===L&&("fulfilled"===e._payload.status?h(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1));}function h(e){return "object"==typeof e&&null!==e&&e.$$typeof===w}var d,m=require$$0__default,w=Symbol.for("react.transitional.element"),u=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),p=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),g=Symbol.for("react.consumer"),j=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),k=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),y=Symbol.for("react.memo"),L=Symbol.for("react.lazy"),N=Symbol.for("react.activity"),M=Symbol.for("react.client.reference"),b=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$=Object.prototype.hasOwnProperty,z=Array.isArray,H=console.createTask?console.createTask:function(){return null},B={},W=(m={react_stack_bottom_frame:function(e){return e()}}).react_stack_bottom_frame.bind(m,n)(),V=H(t(n)),_={};a.Fragment=x,a.jsx=function(e,r,s){var o=1e4>b.recentlyCreatedOwnerStacks++;return i(e,r,s,false,o?Error("react-stack-top-frame"):W,o?H(t(e)):V)},a.jsxs=function(e,r,s){var o=1e4>b.recentlyCreatedOwnerStacks++;return i(e,r,s,true,o?Error("react-stack-top-frame"):W,o?H(t(e)):V)};}()),a}var c=(l||(l=1,"production"===process.env.NODE_ENV?o.exports=function(){if(s)return t;s=1;var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function o(r,s,o){var t=null;if(void 0!==o&&(t=""+o),void 0!==s.key&&(t=""+s.key),"key"in s)for(var n in o={},s)"key"!==n&&(o[n]=s[n]);else o=s;return s=o.ref,{$$typeof:e,type:r,key:t,ref:void 0!==s?s:null,props:o}}return t.Fragment=r,t.jsx=o,t.jsxs=o,t}():o.exports=i()),o.exports);function v({className:e="",size:r="md"}){const s=`${{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"}[r]} ${e}`;return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:s,"aria-label":"Check",children:c.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 L=({className:e="",size:r="md",color:s="currentColor",direction:o="down"})=>c.jsx("svg",{className:`${{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"}[r]} ${{up:"rotate-180",down:"",left:"rotate-90",right:"-rotate-90"}[o]} ${e}`,fill:"none",stroke:s,viewBox:"0 0 24 24",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:c.jsx("path",{d:"M6 9l6 6 6-6"})});function z({className:e="",size:r="md",color:s="currentColor"}){return c.jsx("svg",{className:`${{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"}[r]} ${e}`,fill:"none",stroke:s,viewBox:"0 0 24 24",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:c.jsx("path",{d:"M6 18L18 6M6 6l12 12"})})}const Ae={outlined:"material-symbols-outlined",rounded:"material-symbols-rounded",sharp:"material-symbols-sharp"},Ee=require$$0.forwardRef(({name:e,variant:r="outlined",size:s="md",fill:o=0,weight:t=400,grade:n=0,opticalSize:l=24,style:a,className:i,...h},d)=>{const m=(e=>"number"==typeof e?e:"sm"===e?16:"md"===e?20:24)(s),w=`"FILL" ${o}, "wght" ${t}, "GRAD" ${n}, "opsz" ${l}`;return c.jsx("span",{ref:d,"aria-hidden":"true",className:Ae[r]+(i?` ${i}`:""),style:{fontVariationSettings:w,fontSize:m,lineHeight:1,display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",...a},...h,children:e})});Ee.displayName="MaterialIcon";
|
|
435
436
|
|
|
436
437
|
var jsxRuntime = {exports: {}};
|
|
437
438
|
|
|
@@ -769,7 +770,7 @@ function requireReactJsxRuntime_development () {
|
|
|
769
770
|
object.$$typeof === REACT_ELEMENT_TYPE
|
|
770
771
|
);
|
|
771
772
|
}
|
|
772
|
-
var React = require$$
|
|
773
|
+
var React = require$$0__default,
|
|
773
774
|
REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
|
|
774
775
|
REACT_PORTAL_TYPE = Symbol.for("react.portal"),
|
|
775
776
|
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
|
|
@@ -855,6 +856,40 @@ function requireJsxRuntime () {
|
|
|
855
856
|
|
|
856
857
|
var jsxRuntimeExports = requireJsxRuntime();
|
|
857
858
|
|
|
859
|
+
function styleInject$1(css, ref) {
|
|
860
|
+
if ( ref === void 0 ) ref = {};
|
|
861
|
+
var insertAt = ref.insertAt;
|
|
862
|
+
|
|
863
|
+
if (typeof document === 'undefined') { return; }
|
|
864
|
+
|
|
865
|
+
var head = document.head || document.getElementsByTagName('head')[0];
|
|
866
|
+
var style = document.createElement('style');
|
|
867
|
+
style.type = 'text/css';
|
|
868
|
+
|
|
869
|
+
if (insertAt === 'top') {
|
|
870
|
+
if (head.firstChild) {
|
|
871
|
+
head.insertBefore(style, head.firstChild);
|
|
872
|
+
} else {
|
|
873
|
+
head.appendChild(style);
|
|
874
|
+
}
|
|
875
|
+
} else {
|
|
876
|
+
head.appendChild(style);
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
if (style.styleSheet) {
|
|
880
|
+
style.styleSheet.cssText = css;
|
|
881
|
+
} else {
|
|
882
|
+
style.appendChild(document.createTextNode(css));
|
|
883
|
+
}
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
var css_248z$1 = "/* Container */\n.LoadingSpinner-module_container__PHl1j {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.LoadingSpinner-module_containerInline__eD4FZ {\n display: inline-flex;\n}\n\n/* Inner wrapper */\n.LoadingSpinner-module_inner__SvATp {\n text-align: center;\n}\n\n.LoadingSpinner-module_innerInline__MPS3Y {\n display: inline-flex;\n}\n\n/* Spinner base */\n.LoadingSpinner-module_spinner__vu6Ri {\n border-radius: 9999px;\n border-width: 2px;\n animation: LoadingSpinner-module_spin__vEieX 1s linear infinite;\n}\n\n/* Sizes */\n.LoadingSpinner-module_sizeSm__tL-IR {\n height: 1rem;\n width: 1rem;\n}\n\n.LoadingSpinner-module_sizeMd__AT592 {\n height: 2rem;\n width: 2rem;\n}\n\n.LoadingSpinner-module_sizeLg__jyX27 {\n height: 3rem;\n width: 3rem;\n}\n\n/* Colors - spinner */\n.LoadingSpinner-module_colorBlue__Jtuu1 {\n border-color: #2563eb;\n}\n\n.LoadingSpinner-module_colorGray__-EMqs {\n border-color: #4b5563;\n}\n\n.LoadingSpinner-module_colorWhite__95Hoo {\n border-color: #ffffff;\n}\n\n/* Spinner transparent borders */\n.LoadingSpinner-module_spinnerTransparent__G3zcb {\n border-top-color: transparent;\n border-right-color: transparent;\n}\n\n/* Spacing */\n.LoadingSpinner-module_spacingDefault__8At6H {\n margin: 0 auto 1rem auto;\n}\n\n/* Dots container */\n.LoadingSpinner-module_dotsContainer__l3FsV {\n display: flex;\n gap: 0.25rem;\n}\n\n.LoadingSpinner-module_dotsContainerInline__Kl4Fz {\n display: flex;\n gap: 0.25rem;\n}\n\n/* Dot sizes */\n.LoadingSpinner-module_dotSizeSm__YuBra {\n height: 0.375rem;\n width: 0.375rem;\n}\n\n.LoadingSpinner-module_dotSizeMd__rXeyS {\n height: 0.625rem;\n width: 0.625rem;\n}\n\n.LoadingSpinner-module_dotSizeLg__M8etz {\n height: 0.875rem;\n width: 0.875rem;\n}\n\n/* Dot colors */\n.LoadingSpinner-module_dotColorBlue__5evmc {\n background-color: #2563eb;\n}\n\n.LoadingSpinner-module_dotColorGray__dr80J {\n background-color: #4b5563;\n}\n\n.LoadingSpinner-module_dotColorWhite__54ur- {\n background-color: #ffffff;\n}\n\n/* Dot */\n.LoadingSpinner-module_dot__tz0lA {\n border-radius: 9999px;\n animation: LoadingSpinner-module_bounce__7Raih 1s ease-in-out infinite;\n}\n\n.LoadingSpinner-module_dotDelay1__-94Os {\n animation-delay: 0ms;\n}\n\n.LoadingSpinner-module_dotDelay2__Oy8E- {\n animation-delay: 150ms;\n}\n\n.LoadingSpinner-module_dotDelay3__7EZYH {\n animation-delay: 300ms;\n}\n\n/* Pulse */\n.LoadingSpinner-module_pulse__gKUHJ {\n border-radius: 9999px;\n animation: LoadingSpinner-module_pulse__gKUHJ 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;\n}\n\n/* Ring */\n.LoadingSpinner-module_ringContainer__4p8NG {\n position: relative;\n}\n\n.LoadingSpinner-module_ringBackground__aF2w1 {\n position: absolute;\n inset: 0;\n border-radius: 9999px;\n border-width: 2px;\n opacity: 0.25;\n}\n\n.LoadingSpinner-module_ringSpinner__b92-S {\n position: absolute;\n inset: 0;\n border-radius: 9999px;\n border-width: 2px;\n border-color: transparent;\n animation: LoadingSpinner-module_spin__vEieX 1s linear infinite;\n}\n\n.LoadingSpinner-module_ringSpinnerBlue__zGTgw {\n border-top-color: #2563eb;\n}\n\n.LoadingSpinner-module_ringSpinnerGray__kHnkJ {\n border-top-color: #4b5563;\n}\n\n.LoadingSpinner-module_ringSpinnerWhite__yu8d0 {\n border-top-color: #ffffff;\n}\n\n.LoadingSpinner-module_ringTransparent__DTSbu {\n border-right-color: transparent;\n border-bottom-color: transparent;\n border-left-color: transparent;\n}\n\n/* Message */\n.LoadingSpinner-module_message__FoOvh {\n color: #4b5563;\n font-size: 0.875rem;\n line-height: 1.25rem;\n margin-top: 0.5rem;\n}\n\n/* Animations */\n@keyframes LoadingSpinner-module_spin__vEieX {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n\n@keyframes LoadingSpinner-module_bounce__7Raih {\n 0%,\n 100% {\n transform: translateY(0);\n animation-timing-function: cubic-bezier(0, 0, 0.2, 1);\n }\n 50% {\n transform: translateY(-25%);\n animation-timing-function: cubic-bezier(0.8, 0, 1, 1);\n }\n}\n\n@keyframes LoadingSpinner-module_pulse__gKUHJ {\n 0%,\n 100% {\n opacity: 1;\n }\n 50% {\n opacity: 0.5;\n }\n}\n";
|
|
887
|
+
var styles$1 = {"container":"LoadingSpinner-module_container__PHl1j","containerInline":"LoadingSpinner-module_containerInline__eD4FZ","inner":"LoadingSpinner-module_inner__SvATp","innerInline":"LoadingSpinner-module_innerInline__MPS3Y","spinner":"LoadingSpinner-module_spinner__vu6Ri","spin":"LoadingSpinner-module_spin__vEieX","sizeSm":"LoadingSpinner-module_sizeSm__tL-IR","sizeMd":"LoadingSpinner-module_sizeMd__AT592","sizeLg":"LoadingSpinner-module_sizeLg__jyX27","colorBlue":"LoadingSpinner-module_colorBlue__Jtuu1","colorGray":"LoadingSpinner-module_colorGray__-EMqs","colorWhite":"LoadingSpinner-module_colorWhite__95Hoo","spinnerTransparent":"LoadingSpinner-module_spinnerTransparent__G3zcb","spacingDefault":"LoadingSpinner-module_spacingDefault__8At6H","dotsContainer":"LoadingSpinner-module_dotsContainer__l3FsV","dotsContainerInline":"LoadingSpinner-module_dotsContainerInline__Kl4Fz","dotSizeSm":"LoadingSpinner-module_dotSizeSm__YuBra","dotSizeMd":"LoadingSpinner-module_dotSizeMd__rXeyS","dotSizeLg":"LoadingSpinner-module_dotSizeLg__M8etz","dotColorBlue":"LoadingSpinner-module_dotColorBlue__5evmc","dotColorGray":"LoadingSpinner-module_dotColorGray__dr80J","dotColorWhite":"LoadingSpinner-module_dotColorWhite__54ur-","dot":"LoadingSpinner-module_dot__tz0lA","bounce":"LoadingSpinner-module_bounce__7Raih","dotDelay1":"LoadingSpinner-module_dotDelay1__-94Os","dotDelay2":"LoadingSpinner-module_dotDelay2__Oy8E-","dotDelay3":"LoadingSpinner-module_dotDelay3__7EZYH","pulse":"LoadingSpinner-module_pulse__gKUHJ","ringContainer":"LoadingSpinner-module_ringContainer__4p8NG","ringBackground":"LoadingSpinner-module_ringBackground__aF2w1","ringSpinner":"LoadingSpinner-module_ringSpinner__b92-S","ringSpinnerBlue":"LoadingSpinner-module_ringSpinnerBlue__zGTgw","ringSpinnerGray":"LoadingSpinner-module_ringSpinnerGray__kHnkJ","ringSpinnerWhite":"LoadingSpinner-module_ringSpinnerWhite__yu8d0","ringTransparent":"LoadingSpinner-module_ringTransparent__DTSbu","message":"LoadingSpinner-module_message__FoOvh"};
|
|
888
|
+
styleInject$1(css_248z$1);
|
|
889
|
+
|
|
890
|
+
function classNames$1(...classes) {
|
|
891
|
+
return classes.filter(Boolean).join(" ");
|
|
892
|
+
}
|
|
858
893
|
/**
|
|
859
894
|
* LoadingSpinner component
|
|
860
895
|
* Displays a loading indicator with multiple style variants
|
|
@@ -864,65 +899,69 @@ var jsxRuntimeExports = requireJsxRuntime();
|
|
|
864
899
|
* @param color - Color scheme: 'blue' (default), 'gray', 'white'
|
|
865
900
|
*/
|
|
866
901
|
const LoadingSpinner = ({ message, size = "md", className = "", variant = "spinner", inline = false, color = "blue", }) => {
|
|
867
|
-
const
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
};
|
|
872
|
-
const colorClasses = {
|
|
873
|
-
blue: "border-blue-600",
|
|
874
|
-
gray: "border-gray-600",
|
|
875
|
-
white: "border-white",
|
|
876
|
-
};
|
|
877
|
-
const dotColorClasses = {
|
|
878
|
-
blue: "bg-blue-600",
|
|
879
|
-
gray: "bg-gray-600",
|
|
880
|
-
white: "bg-white",
|
|
881
|
-
};
|
|
882
|
-
const dotSizeClasses = {
|
|
883
|
-
sm: "h-1.5 w-1.5",
|
|
884
|
-
md: "h-2.5 w-2.5",
|
|
885
|
-
lg: "h-3.5 w-3.5",
|
|
886
|
-
};
|
|
902
|
+
const sizeClass = styles$1[`size${size.charAt(0).toUpperCase() + size.slice(1)}`];
|
|
903
|
+
const colorClass = styles$1[`color${color.charAt(0).toUpperCase() + color.slice(1)}`];
|
|
904
|
+
const dotColorClass = styles$1[`dotColor${color.charAt(0).toUpperCase() + color.slice(1)}`];
|
|
905
|
+
const dotSizeClass = styles$1[`dotSize${size.charAt(0).toUpperCase() + size.slice(1)}`];
|
|
887
906
|
// Spinner variant (circular border)
|
|
888
907
|
if (variant === "spinner") {
|
|
889
|
-
return (jsxRuntimeExports.jsx("div", { className: inline ? className :
|
|
890
|
-
borderTopColor: "transparent",
|
|
891
|
-
borderRightColor: "transparent",
|
|
892
|
-
} }), message && jsxRuntimeExports.jsx("p", { className: "text-gray-600 text-sm mt-2", children: message })] }) }));
|
|
908
|
+
return (jsxRuntimeExports.jsx("div", { className: classNames$1(inline ? styles$1.containerInline : styles$1.container, className), "data-testid": "loading-spinner", "data-variant": variant, "data-size": size, "data-color": color, children: jsxRuntimeExports.jsxs("div", { className: inline ? styles$1.innerInline : styles$1.inner, children: [jsxRuntimeExports.jsx("div", { className: classNames$1(styles$1.spinner, styles$1.spinnerTransparent, colorClass, sizeClass, !inline ? styles$1.spacingDefault : undefined) }), message && jsxRuntimeExports.jsx("p", { className: styles$1.message, children: message })] }) }));
|
|
893
909
|
}
|
|
894
910
|
// Dots variant (three bouncing dots)
|
|
895
911
|
if (variant === "dots") {
|
|
896
|
-
return (jsxRuntimeExports.jsx("div", { className: inline ? className :
|
|
912
|
+
return (jsxRuntimeExports.jsx("div", { className: classNames$1(inline ? styles$1.containerInline : styles$1.container, className), "data-testid": "loading-spinner", "data-variant": variant, "data-size": size, "data-color": color, children: jsxRuntimeExports.jsxs("div", { className: inline ? styles$1.innerInline : styles$1.inner, children: [jsxRuntimeExports.jsxs("div", { className: classNames$1(inline ? styles$1.dotsContainerInline : styles$1.dotsContainer, !inline ? styles$1.spacingDefault : undefined), children: [jsxRuntimeExports.jsx("div", { className: classNames$1(styles$1.dot, dotSizeClass, dotColorClass, styles$1.dotDelay1) }), jsxRuntimeExports.jsx("div", { className: classNames$1(styles$1.dot, dotSizeClass, dotColorClass, styles$1.dotDelay2) }), jsxRuntimeExports.jsx("div", { className: classNames$1(styles$1.dot, dotSizeClass, dotColorClass, styles$1.dotDelay3) })] }), message && jsxRuntimeExports.jsx("p", { className: styles$1.message, children: message })] }) }));
|
|
897
913
|
}
|
|
898
914
|
// Pulse variant (pulsing circle)
|
|
899
915
|
if (variant === "pulse") {
|
|
900
|
-
return (jsxRuntimeExports.jsx("div", { className: inline ? className :
|
|
916
|
+
return (jsxRuntimeExports.jsx("div", { className: classNames$1(inline ? styles$1.containerInline : styles$1.container, className), "data-testid": "loading-spinner", "data-variant": variant, "data-size": size, "data-color": color, children: jsxRuntimeExports.jsxs("div", { className: inline ? styles$1.innerInline : styles$1.inner, children: [jsxRuntimeExports.jsx("div", { className: classNames$1(styles$1.pulse, sizeClass, dotColorClass, !inline ? styles$1.spacingDefault : undefined) }), message && jsxRuntimeExports.jsx("p", { className: styles$1.message, children: message })] }) }));
|
|
901
917
|
}
|
|
902
918
|
// Ring variant (rotating ring with gradient)
|
|
903
919
|
if (variant === "ring") {
|
|
904
|
-
const
|
|
905
|
-
|
|
906
|
-
gray: "border-gray-600",
|
|
907
|
-
white: "border-white",
|
|
908
|
-
};
|
|
909
|
-
return (jsxRuntimeExports.jsx("div", { className: inline ? className : `flex justify-center items-center ${className}`, children: jsxRuntimeExports.jsxs("div", { className: inline ? "" : "text-center", children: [jsxRuntimeExports.jsxs("div", { className: `relative ${sizeClasses[size]} ${inline ? "" : "mx-auto mb-4"}`, children: [jsxRuntimeExports.jsx("div", { className: `absolute inset-0 rounded-full border-2 ${colorClasses[color]} opacity-25` }), jsxRuntimeExports.jsx("div", { className: `absolute inset-0 rounded-full border-2 border-transparent ${ringColorMap[color]} animate-spin`, style: {
|
|
910
|
-
borderTopColor: "currentColor",
|
|
911
|
-
borderRightColor: "transparent",
|
|
912
|
-
borderBottomColor: "transparent",
|
|
913
|
-
borderLeftColor: "transparent",
|
|
914
|
-
} })] }), message && jsxRuntimeExports.jsx("p", { className: "text-gray-600 text-sm mt-2", children: message })] }) }));
|
|
920
|
+
const ringSpinnerColorClass = styles$1[`ringSpinner${color.charAt(0).toUpperCase() + color.slice(1)}`];
|
|
921
|
+
return (jsxRuntimeExports.jsx("div", { className: classNames$1(inline ? styles$1.containerInline : styles$1.container, className), "data-testid": "loading-spinner", "data-variant": variant, "data-size": size, "data-color": color, children: jsxRuntimeExports.jsxs("div", { className: inline ? styles$1.innerInline : styles$1.inner, children: [jsxRuntimeExports.jsxs("div", { className: classNames$1(styles$1.ringContainer, sizeClass, !inline ? styles$1.spacingDefault : undefined), children: [jsxRuntimeExports.jsx("div", { className: classNames$1(styles$1.ringBackground, colorClass) }), jsxRuntimeExports.jsx("div", { className: classNames$1(styles$1.ringSpinner, styles$1.ringTransparent, ringSpinnerColorClass) })] }), message && jsxRuntimeExports.jsx("p", { className: styles$1.message, children: message })] }) }));
|
|
915
922
|
}
|
|
916
923
|
return null;
|
|
917
924
|
};
|
|
918
925
|
|
|
926
|
+
function styleInject(css, ref) {
|
|
927
|
+
if ( ref === void 0 ) ref = {};
|
|
928
|
+
var insertAt = ref.insertAt;
|
|
929
|
+
|
|
930
|
+
if (typeof document === 'undefined') { return; }
|
|
931
|
+
|
|
932
|
+
var head = document.head || document.getElementsByTagName('head')[0];
|
|
933
|
+
var style = document.createElement('style');
|
|
934
|
+
style.type = 'text/css';
|
|
935
|
+
|
|
936
|
+
if (insertAt === 'top') {
|
|
937
|
+
if (head.firstChild) {
|
|
938
|
+
head.insertBefore(style, head.firstChild);
|
|
939
|
+
} else {
|
|
940
|
+
head.appendChild(style);
|
|
941
|
+
}
|
|
942
|
+
} else {
|
|
943
|
+
head.appendChild(style);
|
|
944
|
+
}
|
|
945
|
+
|
|
946
|
+
if (style.styleSheet) {
|
|
947
|
+
style.styleSheet.cssText = css;
|
|
948
|
+
} else {
|
|
949
|
+
style.appendChild(document.createTextNode(css));
|
|
950
|
+
}
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
var css_248z = ".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: #374151;\n}\n\n.Autocomplete-module_required__N3ZwR {\n color: #ef4444;\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: #9ca3af;\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 #d1d5db;\n transition:\n border-color 150ms ease,\n box-shadow 150ms ease;\n outline: none;\n font-weight: 500;\n color: #111827;\n}\n\n.Autocomplete-module_input__ZShCt::placeholder {\n color: #9ca3af;\n}\n\n.Autocomplete-module_input__ZShCt:disabled {\n background: #f3f4f6;\n color: #6b7280;\n cursor: not-allowed;\n}\n\n.Autocomplete-module_input__ZShCt:hover:not(:disabled):not(:focus) {\n border-color: #9ca3af;\n}\n\n.Autocomplete-module_input__ZShCt:focus {\n border-color: #3b82f6;\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: #f9fafb;\n cursor: default;\n}\n\n.Autocomplete-module_inputError__Kdk14 {\n border-color: #ef4444;\n}\n\n.Autocomplete-module_inputError__Kdk14:focus {\n border-color: #ef4444;\n box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);\n}\n\n.Autocomplete-module_inputWarning__XTQux {\n border-color: #eab308;\n}\n\n.Autocomplete-module_inputWarning__XTQux:focus {\n border-color: #eab308;\n box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.1);\n}\n\n.Autocomplete-module_inputFocused__1zKVR {\n border-color: #3b82f6;\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: #9ca3af;\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: #4b5563;\n}\n\n.Autocomplete-module_toggleButton__nxFFh {\n color: #9ca3af;\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: #4b5563;\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: #ffffff;\n border: 2px solid #e5e7eb;\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: #6b7280;\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: #f9fafb;\n}\n\n.Autocomplete-module_optionDisabled__kkjS2 {\n opacity: 0.5;\n cursor: not-allowed;\n background: #f9fafb;\n}\n\n.Autocomplete-module_optionHighlighted__WpIwj:not(.Autocomplete-module_optionDisabled__kkjS2) {\n background: #eff6ff;\n}\n\n.Autocomplete-module_optionSelected__CeDeN:not(.Autocomplete-module_optionDisabled__kkjS2) {\n background: #dbeafe;\n}\n\n.Autocomplete-module_optionContent__TzYTm {\n flex: 1;\n}\n\n.Autocomplete-module_optionLabel__5FOIH {\n font-weight: 500;\n color: #111827;\n}\n\n.Autocomplete-module_optionDescription__0HEsl {\n font-size: 0.75rem;\n line-height: 1rem;\n color: #6b7280;\n margin-top: 0.125rem;\n}\n\n.Autocomplete-module_optionCheckIcon__MEavu {\n width: 1.25rem;\n height: 1.25rem;\n color: #3b82f6;\n flex-shrink: 0;\n}\n\n.Autocomplete-module_highlight__MW3bw {\n background: #fef08a;\n font-weight: 600;\n color: #111827;\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: #f9fafb;\n}\n\n.Autocomplete-module_createOptionWithBorder__BX0mv {\n border-top: 1px solid #e5e7eb;\n}\n\n.Autocomplete-module_createOptionHighlighted__-3e6V {\n background: #eff6ff;\n}\n\n.Autocomplete-module_createIcon__wh5Nu {\n color: #3b82f6;\n font-weight: 500;\n}\n\n.Autocomplete-module_createText__V9uqQ {\n color: #111827;\n}\n\n.Autocomplete-module_noResults__rAoto {\n padding: 0.75rem 1rem;\n text-align: center;\n color: #6b7280;\n font-size: 0.875rem;\n}\n\n.Autocomplete-module_hint__E-DXp {\n font-size: 0.75rem;\n line-height: 1rem;\n color: #6b7280;\n}\n\n.Autocomplete-module_warning__6-JRr {\n font-size: 0.75rem;\n line-height: 1rem;\n color: #ca8a04;\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: #dc2626;\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";
|
|
954
|
+
var styles = {"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","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"};
|
|
955
|
+
styleInject(css_248z);
|
|
956
|
+
|
|
957
|
+
const classNames = (...classes) => classes.filter(Boolean).join(" ");
|
|
919
958
|
// Helper function to highlight matching text
|
|
920
959
|
const highlightMatchText = (text, search, shouldHighlight = true) => {
|
|
921
960
|
if (!shouldHighlight || !search || !text)
|
|
922
961
|
return text;
|
|
923
962
|
const regex = new RegExp(`(${search.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")})`, "gi");
|
|
924
963
|
const parts = text.split(regex);
|
|
925
|
-
return (jsxRuntimeExports$1.jsx(jsxRuntimeExports$1.Fragment, { children: parts.map((part, index) => regex.test(part) ? (jsxRuntimeExports$1.jsx("mark", { className:
|
|
964
|
+
return (jsxRuntimeExports$1.jsx(jsxRuntimeExports$1.Fragment, { children: parts.map((part, index) => regex.test(part) ? (jsxRuntimeExports$1.jsx("mark", { className: styles.highlight, children: part }, index)) : (jsxRuntimeExports$1.jsx("span", { children: part }, index))) }));
|
|
926
965
|
};
|
|
927
966
|
const Autocomplete = ({ label, value, onChange, options = [], placeholder = "Search or select...", error, warning, hint, required = false, disabled = false, loading = false, searchable = true, clearable = true, icon, className = "", maxHeight = "300px", onCreate, onSearch, readOnly = false, renderOption, onBlur, onFocus, createLabel = "Create", noResultsText = "No results found", loadingText = "Loading...", highlightMatch = true, minSearchLength = 0, debounceMs = 300, keepListOpen = false, position = "bottom", }) => {
|
|
928
967
|
const [isOpen, setIsOpen] = useState(false);
|
|
@@ -1084,56 +1123,21 @@ const Autocomplete = ({ label, value, onChange, options = [], placeholder = "Sea
|
|
|
1084
1123
|
break;
|
|
1085
1124
|
}
|
|
1086
1125
|
};
|
|
1087
|
-
const
|
|
1088
|
-
|
|
1089
|
-
return "border-red-500 focus:border-red-500 focus:ring-2 focus:ring-red-200";
|
|
1090
|
-
}
|
|
1091
|
-
if (warning) {
|
|
1092
|
-
return "border-yellow-500 focus:border-yellow-500 focus:ring-2 focus:ring-yellow-200";
|
|
1093
|
-
}
|
|
1094
|
-
if (isFocused) {
|
|
1095
|
-
return "border-blue-500 focus:ring-2 focus:ring-blue-200";
|
|
1096
|
-
}
|
|
1097
|
-
return "border-gray-300 hover:border-gray-400 focus:border-blue-500 focus:ring-2 focus:ring-blue-200";
|
|
1126
|
+
const getInputClassName = () => {
|
|
1127
|
+
return classNames(styles.input, icon ? styles.inputWithIcon : undefined, clearable && value ? styles.inputWithClear : styles.inputWithoutClear, readOnly ? styles.inputReadOnly : undefined, error ? styles.inputError : undefined, warning && !error ? styles.inputWarning : undefined, isFocused && !error && !warning ? styles.inputFocused : undefined);
|
|
1098
1128
|
};
|
|
1099
|
-
return (jsxRuntimeExports$1.jsxs("div", { className:
|
|
1100
|
-
w-full px-4 py-2 rounded-lg border-2 transition-all outline-none
|
|
1101
|
-
font-medium text-gray-900 placeholder-gray-400
|
|
1102
|
-
disabled:bg-gray-100 disabled:text-gray-500 disabled:cursor-not-allowed
|
|
1103
|
-
${icon ? "pl-10" : ""}
|
|
1104
|
-
${clearable && value ? "pr-20" : "pr-12"}
|
|
1105
|
-
${getBorderColor()}
|
|
1106
|
-
${readOnly ? "bg-gray-50 cursor-default" : ""}
|
|
1107
|
-
`, "data-testid": "autocomplete-input" }), jsxRuntimeExports$1.jsxs("div", { className: "absolute right-3 top-1/2 transform -translate-y-1/2 flex items-center gap-2", 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: "text-gray-400 hover:text-gray-600 transition-colors", "data-testid": "autocomplete-clear", "aria-label": "Clear selection", children: jsxRuntimeExports$1.jsx(M, { className: "w-4 h-4" }) })), jsxRuntimeExports$1.jsx("button", { type: "button", onClick: handleToggle, className: `text-gray-400 transition-all ${disabled || readOnly
|
|
1108
|
-
? "cursor-not-allowed opacity-50"
|
|
1109
|
-
: "hover:text-gray-600"}`, disabled: disabled, "data-testid": "autocomplete-toggle", "aria-label": isOpen ? "Close dropdown" : "Open dropdown", children: jsxRuntimeExports$1.jsx(f, { className: `w-5 h-5 transition-transform duration-200 ${isOpen ? "rotate-180" : ""}` }) })] }), isOpen && !disabled && !readOnly && (jsxRuntimeExports$1.jsxs("div", { ref: dropdownRef, className: `
|
|
1110
|
-
absolute z-50 left-0 right-0 mt-1
|
|
1111
|
-
bg-white border-2 border-gray-200 rounded-lg shadow-lg
|
|
1112
|
-
overflow-hidden
|
|
1113
|
-
${position === "top" ? "bottom-full mb-1" : "top-full"}
|
|
1114
|
-
`, style: { maxHeight }, "data-testid": "autocomplete-dropdown", children: [loading && filteredOptions.length === 0 && (jsxRuntimeExports$1.jsxs("div", { className: "px-4 py-3 text-center text-gray-500", children: [jsxRuntimeExports$1.jsx(LoadingSpinner, { size: "sm", variant: "spinner", className: "mx-auto" }), jsxRuntimeExports$1.jsx("span", { className: "block mt-2 text-sm", children: loadingText })] })), jsxRuntimeExports$1.jsx("div", { className: "overflow-y-auto max-h-full", children: !loading && filteredOptions.length > 0 && (jsxRuntimeExports$1.jsx(jsxRuntimeExports$1.Fragment, { children: filteredOptions.map((option, index) => {
|
|
1129
|
+
return (jsxRuntimeExports$1.jsxs("div", { className: classNames(styles.container, className), children: [label && (jsxRuntimeExports$1.jsxs("label", { className: styles.label, children: [label, required && jsxRuntimeExports$1.jsx("span", { className: styles.required, children: "*" })] })), jsxRuntimeExports$1.jsxs("div", { ref: containerRef, className: styles.inputWrapper, children: [icon && jsxRuntimeExports$1.jsx("div", { className: styles.iconLeft, children: icon }), jsxRuntimeExports$1.jsx("input", { ref: inputRef, type: "text", value: displayValue, onChange: handleInputChange, onFocus: handleInputFocus, onBlur: handleInputBlur, onKeyDown: handleKeyDown, placeholder: placeholder, disabled: disabled, readOnly: readOnly || !searchable, className: getInputClassName(), "data-testid": "autocomplete-input", "data-has-error": error ? "true" : "false", "data-has-warning": warning ? "true" : "false", "data-is-focused": isFocused ? "true" : "false" }), jsxRuntimeExports$1.jsxs("div", { className: styles.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.clearButton, "data-testid": "autocomplete-clear", "aria-label": "Clear selection", children: jsxRuntimeExports$1.jsx(z, { className: "w-4 h-4" }) })), jsxRuntimeExports$1.jsx("button", { type: "button", onClick: handleToggle, className: styles.toggleButton, disabled: disabled, "data-testid": "autocomplete-toggle", "aria-label": isOpen ? "Close dropdown" : "Open dropdown", children: jsxRuntimeExports$1.jsx(L, { className: classNames(styles.toggleIcon, isOpen && styles.toggleIconOpen) }) })] }), isOpen && !disabled && !readOnly && (jsxRuntimeExports$1.jsxs("div", { ref: dropdownRef, className: classNames(styles.dropdown, position === "top" && styles.dropdownTop), style: { maxHeight }, "data-testid": "autocomplete-dropdown", children: [loading && filteredOptions.length === 0 && (jsxRuntimeExports$1.jsxs("div", { className: styles.loadingState, children: [jsxRuntimeExports$1.jsx(LoadingSpinner, { size: "sm", variant: "spinner", className: styles.loadingSpinner }), jsxRuntimeExports$1.jsx("span", { className: styles.loadingText, children: loadingText })] })), jsxRuntimeExports$1.jsx("div", { className: styles.dropdownContent, children: !loading && filteredOptions.length > 0 && (jsxRuntimeExports$1.jsx(jsxRuntimeExports$1.Fragment, { children: filteredOptions.map((option, index) => {
|
|
1115
1130
|
const isSelected = option.value === value;
|
|
1116
1131
|
const isHighlighted = index === highlightedIndex;
|
|
1117
1132
|
return (jsxRuntimeExports$1.jsx("div", { ref: (el) => {
|
|
1118
1133
|
optionRefs.current[index] = el;
|
|
1119
|
-
}, onClick: () => handleSelect(option), onMouseEnter: () => setHighlightedIndex(index), className: `
|
|
1120
|
-
px-4 py-3 cursor-pointer transition-colors flex items-center justify-between
|
|
1121
|
-
${option.disabled ? "opacity-50 cursor-not-allowed bg-gray-50" : ""}
|
|
1122
|
-
${isHighlighted && !option.disabled ? "bg-blue-50" : ""}
|
|
1123
|
-
${isSelected && !option.disabled ? "bg-blue-100" : ""}
|
|
1124
|
-
${!isHighlighted && !isSelected && !option.disabled ? "hover:bg-gray-50" : ""}
|
|
1125
|
-
`, "data-testid": `autocomplete-option-${option.value}`, children: renderOption ? (renderOption(option, isSelected)) : (jsxRuntimeExports$1.jsxs(jsxRuntimeExports$1.Fragment, { children: [jsxRuntimeExports$1.jsxs("div", { className: "flex-1", children: [jsxRuntimeExports$1.jsx("div", { className: "font-medium text-gray-900", children: highlightMatchText(option.label, searchTerm, highlightMatch) }), option.description && (jsxRuntimeExports$1.jsx("div", { className: "text-xs text-gray-500 mt-0.5", children: option.description }))] }), isSelected && (jsxRuntimeExports$1.jsx(p, { className: "w-5 h-5 text-blue-600 flex-shrink-0" }))] })) }, option.value));
|
|
1134
|
+
}, onClick: () => handleSelect(option), onMouseEnter: () => setHighlightedIndex(index), className: classNames(styles.option, option.disabled && styles.optionDisabled, isHighlighted && styles.optionHighlighted, isSelected && styles.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.optionContent, children: [jsxRuntimeExports$1.jsx("div", { className: styles.optionLabel, children: highlightMatchText(option.label, searchTerm, highlightMatch) }), option.description && (jsxRuntimeExports$1.jsx("div", { className: styles.optionDescription, children: option.description }))] }), isSelected && (jsxRuntimeExports$1.jsx(v, { className: styles.optionCheckIcon }))] })) }, option.value));
|
|
1126
1135
|
}) })) }), onCreate && searchTerm && (jsxRuntimeExports$1.jsxs("div", { onClick: () => {
|
|
1127
1136
|
onCreate(searchTerm.trim());
|
|
1128
1137
|
setIsOpen(false);
|
|
1129
1138
|
setSearchTerm("");
|
|
1130
|
-
}, className:
|
|
1131
|
-
|
|
1132
|
-
flex items-center gap-2
|
|
1133
|
-
${filteredOptions.length > 0 ? "border-t border-gray-200" : ""}
|
|
1134
|
-
transition-colors
|
|
1135
|
-
${highlightedIndex === filteredOptions.length ? "bg-blue-50" : "hover:bg-gray-50"}
|
|
1136
|
-
`, "data-testid": "autocomplete-create", children: [jsxRuntimeExports$1.jsx("span", { className: "text-blue-600 font-medium", children: "+" }), jsxRuntimeExports$1.jsxs("span", { className: "text-gray-900", children: [createLabel, " \"", searchTerm, "\""] })] })), !loading && filteredOptions.length === 0 && !onCreate && (jsxRuntimeExports$1.jsx("div", { className: "px-4 py-3 text-center text-gray-500 text-sm", children: noResultsText }))] }))] }), hint && !error && !warning && (jsxRuntimeExports$1.jsx("p", { className: "text-xs text-gray-500", children: hint })), warning && !error && (jsxRuntimeExports$1.jsxs("p", { className: "text-xs text-yellow-600 flex items-center gap-1", children: [jsxRuntimeExports$1.jsx("svg", { className: "w-4 h-4", fill: "currentColor", viewBox: "0 0 20 20", children: jsxRuntimeExports$1.jsx("path", { fillRule: "evenodd", d: "M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z", clipRule: "evenodd" }) }), warning] })), error && (jsxRuntimeExports$1.jsxs("p", { className: "text-xs text-red-600 flex items-center gap-1", children: [jsxRuntimeExports$1.jsx("svg", { className: "w-4 h-4", 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] }))] }));
|
|
1139
|
+
}, className: classNames(styles.createOption, filteredOptions.length > 0 && styles.createOptionWithBorder, highlightedIndex === filteredOptions.length &&
|
|
1140
|
+
styles.createOptionHighlighted), "data-testid": "autocomplete-create", children: [jsxRuntimeExports$1.jsx("span", { className: styles.createIcon, children: "+" }), jsxRuntimeExports$1.jsxs("span", { className: styles.createText, children: [createLabel, " \"", searchTerm, "\""] })] })), !loading && filteredOptions.length === 0 && !onCreate && (jsxRuntimeExports$1.jsx("div", { className: styles.noResults, children: noResultsText }))] }))] }), hint && !error && !warning && jsxRuntimeExports$1.jsx("p", { className: styles.hint, children: hint }), warning && !error && (jsxRuntimeExports$1.jsxs("p", { className: styles.warning, children: [jsxRuntimeExports$1.jsx("svg", { className: styles.warningIcon, fill: "currentColor", viewBox: "0 0 20 20", children: jsxRuntimeExports$1.jsx("path", { fillRule: "evenodd", d: "M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z", clipRule: "evenodd" }) }), warning] })), error && (jsxRuntimeExports$1.jsxs("p", { className: styles.error, children: [jsxRuntimeExports$1.jsx("svg", { className: styles.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] }))] }));
|
|
1137
1141
|
};
|
|
1138
1142
|
|
|
1139
1143
|
export { Autocomplete as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rubenpazch/autocomplete",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"description": "Autocomplete component",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "dist/index.cjs.js",
|
|
@@ -16,7 +16,9 @@
|
|
|
16
16
|
"files": [
|
|
17
17
|
"dist"
|
|
18
18
|
],
|
|
19
|
-
"sideEffects":
|
|
19
|
+
"sideEffects": [
|
|
20
|
+
"**/*.css"
|
|
21
|
+
],
|
|
20
22
|
"exports": {
|
|
21
23
|
".": {
|
|
22
24
|
"import": "./dist/index.esm.js",
|
|
@@ -29,8 +31,8 @@
|
|
|
29
31
|
"react-dom": "^19.0.0"
|
|
30
32
|
},
|
|
31
33
|
"dependencies": {
|
|
32
|
-
"@rubenpazch/icons": "
|
|
33
|
-
"@rubenpazch/loading-spinner": "
|
|
34
|
+
"@rubenpazch/icons": "4.0.1",
|
|
35
|
+
"@rubenpazch/loading-spinner": "3.0.0"
|
|
34
36
|
},
|
|
35
37
|
"devDependencies": {
|
|
36
38
|
"@rubenpazch/typescript-config": "3.0.0"
|