@redradix/components.autocomplete
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -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),i=r.n(a);function l(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 c(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){c(e,n,r[n])})}return e}var u=r(1),d=r.n(u);function p(){return(p=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"),h=o.a.createElement("desc",{id:"close-description"},"Close icon in svg"),m=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",p({width:24,height:24,viewBox:"0 0 24 24","aria-labelledby":"close-title close-description",role:"img"},e),f,h,m)},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)},g=function(e){return"dynamic"===e.componentsProps.behaviour&&P(e.value)},x=function(e){return e.placeholder!==e.componentsProps.label&&g(e)},y="icon rdx-select-field-icon",w={ClearIndicator:function(e){var n=e.innerProps,r=e.selectProps;return b(r.componentsProps.renderClearIcon,s({},n,{className:y}))},Control:function(e){var n=e.selectProps,r=e.innerProps,t=e.innerRef,a=e.children;return o.a.createElement("div",Object.assign({"aria-expanded":n.menuIsOpen,className:"rdx-select-field-wrapper",ref:t},r),a,n.componentsProps.label&&o.a.createElement("label",{className:"rdx-select-field-label",htmlFor:n.id},n.componentsProps.label))},DropdownIndicator:function(e){var n=e.selectProps,r=e.innerProps;return n.menuIsOpen?b(n.componentsProps.renderUpIcon,s({},r,{className:y})):b(n.componentsProps.renderDownIcon,s({},r,{className:y}))},IndicatorsContainer:function(e){var n=e.children;return o.a.createElement("div",{className:"rdx-select-field-icons-wrapper"},n)},IndicatorSeparator:function(){return null},Input:function(e){var n=e.selectProps,r=e.innerRef,t=e.isDisabled,a=l(e,["selectProps","innerRef","isDisabled"]),i=!P(n.value)&&n.componentsProps.searchHint,c=d()("rdx-select-field-select",{"is-hidden":!n.isMulti&&n.value});return o.a.createElement("input",Object.assign({className:c,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-field-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=d()("rdx-select-field-tag",{"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-field-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,l=e.label,c=e.value,s=!r.isMulti&&r.value&&c===r.value.value&&!r.isDisabled,u=d()("rdx-select-field-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),l)},Placeholder:function(e){var n=e.children,r=e.selectProps;return g(r)&&!x(r)?null:o.a.createElement("div",{className:"rdx-select-field-placeholder"},n)},SelectContainer:function(e){var n=e.selectProps,r=e.innerProps,t=e.children,a=e.isFocused,i=d()("rdx-select-field rdx-select-field-".concat(n.componentsProps.appearance," is-custom"),{"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-height-fixed":"fixed"===n.componentsProps.heightBehaviour,"has-height-adaptative":"adaptative"===n.componentsProps.heightBehaviour,"has-width-full":"full"===n.componentsProps.widthBehaviour,"is-disabled":n.isDisabled,"is-dynamic":g(n),"is-fading":x(n),"is-focused":a,"is-multi":n.isMulti,"is-open-down":n.menuIsOpen,"is-open-up":n.menuIsOpen&&"up"===n.componentsProps.dropDownPos,"is-searchable":n.isSearchable,"is-touched":n.componentsProps.isTouched});return o.a.createElement("div",Object.assign({className:i},r),t,n.componentsProps.helperText&&!n.componentsProps.errorText?o.a.createElement("div",{className:"rdx-select-field-helper"},n.componentsProps.helperText):null,n.componentsProps.hasError&&!n.isDisabled?o.a.createElement("div",{className:"rdx-select-field-helper"},n.componentsProps.errorText):null)},SingleValue:function(e){var n=e.children;return o.a.createElement("div",{className:"rdx-select-field-value"},n)},ValueContainer:function(e){return e.children}};function O(){return(O=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 E=o.a.createElement("title",{id:"chevron-down-title"},"Chevron down icon"),j=o.a.createElement("desc",{id:"chevron-down-description"},"Chevron down icon in svg"),I=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"}),C=function(e){return o.a.createElement("svg",O({width:24,height:24,viewBox:"0 0 24 24","aria-labelledby":"chevron-down-title chevron-down-description",role:"img"},e),E,j,I)};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 M=o.a.createElement("title",{id:"chevron-up-title"},"Chevron up icon"),N=o.a.createElement("desc",{id:"chevron-up-description"},"Chevron up icon in svg"),S=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"}),B=function(e){return o.a.createElement("svg",D({width:24,height:24,viewBox:"0 0 24 24","aria-labelledby":"chevron-up-title chevron-up-description",role:"img"},e),M,N,S)};function F(){return(F=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 L=o.a.createElement("title",{id:"delete-title"},"Delete icon"),T=o.a.createElement("desc",{id:"delete-description"},"Delete icon in svg"),H=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"}),q=function(e){return o.a.createElement("svg",F({width:24,height:24,viewBox:"0 0 24 24","aria-labelledby":"delete-title delete-description",role:"img"},e),L,T,H)},z=function(e){var n=e.appearance,r=e.ariaLabel,t=e.autoFocus,a=e.behaviour,l=e.defaultIsOpen,c=e.dropDownPos,s=e.errorText,u=e.heightBehaviour,d=e.helperText,p=e.id,f=e.isDisabled,h=e.isMulti,m=e.isSearchable,v=e.isTouched,b=e.label,P=e.name,g=e.onBlur,x=e.onChange,y=e.onClose,O=e.onFocus,E=e.onInputChange,j=e.onKeyDown,I=e.onOpen,C=e.options,D=e.placeholder,M=e.renderClearIcon,N=e.renderDownIcon,S=e.renderUpIcon,B=e.searchHint,F=e.value,L=e.widthBehaviour,T=s&&v;return o.a.createElement(i.a,{id:p,ariaLabel:r||b||p,autoFocus:t,defaultMenuIsOpen:l,placeholder:D,isDisabled:f,isMulti:h,isSearchable:m,name:P,options:C,value:F,isClearable:h&&F&&F.some(function(e){return!e.isFixed}),onBlur:g,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=C.filter(function(e){return e.isFixed})}x(e,{action:r,removedValue:t})},onClose:y,onFocus:O,onInputChange:E,onKeyDown:j,onOpen:I,components:w,componentsProps:{renderClearIcon:M,renderDownIcon:N,renderUpIcon:S,label:b,hasError:T,behaviour:a,isTouched:v,heightBehaviour:u,widthBehaviour:L,appearance:n,dropDownPos:c,errorText:s,helperText:d,searchHint:B}})};z.defaultProps={appearance:"box",behaviour:"static",dropDownPos:"down",defaultIsOpen:!1,isSearchable:!0,renderDownIcon:function(e){return o.a.createElement(C,e)},renderUpIcon:function(e){return o.a.createElement(B,e)},renderClearIcon:function(e){return o.a.createElement(q,e)}};var R=z,V=function(e){return o.a.createElement(R,Object.assign({},e,{isSearchable:!0}))};V.defaultProps={appearance:"box",behaviour:"dynamic",defaultIsOpen:!1,dropDownPos:"down",isMulti:!1,searchHint:"Write here"};n.default=V}])}); | ||
!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 l(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 c(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){c(e,n,r[n])})}return e}var u=r(1),d=r.n(u);function p(){return(p=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"),h=o.a.createElement("desc",{id:"close-description"},"Close icon in svg"),m=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",p({width:24,height:24,viewBox:"0 0 24 24","aria-labelledby":"close-title close-description",role:"img"},e),f,h,m)},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)},g=function(e){return"dynamic"===e.componentsProps.behaviour&&P(e.value)},x=function(e){return e.placeholder!==e.componentsProps.label&&g(e)},y="rdx-icon rdx-select-field-icon",w={ClearIndicator:function(e){var n=e.innerProps,r=e.selectProps;return b(r.componentsProps.renderClearIcon,s({},n,{className:y}))},Control:function(e){var n=e.selectProps,r=e.innerProps,t=e.innerRef,a=e.children;return o.a.createElement("div",Object.assign({"aria-expanded":n.menuIsOpen,className:"rdx-select-field-wrapper",ref:t},r),a,n.componentsProps.label&&o.a.createElement("label",{className:"rdx-select-field-label",htmlFor:n.id},n.componentsProps.label))},DropdownIndicator:function(e){var n=e.selectProps,r=e.innerProps;return n.menuIsOpen?b(n.componentsProps.renderUpIcon,s({},r,{className:y})):b(n.componentsProps.renderDownIcon,s({},r,{className:y}))},IndicatorsContainer:function(e){var n=e.children;return o.a.createElement("div",{className:"rdx-select-field-icons-wrapper"},n)},IndicatorSeparator:function(){return null},Input:function(e){var n=e.selectProps,r=e.innerRef,t=e.isDisabled,a=l(e,["selectProps","innerRef","isDisabled"]),i=!P(n.value)&&n.componentsProps.searchHint,c=d()("rdx-select-field-select",{"is-hidden":!n.isMulti&&n.value});return o.a.createElement("input",Object.assign({className:c,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-field-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=d()("rdx-select-field-tag",{"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-field-icon-close",role:"button"},t),o.a.createElement(v,{className:"rdx-icon rdx-icon-close"})))},Option:function(e){var n=e.data,r=e.selectProps,t=e.isFocused,a=e.innerRef,i=e.innerProps,l=e.label,c=e.value,s=!r.isMulti&&r.value&&c===r.value.value&&!r.isDisabled,u=d()("rdx-select-field-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),l)},Placeholder:function(e){var n=e.children,r=e.selectProps;return g(r)&&!x(r)?null:o.a.createElement("div",{className:"rdx-select-field-placeholder"},n)},SelectContainer:function(e){var n=e.selectProps,r=e.innerProps,t=e.children,a=e.isFocused,i=d()("rdx-select-field rdx-select-field-".concat(n.componentsProps.appearance," is-custom"),{"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-height-fixed":"fixed"===n.componentsProps.heightBehaviour,"has-height-adaptative":"adaptative"===n.componentsProps.heightBehaviour,"has-width-full":"full"===n.componentsProps.widthBehaviour,"is-disabled":n.isDisabled,"is-dynamic":g(n),"is-fading":x(n),"is-focused":a,"is-multi":n.isMulti,"is-open-down":n.menuIsOpen,"is-open-up":n.menuIsOpen&&"up"===n.componentsProps.dropDownPos,"is-searchable":n.isSearchable,"is-touched":n.componentsProps.isTouched});return o.a.createElement("div",Object.assign({className:i},r),t,n.componentsProps.helperText&&!n.componentsProps.errorText?o.a.createElement("div",{className:"rdx-select-field-helper"},n.componentsProps.helperText):null,n.componentsProps.hasError&&!n.isDisabled?o.a.createElement("div",{className:"rdx-select-field-helper"},n.componentsProps.errorText):null)},SingleValue:function(e){var n=e.children;return o.a.createElement("div",{className:"rdx-select-field-value"},n)},ValueContainer:function(e){return e.children}};function O(){return(O=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 E=o.a.createElement("title",{id:"chevron-down-title"},"Chevron down icon"),j=o.a.createElement("desc",{id:"chevron-down-description"},"Chevron down icon in svg"),I=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"}),C=function(e){return o.a.createElement("svg",O({width:24,height:24,viewBox:"0 0 24 24","aria-labelledby":"chevron-down-title chevron-down-description",role:"img"},e),E,j,I)};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 M=o.a.createElement("title",{id:"chevron-up-title"},"Chevron up icon"),N=o.a.createElement("desc",{id:"chevron-up-description"},"Chevron up icon in svg"),S=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"}),B=function(e){return o.a.createElement("svg",D({width:24,height:24,viewBox:"0 0 24 24","aria-labelledby":"chevron-up-title chevron-up-description",role:"img"},e),M,N,S)};function F(){return(F=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 L=o.a.createElement("title",{id:"delete-title"},"Delete icon"),T=o.a.createElement("desc",{id:"delete-description"},"Delete icon in svg"),H=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"}),q=function(e){return o.a.createElement("svg",F({width:24,height:24,viewBox:"0 0 24 24","aria-labelledby":"delete-title delete-description",role:"img"},e),L,T,H)},z=function(e){var n=e.appearance,r=e.ariaLabel,t=e.autoFocus,a=e.behaviour,l=e.defaultIsOpen,c=e.dropDownPos,s=e.errorText,u=e.heightBehaviour,d=e.helperText,p=e.id,f=e.isDisabled,h=e.isMulti,m=e.isSearchable,v=e.isTouched,b=e.label,P=e.name,g=e.onBlur,x=e.onChange,y=e.onClose,O=e.onFocus,E=e.onInputChange,j=e.onKeyDown,I=e.onOpen,C=e.options,D=e.placeholder,M=e.renderClearIcon,N=e.renderDownIcon,S=e.renderUpIcon,B=e.searchHint,F=e.value,L=e.widthBehaviour,T=s&&v;return o.a.createElement(i.a,{id:p,ariaLabel:r||b||p,autoFocus:t,defaultMenuIsOpen:l,placeholder:D,isDisabled:f,isMulti:h,isSearchable:m,name:P,options:C,value:F,isClearable:h&&F&&F.some(function(e){return!e.isFixed}),onBlur:g,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=C.filter(function(e){return e.isFixed})}x(e,{action:r,removedValue:t})},onClose:y,onFocus:O,onInputChange:E,onKeyDown:j,onOpen:I,components:w,componentsProps:{renderClearIcon:M,renderDownIcon:N,renderUpIcon:S,label:b,hasError:T,behaviour:a,isTouched:v,heightBehaviour:u,widthBehaviour:L,appearance:n,dropDownPos:c,errorText:s,helperText:d,searchHint:B}})};z.defaultProps={appearance:"box",behaviour:"static",dropDownPos:"down",defaultIsOpen:!1,isSearchable:!0,renderDownIcon:function(e){return o.a.createElement(C,e)},renderUpIcon:function(e){return o.a.createElement(B,e)},renderClearIcon:function(e){return o.a.createElement(q,e)}};var R=z,V=function(e){return o.a.createElement(R,Object.assign({},e,{isSearchable:!0}))};V.defaultProps={appearance:"box",behaviour:"dynamic",defaultIsOpen:!1,dropDownPos:"down",isMulti:!1,searchHint:"Write here"};n.default=V}])}); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@redradix/components.autocomplete", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "", | ||
@@ -23,5 +23,5 @@ "publishConfig": { | ||
"dependencies": { | ||
"@redradix/components.select": "^1.0.0" | ||
"@redradix/components.select": "^1.0.1" | ||
}, | ||
"gitHead": "c05dce30a7f43521638f8d77ac6b7eab46b05529" | ||
"gitHead": "f4ee56601048e3c8ce11d696e20ab052c05f904f" | ||
} |
Sorry, the diff of this file is not supported yet
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
72243