ioloco-ui
Advanced tools
Comparing version 0.3.98 to 0.3.99
@@ -1,1 +0,1 @@ | ||
import{jsxs as e,jsx as n}from"react/jsx-runtime";import{useState as t,useRef as s,useEffect as x}from"react";import a from"../FormInput/index.js";const r=r=>{let{options:l,label:o,size:i,DropDownIcon:c,onSelect:d}=r;const[u,m]=t(!1),[b,h]=t(""),[p,v]=t(!1),[j,f]=t(null),g=s(null),k=l.filter((e=>e.label.toLowerCase().includes(b.toLowerCase())));x((()=>{const e=e=>{g.current&&!g.current.contains(e.target)&&m(!1)};return u&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}}),[u]);return e("div",Object.assign({},{className:"xh8yej3 x1ypdohk x1n2onr6 x9f619"},{ref:g,children:[e("div",Object.assign({},{className:"x1n2onr6 xh8yej3 x78zum5 x6s0dn4"},{onMouseEnter:()=>v(!0),onMouseLeave:()=>v(!1),children:[n(a,{name:"datalistInput",type:"text",label:o,size:i,value:j?j.label:b,onChangeHandler:e=>{h(e.target.value),m(!0)},onClick:()=>m(!u)}),c&&p&&n("div",Object.assign({},{className:"x10l6tqk x10rbbe7 xwa60dl x1cb1t30 x78zum5 x6s0dn4 xl56j7k x127lhb5 x5hsz1j x1debuo4 x10e4vud"},{children:n(c,{})}))]})),u&&n("div",Object.assign({},{className:"x1n327nk x10l6tqk xh8yej3 x1717udv x1ghz6dp x1avysgf xu96u03 x12peec7 xm6uh0w xdhr1b5 x116uinm x11iwqir x1rife3k"},{children:k.map((e=>n("div",Object.assign({},{className:"x579bpy x9255wk x1ypdohk x9f619 x1mqxbix"},{onClick:()=>(e=>{f(e),d(e),m(!1),h("")})(e),children:e.label}),e.value)))}))]}))};export{r as default}; | ||
import{jsxs as e,jsx as n}from"react/jsx-runtime";import{useState as l,useRef as d,useEffect as t}from"react";import o from"../FormInput/index.js";import a from"@stylexjs/stylex";const i=i=>{let{options:s,label:u,size:x,DropDownIcon:c,onSelect:p}=i;const[g,m]=l(!1),[h,b]=l(""),[v,k]=l(!1),[w,f]=l(null),[y,j]=l(0),I=d(null),z=s.filter((e=>e.label.toLowerCase().includes(h.toLowerCase())));t((()=>{const e=e=>{I.current&&!I.current.contains(e.target)&&m(!1)};return g&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}}),[g]);const E=e=>{f(e),p(e),m(!1),b("")};return e("div",Object.assign({},{className:"xh8yej3 x1ypdohk x1n2onr6 x9f619"},{ref:I,tabIndex:0,onKeyDown:e=>{switch(e.key){case"ArrowDown":j((e=>e<z.length-1?e+1:e));break;case"ArrowUp":j((e=>e>0?e-1:0));break;case"Enter":z[y]&&E(z[y]);break;case"Escape":m(!1)}},children:[e("div",Object.assign({},{className:"x1n2onr6 xh8yej3 x78zum5 x6s0dn4"},{onMouseEnter:()=>k(!0),onMouseLeave:()=>k(!1),children:[n(o,{name:"datalistInput",type:"text",label:u,size:x,value:w?w.label:h,onChangeHandler:e=>{b(e.target.value),m(!0),j(0)},onClick:()=>m(!g)}),c&&v&&n("div",Object.assign({},{className:"x10l6tqk x10rbbe7 xwa60dl x1cb1t30 x78zum5 x6s0dn4 xl56j7k x127lhb5 x5hsz1j x1debuo4 x10e4vud"},{children:n(c,{})}))]})),g&&n("div",Object.assign({},{className:"x1n327nk x10l6tqk xh8yej3 x1717udv x1ghz6dp x1avysgf xu96u03 x12peec7 xm6uh0w xdhr1b5 x116uinm x11iwqir x1rife3k"},{role:"listbox",children:z.map(((e,l)=>n("div",Object.assign({},a.props(r.dropdownItem,l===y&&r.highlightedItem),{onClick:()=>E(e),onMouseEnter:()=>j(l),role:"option","aria-selected":(null==w?void 0:w.value)===e.value,children:e.label}),e.value)))}))]}))},r={dropdownItem:{fontSize:"x579bpy",padding:"x9255wk",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,cursor:"x1ypdohk",boxSizing:"x9f619",color:"x1mqxbix",$$css:!0},highlightedItem:{backgroundColor:"x1si8nl4",padding:"x1eygyu5",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,$$css:!0}};export{i as default}; |
{ | ||
"name": "ioloco-ui", | ||
"version": "0.3.98", | ||
"version": "0.3.99", | ||
"description": "Stylex UI components for React", | ||
@@ -80,3 +80,2 @@ "author": { | ||
"react-dom": "^18.3.1", | ||
"react-icons": "^5.3.0", | ||
"rollup": "^4.25.0", | ||
@@ -83,0 +82,0 @@ "rollup-plugin-filesize": "^10.0.0", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
123031
50
1718