New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ioloco-ui

Package Overview
Dependencies
Maintainers
0
Versions
141
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ioloco-ui - npm Package Compare versions

Comparing version 0.4.7 to 0.4.8

2

dist/Components/Form/DataList/index.d.ts
import React from 'react';
import { DataListInputProps } from './types';
import type { DataListInputProps } from './types';
declare const DataListInput: React.FC<DataListInputProps>;
export default DataListInput;

@@ -1,1 +0,1 @@

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};
import{jsxs as e,jsx as n}from"react/jsx-runtime";import{useState as l,useRef as t,useEffect as a}from"react";import d from"../FormInput/index.js";import o from"@stylexjs/stylex";const i=i=>{let{options:u,label:s,size:x,DropDownIcon:p,onSelect:c,defaultValue:g}=i;const[m,b]=l(!1),[h,v]=l(""),[f,k]=l(!1),[w,y]=l(null),[j,I]=l(0),z=t(null);a((()=>{if(!w&&g){let e;g.value&&(e=u.find((e=>e.value===g.value))),!e&&g.label&&(e=u.find((e=>e.label===g.label))),y(null!=e?e:null)}}),[g,u,w]),a((()=>{const e=e=>{z.current&&!z.current.contains(e.target)&&b(!1)};return m&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}}),[m]);const D=u.filter((e=>e.label.toLowerCase().includes(h.toLowerCase()))),E=e=>{y(e),c(e),b(!1),v("")},L=w?w.label:h;return e("div",Object.assign({},{className:"xh8yej3 x1ypdohk x1n2onr6 x9f619"},{ref:z,tabIndex:0,onKeyDown:e=>{switch(e.key){case"ArrowDown":e.preventDefault(),I((e=>e<D.length-1?e+1:e));break;case"ArrowUp":e.preventDefault(),I((e=>e>0?e-1:0));break;case"Enter":e.preventDefault(),D[j]&&E(D[j]);break;case"Escape":e.preventDefault(),b(!1)}},children:[e("div",Object.assign({},{className:"x1n2onr6 xh8yej3 x78zum5 x6s0dn4"},{onMouseEnter:()=>k(!0),onMouseLeave:()=>k(!1),children:[n(d,{name:"datalistInput",type:"text",label:s,size:x,value:L,onChangeHandler:e=>{v(e.target.value),b(!0),I(0)},onClick:()=>b(!m)}),p&&f&&n("div",Object.assign({},{className:"x10l6tqk x10rbbe7 xwa60dl x1cb1t30 x78zum5 x6s0dn4 xl56j7k x127lhb5 x5hsz1j x1debuo4 x10e4vud"},{children:n(p,{})}))]})),m&&D.length>0&&n("div",Object.assign({},{className:"x1n327nk x10l6tqk xh8yej3 x1717udv x1ghz6dp x1avysgf xu96u03 x12peec7 xm6uh0w xdhr1b5 x116uinm x11iwqir x1rife3k"},{role:"listbox",children:D.map(((e,l)=>n("div",Object.assign({},o.props(r.dropdownItem,l===j&&r.highlightedItem),{onClick:()=>E(e),onMouseEnter:()=>I(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};

@@ -12,2 +12,3 @@ import type { ElementType } from 'react';

onSelect: (option: IResourceOption) => void;
defaultValue?: Partial<IResourceOption>;
}
{
"name": "ioloco-ui",
"version": "0.4.7",
"version": "0.4.8",
"description": "Stylex UI components for React",

@@ -5,0 +5,0 @@ "author": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc