react-select-rohit10 1.0.0 → 1.0.2
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/index.cjs +2 -2
- package/dist/index.js +40 -40
- package/package.json +12 -9
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";const m=require("react");var H={exports:{}},
|
|
1
|
+
"use strict";const m=require("react");var H={exports:{}},Y={};var K;function ne(){if(K)return Y;K=1;var o=Symbol.for("react.transitional.element"),h=Symbol.for("react.fragment");function E(_,c,f){var p=null;if(f!==void 0&&(p=""+f),c.key!==void 0&&(p=""+c.key),"key"in c){f={};for(var R in c)R!=="key"&&(f[R]=c[R])}else f=c;return c=f.ref,{$$typeof:o,type:_,key:p,ref:c!==void 0?c:null,props:f}}return Y.Fragment=h,Y.jsx=E,Y.jsxs=E,Y}var $={};var ee;function ae(){return ee||(ee=1,process.env.NODE_ENV!=="production"&&(function(){function o(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===U?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case u:return"Fragment";case y:return"Profiler";case k:return"StrictMode";case B:return"Suspense";case L:return"SuspenseList";case Z:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case g:return"Portal";case F:return e.displayName||"Context";case S:return(e._context.displayName||"Context")+".Consumer";case P:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case W:return r=e.displayName||null,r!==null?r:o(e.type)||"Memo";case C:r=e._payload,e=e._init;try{return o(e(r))}catch{}}return null}function h(e){return""+e}function E(e){try{h(e);var r=!1}catch{r=!0}if(r){r=console;var n=r.error,a=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return n.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",a),h(e)}}function _(e){if(e===u)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===C)return"<...>";try{var r=o(e);return r?"<"+r+">":"<...>"}catch{return"<...>"}}function c(){var e=x.A;return e===null?null:e.getOwner()}function f(){return Error("react-stack-top-frame")}function p(e){if(V.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function R(e,r){function n(){M||(M=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",r))}n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}function i(){var e=o(this.type);return z[e]||(z[e]=!0,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.")),e=this.props.ref,e!==void 0?e:null}function Q(e,r,n,a,w,D){var s=n.ref;return e={$$typeof:I,type:e,key:r,props:n,_owner:a},(s!==void 0?s:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:i}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:w}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:D}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function O(e,r,n,a,w,D){var s=r.children;if(s!==void 0)if(a)if(q(s)){for(a=0;a<s.length;a++)N(s[a]);Object.freeze&&Object.freeze(s)}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 N(s);if(V.call(r,"key")){s=o(e);var v=Object.keys(r).filter(function(l){return l!=="key"});a=0<v.length?"{key: someKey, "+v.join(": ..., ")+": ...}":"{key: someKey}",X[s+a]||(v=0<v.length?"{"+v.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
2
2
|
let props = %s;
|
|
3
3
|
<%s {...props} />
|
|
4
4
|
React keys must be passed directly to JSX without using spread:
|
|
5
5
|
let props = %s;
|
|
6
|
-
<%s key={someKey} {...props} />`,a,s,v,s),X[s+a]=!0)}if(s=null,n!==void 0&&(
|
|
6
|
+
<%s key={someKey} {...props} />`,a,s,v,s),X[s+a]=!0)}if(s=null,n!==void 0&&(E(n),s=""+n),p(r)&&(E(r.key),s=""+r.key),"key"in r){n={};for(var t in r)t!=="key"&&(n[t]=r[t])}else n=r;return s&&R(n,typeof e=="function"?e.displayName||e.name||"Unknown":e),Q(e,s,n,c(),w,D)}function N(e){A(e)?e._store&&(e._store.validated=1):typeof e=="object"&&e!==null&&e.$$typeof===C&&(e._payload.status==="fulfilled"?A(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function A(e){return typeof e=="object"&&e!==null&&e.$$typeof===I}var T=m,I=Symbol.for("react.transitional.element"),g=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),S=Symbol.for("react.consumer"),F=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),B=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),W=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),Z=Symbol.for("react.activity"),U=Symbol.for("react.client.reference"),x=T.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V=Object.prototype.hasOwnProperty,q=Array.isArray,j=console.createTask?console.createTask:function(){return null};T={react_stack_bottom_frame:function(e){return e()}};var M,z={},J=T.react_stack_bottom_frame.bind(T,f)(),G=j(_(f)),X={};$.Fragment=u,$.jsx=function(e,r,n){var a=1e4>x.recentlyCreatedOwnerStacks++;return O(e,r,n,!1,a?Error("react-stack-top-frame"):J,a?j(_(e)):G)},$.jsxs=function(e,r,n){var a=1e4>x.recentlyCreatedOwnerStacks++;return O(e,r,n,!0,a?Error("react-stack-top-frame"):J,a?j(_(e)):G)}})()),$}var re;function se(){return re||(re=1,process.env.NODE_ENV==="production"?H.exports=ne():H.exports=ae()),H.exports}var d=se();function oe({event:o,open:h,options:E,highlightedIndex:_,setHighlightedIndex:c,onSelect:f,closeDropdown:p,userNavigatedRef:R}){if(h){if(o.key==="ArrowDown"&&(o.preventDefault(),R.current=!0,c(i=>Math.min(i+1,E.length-1))),o.key==="ArrowUp"&&(o.preventDefault(),R.current=!0,c(i=>Math.max(i-1,0))),o.key==="Enter"){o.preventDefault();const i=E[_];i&&f(i)}o.key==="Escape"&&p()}}function le({options:o=[],value:h,onChange:E,onClear:_,onSearch:c,onReachEnd:f,isLoading:p=!1,hasMoreOptions:R=!1,isMultipleAllowed:i=!0,placeholder:Q,renderOption:O,renderChipValue:N}){const A=h!==void 0,[T,I]=m.useState(i?[]:null),g=A?h:T;let u;i?Array.isArray(g)?u=g:u=[]:Array.isArray(g)?u=null:u=g??null;function k(t){A||I(t),E?.(t)}const[y,S]=m.useState(!1),[F,P]=m.useState(0),[B,L]=m.useState(""),W=m.useRef(null),C=m.useRef(null),Z=m.useRef(null),U=m.useRef(null),x=m.useRef(!1),V=m.useRef(!1),q=i?u:u?[u]:[],j=q.length>0,M=()=>S(!1),z=()=>S(t=>!t),J=t=>oe({event:t,open:y,options:o,highlightedIndex:F,setHighlightedIndex:P,onSelect:e,closeDropdown:M,userNavigatedRef:V}),G=t=>{t.stopPropagation(),k(i?[]:null),_?.()},X=t=>{const l=t.target.value;L(l),clearTimeout(U.current),U.current=setTimeout(()=>c?.(l.trim()),300)};m.useEffect(()=>{function t(l){W.current?.contains(l.target)||S(!1)}return document.addEventListener("mousedown",t),()=>document.removeEventListener("mousedown",t)},[]),m.useEffect(()=>{y||(L(""),P(0),c?.(""))},[y]);function e(t){if(!i){k(t),S(!1);return}const l=u.some(b=>b.id===t.id);k(l?u.filter(b=>b.id!==t.id):[...u,t])}function r(t){return l=>{l.stopPropagation(),k(u.filter(b=>b.id!==t.id))}}function n(t){if(!R||x.current)return;const l=t.currentTarget;l.scrollTop+l.clientHeight>=l.scrollHeight-5&&(x.current=!0,f?.())}function a({selected:t,highlighted:l}){return`select-option ${t?"selected":""} ${l?"highlighted":""}`}function w(){return j?q.map(t=>d.jsxs("span",{className:"chip",children:[N?N(t):t.label,i&&d.jsx("button",{className:"chip-remove",onClick:r(t),children:"×"})]},t.id)):d.jsx("span",{className:"placeholder",children:Q})}function D(){return o.map((t,l)=>{const b=i?u.some(te=>te.id===t.id):u?.id===t.id;return d.jsx("li",{className:a({selected:b,highlighted:l===F}),onMouseEnter:()=>P(l),onClick:()=>e(t),children:O?O(t,{selected:b}):t.label},t.id)})}function s(){return p?d.jsx("li",{className:"select-loading",children:"Loading…"}):!p&&o.length===0?d.jsx("li",{className:"select-empty",children:"No results"}):null}function v(){return y?d.jsxs(d.Fragment,{children:[d.jsx("input",{ref:C,className:"select-search",value:B,onChange:X}),d.jsxs("ul",{ref:Z,className:"select-dropdown",onScroll:n,children:[D(),s()]})]}):null}return d.jsxs("div",{ref:W,className:"select-wrapper",tabIndex:0,onKeyDown:J,children:[d.jsxs("div",{className:"select-trigger",onClick:z,children:[d.jsx("div",{className:"chips",children:w()}),j&&d.jsx("button",{className:"clear-btn",onClick:G,children:"Clear"})]}),v()]})}module.exports=le;
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import oe, { useState as H, useRef as w, useEffect as ee } from "react";
|
|
2
|
-
var Q = { exports: {} },
|
|
2
|
+
var Q = { exports: {} }, Y = {};
|
|
3
3
|
var re;
|
|
4
4
|
function se() {
|
|
5
|
-
if (re) return
|
|
5
|
+
if (re) return Y;
|
|
6
6
|
re = 1;
|
|
7
7
|
var s = /* @__PURE__ */ Symbol.for("react.transitional.element"), h = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
8
8
|
function m(_, c, f) {
|
|
@@ -20,16 +20,16 @@ function se() {
|
|
|
20
20
|
props: f
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
|
-
return
|
|
23
|
+
return Y.Fragment = h, Y.jsx = m, Y.jsxs = m, Y;
|
|
24
24
|
}
|
|
25
|
-
var
|
|
25
|
+
var $ = {};
|
|
26
26
|
var te;
|
|
27
27
|
function le() {
|
|
28
28
|
return te || (te = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
29
29
|
function s(e) {
|
|
30
30
|
if (e == null) return null;
|
|
31
31
|
if (typeof e == "function")
|
|
32
|
-
return e.$$typeof ===
|
|
32
|
+
return e.$$typeof === U ? null : e.displayName || e.name || null;
|
|
33
33
|
if (typeof e == "string") return e;
|
|
34
34
|
switch (e) {
|
|
35
35
|
case u:
|
|
@@ -55,12 +55,12 @@ function le() {
|
|
|
55
55
|
return e.displayName || "Context";
|
|
56
56
|
case y:
|
|
57
57
|
return (e._context.displayName || "Context") + ".Consumer";
|
|
58
|
-
case
|
|
58
|
+
case P:
|
|
59
59
|
var r = e.render;
|
|
60
60
|
return e = e.displayName, e || (e = r.displayName || r.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
|
|
61
|
-
case
|
|
61
|
+
case W:
|
|
62
62
|
return r = e.displayName || null, r !== null ? r : s(e.type) || "Memo";
|
|
63
|
-
case
|
|
63
|
+
case C:
|
|
64
64
|
r = e._payload, e = e._init;
|
|
65
65
|
try {
|
|
66
66
|
return s(e(r));
|
|
@@ -91,7 +91,7 @@ function le() {
|
|
|
91
91
|
}
|
|
92
92
|
function _(e) {
|
|
93
93
|
if (e === u) return "<>";
|
|
94
|
-
if (typeof e == "object" && e !== null && e.$$typeof ===
|
|
94
|
+
if (typeof e == "object" && e !== null && e.$$typeof === C)
|
|
95
95
|
return "<...>";
|
|
96
96
|
try {
|
|
97
97
|
var r = s(e);
|
|
@@ -108,7 +108,7 @@ function le() {
|
|
|
108
108
|
return Error("react-stack-top-frame");
|
|
109
109
|
}
|
|
110
110
|
function p(e) {
|
|
111
|
-
if (
|
|
111
|
+
if (V.call(e, "key")) {
|
|
112
112
|
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
113
113
|
if (r && r.isReactWarning) return !1;
|
|
114
114
|
}
|
|
@@ -132,7 +132,7 @@ function le() {
|
|
|
132
132
|
"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."
|
|
133
133
|
)), e = this.props.ref, e !== void 0 ? e : null;
|
|
134
134
|
}
|
|
135
|
-
function B(e, r, n, a, j,
|
|
135
|
+
function B(e, r, n, a, j, D) {
|
|
136
136
|
var o = n.ref;
|
|
137
137
|
return e = {
|
|
138
138
|
$$typeof: I,
|
|
@@ -162,23 +162,23 @@ function le() {
|
|
|
162
162
|
configurable: !1,
|
|
163
163
|
enumerable: !1,
|
|
164
164
|
writable: !0,
|
|
165
|
-
value:
|
|
165
|
+
value: D
|
|
166
166
|
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
167
167
|
}
|
|
168
|
-
function O(e, r, n, a, j,
|
|
168
|
+
function O(e, r, n, a, j, D) {
|
|
169
169
|
var o = r.children;
|
|
170
170
|
if (o !== void 0)
|
|
171
171
|
if (a)
|
|
172
172
|
if (M(o)) {
|
|
173
173
|
for (a = 0; a < o.length; a++)
|
|
174
|
-
|
|
174
|
+
N(o[a]);
|
|
175
175
|
Object.freeze && Object.freeze(o);
|
|
176
176
|
} else
|
|
177
177
|
console.error(
|
|
178
178
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
179
179
|
);
|
|
180
|
-
else
|
|
181
|
-
if (
|
|
180
|
+
else N(o);
|
|
181
|
+
if (V.call(r, "key")) {
|
|
182
182
|
o = s(e);
|
|
183
183
|
var R = Object.keys(r).filter(function(l) {
|
|
184
184
|
return l !== "key";
|
|
@@ -210,16 +210,16 @@ React keys must be passed directly to JSX without using spread:
|
|
|
210
210
|
n,
|
|
211
211
|
c(),
|
|
212
212
|
j,
|
|
213
|
-
|
|
213
|
+
D
|
|
214
214
|
);
|
|
215
215
|
}
|
|
216
|
-
function $(e) {
|
|
217
|
-
N(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === P && (e._payload.status === "fulfilled" ? N(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
|
|
218
|
-
}
|
|
219
216
|
function N(e) {
|
|
217
|
+
A(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === C && (e._payload.status === "fulfilled" ? A(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
|
|
218
|
+
}
|
|
219
|
+
function A(e) {
|
|
220
220
|
return typeof e == "object" && e !== null && e.$$typeof === I;
|
|
221
221
|
}
|
|
222
|
-
var b = oe, I = /* @__PURE__ */ Symbol.for("react.transitional.element"), T = /* @__PURE__ */ Symbol.for("react.portal"), u = /* @__PURE__ */ Symbol.for("react.fragment"), g = /* @__PURE__ */ Symbol.for("react.strict_mode"), k = /* @__PURE__ */ Symbol.for("react.profiler"), y = /* @__PURE__ */ Symbol.for("react.consumer"), F = /* @__PURE__ */ Symbol.for("react.context"),
|
|
222
|
+
var b = oe, I = /* @__PURE__ */ Symbol.for("react.transitional.element"), T = /* @__PURE__ */ Symbol.for("react.portal"), u = /* @__PURE__ */ Symbol.for("react.fragment"), g = /* @__PURE__ */ Symbol.for("react.strict_mode"), k = /* @__PURE__ */ Symbol.for("react.profiler"), y = /* @__PURE__ */ Symbol.for("react.consumer"), F = /* @__PURE__ */ Symbol.for("react.context"), P = /* @__PURE__ */ Symbol.for("react.forward_ref"), Z = /* @__PURE__ */ Symbol.for("react.suspense"), L = /* @__PURE__ */ Symbol.for("react.suspense_list"), W = /* @__PURE__ */ Symbol.for("react.memo"), C = /* @__PURE__ */ Symbol.for("react.lazy"), K = /* @__PURE__ */ Symbol.for("react.activity"), U = /* @__PURE__ */ Symbol.for("react.client.reference"), x = b.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, V = Object.prototype.hasOwnProperty, M = Array.isArray, S = console.createTask ? console.createTask : function() {
|
|
223
223
|
return null;
|
|
224
224
|
};
|
|
225
225
|
b = {
|
|
@@ -231,7 +231,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
231
231
|
b,
|
|
232
232
|
f
|
|
233
233
|
)(), G = S(_(f)), X = {};
|
|
234
|
-
|
|
234
|
+
$.Fragment = u, $.jsx = function(e, r, n) {
|
|
235
235
|
var a = 1e4 > x.recentlyCreatedOwnerStacks++;
|
|
236
236
|
return O(
|
|
237
237
|
e,
|
|
@@ -241,7 +241,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
241
241
|
a ? Error("react-stack-top-frame") : J,
|
|
242
242
|
a ? S(_(e)) : G
|
|
243
243
|
);
|
|
244
|
-
},
|
|
244
|
+
}, $.jsxs = function(e, r, n) {
|
|
245
245
|
var a = 1e4 > x.recentlyCreatedOwnerStacks++;
|
|
246
246
|
return O(
|
|
247
247
|
e,
|
|
@@ -252,7 +252,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
252
252
|
a ? S(_(e)) : G
|
|
253
253
|
);
|
|
254
254
|
};
|
|
255
|
-
})()),
|
|
255
|
+
})()), $;
|
|
256
256
|
}
|
|
257
257
|
var ne;
|
|
258
258
|
function ce() {
|
|
@@ -294,41 +294,41 @@ function fe({
|
|
|
294
294
|
isMultipleAllowed: i = !0,
|
|
295
295
|
placeholder: B,
|
|
296
296
|
renderOption: O,
|
|
297
|
-
renderChipValue:
|
|
297
|
+
renderChipValue: N
|
|
298
298
|
}) {
|
|
299
|
-
const
|
|
299
|
+
const A = h !== void 0, [b, I] = H(
|
|
300
300
|
i ? [] : null
|
|
301
|
-
), T =
|
|
301
|
+
), T = A ? h : b;
|
|
302
302
|
let u;
|
|
303
303
|
i ? Array.isArray(T) ? u = T : u = [] : Array.isArray(T) ? u = null : u = T ?? null;
|
|
304
304
|
function g(t) {
|
|
305
|
-
|
|
305
|
+
A || I(t), m?.(t);
|
|
306
306
|
}
|
|
307
|
-
const [k, y] = H(!1), [F,
|
|
307
|
+
const [k, y] = H(!1), [F, P] = H(0), [Z, L] = H(""), W = w(null), C = w(null), K = w(null), U = w(null), x = w(!1), V = w(!1), M = i ? u : u ? [u] : [], S = M.length > 0, q = () => y(!1), z = () => y((t) => !t), J = (t) => ue({
|
|
308
308
|
event: t,
|
|
309
309
|
open: k,
|
|
310
310
|
options: s,
|
|
311
311
|
highlightedIndex: F,
|
|
312
|
-
setHighlightedIndex:
|
|
312
|
+
setHighlightedIndex: P,
|
|
313
313
|
onSelect: e,
|
|
314
314
|
closeDropdown: q,
|
|
315
|
-
userNavigatedRef:
|
|
315
|
+
userNavigatedRef: V
|
|
316
316
|
}), G = (t) => {
|
|
317
317
|
t.stopPropagation(), g(i ? [] : null), _?.();
|
|
318
318
|
}, X = (t) => {
|
|
319
319
|
const l = t.target.value;
|
|
320
|
-
L(l), clearTimeout(
|
|
320
|
+
L(l), clearTimeout(U.current), U.current = setTimeout(
|
|
321
321
|
() => c?.(l.trim()),
|
|
322
322
|
300
|
|
323
323
|
);
|
|
324
324
|
};
|
|
325
325
|
ee(() => {
|
|
326
326
|
function t(l) {
|
|
327
|
-
|
|
327
|
+
W.current?.contains(l.target) || y(!1);
|
|
328
328
|
}
|
|
329
329
|
return document.addEventListener("mousedown", t), () => document.removeEventListener("mousedown", t);
|
|
330
330
|
}, []), ee(() => {
|
|
331
|
-
k || (L(""),
|
|
331
|
+
k || (L(""), P(0), c?.(""));
|
|
332
332
|
}, [k]);
|
|
333
333
|
function e(t) {
|
|
334
334
|
if (!i) {
|
|
@@ -363,7 +363,7 @@ function fe({
|
|
|
363
363
|
}
|
|
364
364
|
function j() {
|
|
365
365
|
return S ? M.map((t) => /* @__PURE__ */ d.jsxs("span", { className: "chip", children: [
|
|
366
|
-
|
|
366
|
+
N ? N(t) : t.label,
|
|
367
367
|
i && /* @__PURE__ */ d.jsx(
|
|
368
368
|
"button",
|
|
369
369
|
{
|
|
@@ -374,7 +374,7 @@ function fe({
|
|
|
374
374
|
)
|
|
375
375
|
] }, t.id)) : /* @__PURE__ */ d.jsx("span", { className: "placeholder", children: B });
|
|
376
376
|
}
|
|
377
|
-
function
|
|
377
|
+
function D() {
|
|
378
378
|
return s.map((t, l) => {
|
|
379
379
|
const v = i ? u.some(
|
|
380
380
|
(ae) => ae.id === t.id
|
|
@@ -386,7 +386,7 @@ function fe({
|
|
|
386
386
|
selected: v,
|
|
387
387
|
highlighted: l === F
|
|
388
388
|
}),
|
|
389
|
-
onMouseEnter: () =>
|
|
389
|
+
onMouseEnter: () => P(l),
|
|
390
390
|
onClick: () => e(t),
|
|
391
391
|
children: O ? O(t, { selected: v }) : t.label
|
|
392
392
|
},
|
|
@@ -402,7 +402,7 @@ function fe({
|
|
|
402
402
|
/* @__PURE__ */ d.jsx(
|
|
403
403
|
"input",
|
|
404
404
|
{
|
|
405
|
-
ref:
|
|
405
|
+
ref: C,
|
|
406
406
|
className: "select-search",
|
|
407
407
|
value: Z,
|
|
408
408
|
onChange: X
|
|
@@ -415,7 +415,7 @@ function fe({
|
|
|
415
415
|
className: "select-dropdown",
|
|
416
416
|
onScroll: n,
|
|
417
417
|
children: [
|
|
418
|
-
|
|
418
|
+
D(),
|
|
419
419
|
o()
|
|
420
420
|
]
|
|
421
421
|
}
|
|
@@ -425,7 +425,7 @@ function fe({
|
|
|
425
425
|
return /* @__PURE__ */ d.jsxs(
|
|
426
426
|
"div",
|
|
427
427
|
{
|
|
428
|
-
ref:
|
|
428
|
+
ref: W,
|
|
429
429
|
className: "select-wrapper",
|
|
430
430
|
tabIndex: 0,
|
|
431
431
|
onKeyDown: J,
|
package/package.json
CHANGED
|
@@ -1,27 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-select-rohit10",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
|
+
"license": "MIT",
|
|
4
5
|
"type": "module",
|
|
5
|
-
|
|
6
6
|
"description": "Async searchable select component with single and multi-select support",
|
|
7
|
-
"keywords": [
|
|
8
|
-
|
|
7
|
+
"keywords": [
|
|
8
|
+
"react",
|
|
9
|
+
"select",
|
|
10
|
+
"async",
|
|
11
|
+
"multiselect"
|
|
12
|
+
],
|
|
9
13
|
"main": "dist/index.cjs",
|
|
10
14
|
"module": "dist/index.js",
|
|
11
15
|
"types": "types/index.d.ts",
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
16
|
+
"files": [
|
|
17
|
+
"dist",
|
|
18
|
+
"types"
|
|
19
|
+
],
|
|
15
20
|
"scripts": {
|
|
16
21
|
"build": "vite build",
|
|
17
22
|
"prepublishOnly": "npm run build"
|
|
18
23
|
},
|
|
19
|
-
|
|
20
24
|
"peerDependencies": {
|
|
21
25
|
"react": ">=17",
|
|
22
26
|
"react-dom": ">=17"
|
|
23
27
|
},
|
|
24
|
-
|
|
25
28
|
"devDependencies": {
|
|
26
29
|
"@eslint/js": "^9.39.1",
|
|
27
30
|
"@types/react": "^19.2.5",
|