Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@redradix/components.autocomplete

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@redradix/components.autocomplete - npm Package Compare versions

Comparing version 0.2.4 to 0.2.5

2

dist/index.js

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

!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n(require("react"),require("classnames"),require("react-select")):"function"==typeof define&&define.amd?define(["react","classnames","react-select"],n):"object"==typeof exports?exports.autocomplete=n(require("react"),require("classnames"),require("react-select")):(e.components=e.components||{},e.components.autocomplete=n(e.react,e.classnames,e["react-select"]))}(window,function(e,n,r){return function(e){var n={};function r(t){if(n[t])return n[t].exports;var o=n[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=n,r.d=function(e,n,t){r.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:t})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,n){if(1&n&&(e=r(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(r.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)r.d(t,o,function(n){return e[n]}.bind(null,o));return t},r.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(n,"a",n),n},r.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},r.p="",r(r.s=3)}([function(n,r){n.exports=e},function(e,r){e.exports=n},function(e,n){e.exports=r},function(e,n,r){e.exports=r(4)},function(e,n,r){"use strict";r.r(n);var t=r(0),o=r.n(t),a=r(2),c=r.n(a);function s(e,n){if(null==e)return{};var r,t,o=function(e,n){if(null==e)return{};var r,t,o={},a=Object.keys(e);for(t=0;t<a.length;t++)r=a[t],n.indexOf(r)>=0||(o[r]=e[r]);return o}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(t=0;t<a.length;t++)r=a[t],n.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function i(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function l(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},t=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.forEach(function(n){i(e,n,r[n])})}return e}var u=r(1),p=r.n(u);function d(){return(d=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e}).apply(this,arguments)}var f=o.a.createElement("path",{d:"M12 10.586l5.293-5.293a1 1 0 0 1 1.414 1.414L13.414 12l5.293 5.293a1 1 0 0 1-1.414 1.414L12 13.414l-5.293 5.293a1 1 0 1 1-1.414-1.414L10.586 12 5.293 6.707a1 1 0 0 1 1.414-1.414L12 10.586z"}),m=function(e){return o.a.createElement("svg",d({width:24,height:24,"aria-labelledby":"close-title close-description"},e),f)},h=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),t=1;t<n;t++)r[t-1]=arguments[t];return"function"==typeof e&&e.apply(void 0,r)},b=function(e){return!(e&&Object.keys(e).length)},v=function(e){return"dynamic"===e.componentsProps.behaviour&&b(e.value)},P=function(e){return e.placeholder!==e.componentsProps.label},y={ClearIndicator:function(e){var n=e.innerProps,r=e.selectProps;return h(r.componentsProps.renderClearIcon,l({},n,{className:"icon rdx-select-icon"}))},Control:function(e){var n=e.innerRef,r=e.innerProps,t=e.children,a=e.selectProps;return o.a.createElement("div",Object.assign({"aria-expanded":a.menuIsOpen,className:"rdx-select-wrapper",ref:n},r),t,a.componentsProps.label&&o.a.createElement("label",{className:"rdx-select-label",htmlFor:a.id},a.componentsProps.label))},DropdownIndicator:function(e){var n=e.selectProps,r=e.innerProps;return n.menuIsOpen?h(n.componentsProps.renderUpIcon,l({},r,{className:"icon rdx-select-icon"})):h(n.componentsProps.renderDownIcon,l({},r,{className:"icon rdx-select-icon"}))},IndicatorsContainer:function(e){var n=e.children;return o.a.createElement("div",{className:"rdx-select-icons-wrapper"},n)},IndicatorSeparator:function(){return null},Input:function(e){var n=e.selectProps,r=e.innerRef,t=e.isDisabled,a=s(e,["selectProps","innerRef","isDisabled"]),c=!b(n.value)&&n.componentsProps.searchHint,i=p()("rdx-select rdx-select-".concat(n.componentsProps.appearance),{"has-error":n.componentsProps.hasError,"is-dynamic":v(n),"is-fading":P(n),"is-hidden":!n.isMulti&&n.value,"is-touched":n.componentsProps.isTouched});return o.a.createElement("input",Object.assign({className:i,disabled:t,ref:r},a,{placeholder:c?n.componentsProps.searchHint:void 0}))},Menu:function(e){var n=e.innerRef,r=e.innerProps,t=e.children;return o.a.createElement("div",Object.assign({className:"rdx-select-items",ref:n},r),t)},MenuList:function(e){var n=e.innerRef,r=e.children;return o.a.createElement("ul",{"aria-label":"submenu",ref:n},r)},MultiValue:function(e){var n=e.children,r=e.data,t=e.removeProps,a=e.isFocused,c=p()("rdx-selectTag",{"is-fixed":r.isFixed,"is-focused":a});return o.a.createElement("button",{className:c,tabIndex:-1},o.a.createElement("p",null,n),!r.isFixed&&o.a.createElement("div",Object.assign({className:"rdx-select-icon-close",role:"button"},t),o.a.createElement(m,{className:"icon rdx-icon-close"})))},Option:function(e){var n=e.data,r=e.selectProps,t=e.isFocused,a=e.innerRef,c=e.innerProps,s=e.label,i=e.value,l=!r.isMulti&&r.value&&i===r.value.value&&!r.isDisabled,u=p()("rdx-select-option",{"is-disabled":n.isDisabled,"is-focused":t,"is-selected":l});return o.a.createElement("li",Object.assign({ref:a,className:u,"aria-selected":l,role:"option"},c),s)},Placeholder:function(e){var n=e.children,r=e.selectProps;return v(r)&&!P(r)?null:o.a.createElement("div",{className:"rdx-select-placeholder"},n)},SelectContainer:function(e){var n=e.selectProps,r=e.innerProps,t=e.children,a=e.isFocused,c=p()("rdx-select-field rdx-select-field-".concat(n.componentsProps.appearance),{"has-error":n.componentsProps.hasError,"has-label":n.componentsProps.label,"has-width-fixed":"fixed"===n.componentsProps.widthBehaviour,"has-width-adaptative":"adaptative"===n.componentsProps.widthBehaviour,"has-width-full":"full"===n.componentsProps.widthBehaviour,"is-disabled":n.isDisabled,"is-dynamic":v(n),"is-fading":P(n),"is-focused":a,"is-multi":n.isMulti,"is-open-down":n.menuIsOpen,"is-open-up":n.menuIsOpen&&"up"===n.componentsProps.dropDownPos});return o.a.createElement("div",Object.assign({className:c},r),t,n.componentsProps.helperText&&!n.componentsProps.errorText?o.a.createElement("div",{className:"rdx-select-helper"},n.componentsProps.helperText):null,n.componentsProps.hasError&&!n.isDisabled?o.a.createElement("div",{className:"rdx-select-helper"},n.componentsProps.errorText):null)},SingleValue:function(e){var n=e.children;return o.a.createElement("div",{className:"rdx-select-value"},n)},ValueContainer:function(e){return e.children}};function x(){return(x=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e}).apply(this,arguments)}var O=o.a.createElement("path",{d:"M19.293 7.293a1 1 0 0 1 1.414 1.414l-8 8a1 1 0 0 1-1.414 0l-8-8a1 1 0 0 1 1.414-1.414L12 14.586l7.293-7.293z"}),g=function(e){return o.a.createElement("svg",x({width:24,height:24,"aria-labelledby":"chevron-down-title chevron-down-description"},e),O)};function w(){return(w=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e}).apply(this,arguments)}var j=o.a.createElement("path",{d:"M19.293 16.707L12 9.414l-7.293 7.293a1 1 0 1 1-1.414-1.414l8-8a1 1 0 0 1 1.414 0l8 8a1 1 0 0 1-1.414 1.414z"}),E=function(e){return o.a.createElement("svg",w({width:24,height:24,"aria-labelledby":"chevron-up-title chevron-up-description"},e),j)};function I(){return(I=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e}).apply(this,arguments)}var D=o.a.createElement("path",{d:"M20.182 4C21.73 4 23 5.222 23 6.75v10.5c0 1.528-1.27 2.75-2.818 2.75H8.364a1 1 0 0 1-.74-.327l-6.364-7a1 1 0 0 1 0-1.346l6.364-7A1 1 0 0 1 8.364 4h11.818zM8.806 18h11.376c.46 0 .818-.345.818-.75V6.75c0-.405-.358-.75-.818-.75H8.806l-5.455 6 5.455 6zm9.912-3.697a1 1 0 1 1-1.415 1.415L15 13.414l-2.303 2.304a1 1 0 1 1-1.415-1.415L13.586 12l-2.293-2.293a1 1 0 1 1 1.414-1.414L15 10.586l2.293-2.293a1 1 0 0 1 1.414 1.414L16.414 12l2.304 2.303z"}),M=function(e){return o.a.createElement("svg",I({width:24,height:24,"aria-labelledby":"delete-title delete-description"},e),D)},C=function(e){var n=e.appearance,r=e.ariaLabel,t=e.autoFocus,a=e.behaviour,s=e.defaultIsOpen,i=e.dropDownPos,l=e.errorText,u=e.helperText,p=e.id,d=e.isDisabled,f=e.isMulti,m=e.isSearchable,h=e.isTouched,b=e.label,v=e.name,P=e.onBlur,x=e.onChange,O=e.onClose,g=e.onFocus,w=e.onInputChange,j=e.onKeyDown,E=e.onOpen,I=e.options,D=e.placeholder,M=e.renderClearIcon,C=e.renderDownIcon,N=e.renderUpIcon,S=e.searchHint,T=e.value,F=e.widthBehaviour,L=l&&h;return o.a.createElement(c.a,{id:p,ariaLabel:r||b||p,autoFocus:t,defaultMenuIsOpen:s,placeholder:D,isDisabled:d,isMulti:f,isSearchable:m,name:v,options:I,value:T,isClearable:f&&T&&T.some(function(e){return!e.isFixed}),onBlur:P,onChange:function(e,n){var r=n.action,t=n.removedValue;switch(r){case"remove-value":case"pop-value":if(t.isFixed)return;break;case"clear":e=I.filter(function(e){return e.isFixed})}x(e,{action:r,removedValue:t})},onClose:O,onFocus:g,onInputChange:w,onKeyDown:j,onOpen:E,components:y,componentsProps:{renderClearIcon:M,renderDownIcon:C,renderUpIcon:N,label:b,hasError:L,behaviour:a,isTouched:h,widthBehaviour:F,appearance:n,dropDownPos:i,errorText:l,helperText:u,searchHint:S}})};C.defaultProps={appearance:"box",behaviour:"static",dropDownPos:"down",defaultIsOpen:!1,isSearchable:!0,renderDownIcon:function(e){return o.a.createElement(g,e)},renderUpIcon:function(e){return o.a.createElement(E,e)},renderClearIcon:function(e){return o.a.createElement(M,e)}};var N=C,S=function(e){return o.a.createElement(N,Object.assign({},e,{isSearchable:!0}))};S.defaultProps={appearance:"box",behaviour:"dynamic",defaultIsOpen:!1,dropDownPos:"down",isMulti:!1,searchHint:"Write here"};n.default=S}])});
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n(require("react"),require("classnames"),require("react-select")):"function"==typeof define&&define.amd?define(["react","classnames","react-select"],n):"object"==typeof exports?exports.autocomplete=n(require("react"),require("classnames"),require("react-select")):(e.components=e.components||{},e.components.autocomplete=n(e.react,e.classnames,e["react-select"]))}(window,function(e,n,r){return function(e){var n={};function r(t){if(n[t])return n[t].exports;var o=n[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=n,r.d=function(e,n,t){r.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:t})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,n){if(1&n&&(e=r(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(r.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)r.d(t,o,function(n){return e[n]}.bind(null,o));return t},r.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(n,"a",n),n},r.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},r.p="",r(r.s=3)}([function(n,r){n.exports=e},function(e,r){e.exports=n},function(e,n){e.exports=r},function(e,n,r){e.exports=r(4)},function(e,n,r){"use strict";r.r(n);var t=r(0),o=r.n(t),a=r(2),i=r.n(a);function c(e,n){if(null==e)return{};var r,t,o=function(e,n){if(null==e)return{};var r,t,o={},a=Object.keys(e);for(t=0;t<a.length;t++)r=a[t],n.indexOf(r)>=0||(o[r]=e[r]);return o}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(t=0;t<a.length;t++)r=a[t],n.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function l(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function s(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},t=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.forEach(function(n){l(e,n,r[n])})}return e}var u=r(1),p=r.n(u);function d(){return(d=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e}).apply(this,arguments)}var f=o.a.createElement("title",{id:"close-title"},"Close icon"),m=o.a.createElement("desc",{id:"close-description"},"Close icon in svg"),h=o.a.createElement("path",{d:"M12 10.586l5.293-5.293a1 1 0 0 1 1.414 1.414L13.414 12l5.293 5.293a1 1 0 0 1-1.414 1.414L12 13.414l-5.293 5.293a1 1 0 1 1-1.414-1.414L10.586 12 5.293 6.707a1 1 0 0 1 1.414-1.414L12 10.586z"}),v=function(e){return o.a.createElement("svg",d({width:24,height:24,viewBox:"0 0 24 24","aria-labelledby":"close-title close-description",role:"img"},e),f,m,h)},b=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),t=1;t<n;t++)r[t-1]=arguments[t];return"function"==typeof e&&e.apply(void 0,r)},P=function(e){return!(e&&Object.keys(e).length)},x=function(e){return"dynamic"===e.componentsProps.behaviour&&P(e.value)},y=function(e){return e.placeholder!==e.componentsProps.label},g={ClearIndicator:function(e){var n=e.innerProps,r=e.selectProps;return b(r.componentsProps.renderClearIcon,s({},n,{className:"icon rdx-select-icon"}))},Control:function(e){var n=e.innerRef,r=e.innerProps,t=e.children,a=e.selectProps;return o.a.createElement("div",Object.assign({"aria-expanded":a.menuIsOpen,className:"rdx-select-wrapper",ref:n},r),t,a.componentsProps.label&&o.a.createElement("label",{className:"rdx-select-label",htmlFor:a.id},a.componentsProps.label))},DropdownIndicator:function(e){var n=e.selectProps,r=e.innerProps;return n.menuIsOpen?b(n.componentsProps.renderUpIcon,s({},r,{className:"icon rdx-select-icon"})):b(n.componentsProps.renderDownIcon,s({},r,{className:"icon rdx-select-icon"}))},IndicatorsContainer:function(e){var n=e.children;return o.a.createElement("div",{className:"rdx-select-icons-wrapper"},n)},IndicatorSeparator:function(){return null},Input:function(e){var n=e.selectProps,r=e.innerRef,t=e.isDisabled,a=c(e,["selectProps","innerRef","isDisabled"]),i=!P(n.value)&&n.componentsProps.searchHint,l=p()("rdx-select rdx-select-".concat(n.componentsProps.appearance),{"has-error":n.componentsProps.hasError,"is-dynamic":x(n),"is-fading":y(n),"is-hidden":!n.isMulti&&n.value,"is-touched":n.componentsProps.isTouched});return o.a.createElement("input",Object.assign({className:l,disabled:t,ref:r},a,{placeholder:i?n.componentsProps.searchHint:void 0}))},Menu:function(e){var n=e.innerRef,r=e.innerProps,t=e.children;return o.a.createElement("div",Object.assign({className:"rdx-select-items",ref:n},r),t)},MenuList:function(e){var n=e.innerRef,r=e.children;return o.a.createElement("ul",{"aria-label":"submenu",ref:n},r)},MultiValue:function(e){var n=e.children,r=e.data,t=e.removeProps,a=e.isFocused,i=p()("rdx-selectTag",{"is-fixed":r.isFixed,"is-focused":a});return o.a.createElement("button",{className:i,tabIndex:-1},o.a.createElement("p",null,n),!r.isFixed&&o.a.createElement("div",Object.assign({className:"rdx-select-icon-close",role:"button"},t),o.a.createElement(v,{className:"icon rdx-icon-close"})))},Option:function(e){var n=e.data,r=e.selectProps,t=e.isFocused,a=e.innerRef,i=e.innerProps,c=e.label,l=e.value,s=!r.isMulti&&r.value&&l===r.value.value&&!r.isDisabled,u=p()("rdx-select-option",{"is-disabled":n.isDisabled,"is-focused":t,"is-selected":s});return o.a.createElement("li",Object.assign({ref:a,className:u,"aria-selected":s,role:"option"},i),c)},Placeholder:function(e){var n=e.children,r=e.selectProps;return x(r)&&!y(r)?null:o.a.createElement("div",{className:"rdx-select-placeholder"},n)},SelectContainer:function(e){var n=e.selectProps,r=e.innerProps,t=e.children,a=e.isFocused,i=p()("rdx-select-field rdx-select-field-".concat(n.componentsProps.appearance),{"has-error":n.componentsProps.hasError,"has-label":n.componentsProps.label,"has-width-fixed":"fixed"===n.componentsProps.widthBehaviour,"has-width-adaptative":"adaptative"===n.componentsProps.widthBehaviour,"has-width-full":"full"===n.componentsProps.widthBehaviour,"is-disabled":n.isDisabled,"is-dynamic":x(n),"is-fading":y(n),"is-focused":a,"is-multi":n.isMulti,"is-open-down":n.menuIsOpen,"is-open-up":n.menuIsOpen&&"up"===n.componentsProps.dropDownPos});return o.a.createElement("div",Object.assign({className:i},r),t,n.componentsProps.helperText&&!n.componentsProps.errorText?o.a.createElement("div",{className:"rdx-select-helper"},n.componentsProps.helperText):null,n.componentsProps.hasError&&!n.isDisabled?o.a.createElement("div",{className:"rdx-select-helper"},n.componentsProps.errorText):null)},SingleValue:function(e){var n=e.children;return o.a.createElement("div",{className:"rdx-select-value"},n)},ValueContainer:function(e){return e.children}};function w(){return(w=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e}).apply(this,arguments)}var O=o.a.createElement("title",{id:"chevron-down-title"},"Chevron down icon"),E=o.a.createElement("desc",{id:"chevron-down-description"},"Chevron down icon in svg"),j=o.a.createElement("path",{d:"M19.293 7.293a1 1 0 0 1 1.414 1.414l-8 8a1 1 0 0 1-1.414 0l-8-8a1 1 0 0 1 1.414-1.414L12 14.586l7.293-7.293z"}),I=function(e){return o.a.createElement("svg",w({width:24,height:24,viewBox:"0 0 24 24","aria-labelledby":"chevron-down-title chevron-down-description",role:"img"},e),O,E,j)};function C(){return(C=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e}).apply(this,arguments)}var D=o.a.createElement("title",{id:"chevron-up-title"},"Chevron up icon"),M=o.a.createElement("desc",{id:"chevron-up-description"},"Chevron up icon in svg"),N=o.a.createElement("path",{d:"M19.293 16.707L12 9.414l-7.293 7.293a1 1 0 1 1-1.414-1.414l8-8a1 1 0 0 1 1.414 0l8 8a1 1 0 0 1-1.414 1.414z"}),S=function(e){return o.a.createElement("svg",C({width:24,height:24,viewBox:"0 0 24 24","aria-labelledby":"chevron-up-title chevron-up-description",role:"img"},e),D,M,N)};function T(){return(T=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e}).apply(this,arguments)}var F=o.a.createElement("title",{id:"delete-title"},"Delete icon"),L=o.a.createElement("desc",{id:"delete-description"},"Delete icon in svg"),B=o.a.createElement("path",{d:"M20.182 4C21.73 4 23 5.222 23 6.75v10.5c0 1.528-1.27 2.75-2.818 2.75H8.364a1 1 0 0 1-.74-.327l-6.364-7a1 1 0 0 1 0-1.346l6.364-7A1 1 0 0 1 8.364 4h11.818zM8.806 18h11.376c.46 0 .818-.345.818-.75V6.75c0-.405-.358-.75-.818-.75H8.806l-5.455 6 5.455 6zm9.912-3.697a1 1 0 1 1-1.415 1.415L15 13.414l-2.303 2.304a1 1 0 1 1-1.415-1.415L13.586 12l-2.293-2.293a1 1 0 1 1 1.414-1.414L15 10.586l2.293-2.293a1 1 0 0 1 1.414 1.414L16.414 12l2.304 2.303z"}),H=function(e){return o.a.createElement("svg",T({width:24,height:24,viewBox:"0 0 24 24","aria-labelledby":"delete-title delete-description",role:"img"},e),F,L,B)},q=function(e){var n=e.appearance,r=e.ariaLabel,t=e.autoFocus,a=e.behaviour,c=e.defaultIsOpen,l=e.dropDownPos,s=e.errorText,u=e.helperText,p=e.id,d=e.isDisabled,f=e.isMulti,m=e.isSearchable,h=e.isTouched,v=e.label,b=e.name,P=e.onBlur,x=e.onChange,y=e.onClose,w=e.onFocus,O=e.onInputChange,E=e.onKeyDown,j=e.onOpen,I=e.options,C=e.placeholder,D=e.renderClearIcon,M=e.renderDownIcon,N=e.renderUpIcon,S=e.searchHint,T=e.value,F=e.widthBehaviour,L=s&&h;return o.a.createElement(i.a,{id:p,ariaLabel:r||v||p,autoFocus:t,defaultMenuIsOpen:c,placeholder:C,isDisabled:d,isMulti:f,isSearchable:m,name:b,options:I,value:T,isClearable:f&&T&&T.some(function(e){return!e.isFixed}),onBlur:P,onChange:function(e,n){var r=n.action,t=n.removedValue;switch(r){case"remove-value":case"pop-value":if(t.isFixed)return;break;case"clear":e=I.filter(function(e){return e.isFixed})}x(e,{action:r,removedValue:t})},onClose:y,onFocus:w,onInputChange:O,onKeyDown:E,onOpen:j,components:g,componentsProps:{renderClearIcon:D,renderDownIcon:M,renderUpIcon:N,label:v,hasError:L,behaviour:a,isTouched:h,widthBehaviour:F,appearance:n,dropDownPos:l,errorText:s,helperText:u,searchHint:S}})};q.defaultProps={appearance:"box",behaviour:"static",dropDownPos:"down",defaultIsOpen:!1,isSearchable:!0,renderDownIcon:function(e){return o.a.createElement(I,e)},renderUpIcon:function(e){return o.a.createElement(S,e)},renderClearIcon:function(e){return o.a.createElement(H,e)}};var z=q,R=function(e){return o.a.createElement(z,Object.assign({},e,{isSearchable:!0}))};R.defaultProps={appearance:"box",behaviour:"dynamic",defaultIsOpen:!1,dropDownPos:"down",isMulti:!1,searchHint:"Write here"};n.default=R}])});
//# sourceMappingURL=index.js.map
{
"name": "@redradix/components.autocomplete",
"version": "0.2.4",
"version": "0.2.5",
"description": "",

@@ -22,5 +22,5 @@ "publishConfig": {

"dependencies": {
"@redradix/components.select": "^0.2.4"
"@redradix/components.select": "^0.2.5"
},
"gitHead": "9b87546bd6271958bf28be022057454e2b2b24ab"
"gitHead": "022afdc8e770604746ba570c0c9abe91156d88fd"
}

Sorry, the diff of this file is not supported yet

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