Socket
Socket
Sign inDemoInstall

@szhsin/react-autocomplete

Package Overview
Dependencies
Maintainers
0
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@szhsin/react-autocomplete - npm Package Compare versions

Comparing version 0.9.5 to 0.9.6-alpha.0

dist/esm/objKeys.js

29

dist/cjs/index.js

@@ -168,2 +168,5 @@ 'use strict';

const $onClick = 'onClick';
const $onMouseDown = 'onMouseDown';
const scrollIntoView = element => element == null ? void 0 : element.scrollIntoView({

@@ -251,4 +254,4 @@ block: 'nearest'

...ButtonProps,
onMouseDown: startCapture,
onClick: () => {
[$onMouseDown]: startCapture,
[$onClick]: () => {
stopCapture();

@@ -265,4 +268,4 @@ setOpen(true);

role: 'listbox',
onMouseDown: startCapture,
onClick: stopCapture
[$onMouseDown]: startCapture,
[$onClick]: stopCapture
}),

@@ -277,3 +280,3 @@ getItemProps: ({

ref: isEqual(item, focusItem) ? scrollIntoView : null,
onClick: () => {
[$onClick]: () => {
if (!(isItemDisabled != null && isItemDisabled(item))) {

@@ -342,4 +345,4 @@ resetState(selectItemOrAction(item));

},
onMouseDown: e => e.stopPropagation(),
onClick: () => setOpen(true)
[$onMouseDown]: e => e.stopPropagation(),
[$onClick]: () => setOpen(true)
})

@@ -412,7 +415,7 @@ };

'aria-controls': getId(id, 'l'),
onMouseDown: () => {
[$onMouseDown]: () => {
startToggle();
startCapture();
},
onClick: () => {
[$onClick]: () => {
stopToggle();

@@ -477,4 +480,4 @@ stopCapture();

ref: toggleRef,
onMouseDown: startToggle,
onClick: stopToggle,
[$onMouseDown]: startToggle,
[$onClick]: stopToggle,
onKeyDown: e => {

@@ -528,4 +531,4 @@ const {

getInputWrapperProps: () => ({
onMouseDown: startCapture,
onClick: stopCapture
[$onMouseDown]: startCapture,
[$onClick]: stopCapture
}),

@@ -532,0 +535,0 @@ getInputProps: () => ({

import { ButtonProps, getId } from '../../common.js';
import { useFocusCapture } from '../../hooks/useFocusCapture.js';
import { $onMouseDown, $onClick } from '../../objKeys.js';

@@ -86,4 +87,4 @@ const scrollIntoView = element => element == null ? void 0 : element.scrollIntoView({

...ButtonProps,
onMouseDown: startCapture,
onClick: () => {
[$onMouseDown]: startCapture,
[$onClick]: () => {
stopCapture();

@@ -100,4 +101,4 @@ setOpen(true);

role: 'listbox',
onMouseDown: startCapture,
onClick: stopCapture
[$onMouseDown]: startCapture,
[$onClick]: stopCapture
}),

@@ -112,3 +113,3 @@ getItemProps: ({

ref: isEqual(item, focusItem) ? scrollIntoView : null,
onClick: () => {
[$onClick]: () => {
if (!(isItemDisabled != null && isItemDisabled(item))) {

@@ -177,4 +178,4 @@ resetState(selectItemOrAction(item));

},
onMouseDown: e => e.stopPropagation(),
onClick: () => setOpen(true)
[$onMouseDown]: e => e.stopPropagation(),
[$onClick]: () => setOpen(true)
})

@@ -181,0 +182,0 @@ };

import { useRef, useEffect } from 'react';
import { useToggle } from '../../hooks/useToggle.js';
import { $onMouseDown, $onClick } from '../../objKeys.js';

@@ -32,4 +33,4 @@ const dropdownToggle = ({

ref: toggleRef,
onMouseDown: startToggle,
onClick: stopToggle,
[$onMouseDown]: startToggle,
[$onClick]: stopToggle,
onKeyDown: e => {

@@ -36,0 +37,0 @@ const {

import { ButtonProps, getId } from '../../common.js';
import { useToggle } from '../../hooks/useToggle.js';
import { useFocusCapture } from '../../hooks/useFocusCapture.js';
import { $onMouseDown, $onClick } from '../../objKeys.js';

@@ -18,7 +19,7 @@ const inputToggle = () => ({

'aria-controls': getId(id, 'l'),
onMouseDown: () => {
[$onMouseDown]: () => {
startToggle();
startCapture();
},
onClick: () => {
[$onClick]: () => {
stopToggle();

@@ -25,0 +26,0 @@ stopCapture();

import { useFocusCapture } from '../../hooks/useFocusCapture.js';
import { $onMouseDown, $onClick } from '../../objKeys.js';

@@ -10,4 +11,4 @@ const multiInput = () => ({

getInputWrapperProps: () => ({
onMouseDown: startCapture,
onClick: stopCapture
[$onMouseDown]: startCapture,
[$onClick]: stopCapture
}),

@@ -14,0 +15,0 @@ getInputProps: () => ({

{
"name": "@szhsin/react-autocomplete",
"version": "0.9.5",
"version": "0.9.6-alpha.0",
"description": "",

@@ -5,0 +5,0 @@ "author": "Zheng Song",

@@ -37,3 +37,3 @@ import type { HTMLAttributes, InputHTMLAttributes, ButtonHTMLAttributes, LabelHTMLAttributes } from 'react';

onAction?: (item: T) => void;
value?: string | undefined;
value: string | undefined;
onChange: (value?: string | undefined) => void;

@@ -40,0 +40,0 @@ items: T[];

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