react-functional-select
Advanced tools
Comparing version 2.3.3 to 2.3.4
@@ -126,3 +126,3 @@ !function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("react"),require("styled-components"),require("react-window")):"function"==typeof define&&define.amd?define(["exports","react","styled-components","react-window"],n):n((e=e||self).ReactFunctionalSelect={},e.React,e.StyledComponents,e.ReactWindow)}(this,(function(e,n,t,o){"use strict";var i="default"in n?n.default:n,r="default"in t?t.default:t;const a=t.keyframes` | ||
background-color: ${({theme:e})=>e.color.iconSeparator||e.color.border}; | ||
`,H=i.memo(({menuOpen:e,clearIcon:n,caretIcon:t,isInvalid:o,showClear:r,isLoading:a,isDisabled:l,loadingNode:s,isTouchDevice:d,addClassNames:c,onCaretMouseDown:u,onClearMouseDown:p})=>{const m={menuOpen:e,isLoading:!!a,isInvalid:!!o,isDisabled:!!l},f=e=>e&&"function"==typeof e?e(m):e;return i.createElement(j,null,r&&!a&&i.createElement(W,{onMouseDown:p,"data-testid":void 0,onTouchEnd:d?p:void 0},f(n)||i.createElement(Y,{"aria-hidden":"true",viewBox:"0 0 14 16",className:c?"rfs-clear-icon":void 0},i.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"}))),a&&(s||i.createElement(P,{addClassNames:c})),i.createElement(U,null),i.createElement(W,{onMouseDown:u,"data-testid":void 0,onTouchEnd:d?u:void 0},f(t)||i.createElement(q,{"aria-hidden":"true",menuOpen:e,isInvalid:o,className:c?"rfs-caret-icon":void 0})))});H.displayName="IndicatorIcons";const K=r.span` | ||
`,H=i.memo(({menuOpen:e,clearIcon:n,caretIcon:t,isInvalid:o,showClear:r,isLoading:a,isDisabled:l,loadingNode:s,isTouchDevice:d,addClassNames:c,onCaretMouseDown:u,onClearMouseDown:p})=>{const m="function"==typeof t||"function"==typeof n?{menuOpen:e,isLoading:!!a,isInvalid:!!o,isDisabled:!!l}:void 0,f=e=>e&&"function"==typeof e?e(m):e;return i.createElement(j,null,r&&!a&&i.createElement(W,{onMouseDown:p,"data-testid":void 0,onTouchEnd:d?p:void 0},f(n)||i.createElement(Y,{"aria-hidden":"true",viewBox:"0 0 14 16",className:c?"rfs-clear-icon":void 0},i.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"}))),a&&(s||i.createElement(P,{addClassNames:c})),i.createElement(U,null),i.createElement(W,{onMouseDown:u,"data-testid":void 0,onTouchEnd:d?u:void 0},f(t)||i.createElement(q,{"aria-hidden":"true",menuOpen:e,isInvalid:o,className:c?"rfs-caret-icon":void 0})))});H.displayName="IndicatorIcons";const K=r.span` | ||
border: 0; | ||
@@ -129,0 +129,0 @@ padding: 0; |
@@ -126,3 +126,3 @@ !function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("react"),require("styled-components"),require("react-window")):"function"==typeof define&&define.amd?define(["exports","react","styled-components","react-window"],n):n((e=e||self).ReactFunctionalSelect={},e.React,e.StyledComponents,e.ReactWindow)}(this,(function(e,n,t,o){"use strict";var i="default"in n?n.default:n,r="default"in t?t.default:t;const a=t.keyframes` | ||
background-color: ${({theme:e})=>e.color.iconSeparator||e.color.border}; | ||
`,H=i.memo(({menuOpen:e,clearIcon:n,caretIcon:t,isInvalid:o,showClear:r,isLoading:a,isDisabled:l,loadingNode:s,isTouchDevice:d,addClassNames:c,onCaretMouseDown:u,onClearMouseDown:p})=>{const m={menuOpen:e,isLoading:!!a,isInvalid:!!o,isDisabled:!!l},f=e=>e&&"function"==typeof e?e(m):e;return i.createElement(j,null,r&&!a&&i.createElement(W,{onMouseDown:p,"data-testid":void 0,onTouchEnd:d?p:void 0},f(n)||i.createElement(Y,{"aria-hidden":"true",viewBox:"0 0 14 16",className:c?"rfs-clear-icon":void 0},i.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"}))),a&&(s||i.createElement(P,{addClassNames:c})),i.createElement(U,null),i.createElement(W,{onMouseDown:u,"data-testid":void 0,onTouchEnd:d?u:void 0},f(t)||i.createElement(q,{"aria-hidden":"true",menuOpen:e,isInvalid:o,className:c?"rfs-caret-icon":void 0})))});H.displayName="IndicatorIcons";const K=r.span` | ||
`,H=i.memo(({menuOpen:e,clearIcon:n,caretIcon:t,isInvalid:o,showClear:r,isLoading:a,isDisabled:l,loadingNode:s,isTouchDevice:d,addClassNames:c,onCaretMouseDown:u,onClearMouseDown:p})=>{const m="function"==typeof t||"function"==typeof n?{menuOpen:e,isLoading:!!a,isInvalid:!!o,isDisabled:!!l}:void 0,f=e=>e&&"function"==typeof e?e(m):e;return i.createElement(j,null,r&&!a&&i.createElement(W,{onMouseDown:p,"data-testid":void 0,onTouchEnd:d?p:void 0},f(n)||i.createElement(Y,{"aria-hidden":"true",viewBox:"0 0 14 16",className:c?"rfs-clear-icon":void 0},i.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"}))),a&&(s||i.createElement(P,{addClassNames:c})),i.createElement(U,null),i.createElement(W,{onMouseDown:u,"data-testid":void 0,onTouchEnd:d?u:void 0},f(t)||i.createElement(q,{"aria-hidden":"true",menuOpen:e,isInvalid:o,className:c?"rfs-caret-icon":void 0})))});H.displayName="IndicatorIcons";const K=r.span` | ||
border: 0; | ||
@@ -129,0 +129,0 @@ padding: 0; |
@@ -779,3 +779,3 @@ 'use strict'; | ||
}) => { | ||
const forwardState = { | ||
const forwardState = typeof caretIcon === 'function' || typeof clearIcon === 'function' ? { | ||
menuOpen, | ||
@@ -785,6 +785,6 @@ isLoading: !!isLoading, | ||
isDisabled: !!isDisabled | ||
}; | ||
} : undefined; | ||
const renderCustomIcon = icon => { | ||
return icon && typeof icon === 'function' ? icon(forwardState) : icon; | ||
const renderCustomIcon = iconProp => { | ||
return iconProp && typeof iconProp === 'function' ? iconProp(forwardState) : iconProp; | ||
}; | ||
@@ -791,0 +791,0 @@ |
@@ -771,3 +771,3 @@ import React, { useMemo, Fragment, useRef, useState, useEffect, useCallback, useImperativeHandle } from 'react'; | ||
}) => { | ||
const forwardState = { | ||
const forwardState = typeof caretIcon === 'function' || typeof clearIcon === 'function' ? { | ||
menuOpen, | ||
@@ -777,6 +777,6 @@ isLoading: !!isLoading, | ||
isDisabled: !!isDisabled | ||
}; | ||
} : undefined; | ||
const renderCustomIcon = icon => { | ||
return icon && typeof icon === 'function' ? icon(forwardState) : icon; | ||
const renderCustomIcon = iconProp => { | ||
return iconProp && typeof iconProp === 'function' ? iconProp(forwardState) : iconProp; | ||
}; | ||
@@ -783,0 +783,0 @@ |
{ | ||
"name": "react-functional-select", | ||
"version": "2.3.3", | ||
"version": "2.3.4", | ||
"author": "Matt Areddia <mareddia@protonmail.com> (https://github.com/based-ghost/)", | ||
@@ -5,0 +5,0 @@ "description": "Miro-sized and micro-optimized select component for React.js", |
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
169516