react-functional-select
Advanced tools
Comparing version 3.0.0 to 3.0.1
@@ -13,4 +13,4 @@ import React from 'react'; | ||
`; | ||
const ClearSvgIcon = () => (React.createElement(ClearSvg, { "aria-hidden": 'true', viewBox: '0 0 14 16', className: CLEAR_ICON_CLS }, | ||
const ClearSvgIcon = () => (React.createElement(ClearSvg, { "aria-hidden": true, viewBox: '0 0 14 16', className: CLEAR_ICON_CLS }, | ||
React.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' }))); | ||
export default ClearSvgIcon; |
@@ -56,8 +56,8 @@ import React, { memo } from 'react'; | ||
return (React.createElement(IndicatorIconsWrapper, null, | ||
(showClear && !isLoading) && (React.createElement(IndicatorIcon, { onTouchEnd: onClearMouseDown, onMouseDown: onClearMouseDown, "data-testid": CLEAR_ICON_TESTID }, renderIconFn(clearIcon) || React.createElement(ClearSvgIcon, null))), | ||
showClear && !isLoading && (React.createElement(IndicatorIcon, { onTouchEnd: onClearMouseDown, onMouseDown: onClearMouseDown, "data-testid": CLEAR_ICON_TESTID }, renderIconFn(clearIcon) || React.createElement(ClearSvgIcon, null))), | ||
isLoading && (loadingNode || React.createElement(LoadingDots, null)), | ||
React.createElement(Separator, null), | ||
React.createElement(IndicatorIcon, { onTouchEnd: onCaretMouseDown, onMouseDown: onCaretMouseDown, "data-testid": CARET_ICON_TESTID }, renderIconFn(caretIcon) || (React.createElement(Caret, { "aria-hidden": 'true', menuOpen: menuOpen, isInvalid: isInvalid, className: CARET_ICON_CLS }))))); | ||
React.createElement(IndicatorIcon, { onTouchEnd: onCaretMouseDown, onMouseDown: onCaretMouseDown, "data-testid": CARET_ICON_TESTID }, renderIconFn(caretIcon) || (React.createElement(Caret, { "aria-hidden": true, menuOpen: menuOpen, isInvalid: isInvalid, className: CARET_ICON_CLS }))))); | ||
}); | ||
IndicatorIcons.displayName = 'IndicatorIcons'; | ||
export default IndicatorIcons; |
@@ -31,3 +31,3 @@ import React from 'react'; | ||
`; | ||
const LoadingDots = () => (React.createElement(StyledLoadingDots, { "aria-hidden": 'true', className: LOADING_DOTS_CLS }, | ||
const LoadingDots = () => (React.createElement(StyledLoadingDots, { "aria-hidden": true, className: LOADING_DOTS_CLS }, | ||
React.createElement("div", null), | ||
@@ -34,0 +34,0 @@ React.createElement("div", null), |
@@ -5,2 +5,3 @@ import React from 'react'; | ||
import styled, { css } from 'styled-components'; | ||
import { isArrayWithLength } from '../../utils'; | ||
import { OPTION_CLS, OPTION_FOCUSED_CLS, OPTION_DISABLED_CLS, OPTION_SELECTED_CLS, MENU_CONTAINER_CLS, MENU_CONTAINER_TESTID } from '../../constants'; | ||
@@ -12,3 +13,3 @@ const MenuWrapper = styled.div ` | ||
${({ menuTop, menuOpen, theme: { menu } }) => css ` | ||
${({ menuTop, menuOpen, hideNoOptionsMsg, theme: { menu } }) => css ` | ||
width: ${menu.width}; | ||
@@ -18,5 +19,5 @@ margin: ${menu.margin}; | ||
animation: ${menu.animation}; | ||
box-shadow: ${menu.boxShadow}; | ||
border-radius: ${menu.borderRadius}; | ||
background-color: ${menu.backgroundColor}; | ||
box-shadow: ${hideNoOptionsMsg ? 'none' : menu.boxShadow}; | ||
${!menuOpen ? 'display: none;' : ''} | ||
@@ -57,3 +58,6 @@ ${menuTop ? `top: ${menuTop};` : ''} | ||
const Menu = ({ menuRef, menuTop, menuOpen, onMenuMouseDown, menuPortalTarget, ...menuListProps }) => { | ||
const menuNode = (React.createElement(MenuWrapper, { ref: menuRef, menuTop: menuTop, menuOpen: menuOpen, onMouseDown: onMenuMouseDown, className: MENU_CONTAINER_CLS, "data-testid": MENU_CONTAINER_TESTID }, | ||
const hideNoOptionsMsg = menuOpen && | ||
!Boolean(menuListProps.noOptionsMsg) && | ||
!isArrayWithLength(menuListProps.menuOptions); | ||
const menuNode = (React.createElement(MenuWrapper, { ref: menuRef, menuTop: menuTop, menuOpen: menuOpen, onMouseDown: onMenuMouseDown, className: MENU_CONTAINER_CLS, "data-testid": MENU_CONTAINER_TESTID, hideNoOptionsMsg: hideNoOptionsMsg }, | ||
React.createElement(MenuList, Object.assign({}, menuListProps)))); | ||
@@ -60,0 +64,0 @@ return menuPortalTarget |
@@ -29,4 +29,4 @@ import React, { useMemo, Fragment } from 'react'; | ||
React.createElement(FixedSizeList, { width: width, height: height, itemKey: itemKey, itemSize: itemSize, itemData: itemData, ref: fixedSizeListRef, overscanCount: overscanCount, itemCount: menuOptions.length }, Option), | ||
!isArrayWithLength(menuOptions) && React.createElement(NoOptionsMsg, null, noOptionsMsg))); | ||
!isArrayWithLength(menuOptions) && noOptionsMsg && (React.createElement(NoOptionsMsg, null, noOptionsMsg)))); | ||
}; | ||
export default MenuList; |
import React, { memo } from 'react'; | ||
import { areEqual } from 'react-window'; | ||
import { buildOptionClassName } from '../../utils'; | ||
import { optionClassNames } from '../../utils'; | ||
const Option = memo(({ index, style, data: { menuOptions, selectOption, renderOptionLabel, focusedOptionIndex } }) => { | ||
const { data, value, label, isDisabled, isSelected } = menuOptions[index]; | ||
const className = buildOptionClassName(isDisabled, isSelected, (index === focusedOptionIndex)); | ||
const className = optionClassNames(isDisabled, isSelected, (index === focusedOptionIndex)); | ||
const onClick = !isDisabled ? () => selectOption({ data, value, label }, isSelected) : undefined; | ||
@@ -8,0 +8,0 @@ return (React.createElement("div", { style: style, onClick: onClick, className: className }, renderOptionLabel(data))); |
export * from './dom'; | ||
export * from './enums'; | ||
export * from './styled'; | ||
export * from './regexp'; | ||
export * from './defaults'; |
export * from './dom'; | ||
export * from './enums'; | ||
export * from './styled'; | ||
export * from './regexp'; | ||
export * from './defaults'; |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("styled-components"),n=require("react-dom"),o=require("react-window");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=i(e),r=i(t);const l={role:"combobox","aria-haspopup":"listbox",className:"rfs-select-container","data-testid":undefined},s={tabIndex:0,type:"text",spellCheck:!1,autoCorrect:"off",autoComplete:"off",autoCapitalize:"none","aria-autocomplete":"list",className:"rfs-autosize-input","data-testid":undefined};var d,u,c,p;!function(e){e.TOP="top",e.AUTO="auto",e.BOTTOM="bottom"}(d||(d={})),function(e){e.ANY="any",e.START="start"}(u||(u={})),function(e){e.NEXT="next",e.PREVIOUS="prev"}(c||(c={})),function(e){e.UP="up",e.DOWN="down",e.LAST="last",e.FIRST="first"}(p||(p={}));const f=t.keyframes(["0%,80%,100%{transform:scale(0);}40%{transform:scale(1.0);}"]),m=t.keyframes(["from{opacity:0;}to{opacity:1;}"]),g=t.css([""," 0.2s ease-out both"],m),h=/[\u0300-\u036f]/g,b={index:-1},v=[],w={color:{border:"#ced4da",danger:"#dc3545",primary:"#007bff",disabled:"#e9ecef",placeholder:"#6E7276",dangerLight:"rgba(220, 53, 69, 0.25)"},input:{},select:{},loader:{size:"0.625rem",padding:"0.375rem 0.75rem",animation:t.css([""," 1.19s ease-in-out infinite"],f),color:"rgba(0, 123, 255, 0.42)"},icon:{color:"#ccc",hoverColor:"#A6A6A6",padding:"0 0.9375rem",clear:{width:"14px",height:"16px",animation:g,transition:"color 0.2s ease-out"},caret:{size:"7px",transition:"transform 0.3s ease-in-out, color 0.2s ease-out"}},control:{minHeight:"38px",borderWidth:"1px",borderStyle:"solid",borderRadius:"0.25rem",boxShadow:"0 0 0 0.2rem",padding:"0.375rem 0.75rem",boxShadowColor:"rgba(0, 123, 255, 0.25)",focusedBorderColor:"rgba(0, 123, 255, 0.75)",transition:"box-shadow 0.2s ease-out, border-color 0.2s ease-out"},menu:{padding:"0",width:"100%",margin:"0.5rem 0",borderRadius:"0.25rem",backgroundColor:"#fff",animation:g,boxShadow:"0 0 0 1px rgba(0, 0, 0, 0.1), 0 4px 11px rgba(0, 0, 0, 0.1)",option:{textAlign:"left",selectedColor:"#fff",selectedBgColor:"#007bff",padding:"0.375rem 0.75rem",focusedBgColor:"rgba(0, 123, 255, 0.20)"}},noOptions:{fontSize:"1.25rem",margin:"0.25rem 0",color:"hsl(0, 0%, 60%)",padding:"0.375rem 0.75rem"},multiValue:{margin:"1px 2px",borderRadius:"0.25rem",backgroundColor:"#e7edf3",animation:g,label:{fontSize:"0.825em",borderRadius:"0.25rem",padding:"1px 2px 1px 6px"},clear:{fontWeight:700,padding:"0 7px",color:"#a6a6a6",fontSize:"0.65em",alignSelf:"center",focusColor:"#808080",transition:"color 0.2s ease-out, transform 0.2s ease-out, z-index 0.2s ease-out"}}};function y(e){return Array.isArray(e)&&!!e.length}function x(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function O(e,t,n){let o=e.trim();return t&&(o=o.toLowerCase()),n?function(e){return e.normalize("NFD").replace(h,"")}(o):o}function C(e,t,n){const o=Array.isArray(e)?e:x(e)?[e]:v;return y(o)?o.map((e=>({data:e,value:t(e),label:n(e)}))):o}const S=(e,t)=>{const n={...e};return Object.keys(t).forEach((o=>{const i=t[o];n[o]=x(i)&&"animation"!==o?o in e?S(e[o],i):i:i||""})),n};function I(e){return E(e)?window.pageYOffset:e.scrollTop}function E(e){return e===document.documentElement||e===document.body||e===window}function M({overflow:e,overflowX:t,overflowY:n}){const o=e=>"auto"===e||"scroll"===e;return o(e)||o(t)||o(n)}function T(e){let t=getComputedStyle(e);const n="absolute"===t.position;if("fixed"===t.position)return document.documentElement;for(let o=e;o=o?o.parentElement:null;)if(t=getComputedStyle(o),(!n||"static"!==t.position)&&M(t))return o;return document.documentElement}function k(e,t,n=300,o){let i=0;const a=I(e),r=t-a;window.requestAnimationFrame((function t(){var l;i+=5,function(e,t){E(e)?window.scrollTo(0,t):e.scrollTop=t}(e,r*((l=(l=i)/n-1)*l*l+1)+a),i<n?window.requestAnimationFrame(t):null==o||o()}))}const N="undefined"!=typeof window&&"ontouchstart"in window||"undefined"!=typeof navigator&&!!navigator.maxTouchPoints,R="undefined"!=typeof navigator&&/(MSIE|Trident\/|Edge\/|Edg\/)/i.test(navigator.userAgent),z=e.memo((({index:e,style:t,data:{menuOptions:n,selectOption:o,renderOptionLabel:i,focusedOptionIndex:r}})=>{const{data:l,value:s,label:d,isDisabled:u,isSelected:c}=n[e],p=function(e,t,n){let o="rfs-option";return e&&(o+=" rfs-option-disabled"),t&&(o+=" rfs-option-selected"),n&&(o+=" rfs-option-focused"),o}(u,c,e===r),f=u?void 0:()=>o({data:l,value:s,label:d},c);return a.default.createElement("div",{style:t,onClick:f,className:p},i(l))}),o.areEqual);z.displayName="Option";const L=r.default.div.withConfig({displayName:"NoOptionsMsg",componentId:"v1y124-0"})(["text-align:center;color:",";margin:",";padding:",";font-size:",";",""],(({theme:e})=>e.noOptions.color),(({theme:e})=>e.noOptions.margin),(({theme:e})=>e.noOptions.padding),(({theme:e})=>e.noOptions.fontSize),(({theme:e})=>e.noOptions.css)),D=({width:t,height:n,itemSize:i,isLoading:r,loadingMsg:l,menuOptions:s,selectOption:d,noOptionsMsg:u,overscanCount:c,itemKeySelector:p,fixedSizeListRef:f,renderOptionLabel:m,focusedOptionIndex:g})=>{const h=e.useMemo((()=>({menuOptions:s,selectOption:d,renderOptionLabel:m,focusedOptionIndex:g})),[s,g,d,m]);if(r)return a.default.createElement(L,null,l);const b=p?(e,t)=>t.menuOptions[e][p]:void 0;return a.default.createElement(e.Fragment,null,a.default.createElement(o.FixedSizeList,{width:t,height:n,itemKey:b,itemSize:i,itemData:h,ref:f,overscanCount:c,itemCount:s.length},z),!y(s)&&a.default.createElement(L,null,u))},A=r.default.div.withConfig({displayName:"MenuWrapper",componentId:"yf5myu-0"})(["z-index:999;cursor:default;position:absolute;"," "," .","{display:block;overflow:hidden;user-select:none;white-space:nowrap;text-overflow:ellipsis;-webkit-tap-highlight-color:transparent;","}"],(({menuTop:e,menuOpen:n,theme:{menu:o}})=>t.css(["width:",";margin:",";padding:",";animation:",";box-shadow:",";border-radius:",";background-color:",";"," ",""],o.width,o.margin,o.padding,o.animation,o.boxShadow,o.borderRadius,o.backgroundColor,n?"":"display: none;",e?`top: ${e};`:"")),(({theme:e})=>e.menu.css),"rfs-option",(({theme:{menu:{option:e}}})=>t.css(["padding:",";text-align:",";&.",",&:hover:not(.","):not(.","){background-color:",";}&.","{color:",";background-color:",";}&.","{opacity:0.35;}"],e.padding,e.textAlign,"rfs-option-focused","rfs-option-disabled","rfs-option-selected",e.focusedBgColor,"rfs-option-selected",e.selectedColor,e.selectedBgColor,"rfs-option-disabled"))),F=({menuRef:e,menuTop:t,menuOpen:o,onMenuMouseDown:i,menuPortalTarget:r,...l})=>{const s=a.default.createElement(A,{ref:e,menuTop:t,menuOpen:o,onMouseDown:i,className:"rfs-menu-container","data-testid":undefined},a.default.createElement(D,Object.assign({},l)));return r?n.createPortal(s,r):s},V=t.css(["z-index:5000;transform:scale(1.26);color:",";"],(({theme:e})=>e.multiValue.clear.focusColor)),B=r.default.div.withConfig({displayName:"MultiValueWrapper",componentId:"sc-211cx7-0"})(["min-width:0;display:flex;"," ",""],(({theme:{multiValue:e}})=>t.css(["margin:",";animation:",";border-radius:",";background-color:",";"],e.margin,e.animation,e.borderRadius,e.backgroundColor)),(({theme:e})=>e.multiValue.css)),P=r.default.div.withConfig({displayName:"Label",componentId:"sc-211cx7-1"})(["overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:",";font-size:",";border-radius:",";"],(({theme:e})=>e.multiValue.label.padding),(({theme:e})=>e.multiValue.label.fontSize),(({theme:e})=>e.multiValue.label.borderRadius)),$=r.default.i.withConfig({displayName:"Clear",componentId:"sc-211cx7-2"})(["display:flex;font-style:inherit;"," ",""],(({theme:{multiValue:{clear:e}}})=>t.css(["color:",";padding:",";font-size:",";align-self:",";transition:",";font-weight:",";:hover{","}"],e.color,e.padding,e.fontSize,e.alignSelf,e.transition,e.fontWeight,V)),(({isFocused:e})=>e&&V)),W=e.memo((({data:e,value:t,isFocused:n,renderOptionLabel:o,removeSelectedOption:i})=>a.default.createElement(B,null,a.default.createElement(P,null,o(e)),a.default.createElement($,{isFocused:n,"data-testid":undefined,onTouchEnd:e=>i(t,e),onMouseDown:e=>i(t,e)},"✖"))));W.displayName="MultiValue";const q=t.css(["top:50%;overflow:hidden;position:absolute;white-space:nowrap;box-sizing:border-box;text-overflow:ellipsis;transform:translateY(-50%);"]),U=r.default.div.withConfig({displayName:"SingleValue",componentId:"sc-153h0ct-0"})([""," max-width:calc(100% - 0.5rem);"],q),j=r.default.div.withConfig({displayName:"Placeholder",componentId:"sc-153h0ct-1"})([""," color:",";",""],q,(({theme:e})=>e.color.placeholder),(({theme:e,isMulti:n})=>n&&t.css(["animation:",";"],e.multiValue.animation))),K=({isMulti:t,inputValue:n,placeholder:o,selectedOption:i,focusedMultiValue:r,renderOptionLabel:l,renderMultiOptions:s,removeSelectedOption:d})=>!n||t&&(!t||y(i)&&!s)?y(i)?t?a.default.createElement(e.Fragment,null,s?s({renderOptionLabel:l,selected:i}):i.map((({data:e,value:t})=>a.default.createElement(W,{key:t,data:e,value:t,renderOptionLabel:l,isFocused:t===r,removeSelectedOption:d})))):a.default.createElement(U,null,l(i[0].data)):a.default.createElement(j,{isMulti:t},o):null,Y=(t,n,o,i,a,r,l,s,d,c,p,f,m)=>{const[g,h]=e.useState(v),b=m?"":n,w="boolean"!=typeof f?!!p:f;return e.useEffect((()=>{const e=O(b,d,c),n=i.length?new Set(i.map((e=>e.value))):void 0,p=l||(e=>!!e.isDisabled),f=s||(e=>"string"==typeof e.label?e.label:`${e.label}`),m=t=>{const i=a(t),l={data:t,value:i,label:r(t),...p(t)&&{isDisabled:!0},...(null==n?void 0:n.has(i))&&{isSelected:!0}};if(!(e&&!(t=>{const n=O(f(t),d,c);return o===u.ANY?n.indexOf(e)>-1:n.substr(0,e.length)===e})(l)||w&&l.isSelected))return l},g=[];for(let e=0;e<t.length;e++){const n=m(t[e]);n&&g.push(n)}h(g)}),[t,i,b,w,o,d,c,s,l,a,r]),g},H=(t,n)=>{const o=e.useRef(!0);e.useEffect((()=>{if(!o.current)return t();o.current=!1}),n)},X=(t,n,o,i,a,r,l,s,u,c,p)=>{const f=e.useRef(!1),m=e.useRef(!1),[g,h]=e.useState(r),[b,v]=e.useState(i===d.TOP);e.useEffect((()=>{const e=i===d.TOP||i===d.AUTO&&!(e=>{if(!e)return!0;const t=T(e),{top:n,height:o}=e.getBoundingClientRect();return t.getBoundingClientRect().height-I(t)-n>=o})(t.current);v(e),m.current=b}),[t,i]),H((()=>{if(o){const e=e=>{null==c||c(),e&&(f.current=!0,h(e))};m.current?e():((e,t,n,o)=>{if(!e)return void o();const{top:i,height:a,bottom:r}=e.getBoundingClientRect(),l=window.innerHeight;if(l-i>=a)return void o();const s=T(e),d=I(s),u=s.getBoundingClientRect().height-d-i,c=u<a;if(c||!n)return void o(c?u:void 0);k(s,r-l+d+parseInt(getComputedStyle(e).marginBottom,10),t,o)})(t.current,s,u,e)}else null==p||p(),f.current&&(f.current=!1,h(r))}),[t,o,p,c,r,u,s]);const w=Math.min(g,l*a);return[b?((e,t,n)=>{const o=e>0||!t?e:t.getBoundingClientRect().height,i=n?n.getBoundingClientRect().height:0,a=t&&getComputedStyle(t),r=a?parseInt(a.marginBottom,10):0,l=a?parseInt(a.marginTop,10):0;return"calc("+-Math.abs(o+i)+"px + "+(r+l)+"px)"})(w,t.current,n.current):void 0,w]},_=r.default.div.withConfig({displayName:"SizerDiv",componentId:"o2ype2-0"})(["top:0;left:0;height:0;overflow:scroll;white-space:pre;position:absolute;visibility:hidden;font-size:inherit;font-weight:inherit;font-family:inherit;",""],(({theme:e})=>e.input.css)),G=r.default.input.withConfig({displayName:"Input",componentId:"o2ype2-1"})(["border:0;outline:0;padding:0;cursor:text;background:0;color:inherit;font-size:inherit;font-weight:inherit;font-family:inherit;box-sizing:content-box;:read-only{opacity:0;cursor:default;}:required{","}"," ",""],(({theme:e,isInvalid:t})=>t&&e.input.cssRequired),(({theme:e})=>e.input.css),R&&"::-ms-clear{display:none;}"),J=e.memo(e.forwardRef((({id:t,onBlur:n,onFocus:o,readOnly:i,required:r,onChange:l,ariaLabel:d,inputValue:u,ariaLabelledBy:c,selectedOption:p},f)=>{const m=e.useRef(null),[g,h]=e.useState(2),b=r&&!y(p);return H((()=>{m.current&&h(m.current.scrollWidth+2)}),[u]),a.default.createElement(e.Fragment,null,a.default.createElement(G,Object.assign({id:t,ref:f,isInvalid:!0,onBlur:n,onFocus:o,value:u,readOnly:i,required:b,"aria-label":d,style:{width:g}},s,{"aria-labelledby":c,onChange:i?void 0:l})),a.default.createElement(_,{ref:m},u))})));J.displayName="AutosizeInput";const Q=r.default.span.withConfig({displayName:"A11yText",componentId:"zxgkbx-0"})(["border:0;padding:0;width:1px;height:1px;margin:-1px;overflow:hidden;position:absolute;white-space:nowrap;clip:rect(0 0 0 0);clip-path:inset(50%);"]),Z=({menuOpen:e,isFocused:t,ariaLabel:n,inputValue:o,optionCount:i,isSearchable:r,focusedOption:l,selectedOption:s})=>{if(!t)return null;const d=`${i} result(s) available${o?" for search input "+o:""}.`,u=l.value?`Focused option: ${l.label}${l.isDisabled?" - disabled":""}, ${l.index+1} of ${i}.`:"",c=e?"Use Up and Down arrow keys to choose options, press Enter or Tab to select the currently focused option, press Escape to close the menu.":`${n||"Select"} is focused${r?", type to filter options":""}, press Down arrow key to open the menu.`,p=`Selected option: ${y(s)?s.map((({label:e})=>e)).join(" "):"N/A"}`,f=`${u} ${d} ${c}`;return a.default.createElement(Q,{"aria-live":"polite","data-testid":undefined},a.default.createElement("span",null," ",p),a.default.createElement("span",null," ",f))},ee=r.default.div.withConfig({displayName:"StyledLoadingDots",componentId:"sc-1j9e0pa-0"})(["display:flex;align-self:center;text-align:center;margin-right:0.25rem;padding:",";> div{border-radius:100%;display:inline-block;",":nth-of-type(1){animation-delay:-0.272s;}:nth-of-type(2){animation-delay:-0.136s;}}"],(({theme:e})=>e.loader.padding),(({theme:{loader:e}})=>t.css(["width:",";height:",";animation:",";background-color:",";"],e.size,e.size,e.animation,e.color))),te=()=>a.default.createElement(ee,{"aria-hidden":"true",className:"rfs-loading-dots"},a.default.createElement("div",null),a.default.createElement("div",null),a.default.createElement("div",null)),ne=r.default.svg.withConfig({displayName:"ClearSvg",componentId:"sc-1v5ipi2-0"})(["fill:currentColor;",""],(({theme:e})=>t.css(["width:",";height:",";animation:",";transition:",";"],e.icon.clear.width,e.icon.clear.height,e.icon.clear.animation,e.icon.clear.transition))),oe=()=>a.default.createElement(ne,{"aria-hidden":"true",viewBox:"0 0 14 16",className:"rfs-clear-icon"},a.default.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"})),ie=r.default.div.withConfig({displayName:"IndicatorIconsWrapper",componentId:"sc-1561oeb-0"})(["display:flex;flex-shrink:0;align-items:center;align-self:stretch;box-sizing:border-box;"]),ae=r.default.div.withConfig({displayName:"IndicatorIcon",componentId:"sc-1561oeb-1"})(["height:100%;display:flex;align-items:center;box-sizing:border-box;color:",";padding:",";:hover{color:",";}",""],(({theme:e})=>e.icon.color),(({theme:e})=>e.icon.padding),(({theme:e})=>e.icon.hoverColor),(({theme:e})=>e.icon.css)),re=r.default.div.withConfig({displayName:"Caret",componentId:"sc-1561oeb-2"})(["transition:",";border-top:"," dashed;border-left:"," solid transparent;border-right:"," solid transparent;",""],(({theme:e})=>e.icon.caret.transition),(({theme:e})=>e.icon.caret.size),(({theme:e})=>e.icon.caret.size),(({theme:e})=>e.icon.caret.size),(({theme:e,menuOpen:n,isInvalid:o})=>n&&t.css(["transform:rotate(180deg);color:",";"],o?e.color.danger:e.color.caretActive||e.color.primary))),le=r.default.div.withConfig({displayName:"Separator",componentId:"sc-1561oeb-3"})(["width:1px;margin:0.5rem 0;align-self:stretch;box-sizing:border-box;background-color:",";"],(({theme:e})=>e.color.iconSeparator||e.color.border)),se=e.memo((({menuOpen:e,clearIcon:t,caretIcon:n,isInvalid:o,showClear:i,isLoading:r,isDisabled:l,loadingNode:s,onCaretMouseDown:d,onClearMouseDown:u})=>{const c="function"==typeof n||"function"==typeof t?{menuOpen:e,isLoading:!!r,isInvalid:!!o,isDisabled:!!l}:void 0,p=e=>"function"==typeof e?e(c):e;return a.default.createElement(ie,null,i&&!r&&a.default.createElement(ae,{onTouchEnd:u,onMouseDown:u,"data-testid":undefined},p(t)||a.default.createElement(oe,null)),r&&(s||a.default.createElement(te,null)),a.default.createElement(le,null),a.default.createElement(ae,{onTouchEnd:d,onMouseDown:d,"data-testid":undefined},p(n)||a.default.createElement(re,{"aria-hidden":"true",menuOpen:e,isInvalid:o,className:"rfs-caret-icon"})))}));se.displayName="IndicatorIcons";const de=r.default.div.withConfig({displayName:"SelectWrapper",componentId:"kcrmu9-0"})(["position:relative;box-sizing:border-box;",""],(({theme:e})=>e.select.css)),ue=r.default.div.withConfig({displayName:"ValueWrapper",componentId:"kcrmu9-1"})(["flex:1 1 0%;display:flex;flex-wrap:wrap;overflow:hidden;position:relative;align-items:center;box-sizing:border-box;padding:",";"],(({theme:e})=>e.control.padding)),ce=r.default.div.withConfig({displayName:"ControlWrapper",componentId:"kcrmu9-2"})(["outline:0;display:flex;flex-wrap:wrap;cursor:default;position:relative;align-items:center;box-sizing:border-box;justify-content:space-between;"," "," ",""],(({isDisabled:e,isFocused:n,isInvalid:o,theme:{control:i,color:a}})=>t.css(["transition:",";border-style:",";border-width:",";border-radius:",";min-height:",";border-color:",";"," "," "," ",""],i.transition,i.borderStyle,i.borderWidth,i.borderRadius,i.height||i.minHeight,o?a.danger:n?i.focusedBorderColor:a.border,i.height?`height: ${i.height};`:"",e?"pointer-events:none;user-select:none;":"",i.backgroundColor||e?`background-color: ${e?a.disabled:i.backgroundColor};`:"",n?`box-shadow: ${i.boxShadow} ${o?a.dangerLight:i.boxShadowColor};`:"")),(({theme:e})=>e.control.css),(({isFocused:e,theme:t})=>e&&t.control.focusedCss)),pe=e.forwardRef((({async:n,isMulti:o,inputId:i,selectId:r,required:s,autoFocus:f,isLoading:m,onKeyDown:g,clearIcon:h,caretIcon:O,isInvalid:I,ariaLabel:E,menuWidth:M,isDisabled:T,inputDelay:k,onMenuOpen:R,onMenuClose:z,onInputBlur:L,isClearable:D,themeConfig:A,loadingNode:V,initialValue:B,onInputFocus:P,onInputChange:$,ariaLabelledBy:W,onOptionChange:q,onSearchChange:U,getOptionLabel:j,getOptionValue:_,itemKeySelector:G,openMenuOnFocus:Q,menuPortalTarget:ee,isAriaLiveEnabled:te,menuOverscanCount:ne,blurInputOnSelect:oe,renderOptionLabel:ie,renderMultiOptions:ae,menuScrollDuration:re,filterIgnoreAccents:le,hideSelectedOptions:pe,getIsOptionDisabled:fe,getFilterOptionString:me,isSearchable:ge=!0,lazyLoadMenu:he=!1,openMenuOnClick:be=!0,filterIgnoreCase:ve=!0,tabSelectsOption:we=!0,closeMenuOnSelect:ye=!0,scrollMenuIntoView:xe=!0,backspaceClearsValue:Oe=!0,filterMatchFrom:Ce=u.ANY,menuPosition:Se=d.BOTTOM,options:Ie=v,loadingMsg:Ee="Loading..",placeholder:Me="Select option..",noOptionsMsg:Te="No options",menuItemSize:ke=35,menuMaxHeight:Ne=300},Re)=>{const ze=e.useRef(!1),Le=e.useRef(),De=e.useRef(!1),Ae=e.useRef(null),Fe=e.useRef(null),Ve=e.useRef(null),Be=e.useRef(null),[Pe,$e]=e.useState(""),[We,qe]=e.useState(!1),[Ue,je]=e.useState(!1),[Ke,Ye]=e.useState(null),[He,Xe]=e.useState(b),_e=e.useMemo((()=>x(A)?S(w,A):w),[A]),Ge=e.useMemo((()=>j||(e=>e.label)),[j]),Je=e.useMemo((()=>_||(e=>e.value)),[_]),Qe=e.useMemo((()=>ie||Ge),[ie,Ge]),Ze=((t,n)=>{const[o,i]=e.useState(t);return e.useEffect((()=>{if(void 0===n)return;const e=setTimeout((()=>{i(t)}),n);return()=>{clearTimeout(e)}}),[t,n]),void 0===n?t:o})(Pe,k),[et,tt]=e.useState((()=>C(B,Je,Ge))),nt=Y(Ie,Ze,Ce,et,Je,Ge,fe,me,ve,le,o,pe,n),[ot,it]=X(Fe,Be,We,Se,ke,Ne,nt.length,re,xe,R,z),at=()=>{var e;return null===(e=Ve.current)||void 0===e?void 0:e.blur()},rt=()=>{var e;return null===(e=Ve.current)||void 0===e?void 0:e.focus()},lt=e=>{var t;return null===(t=Ae.current)||void 0===t?void 0:t.scrollToItem(e)},st=(e,t=!0)=>{e.stopPropagation(),t&&e.preventDefault()},dt=e.useCallback(((e,t)=>{t&&st(t,"mousedown"===t.type),tt((t=>t.filter((t=>t.value!==e))))}),[]),ut=e.useCallback((e=>{if(!y(nt))return void(!ze.current&&qe(!0));const t=o?-1:nt.findIndex((({isSelected:e})=>e)),n=t>-1?t:e===p.FIRST?0:nt.length-1;!ze.current&&qe(!0),Xe({index:n,...nt[n]}),lt(n)}),[o,nt]),ct=e.useCallback(((e,t)=>{t?o&&dt(e.value):tt((t=>o?[...t,e]:[e]));("boolean"==typeof oe?oe:N)?at():ye&&(qe(!1),$e(""))}),[o,ye,dt,oe]);var pt;e.useImperativeHandle(Re,(()=>({menuOpen:We,empty:!y(et),blur:at,focus:rt,clearValue:()=>{tt(v),Xe(b)},setValue:e=>{const t=C(e,Je,Ge);tt(t)},toggleMenu:e=>{!0===e||void 0===e&&!We?(!Ue&&rt(),ut(p.FIRST)):at()}}))),pt=()=>{f&&rt()},e.useEffect(pt,[]),e.useEffect((()=>{ze.current=We}),[We]),e.useEffect((()=>{Ue&&Q&&ut(p.FIRST)}),[Ue,Q,ut]),e.useEffect((()=>{U&&De.current&&(De.current=!1,U(Ze))}),[U,Ze]),H((()=>{if(!q)return;const e=o?et.map((({data:e})=>e)):y(et)?et[0].data:null;q(e)}),[o,et,q]),H((()=>{const e=nt.length>0&&(n||nt.length!==Ie.length||0===Le.current);0===nt.length?Xe(b):(1===nt.length||e)&&(Xe({index:0,...nt[0]}),lt(0)),Le.current=nt.length}),[n,Ie,nt]);const ft=()=>{const{data:e,value:t,label:n,isSelected:o,isDisabled:i}=He;e&&!i&&ct({data:e,value:t,label:n},o)},mt=e=>{T||(Ue||rt(),We?"INPUT"!==e.currentTarget.tagName&&(We&&qe(!1),Pe&&$e("")):be&&ut(p.FIRST),"INPUT"!==e.currentTarget.tagName&&e.preventDefault())},gt=e.useCallback((e=>{null==L||L(e),je(!1),qe(!1),$e("")}),[L]),ht=e.useCallback((e=>{null==P||P(e),je(!0)}),[P]),bt=e.useCallback((e=>{De.current=!0,null==$||$(e.currentTarget.value||""),!ze.current&&qe(!0),$e(e.currentTarget.value||"")}),[$]),vt=e.useCallback((e=>{st(e,"mousedown"===e.type),tt(v),rt()}),[]),wt=e.useCallback((e=>{st(e,"mousedown"===e.type),rt(),ze.current?qe(!1):ut(p.FIRST)}),[ut]),yt=!he||he&&We,xt=T||!ge||!!Ke,Ot=!(!D||T||!y(et)),Ct=T||be?void 0:wt;return a.default.createElement(t.ThemeProvider,{theme:_e},a.default.createElement(de,Object.assign({id:r,"aria-controls":i,"aria-expanded":We,onKeyDown:e=>{if(!(T||g&&(g(e,Pe,He),e.defaultPrevented))){switch(e.key){case"ArrowDown":case"ArrowUp":const t="ArrowDown"===e.key;We?(e=>{if(!y(nt))return;const t=e===p.DOWN?(He.index+1)%nt.length:He.index>0?He.index-1:nt.length-1;Ke&&Ye(null),Xe({index:t,...nt[t]}),lt(t)})(t?p.DOWN:p.UP):ut(t?p.FIRST:p.LAST);break;case"ArrowLeft":case"ArrowRight":if(!o||Pe||ae)return;(e=>{if(!y(et))return;let t=-1;const n=et.length-1,o=Ke?et.findIndex((e=>e.value===Ke)):-1;switch(e){case c.NEXT:t=o>-1&&o<n?o+1:-1;break;case c.PREVIOUS:t=0!==o?-1===o?n:o-1:0}const i=t>=0?et[t].value:null;He.data&&Xe(b),i!==Ke&&Ye(i)})("ArrowLeft"===e.key?c.PREVIOUS:c.NEXT);break;case" ":if(Pe)return;if(We){if(!He.data)return;ft()}else ut(p.FIRST);break;case"Enter":We&&229!==e.keyCode&&ft();break;case"Escape":We&&(qe(!1),$e(""));break;case"Tab":if(!We||!we||!He.data||e.shiftKey)return;ft();break;case"Delete":case"Backspace":if(Pe)return;if(Ke){const e=et.findIndex((e=>e.value===Ke)),t=e>-1&&e<et.length-1?et[e+1].value:null;dt(Ke),Ye(t)}else{if(!Oe)return;if(y(et))if(o&&!ae){const{value:e}=et[et.length-1];dt(e)}else D&&tt(v)}break;default:return}e.preventDefault()}}},l),a.default.createElement(ce,{ref:Be,isInvalid:I,isFocused:Ue,isDisabled:T,className:"rfs-control-container",onTouchEnd:mt,onMouseDown:mt,"data-testid":undefined},a.default.createElement(ue,null,a.default.createElement(K,{isMulti:o,inputValue:Pe,placeholder:Me,selectedOption:et,focusedMultiValue:Ke,renderOptionLabel:Qe,renderMultiOptions:ae,removeSelectedOption:dt}),a.default.createElement(J,{id:i,ref:Ve,required:s,ariaLabel:E,inputValue:Pe,readOnly:xt,onBlur:gt,onFocus:ht,onChange:bt,ariaLabelledBy:W,selectedOption:et})),a.default.createElement(se,{menuOpen:We,clearIcon:h,caretIcon:O,isInvalid:I,isLoading:m,showClear:Ot,isDisabled:T,loadingNode:V,onClearMouseDown:vt,onCaretMouseDown:Ct})),yt&&a.default.createElement(F,{menuRef:Fe,menuOpen:We,isLoading:m,menuTop:ot,height:it,itemSize:ke,loadingMsg:Ee,menuOptions:nt,fixedSizeListRef:Ae,noOptionsMsg:Te,selectOption:ct,itemKeySelector:G,overscanCount:ne,menuPortalTarget:ee,width:M||_e.menu.width,onMenuMouseDown:e=>{st(e),rt()},renderOptionLabel:Qe,focusedOptionIndex:He.index}),te&&a.default.createElement(Z,{menuOpen:We,isFocused:Ue,ariaLabel:E,inputValue:Pe,isSearchable:ge,focusedOption:He,selectedOption:et,optionCount:nt.length})))}));pe.displayName="Select",exports.Select=pe; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("styled-components"),n=require("react-dom"),o=require("react-window");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=i(e),r=i(t);const l={role:"combobox","aria-haspopup":"listbox",className:"rfs-select-container","data-testid":undefined},s={tabIndex:0,type:"text",spellCheck:!1,autoCorrect:"off",autoComplete:"off",autoCapitalize:"none","aria-autocomplete":"list",className:"rfs-autosize-input","data-testid":undefined};var d,u,c,p;!function(e){e.TOP="top",e.AUTO="auto",e.BOTTOM="bottom"}(d||(d={})),function(e){e.ANY="any",e.START="start"}(u||(u={})),function(e){e.NEXT="next",e.PREVIOUS="prev"}(c||(c={})),function(e){e.UP="up",e.DOWN="down",e.LAST="last",e.FIRST="first"}(p||(p={}));const f=t.keyframes(["0%,80%,100%{transform:scale(0);}40%{transform:scale(1.0);}"]),m=t.keyframes(["from{opacity:0;}to{opacity:1;}"]),g=t.css([""," 0.2s ease-out both"],m),h={index:-1},b=[],v={color:{border:"#ced4da",danger:"#dc3545",primary:"#007bff",disabled:"#e9ecef",placeholder:"#6E7276",dangerLight:"rgba(220, 53, 69, 0.25)"},input:{},select:{},loader:{size:"0.625rem",padding:"0.375rem 0.75rem",animation:t.css([""," 1.19s ease-in-out infinite"],f),color:"rgba(0, 123, 255, 0.42)"},icon:{color:"#ccc",hoverColor:"#A6A6A6",padding:"0 0.9375rem",clear:{width:"14px",height:"16px",animation:g,transition:"color 0.2s ease-out"},caret:{size:"7px",transition:"transform 0.3s ease-in-out, color 0.2s ease-out"}},control:{minHeight:"38px",borderWidth:"1px",borderStyle:"solid",borderRadius:"3px",boxShadow:"0 0 0 0.2rem",padding:"0.375rem 0.75rem",boxShadowColor:"rgba(0, 123, 255, 0.25)",focusedBorderColor:"rgba(0, 123, 255, 0.75)",transition:"box-shadow 0.2s ease-out, border-color 0.2s ease-out"},menu:{padding:"0",width:"100%",margin:"0.5rem 0",borderRadius:"3px",backgroundColor:"#fff",animation:g,boxShadow:"0 0.5em 1em -0.125em rgb(10 10 10 / 12%), 0 0 0 1px rgb(10 10 10 / 4%)",option:{textAlign:"left",selectedColor:"#fff",selectedBgColor:"#007bff",padding:"0.375rem 0.75rem",focusedBgColor:"rgba(0, 123, 255, 0.15)"}},noOptions:{fontSize:"1.25rem",margin:"0.25rem 0",color:"hsl(0, 0%, 60%)",padding:"0.375rem 0.75rem"},multiValue:{margin:"1px 2px",borderRadius:"3px",backgroundColor:"#e7edf3",animation:g,label:{borderRadius:"3px",fontSize:"0.825em",padding:"1px 0 1px 6px"},clear:{fontWeight:600,padding:"0 6px",color:"#a6a6a6",fontSize:"0.65em",alignSelf:"center",focusColor:"#808080",transition:"color 0.2s ease-out, transform 0.2s ease-out, z-index 0.2s ease-out"}}};function w(e){return Array.isArray(e)&&!!e.length}const y=/[\u0300-\u036f]/g;function x(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function O(e,t,n){let o=e.trim();return t&&(o=o.toLowerCase()),n?function(e){return e.normalize("NFD").replace(y,"")}(o):o}function C(e,t,n){const o=Array.isArray(e)?e:x(e)?[e]:b;return w(o)?o.map((e=>({data:e,value:t(e),label:n(e)}))):o}const S=(e,t)=>{const n={...e};return Object.keys(t).forEach((o=>{const i=t[o];n[o]=x(i)&&"animation"!==o?o in e?S(e[o],i):i:i||""})),n};function I(e){return E(e)?window.pageYOffset:e.scrollTop}function E(e){return e===document.documentElement||e===document.body||e===window}function M({overflow:e,overflowX:t,overflowY:n}){const o=e=>"auto"===e||"scroll"===e;return o(e)||o(t)||o(n)}function N(e){let t=getComputedStyle(e);const n="absolute"===t.position;if("fixed"===t.position)return document.documentElement;for(let o=e;o=o?o.parentElement:null;)if(t=getComputedStyle(o),(!n||"static"!==t.position)&&M(t))return o;return document.documentElement}function T(e,t,n=300,o){let i=0;const a=I(e),r=t-a;window.requestAnimationFrame((function t(){var l;i+=5,function(e,t){E(e)?window.scrollTo(0,t):e.scrollTop=t}(e,r*((l=(l=i)/n-1)*l*l+1)+a),i<n?window.requestAnimationFrame(t):null==o||o()}))}const k="undefined"!=typeof window&&"ontouchstart"in window||"undefined"!=typeof navigator&&!!navigator.maxTouchPoints,R="undefined"!=typeof navigator&&/(MSIE|Trident\/|Edge\/|Edg\/)/i.test(navigator.userAgent),z=e.memo((({index:e,style:t,data:{menuOptions:n,selectOption:o,renderOptionLabel:i,focusedOptionIndex:r}})=>{const{data:l,value:s,label:d,isDisabled:u,isSelected:c}=n[e],p=function(e,t,n){let o="rfs-option";return e&&(o+=" rfs-option-disabled"),t&&(o+=" rfs-option-selected"),n&&(o+=" rfs-option-focused"),o}(u,c,e===r),f=u?void 0:()=>o({data:l,value:s,label:d},c);return a.default.createElement("div",{style:t,onClick:f,className:p},i(l))}),o.areEqual);z.displayName="Option";const L=r.default.div.withConfig({displayName:"NoOptionsMsg",componentId:"v1y124-0"})(["text-align:center;color:",";margin:",";padding:",";font-size:",";",""],(({theme:e})=>e.noOptions.color),(({theme:e})=>e.noOptions.margin),(({theme:e})=>e.noOptions.padding),(({theme:e})=>e.noOptions.fontSize),(({theme:e})=>e.noOptions.css)),D=({width:t,height:n,itemSize:i,isLoading:r,loadingMsg:l,menuOptions:s,selectOption:d,noOptionsMsg:u,overscanCount:c,itemKeySelector:p,fixedSizeListRef:f,renderOptionLabel:m,focusedOptionIndex:g})=>{const h=e.useMemo((()=>({menuOptions:s,selectOption:d,renderOptionLabel:m,focusedOptionIndex:g})),[s,g,d,m]);if(r)return a.default.createElement(L,null,l);const b=p?(e,t)=>t.menuOptions[e][p]:void 0;return a.default.createElement(e.Fragment,null,a.default.createElement(o.FixedSizeList,{width:t,height:n,itemKey:b,itemSize:i,itemData:h,ref:f,overscanCount:c,itemCount:s.length},z),!w(s)&&u&&a.default.createElement(L,null,u))},A=r.default.div.withConfig({displayName:"MenuWrapper",componentId:"yf5myu-0"})(["z-index:999;cursor:default;position:absolute;"," "," .","{display:block;overflow:hidden;user-select:none;white-space:nowrap;text-overflow:ellipsis;-webkit-tap-highlight-color:transparent;","}"],(({menuTop:e,menuOpen:n,hideNoOptionsMsg:o,theme:{menu:i}})=>t.css(["width:",";margin:",";padding:",";animation:",";border-radius:",";background-color:",";box-shadow:",";"," ",""],i.width,i.margin,i.padding,i.animation,i.borderRadius,i.backgroundColor,o?"none":i.boxShadow,n?"":"display: none;",e?`top: ${e};`:"")),(({theme:e})=>e.menu.css),"rfs-option",(({theme:{menu:{option:e}}})=>t.css(["padding:",";text-align:",";&.",",&:hover:not(.","):not(.","){background-color:",";}&.","{color:",";background-color:",";}&.","{opacity:0.35;}"],e.padding,e.textAlign,"rfs-option-focused","rfs-option-disabled","rfs-option-selected",e.focusedBgColor,"rfs-option-selected",e.selectedColor,e.selectedBgColor,"rfs-option-disabled"))),F=({menuRef:e,menuTop:t,menuOpen:o,onMenuMouseDown:i,menuPortalTarget:r,...l})=>{const s=o&&!Boolean(l.noOptionsMsg)&&!w(l.menuOptions),d=a.default.createElement(A,{ref:e,menuTop:t,menuOpen:o,onMouseDown:i,className:"rfs-menu-container","data-testid":undefined,hideNoOptionsMsg:s},a.default.createElement(D,Object.assign({},l)));return r?n.createPortal(d,r):d},V=t.css(["z-index:5000;transform:scale(1.26);color:",";"],(({theme:e})=>e.multiValue.clear.focusColor)),B=r.default.div.withConfig({displayName:"MultiValueWrapper",componentId:"sc-211cx7-0"})(["min-width:0;display:flex;"," ",""],(({theme:{multiValue:e}})=>t.css(["margin:",";animation:",";border-radius:",";background-color:",";"],e.margin,e.animation,e.borderRadius,e.backgroundColor)),(({theme:e})=>e.multiValue.css)),P=r.default.div.withConfig({displayName:"Label",componentId:"sc-211cx7-1"})(["overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:",";font-size:",";border-radius:",";"],(({theme:e})=>e.multiValue.label.padding),(({theme:e})=>e.multiValue.label.fontSize),(({theme:e})=>e.multiValue.label.borderRadius)),$=r.default.i.withConfig({displayName:"Clear",componentId:"sc-211cx7-2"})(["display:flex;font-style:inherit;"," ",""],(({theme:{multiValue:{clear:e}}})=>t.css(["color:",";padding:",";font-size:",";align-self:",";transition:",";font-weight:",";:hover{","}"],e.color,e.padding,e.fontSize,e.alignSelf,e.transition,e.fontWeight,V)),(({isFocused:e})=>e&&V)),W=e.memo((({data:e,value:t,isFocused:n,renderOptionLabel:o,removeSelectedOption:i})=>a.default.createElement(B,null,a.default.createElement(P,null,o(e)),a.default.createElement($,{isFocused:n,"data-testid":undefined,onTouchEnd:e=>i(t,e),onMouseDown:e=>i(t,e)},"✖"))));W.displayName="MultiValue";const q=t.css(["top:50%;overflow:hidden;position:absolute;white-space:nowrap;box-sizing:border-box;text-overflow:ellipsis;transform:translateY(-50%);"]),U=r.default.div.withConfig({displayName:"SingleValue",componentId:"sc-153h0ct-0"})([""," max-width:calc(100% - 0.5rem);"],q),j=r.default.div.withConfig({displayName:"Placeholder",componentId:"sc-153h0ct-1"})([""," color:",";",""],q,(({theme:e})=>e.color.placeholder),(({theme:e,isMulti:n})=>n&&t.css(["animation:",";"],e.multiValue.animation))),K=({isMulti:t,inputValue:n,placeholder:o,selectedOption:i,focusedMultiValue:r,renderOptionLabel:l,renderMultiOptions:s,removeSelectedOption:d})=>!n||t&&(!t||w(i)&&!s)?w(i)?t?a.default.createElement(e.Fragment,null,s?s({renderOptionLabel:l,selected:i}):i.map((({data:e,value:t})=>a.default.createElement(W,{key:t,data:e,value:t,renderOptionLabel:l,isFocused:t===r,removeSelectedOption:d})))):a.default.createElement(U,null,l(i[0].data)):a.default.createElement(j,{isMulti:t},o):null,Y=(t,n,o,i,a,r,l,s,d,c,p,f,m)=>{const[g,h]=e.useState(b),v=m?"":n,w="boolean"!=typeof f?!!p:f;return e.useEffect((()=>{const e=O(v,d,c),n=i.length?new Set(i.map((e=>e.value))):void 0,p=l||(e=>!!e.isDisabled),f=s||(e=>"string"==typeof e.label?e.label:`${e.label}`),m=t=>{const i=a(t),l={data:t,value:i,label:r(t),...p(t)&&{isDisabled:!0},...(null==n?void 0:n.has(i))&&{isSelected:!0}};if(!(e&&!(t=>{const n=O(f(t),d,c);return o===u.ANY?n.indexOf(e)>-1:n.substr(0,e.length)===e})(l)||w&&l.isSelected))return l},g=[];for(let e=0;e<t.length;e++){const n=m(t[e]);n&&g.push(n)}h(g)}),[t,i,v,w,o,d,c,s,l,a,r]),g},H=(t,n)=>{const o=e.useRef(!0);e.useEffect((()=>{if(!o.current)return t();o.current=!1}),n)},X=(t,n,o,i,a,r,l,s,u,c,p)=>{const f=e.useRef(!1),m=e.useRef(!1),[g,h]=e.useState(r),[b,v]=e.useState(i===d.TOP);e.useEffect((()=>{const e=i===d.TOP||i===d.AUTO&&!(e=>{if(!e)return!0;const t=N(e),{top:n,height:o}=e.getBoundingClientRect();return t.getBoundingClientRect().height-I(t)-n>=o})(t.current);v(e),m.current=b}),[t,i]),H((()=>{if(o){const e=e=>{null==c||c(),e&&(f.current=!0,h(e))};m.current?e():((e,t,n,o)=>{if(!e)return void o();const{top:i,height:a,bottom:r}=e.getBoundingClientRect(),l=window.innerHeight;if(l-i>=a)return void o();const s=N(e),d=I(s),u=s.getBoundingClientRect().height-d-i,c=u<a;if(c||!n)return void o(c?u:void 0);T(s,r-l+d+parseInt(getComputedStyle(e).marginBottom,10),t,o)})(t.current,s,u,e)}else null==p||p(),f.current&&(f.current=!1,h(r))}),[t,o,p,c,r,u,s]);const w=Math.min(g,l*a);return[b?((e,t,n)=>{const o=e>0||!t?e:t.getBoundingClientRect().height,i=n?n.getBoundingClientRect().height:0,a=t&&getComputedStyle(t),r=a?parseInt(a.marginBottom,10):0,l=a?parseInt(a.marginTop,10):0;return"calc("+-Math.abs(o+i)+"px + "+(r+l)+"px)"})(w,t.current,n.current):void 0,w]},_=r.default.div.withConfig({displayName:"SizerDiv",componentId:"o2ype2-0"})(["top:0;left:0;height:0;overflow:scroll;white-space:pre;position:absolute;visibility:hidden;font-size:inherit;font-weight:inherit;font-family:inherit;",""],(({theme:e})=>e.input.css)),G=r.default.input.withConfig({displayName:"Input",componentId:"o2ype2-1"})(["border:0;outline:0;padding:0;cursor:text;background:0;color:inherit;font-size:inherit;font-weight:inherit;font-family:inherit;box-sizing:content-box;:read-only{opacity:0;cursor:default;}:required{","}"," ",""],(({theme:e,isInvalid:t})=>t&&e.input.cssRequired),(({theme:e})=>e.input.css),R&&"::-ms-clear{display:none;}"),J=e.memo(e.forwardRef((({id:t,onBlur:n,onFocus:o,readOnly:i,required:r,onChange:l,ariaLabel:d,inputValue:u,ariaLabelledBy:c,selectedOption:p},f)=>{const m=e.useRef(null),[g,h]=e.useState(2),b=r&&!w(p);return H((()=>{m.current&&h(m.current.scrollWidth+2)}),[u]),a.default.createElement(e.Fragment,null,a.default.createElement(G,Object.assign({id:t,ref:f,isInvalid:!0,onBlur:n,onFocus:o,value:u,readOnly:i,required:b,"aria-label":d,style:{width:g}},s,{"aria-labelledby":c,onChange:i?void 0:l})),a.default.createElement(_,{ref:m},u))})));J.displayName="AutosizeInput";const Q=r.default.span.withConfig({displayName:"A11yText",componentId:"zxgkbx-0"})(["border:0;padding:0;width:1px;height:1px;margin:-1px;overflow:hidden;position:absolute;white-space:nowrap;clip:rect(0 0 0 0);clip-path:inset(50%);"]),Z=({menuOpen:e,isFocused:t,ariaLabel:n,inputValue:o,optionCount:i,isSearchable:r,focusedOption:l,selectedOption:s})=>{if(!t)return null;const d=`${i} result(s) available${o?" for search input "+o:""}.`,u=l.value?`Focused option: ${l.label}${l.isDisabled?" - disabled":""}, ${l.index+1} of ${i}.`:"",c=e?"Use Up and Down arrow keys to choose options, press Enter or Tab to select the currently focused option, press Escape to close the menu.":`${n||"Select"} is focused${r?", type to filter options":""}, press Down arrow key to open the menu.`,p=`Selected option: ${w(s)?s.map((({label:e})=>e)).join(" "):"N/A"}`,f=`${u} ${d} ${c}`;return a.default.createElement(Q,{"aria-live":"polite","data-testid":undefined},a.default.createElement("span",null," ",p),a.default.createElement("span",null," ",f))},ee=r.default.div.withConfig({displayName:"StyledLoadingDots",componentId:"sc-1j9e0pa-0"})(["display:flex;align-self:center;text-align:center;margin-right:0.25rem;padding:",";> div{border-radius:100%;display:inline-block;",":nth-of-type(1){animation-delay:-0.272s;}:nth-of-type(2){animation-delay:-0.136s;}}"],(({theme:e})=>e.loader.padding),(({theme:{loader:e}})=>t.css(["width:",";height:",";animation:",";background-color:",";"],e.size,e.size,e.animation,e.color))),te=()=>a.default.createElement(ee,{"aria-hidden":!0,className:"rfs-loading-dots"},a.default.createElement("div",null),a.default.createElement("div",null),a.default.createElement("div",null)),ne=r.default.svg.withConfig({displayName:"ClearSvg",componentId:"sc-1v5ipi2-0"})(["fill:currentColor;",""],(({theme:e})=>t.css(["width:",";height:",";animation:",";transition:",";"],e.icon.clear.width,e.icon.clear.height,e.icon.clear.animation,e.icon.clear.transition))),oe=()=>a.default.createElement(ne,{"aria-hidden":!0,viewBox:"0 0 14 16",className:"rfs-clear-icon"},a.default.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"})),ie=r.default.div.withConfig({displayName:"IndicatorIconsWrapper",componentId:"sc-1561oeb-0"})(["display:flex;flex-shrink:0;align-items:center;align-self:stretch;box-sizing:border-box;"]),ae=r.default.div.withConfig({displayName:"IndicatorIcon",componentId:"sc-1561oeb-1"})(["height:100%;display:flex;align-items:center;box-sizing:border-box;color:",";padding:",";:hover{color:",";}",""],(({theme:e})=>e.icon.color),(({theme:e})=>e.icon.padding),(({theme:e})=>e.icon.hoverColor),(({theme:e})=>e.icon.css)),re=r.default.div.withConfig({displayName:"Caret",componentId:"sc-1561oeb-2"})(["transition:",";border-top:"," dashed;border-left:"," solid transparent;border-right:"," solid transparent;",""],(({theme:e})=>e.icon.caret.transition),(({theme:e})=>e.icon.caret.size),(({theme:e})=>e.icon.caret.size),(({theme:e})=>e.icon.caret.size),(({theme:e,menuOpen:n,isInvalid:o})=>n&&t.css(["transform:rotate(180deg);color:",";"],o?e.color.danger:e.color.caretActive||e.color.primary))),le=r.default.div.withConfig({displayName:"Separator",componentId:"sc-1561oeb-3"})(["width:1px;margin:0.5rem 0;align-self:stretch;box-sizing:border-box;background-color:",";"],(({theme:e})=>e.color.iconSeparator||e.color.border)),se=e.memo((({menuOpen:e,clearIcon:t,caretIcon:n,isInvalid:o,showClear:i,isLoading:r,isDisabled:l,loadingNode:s,onCaretMouseDown:d,onClearMouseDown:u})=>{const c="function"==typeof n||"function"==typeof t?{menuOpen:e,isLoading:!!r,isInvalid:!!o,isDisabled:!!l}:void 0,p=e=>"function"==typeof e?e(c):e;return a.default.createElement(ie,null,i&&!r&&a.default.createElement(ae,{onTouchEnd:u,onMouseDown:u,"data-testid":undefined},p(t)||a.default.createElement(oe,null)),r&&(s||a.default.createElement(te,null)),a.default.createElement(le,null),a.default.createElement(ae,{onTouchEnd:d,onMouseDown:d,"data-testid":undefined},p(n)||a.default.createElement(re,{"aria-hidden":!0,menuOpen:e,isInvalid:o,className:"rfs-caret-icon"})))}));se.displayName="IndicatorIcons";const de=r.default.div.withConfig({displayName:"SelectWrapper",componentId:"kcrmu9-0"})(["position:relative;box-sizing:border-box;",""],(({theme:e})=>e.select.css)),ue=r.default.div.withConfig({displayName:"ValueWrapper",componentId:"kcrmu9-1"})(["flex:1 1 0%;display:flex;flex-wrap:wrap;overflow:hidden;position:relative;align-items:center;box-sizing:border-box;padding:",";"],(({theme:e})=>e.control.padding)),ce=r.default.div.withConfig({displayName:"ControlWrapper",componentId:"kcrmu9-2"})(["outline:0;display:flex;flex-wrap:wrap;cursor:default;position:relative;align-items:center;box-sizing:border-box;justify-content:space-between;"," "," ",""],(({isDisabled:e,isFocused:n,isInvalid:o,theme:{control:i,color:a}})=>t.css(["transition:",";border-style:",";border-width:",";border-radius:",";min-height:",";border-color:",";"," "," "," ",""],i.transition,i.borderStyle,i.borderWidth,i.borderRadius,i.height||i.minHeight,o?a.danger:n?i.focusedBorderColor:a.border,i.height?`height: ${i.height};`:"",e?"pointer-events:none;user-select:none;":"",i.backgroundColor||e?`background-color: ${e?a.disabled:i.backgroundColor};`:"",n?`box-shadow: ${i.boxShadow} ${o?a.dangerLight:i.boxShadowColor};`:"")),(({theme:e})=>e.control.css),(({isFocused:e,theme:t})=>e&&t.control.focusedCss)),pe=e.forwardRef((({async:n,isMulti:o,inputId:i,selectId:r,required:s,autoFocus:f,isLoading:m,onKeyDown:g,clearIcon:y,caretIcon:O,isInvalid:I,ariaLabel:E,menuWidth:M,isDisabled:N,inputDelay:T,onMenuOpen:R,onMenuClose:z,onInputBlur:L,isClearable:D,themeConfig:A,loadingNode:V,initialValue:B,onInputFocus:P,onInputChange:$,ariaLabelledBy:W,onOptionChange:q,onSearchChange:U,getOptionLabel:j,getOptionValue:_,itemKeySelector:G,openMenuOnFocus:Q,menuPortalTarget:ee,isAriaLiveEnabled:te,menuOverscanCount:ne,blurInputOnSelect:oe,renderOptionLabel:ie,renderMultiOptions:ae,menuScrollDuration:re,filterIgnoreAccents:le,hideSelectedOptions:pe,getIsOptionDisabled:fe,getFilterOptionString:me,isSearchable:ge=!0,lazyLoadMenu:he=!1,openMenuOnClick:be=!0,filterIgnoreCase:ve=!0,tabSelectsOption:we=!0,closeMenuOnSelect:ye=!0,scrollMenuIntoView:xe=!0,backspaceClearsValue:Oe=!0,filterMatchFrom:Ce=u.ANY,menuPosition:Se=d.BOTTOM,options:Ie=b,loadingMsg:Ee="Loading..",placeholder:Me="Select option..",noOptionsMsg:Ne="No options",menuItemSize:Te=35,menuMaxHeight:ke=300},Re)=>{const ze=e.useRef(!1),Le=e.useRef(),De=e.useRef(!1),Ae=e.useRef(null),Fe=e.useRef(null),Ve=e.useRef(null),Be=e.useRef(null),[Pe,$e]=e.useState(""),[We,qe]=e.useState(!1),[Ue,je]=e.useState(!1),[Ke,Ye]=e.useState(null),[He,Xe]=e.useState(h),_e=e.useMemo((()=>x(A)?S(v,A):v),[A]),Ge=e.useMemo((()=>j||(e=>e.label)),[j]),Je=e.useMemo((()=>_||(e=>e.value)),[_]),Qe=e.useMemo((()=>ie||Ge),[ie,Ge]),Ze=((t,n)=>{const[o,i]=e.useState(t);return e.useEffect((()=>{if(void 0===n)return;const e=setTimeout((()=>{i(t)}),n);return()=>{clearTimeout(e)}}),[t,n]),void 0===n?t:o})(Pe,T),[et,tt]=e.useState((()=>C(B,Je,Ge))),nt=Y(Ie,Ze,Ce,et,Je,Ge,fe,me,ve,le,o,pe,n),[ot,it]=X(Fe,Be,We,Se,Te,ke,nt.length,re,xe,R,z),at=()=>{var e;return null===(e=Ve.current)||void 0===e?void 0:e.blur()},rt=()=>{var e;return null===(e=Ve.current)||void 0===e?void 0:e.focus()},lt=e=>{var t;return null===(t=Ae.current)||void 0===t?void 0:t.scrollToItem(e)},st=(e,t=!0)=>{e.stopPropagation(),t&&e.preventDefault()},dt=e.useCallback(((e,t)=>{t&&st(t,"mousedown"===t.type),tt((t=>t.filter((t=>t.value!==e))))}),[]),ut=e.useCallback((e=>{if(!w(nt))return void(!ze.current&&qe(!0));const t=o?-1:nt.findIndex((({isSelected:e})=>e)),n=t>-1?t:e===p.FIRST?0:nt.length-1;!ze.current&&qe(!0),Xe({index:n,...nt[n]}),lt(n)}),[o,nt]),ct=e.useCallback(((e,t)=>{t?o&&dt(e.value):tt((t=>o?[...t,e]:[e]));("boolean"==typeof oe?oe:k)?at():ye&&(qe(!1),$e(""))}),[o,ye,dt,oe]);var pt;e.useImperativeHandle(Re,(()=>({menuOpen:We,empty:!w(et),blur:at,focus:rt,clearValue:()=>{tt(b),Xe(h)},setValue:e=>{const t=C(e,Je,Ge);tt(t)},toggleMenu:e=>{!0===e||void 0===e&&!We?(!Ue&&rt(),ut(p.FIRST)):at()}}))),pt=()=>{f&&rt()},e.useEffect(pt,[]),e.useEffect((()=>{ze.current=We}),[We]),e.useEffect((()=>{Ue&&Q&&ut(p.FIRST)}),[Ue,Q,ut]),e.useEffect((()=>{U&&De.current&&(De.current=!1,U(Ze))}),[U,Ze]),H((()=>{if(!q)return;const e=o?et.map((({data:e})=>e)):w(et)?et[0].data:null;q(e)}),[o,et,q]),H((()=>{const e=nt.length>0&&(n||nt.length!==Ie.length||0===Le.current);0===nt.length?Xe(h):(1===nt.length||e)&&(Xe({index:0,...nt[0]}),lt(0)),Le.current=nt.length}),[n,Ie,nt]);const ft=()=>{const{data:e,value:t,label:n,isSelected:o,isDisabled:i}=He;e&&!i&&ct({data:e,value:t,label:n},o)},mt=e=>{N||(Ue||rt(),We?"INPUT"!==e.currentTarget.tagName&&(We&&qe(!1),Pe&&$e("")):be&&ut(p.FIRST),"INPUT"!==e.currentTarget.tagName&&e.preventDefault())},gt=e.useCallback((e=>{null==L||L(e),je(!1),qe(!1),$e("")}),[L]),ht=e.useCallback((e=>{null==P||P(e),je(!0)}),[P]),bt=e.useCallback((e=>{De.current=!0,null==$||$(e.currentTarget.value||""),!ze.current&&qe(!0),$e(e.currentTarget.value||"")}),[$]),vt=e.useCallback((e=>{st(e,"mousedown"===e.type),tt(b),rt()}),[]),wt=e.useCallback((e=>{st(e,"mousedown"===e.type),rt(),ze.current?qe(!1):ut(p.FIRST)}),[ut]),yt=!he||he&&We,xt=N||!ge||!!Ke,Ot=!(!D||N||!w(et)),Ct=N||be?void 0:wt;return a.default.createElement(t.ThemeProvider,{theme:_e},a.default.createElement(de,Object.assign({id:r,"aria-controls":i,"aria-expanded":We,onKeyDown:e=>{if(!(N||g&&(g(e,Pe,He),e.defaultPrevented))){switch(e.key){case"ArrowDown":case"ArrowUp":{const t="ArrowDown"===e.key;We?(e=>{if(!w(nt))return;const t=e===p.DOWN?(He.index+1)%nt.length:He.index>0?He.index-1:nt.length-1;Ke&&Ye(null),Xe({index:t,...nt[t]}),lt(t)})(t?p.DOWN:p.UP):ut(t?p.FIRST:p.LAST);break}case"ArrowLeft":case"ArrowRight":if(!o||Pe||ae)return;(e=>{if(!w(et))return;let t=-1;const n=et.length-1,o=Ke?et.findIndex((e=>e.value===Ke)):-1;switch(e){case c.NEXT:t=o>-1&&o<n?o+1:-1;break;case c.PREVIOUS:t=0!==o?-1===o?n:o-1:0}const i=t>=0?et[t].value:null;He.data&&Xe(h),i!==Ke&&Ye(i)})("ArrowLeft"===e.key?c.PREVIOUS:c.NEXT);break;case" ":if(Pe)return;if(We){if(!He.data)return;ft()}else ut(p.FIRST);break;case"Enter":We&&229!==e.keyCode&&ft();break;case"Escape":We&&(qe(!1),$e(""));break;case"Tab":if(!We||!we||!He.data||e.shiftKey)return;ft();break;case"Delete":case"Backspace":if(Pe)return;if(Ke){const e=et.findIndex((e=>e.value===Ke)),t=e>-1&&e<et.length-1?et[e+1].value:null;dt(Ke),Ye(t)}else{if(!Oe)return;if(w(et))if(o&&!ae){const{value:e}=et[et.length-1];dt(e)}else D&&tt(b)}break;default:return}e.preventDefault()}}},l),a.default.createElement(ce,{ref:Be,isInvalid:I,isFocused:Ue,isDisabled:N,className:"rfs-control-container",onTouchEnd:mt,onMouseDown:mt,"data-testid":undefined},a.default.createElement(ue,null,a.default.createElement(K,{isMulti:o,inputValue:Pe,placeholder:Me,selectedOption:et,focusedMultiValue:Ke,renderOptionLabel:Qe,renderMultiOptions:ae,removeSelectedOption:dt}),a.default.createElement(J,{id:i,ref:Ve,required:s,ariaLabel:E,inputValue:Pe,readOnly:xt,onBlur:gt,onFocus:ht,onChange:bt,ariaLabelledBy:W,selectedOption:et})),a.default.createElement(se,{menuOpen:We,clearIcon:y,caretIcon:O,isInvalid:I,isLoading:m,showClear:Ot,isDisabled:N,loadingNode:V,onClearMouseDown:vt,onCaretMouseDown:Ct})),yt&&a.default.createElement(F,{menuRef:Fe,menuOpen:We,isLoading:m,menuTop:ot,height:it,itemSize:Te,loadingMsg:Ee,menuOptions:nt,fixedSizeListRef:Ae,noOptionsMsg:Ne,selectOption:ct,itemKeySelector:G,overscanCount:ne,menuPortalTarget:ee,width:M||_e.menu.width,onMenuMouseDown:e=>{st(e),rt()},renderOptionLabel:Qe,focusedOptionIndex:He.index}),te&&a.default.createElement(Z,{menuOpen:We,isFocused:Ue,ariaLabel:E,inputValue:Pe,isSearchable:ge,focusedOption:He,selectedOption:et,optionCount:nt.length})))}));pe.displayName="Select",exports.Select=pe; |
@@ -1,1 +0,1 @@ | ||
import e from"@babel/runtime/helpers/esm/defineProperty";import t,{memo as n,useMemo as o,Fragment as r,useState as i,useEffect as a,useRef as l,forwardRef as s,useCallback as c,useImperativeHandle as d}from"react";import u,{css as p,keyframes as m,ThemeProvider as f}from"styled-components";import g from"@babel/runtime/helpers/esm/objectWithoutProperties";import{createPortal as h}from"react-dom";import{areEqual as b,FixedSizeList as y}from"react-window";const O={role:"combobox","aria-haspopup":"listbox",className:"rfs-select-container","data-testid":undefined},w={tabIndex:0,type:"text",spellCheck:!1,autoCorrect:"off",autoComplete:"off",autoCapitalize:"none","aria-autocomplete":"list",className:"rfs-autosize-input","data-testid":undefined};var v,x,C,S;!function(e){e.TOP="top",e.AUTO="auto",e.BOTTOM="bottom"}(v||(v={})),function(e){e.ANY="any",e.START="start"}(x||(x={})),function(e){e.NEXT="next",e.PREVIOUS="prev"}(C||(C={})),function(e){e.UP="up",e.DOWN="down",e.LAST="last",e.FIRST="first"}(S||(S={}));const I=m(["0%,80%,100%{transform:scale(0);}40%{transform:scale(1.0);}"]),E=p([""," 0.2s ease-out both"],m(["from{opacity:0;}to{opacity:1;}"])),D=/[\u0300-\u036f]/g,T={index:-1},N=[],M={color:{border:"#ced4da",danger:"#dc3545",primary:"#007bff",disabled:"#e9ecef",placeholder:"#6E7276",dangerLight:"rgba(220, 53, 69, 0.25)"},input:{},select:{},loader:{size:"0.625rem",padding:"0.375rem 0.75rem",animation:p([""," 1.19s ease-in-out infinite"],I),color:"rgba(0, 123, 255, 0.42)"},icon:{color:"#ccc",hoverColor:"#A6A6A6",padding:"0 0.9375rem",clear:{width:"14px",height:"16px",animation:E,transition:"color 0.2s ease-out"},caret:{size:"7px",transition:"transform 0.3s ease-in-out, color 0.2s ease-out"}},control:{minHeight:"38px",borderWidth:"1px",borderStyle:"solid",borderRadius:"0.25rem",boxShadow:"0 0 0 0.2rem",padding:"0.375rem 0.75rem",boxShadowColor:"rgba(0, 123, 255, 0.25)",focusedBorderColor:"rgba(0, 123, 255, 0.75)",transition:"box-shadow 0.2s ease-out, border-color 0.2s ease-out"},menu:{padding:"0",width:"100%",margin:"0.5rem 0",borderRadius:"0.25rem",backgroundColor:"#fff",animation:E,boxShadow:"0 0 0 1px rgba(0, 0, 0, 0.1), 0 4px 11px rgba(0, 0, 0, 0.1)",option:{textAlign:"left",selectedColor:"#fff",selectedBgColor:"#007bff",padding:"0.375rem 0.75rem",focusedBgColor:"rgba(0, 123, 255, 0.20)"}},noOptions:{fontSize:"1.25rem",margin:"0.25rem 0",color:"hsl(0, 0%, 60%)",padding:"0.375rem 0.75rem"},multiValue:{margin:"1px 2px",borderRadius:"0.25rem",backgroundColor:"#e7edf3",animation:E,label:{fontSize:"0.825em",borderRadius:"0.25rem",padding:"1px 2px 1px 6px"},clear:{fontWeight:700,padding:"0 7px",color:"#a6a6a6",fontSize:"0.65em",alignSelf:"center",focusColor:"#808080",transition:"color 0.2s ease-out, transform 0.2s ease-out, z-index 0.2s ease-out"}}};function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function P(e){return Array.isArray(e)&&!!e.length}function z(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function j(e,t,n){let o=e.trim();return t&&(o=o.toLowerCase()),n?function(e){return e.normalize("NFD").replace(D,"")}(o):o}function L(e,t,n){const o=Array.isArray(e)?e:z(e)?[e]:N;return P(o)?o.map((e=>({data:e,value:t(e),label:n(e)}))):o}const A=(t,n)=>{const o=function(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?k(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):k(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}({},t);return Object.keys(n).forEach((e=>{const r=n[e];o[e]=z(r)&&"animation"!==e?e in t?A(t[e],r):r:r||""})),o};function R(e){return V(e)?window.pageYOffset:e.scrollTop}function V(e){return e===document.documentElement||e===document.body||e===window}function F({overflow:e,overflowX:t,overflowY:n}){const o=e=>"auto"===e||"scroll"===e;return o(e)||o(t)||o(n)}function B(e){let t=getComputedStyle(e);const n="absolute"===t.position;if("fixed"===t.position)return document.documentElement;for(let o=e;o=o?o.parentElement:null;)if(t=getComputedStyle(o),(!n||"static"!==t.position)&&F(t))return o;return document.documentElement}function $(e,t,n=300,o){let r=0;const i=R(e),a=t-i;window.requestAnimationFrame((function t(){var l;r+=5,function(e,t){V(e)?window.scrollTo(0,t):e.scrollTop=t}(e,a*((l=(l=r)/n-1)*l*l+1)+i),r<n?window.requestAnimationFrame(t):null==o||o()}))}const W="undefined"!=typeof window&&"ontouchstart"in window||"undefined"!=typeof navigator&&!!navigator.maxTouchPoints,U="undefined"!=typeof navigator&&/(MSIE|Trident\/|Edge\/|Edg\/)/i.test(navigator.userAgent),q=n((({index:e,style:n,data:{menuOptions:o,selectOption:r,renderOptionLabel:i,focusedOptionIndex:a}})=>{const{data:l,value:s,label:c,isDisabled:d,isSelected:u}=o[e],p=function(e,t,n){let o="rfs-option";return e&&(o+=" rfs-option-disabled"),t&&(o+=" rfs-option-selected"),n&&(o+=" rfs-option-focused"),o}(d,u,e===a),m=d?void 0:()=>r({data:l,value:s,label:c},u);return t.createElement("div",{style:n,onClick:m,className:p},i(l))}),b);q.displayName="Option";const K=u.div.withConfig({displayName:"NoOptionsMsg",componentId:"v1y124-0"})(["text-align:center;color:",";margin:",";padding:",";font-size:",";",""],(({theme:e})=>e.noOptions.color),(({theme:e})=>e.noOptions.margin),(({theme:e})=>e.noOptions.padding),(({theme:e})=>e.noOptions.fontSize),(({theme:e})=>e.noOptions.css)),Y=({width:e,height:n,itemSize:i,isLoading:a,loadingMsg:l,menuOptions:s,selectOption:c,noOptionsMsg:d,overscanCount:u,itemKeySelector:p,fixedSizeListRef:m,renderOptionLabel:f,focusedOptionIndex:g})=>{const h=o((()=>({menuOptions:s,selectOption:c,renderOptionLabel:f,focusedOptionIndex:g})),[s,g,c,f]);if(a)return t.createElement(K,null,l);const b=p?(e,t)=>t.menuOptions[e][p]:void 0;return t.createElement(r,null,t.createElement(y,{width:e,height:n,itemKey:b,itemSize:i,itemData:h,ref:m,overscanCount:u,itemCount:s.length},q),!P(s)&&t.createElement(K,null,d))},H=u.div.withConfig({displayName:"MenuWrapper",componentId:"yf5myu-0"})(["z-index:999;cursor:default;position:absolute;"," "," .","{display:block;overflow:hidden;user-select:none;white-space:nowrap;text-overflow:ellipsis;-webkit-tap-highlight-color:transparent;","}"],(({menuTop:e,menuOpen:t,theme:{menu:n}})=>p(["width:",";margin:",";padding:",";animation:",";box-shadow:",";border-radius:",";background-color:",";"," ",""],n.width,n.margin,n.padding,n.animation,n.boxShadow,n.borderRadius,n.backgroundColor,t?"":"display: none;",e?`top: ${e};`:"")),(({theme:e})=>e.menu.css),"rfs-option",(({theme:{menu:{option:e}}})=>p(["padding:",";text-align:",";&.",",&:hover:not(.","):not(.","){background-color:",";}&.","{color:",";background-color:",";}&.","{opacity:0.35;}"],e.padding,e.textAlign,"rfs-option-focused","rfs-option-disabled","rfs-option-selected",e.focusedBgColor,"rfs-option-selected",e.selectedColor,e.selectedBgColor,"rfs-option-disabled"))),X=e=>{let{menuRef:n,menuTop:o,menuOpen:r,onMenuMouseDown:i,menuPortalTarget:a}=e,l=g(e,["menuRef","menuTop","menuOpen","onMenuMouseDown","menuPortalTarget"]);const s=t.createElement(H,{ref:n,menuTop:o,menuOpen:r,onMouseDown:i,className:"rfs-menu-container","data-testid":undefined},t.createElement(Y,Object.assign({},l)));return a?h(s,a):s},G=p(["z-index:5000;transform:scale(1.26);color:",";"],(({theme:e})=>e.multiValue.clear.focusColor)),J=u.div.withConfig({displayName:"MultiValueWrapper",componentId:"sc-211cx7-0"})(["min-width:0;display:flex;"," ",""],(({theme:{multiValue:e}})=>p(["margin:",";animation:",";border-radius:",";background-color:",";"],e.margin,e.animation,e.borderRadius,e.backgroundColor)),(({theme:e})=>e.multiValue.css)),Q=u.div.withConfig({displayName:"Label",componentId:"sc-211cx7-1"})(["overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:",";font-size:",";border-radius:",";"],(({theme:e})=>e.multiValue.label.padding),(({theme:e})=>e.multiValue.label.fontSize),(({theme:e})=>e.multiValue.label.borderRadius)),Z=u.i.withConfig({displayName:"Clear",componentId:"sc-211cx7-2"})(["display:flex;font-style:inherit;"," ",""],(({theme:{multiValue:{clear:e}}})=>p(["color:",";padding:",";font-size:",";align-self:",";transition:",";font-weight:",";:hover{","}"],e.color,e.padding,e.fontSize,e.alignSelf,e.transition,e.fontWeight,G)),(({isFocused:e})=>e&&G)),_=n((({data:e,value:n,isFocused:o,renderOptionLabel:r,removeSelectedOption:i})=>t.createElement(J,null,t.createElement(Q,null,r(e)),t.createElement(Z,{isFocused:o,"data-testid":undefined,onTouchEnd:e=>i(n,e),onMouseDown:e=>i(n,e)},"✖"))));_.displayName="MultiValue";const ee=p(["top:50%;overflow:hidden;position:absolute;white-space:nowrap;box-sizing:border-box;text-overflow:ellipsis;transform:translateY(-50%);"]),te=u.div.withConfig({displayName:"SingleValue",componentId:"sc-153h0ct-0"})([""," max-width:calc(100% - 0.5rem);"],ee),ne=u.div.withConfig({displayName:"Placeholder",componentId:"sc-153h0ct-1"})([""," color:",";",""],ee,(({theme:e})=>e.color.placeholder),(({theme:e,isMulti:t})=>t&&p(["animation:",";"],e.multiValue.animation))),oe=({isMulti:e,inputValue:n,placeholder:o,selectedOption:i,focusedMultiValue:a,renderOptionLabel:l,renderMultiOptions:s,removeSelectedOption:c})=>!n||e&&(!e||P(i)&&!s)?P(i)?e?t.createElement(r,null,s?s({renderOptionLabel:l,selected:i}):i.map((({data:e,value:n})=>t.createElement(_,{key:n,data:e,value:n,renderOptionLabel:l,isFocused:n===a,removeSelectedOption:c})))):t.createElement(te,null,l(i[0].data)):t.createElement(ne,{isMulti:e},o):null;function re(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function ie(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?re(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):re(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}const ae=(e,t,n,o,r,l,s,c,d,u,p,m,f)=>{const[g,h]=i(N),b=f?"":t,y="boolean"!=typeof m?!!p:m;return a((()=>{const t=j(b,d,u),i=o.length?new Set(o.map((e=>e.value))):void 0,a=s||(e=>!!e.isDisabled),p=c||(e=>"string"==typeof e.label?e.label:`${e.label}`),m=e=>{const o=r(e),s=ie(ie({data:e,value:o,label:l(e)},a(e)&&{isDisabled:!0}),(null==i?void 0:i.has(o))&&{isSelected:!0});if(!(t&&!(e=>{const o=j(p(e),d,u);return n===x.ANY?o.indexOf(t)>-1:o.substr(0,t.length)===t})(s)||y&&s.isSelected))return s},f=[];for(let t=0;t<e.length;t++){const n=m(e[t]);n&&f.push(n)}h(f)}),[e,o,b,y,n,d,u,c,s,r,l]),g},le=(e,t)=>{const n=l(!0);a((()=>{if(!n.current)return e();n.current=!1}),t)},se=(e,t,n,o,r,s,c,d,u,p,m)=>{const f=l(!1),g=l(!1),[h,b]=i(s),[y,O]=i(o===v.TOP);a((()=>{const t=o===v.TOP||o===v.AUTO&&!(e=>{if(!e)return!0;const t=B(e),{top:n,height:o}=e.getBoundingClientRect();return t.getBoundingClientRect().height-R(t)-n>=o})(e.current);O(t),g.current=y}),[e,o]),le((()=>{if(n){const t=e=>{null==p||p(),e&&(f.current=!0,b(e))};g.current?t():((e,t,n,o)=>{if(!e)return void o();const{top:r,height:i,bottom:a}=e.getBoundingClientRect(),l=window.innerHeight;if(l-r>=i)return void o();const s=B(e),c=R(s),d=s.getBoundingClientRect().height-c-r,u=d<i;if(u||!n)return void o(u?d:void 0);$(s,a-l+c+parseInt(getComputedStyle(e).marginBottom,10),t,o)})(e.current,d,u,t)}else null==m||m(),f.current&&(f.current=!1,b(s))}),[e,n,m,p,s,u,d]);const w=Math.min(h,c*r);return[y?((e,t,n)=>{const o=e>0||!t?e:t.getBoundingClientRect().height,r=n?n.getBoundingClientRect().height:0,i=t&&getComputedStyle(t),a=i?parseInt(i.marginBottom,10):0,l=i?parseInt(i.marginTop,10):0;return"calc("+-Math.abs(o+r)+"px + "+(a+l)+"px)"})(w,e.current,t.current):void 0,w]},ce=u.div.withConfig({displayName:"SizerDiv",componentId:"o2ype2-0"})(["top:0;left:0;height:0;overflow:scroll;white-space:pre;position:absolute;visibility:hidden;font-size:inherit;font-weight:inherit;font-family:inherit;",""],(({theme:e})=>e.input.css)),de=u.input.withConfig({displayName:"Input",componentId:"o2ype2-1"})(["border:0;outline:0;padding:0;cursor:text;background:0;color:inherit;font-size:inherit;font-weight:inherit;font-family:inherit;box-sizing:content-box;:read-only{opacity:0;cursor:default;}:required{","}"," ",""],(({theme:e,isInvalid:t})=>t&&e.input.cssRequired),(({theme:e})=>e.input.css),U&&"::-ms-clear{display:none;}"),ue=n(s((({id:e,onBlur:n,onFocus:o,readOnly:a,required:s,onChange:c,ariaLabel:d,inputValue:u,ariaLabelledBy:p,selectedOption:m},f)=>{const g=l(null),[h,b]=i(2),y=s&&!P(m);return le((()=>{g.current&&b(g.current.scrollWidth+2)}),[u]),t.createElement(r,null,t.createElement(de,Object.assign({id:e,ref:f,isInvalid:!0,onBlur:n,onFocus:o,value:u,readOnly:a,required:y,"aria-label":d,style:{width:h}},w,{"aria-labelledby":p,onChange:a?void 0:c})),t.createElement(ce,{ref:g},u))})));ue.displayName="AutosizeInput";const pe=u.span.withConfig({displayName:"A11yText",componentId:"zxgkbx-0"})(["border:0;padding:0;width:1px;height:1px;margin:-1px;overflow:hidden;position:absolute;white-space:nowrap;clip:rect(0 0 0 0);clip-path:inset(50%);"]),me=({menuOpen:e,isFocused:n,ariaLabel:o,inputValue:r,optionCount:i,isSearchable:a,focusedOption:l,selectedOption:s})=>{if(!n)return null;const c=`${i} result(s) available${r?" for search input "+r:""}.`,d=l.value?`Focused option: ${l.label}${l.isDisabled?" - disabled":""}, ${l.index+1} of ${i}.`:"",u=e?"Use Up and Down arrow keys to choose options, press Enter or Tab to select the currently focused option, press Escape to close the menu.":`${o||"Select"} is focused${a?", type to filter options":""}, press Down arrow key to open the menu.`,p=`Selected option: ${P(s)?s.map((({label:e})=>e)).join(" "):"N/A"}`,m=`${d} ${c} ${u}`;return t.createElement(pe,{"aria-live":"polite","data-testid":undefined},t.createElement("span",null," ",p),t.createElement("span",null," ",m))},fe=u.div.withConfig({displayName:"StyledLoadingDots",componentId:"sc-1j9e0pa-0"})(["display:flex;align-self:center;text-align:center;margin-right:0.25rem;padding:",";> div{border-radius:100%;display:inline-block;",":nth-of-type(1){animation-delay:-0.272s;}:nth-of-type(2){animation-delay:-0.136s;}}"],(({theme:e})=>e.loader.padding),(({theme:{loader:e}})=>p(["width:",";height:",";animation:",";background-color:",";"],e.size,e.size,e.animation,e.color))),ge=()=>t.createElement(fe,{"aria-hidden":"true",className:"rfs-loading-dots"},t.createElement("div",null),t.createElement("div",null),t.createElement("div",null)),he=u.svg.withConfig({displayName:"ClearSvg",componentId:"sc-1v5ipi2-0"})(["fill:currentColor;",""],(({theme:e})=>p(["width:",";height:",";animation:",";transition:",";"],e.icon.clear.width,e.icon.clear.height,e.icon.clear.animation,e.icon.clear.transition))),be=()=>t.createElement(he,{"aria-hidden":"true",viewBox:"0 0 14 16",className:"rfs-clear-icon"},t.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"})),ye=u.div.withConfig({displayName:"IndicatorIconsWrapper",componentId:"sc-1561oeb-0"})(["display:flex;flex-shrink:0;align-items:center;align-self:stretch;box-sizing:border-box;"]),Oe=u.div.withConfig({displayName:"IndicatorIcon",componentId:"sc-1561oeb-1"})(["height:100%;display:flex;align-items:center;box-sizing:border-box;color:",";padding:",";:hover{color:",";}",""],(({theme:e})=>e.icon.color),(({theme:e})=>e.icon.padding),(({theme:e})=>e.icon.hoverColor),(({theme:e})=>e.icon.css)),we=u.div.withConfig({displayName:"Caret",componentId:"sc-1561oeb-2"})(["transition:",";border-top:"," dashed;border-left:"," solid transparent;border-right:"," solid transparent;",""],(({theme:e})=>e.icon.caret.transition),(({theme:e})=>e.icon.caret.size),(({theme:e})=>e.icon.caret.size),(({theme:e})=>e.icon.caret.size),(({theme:e,menuOpen:t,isInvalid:n})=>t&&p(["transform:rotate(180deg);color:",";"],n?e.color.danger:e.color.caretActive||e.color.primary))),ve=u.div.withConfig({displayName:"Separator",componentId:"sc-1561oeb-3"})(["width:1px;margin:0.5rem 0;align-self:stretch;box-sizing:border-box;background-color:",";"],(({theme:e})=>e.color.iconSeparator||e.color.border)),xe=n((({menuOpen:e,clearIcon:n,caretIcon:o,isInvalid:r,showClear:i,isLoading:a,isDisabled:l,loadingNode:s,onCaretMouseDown:c,onClearMouseDown:d})=>{const u="function"==typeof o||"function"==typeof n?{menuOpen:e,isLoading:!!a,isInvalid:!!r,isDisabled:!!l}:void 0,p=e=>"function"==typeof e?e(u):e;return t.createElement(ye,null,i&&!a&&t.createElement(Oe,{onTouchEnd:d,onMouseDown:d,"data-testid":undefined},p(n)||t.createElement(be,null)),a&&(s||t.createElement(ge,null)),t.createElement(ve,null),t.createElement(Oe,{onTouchEnd:c,onMouseDown:c,"data-testid":undefined},p(o)||t.createElement(we,{"aria-hidden":"true",menuOpen:e,isInvalid:r,className:"rfs-caret-icon"})))}));function Ce(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Se(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?Ce(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):Ce(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}xe.displayName="IndicatorIcons";const Ie=u.div.withConfig({displayName:"SelectWrapper",componentId:"kcrmu9-0"})(["position:relative;box-sizing:border-box;",""],(({theme:e})=>e.select.css)),Ee=u.div.withConfig({displayName:"ValueWrapper",componentId:"kcrmu9-1"})(["flex:1 1 0%;display:flex;flex-wrap:wrap;overflow:hidden;position:relative;align-items:center;box-sizing:border-box;padding:",";"],(({theme:e})=>e.control.padding)),De=u.div.withConfig({displayName:"ControlWrapper",componentId:"kcrmu9-2"})(["outline:0;display:flex;flex-wrap:wrap;cursor:default;position:relative;align-items:center;box-sizing:border-box;justify-content:space-between;"," "," ",""],(({isDisabled:e,isFocused:t,isInvalid:n,theme:{control:o,color:r}})=>p(["transition:",";border-style:",";border-width:",";border-radius:",";min-height:",";border-color:",";"," "," "," ",""],o.transition,o.borderStyle,o.borderWidth,o.borderRadius,o.height||o.minHeight,n?r.danger:t?o.focusedBorderColor:r.border,o.height?`height: ${o.height};`:"",e?"pointer-events:none;user-select:none;":"",o.backgroundColor||e?`background-color: ${e?r.disabled:o.backgroundColor};`:"",t?`box-shadow: ${o.boxShadow} ${n?r.dangerLight:o.boxShadowColor};`:"")),(({theme:e})=>e.control.css),(({isFocused:e,theme:t})=>e&&t.control.focusedCss)),Te=s((({async:e,isMulti:n,inputId:r,selectId:s,required:u,autoFocus:p,isLoading:m,onKeyDown:g,clearIcon:h,caretIcon:b,isInvalid:y,ariaLabel:w,menuWidth:I,isDisabled:E,inputDelay:D,onMenuOpen:k,onMenuClose:j,onInputBlur:R,isClearable:V,themeConfig:F,loadingNode:B,initialValue:$,onInputFocus:U,onInputChange:q,ariaLabelledBy:K,onOptionChange:Y,onSearchChange:H,getOptionLabel:G,getOptionValue:J,itemKeySelector:Q,openMenuOnFocus:Z,menuPortalTarget:_,isAriaLiveEnabled:ee,menuOverscanCount:te,blurInputOnSelect:ne,renderOptionLabel:re,renderMultiOptions:ie,menuScrollDuration:ce,filterIgnoreAccents:de,hideSelectedOptions:pe,getIsOptionDisabled:fe,getFilterOptionString:ge,isSearchable:he=!0,lazyLoadMenu:be=!1,openMenuOnClick:ye=!0,filterIgnoreCase:Oe=!0,tabSelectsOption:we=!0,closeMenuOnSelect:ve=!0,scrollMenuIntoView:Ce=!0,backspaceClearsValue:Te=!0,filterMatchFrom:Ne=x.ANY,menuPosition:Me=v.BOTTOM,options:ke=N,loadingMsg:Pe="Loading..",placeholder:ze="Select option..",noOptionsMsg:je="No options",menuItemSize:Le=35,menuMaxHeight:Ae=300},Re)=>{const Ve=l(!1),Fe=l(),Be=l(!1),$e=l(null),We=l(null),Ue=l(null),qe=l(null),[Ke,Ye]=i(""),[He,Xe]=i(!1),[Ge,Je]=i(!1),[Qe,Ze]=i(null),[_e,et]=i(T),tt=o((()=>z(F)?A(M,F):M),[F]),nt=o((()=>G||(e=>e.label)),[G]),ot=o((()=>J||(e=>e.value)),[J]),rt=o((()=>re||nt),[re,nt]),it=((e,t)=>{const[n,o]=i(e);return a((()=>{if(void 0===t)return;const n=setTimeout((()=>{o(e)}),t);return()=>{clearTimeout(n)}}),[e,t]),void 0===t?e:n})(Ke,D),[at,lt]=i((()=>L($,ot,nt))),st=ae(ke,it,Ne,at,ot,nt,fe,ge,Oe,de,n,pe,e),[ct,dt]=se(We,qe,He,Me,Le,Ae,st.length,ce,Ce,k,j),ut=()=>{var e;return null===(e=Ue.current)||void 0===e?void 0:e.blur()},pt=()=>{var e;return null===(e=Ue.current)||void 0===e?void 0:e.focus()},mt=e=>{var t;return null===(t=$e.current)||void 0===t?void 0:t.scrollToItem(e)},ft=(e,t=!0)=>{e.stopPropagation(),t&&e.preventDefault()},gt=c(((e,t)=>{t&&ft(t,"mousedown"===t.type),lt((t=>t.filter((t=>t.value!==e))))}),[]),ht=c((e=>{if(!P(st))return void(!Ve.current&&Xe(!0));const t=n?-1:st.findIndex((({isSelected:e})=>e)),o=t>-1?t:e===S.FIRST?0:st.length-1;!Ve.current&&Xe(!0),et(Se({index:o},st[o])),mt(o)}),[n,st]),bt=c(((e,t)=>{t?n&>(e.value):lt((t=>n?[...t,e]:[e]));("boolean"==typeof ne?ne:W)?ut():ve&&(Xe(!1),Ye(""))}),[n,ve,gt,ne]);d(Re,(()=>({menuOpen:He,empty:!P(at),blur:ut,focus:pt,clearValue:()=>{lt(N),et(T)},setValue:e=>{const t=L(e,ot,nt);lt(t)},toggleMenu:e=>{!0===e||void 0===e&&!He?(!Ge&&pt(),ht(S.FIRST)):ut()}}))),a((()=>{p&&pt()}),[]),a((()=>{Ve.current=He}),[He]),a((()=>{Ge&&Z&&ht(S.FIRST)}),[Ge,Z,ht]),a((()=>{H&&Be.current&&(Be.current=!1,H(it))}),[H,it]),le((()=>{if(!Y)return;const e=n?at.map((({data:e})=>e)):P(at)?at[0].data:null;Y(e)}),[n,at,Y]),le((()=>{const t=st.length>0&&(e||st.length!==ke.length||0===Fe.current);0===st.length?et(T):(1===st.length||t)&&(et(Se({index:0},st[0])),mt(0)),Fe.current=st.length}),[e,ke,st]);const yt=()=>{const{data:e,value:t,label:n,isSelected:o,isDisabled:r}=_e;e&&!r&&bt({data:e,value:t,label:n},o)},Ot=e=>{E||(Ge||pt(),He?"INPUT"!==e.currentTarget.tagName&&(He&&Xe(!1),Ke&&Ye("")):ye&&ht(S.FIRST),"INPUT"!==e.currentTarget.tagName&&e.preventDefault())},wt=c((e=>{null==R||R(e),Je(!1),Xe(!1),Ye("")}),[R]),vt=c((e=>{null==U||U(e),Je(!0)}),[U]),xt=c((e=>{Be.current=!0,null==q||q(e.currentTarget.value||""),!Ve.current&&Xe(!0),Ye(e.currentTarget.value||"")}),[q]),Ct=c((e=>{ft(e,"mousedown"===e.type),lt(N),pt()}),[]),St=c((e=>{ft(e,"mousedown"===e.type),pt(),Ve.current?Xe(!1):ht(S.FIRST)}),[ht]),It=!be||be&&He,Et=E||!he||!!Qe,Dt=!(!V||E||!P(at)),Tt=E||ye?void 0:St;return t.createElement(f,{theme:tt},t.createElement(Ie,Object.assign({id:s,"aria-controls":r,"aria-expanded":He,onKeyDown:e=>{if(!(E||g&&(g(e,Ke,_e),e.defaultPrevented))){switch(e.key){case"ArrowDown":case"ArrowUp":const t="ArrowDown"===e.key;He?(e=>{if(!P(st))return;const t=e===S.DOWN?(_e.index+1)%st.length:_e.index>0?_e.index-1:st.length-1;Qe&&Ze(null),et(Se({index:t},st[t])),mt(t)})(t?S.DOWN:S.UP):ht(t?S.FIRST:S.LAST);break;case"ArrowLeft":case"ArrowRight":if(!n||Ke||ie)return;(e=>{if(!P(at))return;let t=-1;const n=at.length-1,o=Qe?at.findIndex((e=>e.value===Qe)):-1;switch(e){case C.NEXT:t=o>-1&&o<n?o+1:-1;break;case C.PREVIOUS:t=0!==o?-1===o?n:o-1:0}const r=t>=0?at[t].value:null;_e.data&&et(T),r!==Qe&&Ze(r)})("ArrowLeft"===e.key?C.PREVIOUS:C.NEXT);break;case" ":if(Ke)return;if(He){if(!_e.data)return;yt()}else ht(S.FIRST);break;case"Enter":He&&229!==e.keyCode&&yt();break;case"Escape":He&&(Xe(!1),Ye(""));break;case"Tab":if(!He||!we||!_e.data||e.shiftKey)return;yt();break;case"Delete":case"Backspace":if(Ke)return;if(Qe){const e=at.findIndex((e=>e.value===Qe)),t=e>-1&&e<at.length-1?at[e+1].value:null;gt(Qe),Ze(t)}else{if(!Te)return;if(P(at))if(n&&!ie){const{value:e}=at[at.length-1];gt(e)}else V&<(N)}break;default:return}e.preventDefault()}}},O),t.createElement(De,{ref:qe,isInvalid:y,isFocused:Ge,isDisabled:E,className:"rfs-control-container",onTouchEnd:Ot,onMouseDown:Ot,"data-testid":undefined},t.createElement(Ee,null,t.createElement(oe,{isMulti:n,inputValue:Ke,placeholder:ze,selectedOption:at,focusedMultiValue:Qe,renderOptionLabel:rt,renderMultiOptions:ie,removeSelectedOption:gt}),t.createElement(ue,{id:r,ref:Ue,required:u,ariaLabel:w,inputValue:Ke,readOnly:Et,onBlur:wt,onFocus:vt,onChange:xt,ariaLabelledBy:K,selectedOption:at})),t.createElement(xe,{menuOpen:He,clearIcon:h,caretIcon:b,isInvalid:y,isLoading:m,showClear:Dt,isDisabled:E,loadingNode:B,onClearMouseDown:Ct,onCaretMouseDown:Tt})),It&&t.createElement(X,{menuRef:We,menuOpen:He,isLoading:m,menuTop:ct,height:dt,itemSize:Le,loadingMsg:Pe,menuOptions:st,fixedSizeListRef:$e,noOptionsMsg:je,selectOption:bt,itemKeySelector:Q,overscanCount:te,menuPortalTarget:_,width:I||tt.menu.width,onMenuMouseDown:e=>{ft(e),pt()},renderOptionLabel:rt,focusedOptionIndex:_e.index}),ee&&t.createElement(me,{menuOpen:He,isFocused:Ge,ariaLabel:w,inputValue:Ke,isSearchable:he,focusedOption:_e,selectedOption:at,optionCount:st.length})))}));Te.displayName="Select";export{Te as Select}; | ||
import e from"@babel/runtime/helpers/esm/defineProperty";import t,{memo as n,useMemo as o,Fragment as r,useState as i,useEffect as a,useRef as l,forwardRef as s,useCallback as c,useImperativeHandle as d}from"react";import u,{css as p,keyframes as m,ThemeProvider as f}from"styled-components";import g from"@babel/runtime/helpers/esm/objectWithoutProperties";import{createPortal as h}from"react-dom";import{areEqual as b,FixedSizeList as O}from"react-window";const y={role:"combobox","aria-haspopup":"listbox",className:"rfs-select-container","data-testid":undefined},w={tabIndex:0,type:"text",spellCheck:!1,autoCorrect:"off",autoComplete:"off",autoCapitalize:"none","aria-autocomplete":"list",className:"rfs-autosize-input","data-testid":undefined};var v,x,C,S;!function(e){e.TOP="top",e.AUTO="auto",e.BOTTOM="bottom"}(v||(v={})),function(e){e.ANY="any",e.START="start"}(x||(x={})),function(e){e.NEXT="next",e.PREVIOUS="prev"}(C||(C={})),function(e){e.UP="up",e.DOWN="down",e.LAST="last",e.FIRST="first"}(S||(S={}));const I=m(["0%,80%,100%{transform:scale(0);}40%{transform:scale(1.0);}"]),E=p([""," 0.2s ease-out both"],m(["from{opacity:0;}to{opacity:1;}"])),D={index:-1},T=[],M={color:{border:"#ced4da",danger:"#dc3545",primary:"#007bff",disabled:"#e9ecef",placeholder:"#6E7276",dangerLight:"rgba(220, 53, 69, 0.25)"},input:{},select:{},loader:{size:"0.625rem",padding:"0.375rem 0.75rem",animation:p([""," 1.19s ease-in-out infinite"],I),color:"rgba(0, 123, 255, 0.42)"},icon:{color:"#ccc",hoverColor:"#A6A6A6",padding:"0 0.9375rem",clear:{width:"14px",height:"16px",animation:E,transition:"color 0.2s ease-out"},caret:{size:"7px",transition:"transform 0.3s ease-in-out, color 0.2s ease-out"}},control:{minHeight:"38px",borderWidth:"1px",borderStyle:"solid",borderRadius:"3px",boxShadow:"0 0 0 0.2rem",padding:"0.375rem 0.75rem",boxShadowColor:"rgba(0, 123, 255, 0.25)",focusedBorderColor:"rgba(0, 123, 255, 0.75)",transition:"box-shadow 0.2s ease-out, border-color 0.2s ease-out"},menu:{padding:"0",width:"100%",margin:"0.5rem 0",borderRadius:"3px",backgroundColor:"#fff",animation:E,boxShadow:"0 0.5em 1em -0.125em rgb(10 10 10 / 12%), 0 0 0 1px rgb(10 10 10 / 4%)",option:{textAlign:"left",selectedColor:"#fff",selectedBgColor:"#007bff",padding:"0.375rem 0.75rem",focusedBgColor:"rgba(0, 123, 255, 0.15)"}},noOptions:{fontSize:"1.25rem",margin:"0.25rem 0",color:"hsl(0, 0%, 60%)",padding:"0.375rem 0.75rem"},multiValue:{margin:"1px 2px",borderRadius:"3px",backgroundColor:"#e7edf3",animation:E,label:{borderRadius:"3px",fontSize:"0.825em",padding:"1px 0 1px 6px"},clear:{fontWeight:600,padding:"0 6px",color:"#a6a6a6",fontSize:"0.65em",alignSelf:"center",focusColor:"#808080",transition:"color 0.2s ease-out, transform 0.2s ease-out, z-index 0.2s ease-out"}}};function N(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function k(e){return Array.isArray(e)&&!!e.length}const P=/[\u0300-\u036f]/g;function z(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function j(e,t,n){let o=e.trim();return t&&(o=o.toLowerCase()),n?function(e){return e.normalize("NFD").replace(P,"")}(o):o}function L(e,t,n){const o=Array.isArray(e)?e:z(e)?[e]:T;return k(o)?o.map((e=>({data:e,value:t(e),label:n(e)}))):o}const A=(t,n)=>{const o=function(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?N(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):N(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}({},t);return Object.keys(n).forEach((e=>{const r=n[e];o[e]=z(r)&&"animation"!==e?e in t?A(t[e],r):r:r||""})),o};function R(e){return V(e)?window.pageYOffset:e.scrollTop}function V(e){return e===document.documentElement||e===document.body||e===window}function F({overflow:e,overflowX:t,overflowY:n}){const o=e=>"auto"===e||"scroll"===e;return o(e)||o(t)||o(n)}function B(e){let t=getComputedStyle(e);const n="absolute"===t.position;if("fixed"===t.position)return document.documentElement;for(let o=e;o=o?o.parentElement:null;)if(t=getComputedStyle(o),(!n||"static"!==t.position)&&F(t))return o;return document.documentElement}function $(e,t,n=300,o){let r=0;const i=R(e),a=t-i;window.requestAnimationFrame((function t(){var l;r+=5,function(e,t){V(e)?window.scrollTo(0,t):e.scrollTop=t}(e,a*((l=(l=r)/n-1)*l*l+1)+i),r<n?window.requestAnimationFrame(t):null==o||o()}))}const W="undefined"!=typeof window&&"ontouchstart"in window||"undefined"!=typeof navigator&&!!navigator.maxTouchPoints,U="undefined"!=typeof navigator&&/(MSIE|Trident\/|Edge\/|Edg\/)/i.test(navigator.userAgent),q=n((({index:e,style:n,data:{menuOptions:o,selectOption:r,renderOptionLabel:i,focusedOptionIndex:a}})=>{const{data:l,value:s,label:c,isDisabled:d,isSelected:u}=o[e],p=function(e,t,n){let o="rfs-option";return e&&(o+=" rfs-option-disabled"),t&&(o+=" rfs-option-selected"),n&&(o+=" rfs-option-focused"),o}(d,u,e===a),m=d?void 0:()=>r({data:l,value:s,label:c},u);return t.createElement("div",{style:n,onClick:m,className:p},i(l))}),b);q.displayName="Option";const K=u.div.withConfig({displayName:"NoOptionsMsg",componentId:"v1y124-0"})(["text-align:center;color:",";margin:",";padding:",";font-size:",";",""],(({theme:e})=>e.noOptions.color),(({theme:e})=>e.noOptions.margin),(({theme:e})=>e.noOptions.padding),(({theme:e})=>e.noOptions.fontSize),(({theme:e})=>e.noOptions.css)),Y=({width:e,height:n,itemSize:i,isLoading:a,loadingMsg:l,menuOptions:s,selectOption:c,noOptionsMsg:d,overscanCount:u,itemKeySelector:p,fixedSizeListRef:m,renderOptionLabel:f,focusedOptionIndex:g})=>{const h=o((()=>({menuOptions:s,selectOption:c,renderOptionLabel:f,focusedOptionIndex:g})),[s,g,c,f]);if(a)return t.createElement(K,null,l);const b=p?(e,t)=>t.menuOptions[e][p]:void 0;return t.createElement(r,null,t.createElement(O,{width:e,height:n,itemKey:b,itemSize:i,itemData:h,ref:m,overscanCount:u,itemCount:s.length},q),!k(s)&&d&&t.createElement(K,null,d))},H=u.div.withConfig({displayName:"MenuWrapper",componentId:"yf5myu-0"})(["z-index:999;cursor:default;position:absolute;"," "," .","{display:block;overflow:hidden;user-select:none;white-space:nowrap;text-overflow:ellipsis;-webkit-tap-highlight-color:transparent;","}"],(({menuTop:e,menuOpen:t,hideNoOptionsMsg:n,theme:{menu:o}})=>p(["width:",";margin:",";padding:",";animation:",";border-radius:",";background-color:",";box-shadow:",";"," ",""],o.width,o.margin,o.padding,o.animation,o.borderRadius,o.backgroundColor,n?"none":o.boxShadow,t?"":"display: none;",e?`top: ${e};`:"")),(({theme:e})=>e.menu.css),"rfs-option",(({theme:{menu:{option:e}}})=>p(["padding:",";text-align:",";&.",",&:hover:not(.","):not(.","){background-color:",";}&.","{color:",";background-color:",";}&.","{opacity:0.35;}"],e.padding,e.textAlign,"rfs-option-focused","rfs-option-disabled","rfs-option-selected",e.focusedBgColor,"rfs-option-selected",e.selectedColor,e.selectedBgColor,"rfs-option-disabled"))),X=e=>{let{menuRef:n,menuTop:o,menuOpen:r,onMenuMouseDown:i,menuPortalTarget:a}=e,l=g(e,["menuRef","menuTop","menuOpen","onMenuMouseDown","menuPortalTarget"]);const s=r&&!Boolean(l.noOptionsMsg)&&!k(l.menuOptions),c=t.createElement(H,{ref:n,menuTop:o,menuOpen:r,onMouseDown:i,className:"rfs-menu-container","data-testid":undefined,hideNoOptionsMsg:s},t.createElement(Y,Object.assign({},l)));return a?h(c,a):c},G=p(["z-index:5000;transform:scale(1.26);color:",";"],(({theme:e})=>e.multiValue.clear.focusColor)),J=u.div.withConfig({displayName:"MultiValueWrapper",componentId:"sc-211cx7-0"})(["min-width:0;display:flex;"," ",""],(({theme:{multiValue:e}})=>p(["margin:",";animation:",";border-radius:",";background-color:",";"],e.margin,e.animation,e.borderRadius,e.backgroundColor)),(({theme:e})=>e.multiValue.css)),Q=u.div.withConfig({displayName:"Label",componentId:"sc-211cx7-1"})(["overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:",";font-size:",";border-radius:",";"],(({theme:e})=>e.multiValue.label.padding),(({theme:e})=>e.multiValue.label.fontSize),(({theme:e})=>e.multiValue.label.borderRadius)),Z=u.i.withConfig({displayName:"Clear",componentId:"sc-211cx7-2"})(["display:flex;font-style:inherit;"," ",""],(({theme:{multiValue:{clear:e}}})=>p(["color:",";padding:",";font-size:",";align-self:",";transition:",";font-weight:",";:hover{","}"],e.color,e.padding,e.fontSize,e.alignSelf,e.transition,e.fontWeight,G)),(({isFocused:e})=>e&&G)),_=n((({data:e,value:n,isFocused:o,renderOptionLabel:r,removeSelectedOption:i})=>t.createElement(J,null,t.createElement(Q,null,r(e)),t.createElement(Z,{isFocused:o,"data-testid":undefined,onTouchEnd:e=>i(n,e),onMouseDown:e=>i(n,e)},"✖"))));_.displayName="MultiValue";const ee=p(["top:50%;overflow:hidden;position:absolute;white-space:nowrap;box-sizing:border-box;text-overflow:ellipsis;transform:translateY(-50%);"]),te=u.div.withConfig({displayName:"SingleValue",componentId:"sc-153h0ct-0"})([""," max-width:calc(100% - 0.5rem);"],ee),ne=u.div.withConfig({displayName:"Placeholder",componentId:"sc-153h0ct-1"})([""," color:",";",""],ee,(({theme:e})=>e.color.placeholder),(({theme:e,isMulti:t})=>t&&p(["animation:",";"],e.multiValue.animation))),oe=({isMulti:e,inputValue:n,placeholder:o,selectedOption:i,focusedMultiValue:a,renderOptionLabel:l,renderMultiOptions:s,removeSelectedOption:c})=>!n||e&&(!e||k(i)&&!s)?k(i)?e?t.createElement(r,null,s?s({renderOptionLabel:l,selected:i}):i.map((({data:e,value:n})=>t.createElement(_,{key:n,data:e,value:n,renderOptionLabel:l,isFocused:n===a,removeSelectedOption:c})))):t.createElement(te,null,l(i[0].data)):t.createElement(ne,{isMulti:e},o):null;function re(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function ie(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?re(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):re(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}const ae=(e,t,n,o,r,l,s,c,d,u,p,m,f)=>{const[g,h]=i(T),b=f?"":t,O="boolean"!=typeof m?!!p:m;return a((()=>{const t=j(b,d,u),i=o.length?new Set(o.map((e=>e.value))):void 0,a=s||(e=>!!e.isDisabled),p=c||(e=>"string"==typeof e.label?e.label:`${e.label}`),m=e=>{const o=r(e),s=ie(ie({data:e,value:o,label:l(e)},a(e)&&{isDisabled:!0}),(null==i?void 0:i.has(o))&&{isSelected:!0});if(!(t&&!(e=>{const o=j(p(e),d,u);return n===x.ANY?o.indexOf(t)>-1:o.substr(0,t.length)===t})(s)||O&&s.isSelected))return s},f=[];for(let t=0;t<e.length;t++){const n=m(e[t]);n&&f.push(n)}h(f)}),[e,o,b,O,n,d,u,c,s,r,l]),g},le=(e,t)=>{const n=l(!0);a((()=>{if(!n.current)return e();n.current=!1}),t)},se=(e,t,n,o,r,s,c,d,u,p,m)=>{const f=l(!1),g=l(!1),[h,b]=i(s),[O,y]=i(o===v.TOP);a((()=>{const t=o===v.TOP||o===v.AUTO&&!(e=>{if(!e)return!0;const t=B(e),{top:n,height:o}=e.getBoundingClientRect();return t.getBoundingClientRect().height-R(t)-n>=o})(e.current);y(t),g.current=O}),[e,o]),le((()=>{if(n){const t=e=>{null==p||p(),e&&(f.current=!0,b(e))};g.current?t():((e,t,n,o)=>{if(!e)return void o();const{top:r,height:i,bottom:a}=e.getBoundingClientRect(),l=window.innerHeight;if(l-r>=i)return void o();const s=B(e),c=R(s),d=s.getBoundingClientRect().height-c-r,u=d<i;if(u||!n)return void o(u?d:void 0);$(s,a-l+c+parseInt(getComputedStyle(e).marginBottom,10),t,o)})(e.current,d,u,t)}else null==m||m(),f.current&&(f.current=!1,b(s))}),[e,n,m,p,s,u,d]);const w=Math.min(h,c*r);return[O?((e,t,n)=>{const o=e>0||!t?e:t.getBoundingClientRect().height,r=n?n.getBoundingClientRect().height:0,i=t&&getComputedStyle(t),a=i?parseInt(i.marginBottom,10):0,l=i?parseInt(i.marginTop,10):0;return"calc("+-Math.abs(o+r)+"px + "+(a+l)+"px)"})(w,e.current,t.current):void 0,w]},ce=u.div.withConfig({displayName:"SizerDiv",componentId:"o2ype2-0"})(["top:0;left:0;height:0;overflow:scroll;white-space:pre;position:absolute;visibility:hidden;font-size:inherit;font-weight:inherit;font-family:inherit;",""],(({theme:e})=>e.input.css)),de=u.input.withConfig({displayName:"Input",componentId:"o2ype2-1"})(["border:0;outline:0;padding:0;cursor:text;background:0;color:inherit;font-size:inherit;font-weight:inherit;font-family:inherit;box-sizing:content-box;:read-only{opacity:0;cursor:default;}:required{","}"," ",""],(({theme:e,isInvalid:t})=>t&&e.input.cssRequired),(({theme:e})=>e.input.css),U&&"::-ms-clear{display:none;}"),ue=n(s((({id:e,onBlur:n,onFocus:o,readOnly:a,required:s,onChange:c,ariaLabel:d,inputValue:u,ariaLabelledBy:p,selectedOption:m},f)=>{const g=l(null),[h,b]=i(2),O=s&&!k(m);return le((()=>{g.current&&b(g.current.scrollWidth+2)}),[u]),t.createElement(r,null,t.createElement(de,Object.assign({id:e,ref:f,isInvalid:!0,onBlur:n,onFocus:o,value:u,readOnly:a,required:O,"aria-label":d,style:{width:h}},w,{"aria-labelledby":p,onChange:a?void 0:c})),t.createElement(ce,{ref:g},u))})));ue.displayName="AutosizeInput";const pe=u.span.withConfig({displayName:"A11yText",componentId:"zxgkbx-0"})(["border:0;padding:0;width:1px;height:1px;margin:-1px;overflow:hidden;position:absolute;white-space:nowrap;clip:rect(0 0 0 0);clip-path:inset(50%);"]),me=({menuOpen:e,isFocused:n,ariaLabel:o,inputValue:r,optionCount:i,isSearchable:a,focusedOption:l,selectedOption:s})=>{if(!n)return null;const c=`${i} result(s) available${r?" for search input "+r:""}.`,d=l.value?`Focused option: ${l.label}${l.isDisabled?" - disabled":""}, ${l.index+1} of ${i}.`:"",u=e?"Use Up and Down arrow keys to choose options, press Enter or Tab to select the currently focused option, press Escape to close the menu.":`${o||"Select"} is focused${a?", type to filter options":""}, press Down arrow key to open the menu.`,p=`Selected option: ${k(s)?s.map((({label:e})=>e)).join(" "):"N/A"}`,m=`${d} ${c} ${u}`;return t.createElement(pe,{"aria-live":"polite","data-testid":undefined},t.createElement("span",null," ",p),t.createElement("span",null," ",m))},fe=u.div.withConfig({displayName:"StyledLoadingDots",componentId:"sc-1j9e0pa-0"})(["display:flex;align-self:center;text-align:center;margin-right:0.25rem;padding:",";> div{border-radius:100%;display:inline-block;",":nth-of-type(1){animation-delay:-0.272s;}:nth-of-type(2){animation-delay:-0.136s;}}"],(({theme:e})=>e.loader.padding),(({theme:{loader:e}})=>p(["width:",";height:",";animation:",";background-color:",";"],e.size,e.size,e.animation,e.color))),ge=()=>t.createElement(fe,{"aria-hidden":!0,className:"rfs-loading-dots"},t.createElement("div",null),t.createElement("div",null),t.createElement("div",null)),he=u.svg.withConfig({displayName:"ClearSvg",componentId:"sc-1v5ipi2-0"})(["fill:currentColor;",""],(({theme:e})=>p(["width:",";height:",";animation:",";transition:",";"],e.icon.clear.width,e.icon.clear.height,e.icon.clear.animation,e.icon.clear.transition))),be=()=>t.createElement(he,{"aria-hidden":!0,viewBox:"0 0 14 16",className:"rfs-clear-icon"},t.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"})),Oe=u.div.withConfig({displayName:"IndicatorIconsWrapper",componentId:"sc-1561oeb-0"})(["display:flex;flex-shrink:0;align-items:center;align-self:stretch;box-sizing:border-box;"]),ye=u.div.withConfig({displayName:"IndicatorIcon",componentId:"sc-1561oeb-1"})(["height:100%;display:flex;align-items:center;box-sizing:border-box;color:",";padding:",";:hover{color:",";}",""],(({theme:e})=>e.icon.color),(({theme:e})=>e.icon.padding),(({theme:e})=>e.icon.hoverColor),(({theme:e})=>e.icon.css)),we=u.div.withConfig({displayName:"Caret",componentId:"sc-1561oeb-2"})(["transition:",";border-top:"," dashed;border-left:"," solid transparent;border-right:"," solid transparent;",""],(({theme:e})=>e.icon.caret.transition),(({theme:e})=>e.icon.caret.size),(({theme:e})=>e.icon.caret.size),(({theme:e})=>e.icon.caret.size),(({theme:e,menuOpen:t,isInvalid:n})=>t&&p(["transform:rotate(180deg);color:",";"],n?e.color.danger:e.color.caretActive||e.color.primary))),ve=u.div.withConfig({displayName:"Separator",componentId:"sc-1561oeb-3"})(["width:1px;margin:0.5rem 0;align-self:stretch;box-sizing:border-box;background-color:",";"],(({theme:e})=>e.color.iconSeparator||e.color.border)),xe=n((({menuOpen:e,clearIcon:n,caretIcon:o,isInvalid:r,showClear:i,isLoading:a,isDisabled:l,loadingNode:s,onCaretMouseDown:c,onClearMouseDown:d})=>{const u="function"==typeof o||"function"==typeof n?{menuOpen:e,isLoading:!!a,isInvalid:!!r,isDisabled:!!l}:void 0,p=e=>"function"==typeof e?e(u):e;return t.createElement(Oe,null,i&&!a&&t.createElement(ye,{onTouchEnd:d,onMouseDown:d,"data-testid":undefined},p(n)||t.createElement(be,null)),a&&(s||t.createElement(ge,null)),t.createElement(ve,null),t.createElement(ye,{onTouchEnd:c,onMouseDown:c,"data-testid":undefined},p(o)||t.createElement(we,{"aria-hidden":!0,menuOpen:e,isInvalid:r,className:"rfs-caret-icon"})))}));function Ce(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Se(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?Ce(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):Ce(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}xe.displayName="IndicatorIcons";const Ie=u.div.withConfig({displayName:"SelectWrapper",componentId:"kcrmu9-0"})(["position:relative;box-sizing:border-box;",""],(({theme:e})=>e.select.css)),Ee=u.div.withConfig({displayName:"ValueWrapper",componentId:"kcrmu9-1"})(["flex:1 1 0%;display:flex;flex-wrap:wrap;overflow:hidden;position:relative;align-items:center;box-sizing:border-box;padding:",";"],(({theme:e})=>e.control.padding)),De=u.div.withConfig({displayName:"ControlWrapper",componentId:"kcrmu9-2"})(["outline:0;display:flex;flex-wrap:wrap;cursor:default;position:relative;align-items:center;box-sizing:border-box;justify-content:space-between;"," "," ",""],(({isDisabled:e,isFocused:t,isInvalid:n,theme:{control:o,color:r}})=>p(["transition:",";border-style:",";border-width:",";border-radius:",";min-height:",";border-color:",";"," "," "," ",""],o.transition,o.borderStyle,o.borderWidth,o.borderRadius,o.height||o.minHeight,n?r.danger:t?o.focusedBorderColor:r.border,o.height?`height: ${o.height};`:"",e?"pointer-events:none;user-select:none;":"",o.backgroundColor||e?`background-color: ${e?r.disabled:o.backgroundColor};`:"",t?`box-shadow: ${o.boxShadow} ${n?r.dangerLight:o.boxShadowColor};`:"")),(({theme:e})=>e.control.css),(({isFocused:e,theme:t})=>e&&t.control.focusedCss)),Te=s((({async:e,isMulti:n,inputId:r,selectId:s,required:u,autoFocus:p,isLoading:m,onKeyDown:g,clearIcon:h,caretIcon:b,isInvalid:O,ariaLabel:w,menuWidth:I,isDisabled:E,inputDelay:N,onMenuOpen:P,onMenuClose:j,onInputBlur:R,isClearable:V,themeConfig:F,loadingNode:B,initialValue:$,onInputFocus:U,onInputChange:q,ariaLabelledBy:K,onOptionChange:Y,onSearchChange:H,getOptionLabel:G,getOptionValue:J,itemKeySelector:Q,openMenuOnFocus:Z,menuPortalTarget:_,isAriaLiveEnabled:ee,menuOverscanCount:te,blurInputOnSelect:ne,renderOptionLabel:re,renderMultiOptions:ie,menuScrollDuration:ce,filterIgnoreAccents:de,hideSelectedOptions:pe,getIsOptionDisabled:fe,getFilterOptionString:ge,isSearchable:he=!0,lazyLoadMenu:be=!1,openMenuOnClick:Oe=!0,filterIgnoreCase:ye=!0,tabSelectsOption:we=!0,closeMenuOnSelect:ve=!0,scrollMenuIntoView:Ce=!0,backspaceClearsValue:Te=!0,filterMatchFrom:Me=x.ANY,menuPosition:Ne=v.BOTTOM,options:ke=T,loadingMsg:Pe="Loading..",placeholder:ze="Select option..",noOptionsMsg:je="No options",menuItemSize:Le=35,menuMaxHeight:Ae=300},Re)=>{const Ve=l(!1),Fe=l(),Be=l(!1),$e=l(null),We=l(null),Ue=l(null),qe=l(null),[Ke,Ye]=i(""),[He,Xe]=i(!1),[Ge,Je]=i(!1),[Qe,Ze]=i(null),[_e,et]=i(D),tt=o((()=>z(F)?A(M,F):M),[F]),nt=o((()=>G||(e=>e.label)),[G]),ot=o((()=>J||(e=>e.value)),[J]),rt=o((()=>re||nt),[re,nt]),it=((e,t)=>{const[n,o]=i(e);return a((()=>{if(void 0===t)return;const n=setTimeout((()=>{o(e)}),t);return()=>{clearTimeout(n)}}),[e,t]),void 0===t?e:n})(Ke,N),[at,lt]=i((()=>L($,ot,nt))),st=ae(ke,it,Me,at,ot,nt,fe,ge,ye,de,n,pe,e),[ct,dt]=se(We,qe,He,Ne,Le,Ae,st.length,ce,Ce,P,j),ut=()=>{var e;return null===(e=Ue.current)||void 0===e?void 0:e.blur()},pt=()=>{var e;return null===(e=Ue.current)||void 0===e?void 0:e.focus()},mt=e=>{var t;return null===(t=$e.current)||void 0===t?void 0:t.scrollToItem(e)},ft=(e,t=!0)=>{e.stopPropagation(),t&&e.preventDefault()},gt=c(((e,t)=>{t&&ft(t,"mousedown"===t.type),lt((t=>t.filter((t=>t.value!==e))))}),[]),ht=c((e=>{if(!k(st))return void(!Ve.current&&Xe(!0));const t=n?-1:st.findIndex((({isSelected:e})=>e)),o=t>-1?t:e===S.FIRST?0:st.length-1;!Ve.current&&Xe(!0),et(Se({index:o},st[o])),mt(o)}),[n,st]),bt=c(((e,t)=>{t?n&>(e.value):lt((t=>n?[...t,e]:[e]));("boolean"==typeof ne?ne:W)?ut():ve&&(Xe(!1),Ye(""))}),[n,ve,gt,ne]);d(Re,(()=>({menuOpen:He,empty:!k(at),blur:ut,focus:pt,clearValue:()=>{lt(T),et(D)},setValue:e=>{const t=L(e,ot,nt);lt(t)},toggleMenu:e=>{!0===e||void 0===e&&!He?(!Ge&&pt(),ht(S.FIRST)):ut()}}))),a((()=>{p&&pt()}),[]),a((()=>{Ve.current=He}),[He]),a((()=>{Ge&&Z&&ht(S.FIRST)}),[Ge,Z,ht]),a((()=>{H&&Be.current&&(Be.current=!1,H(it))}),[H,it]),le((()=>{if(!Y)return;const e=n?at.map((({data:e})=>e)):k(at)?at[0].data:null;Y(e)}),[n,at,Y]),le((()=>{const t=st.length>0&&(e||st.length!==ke.length||0===Fe.current);0===st.length?et(D):(1===st.length||t)&&(et(Se({index:0},st[0])),mt(0)),Fe.current=st.length}),[e,ke,st]);const Ot=()=>{const{data:e,value:t,label:n,isSelected:o,isDisabled:r}=_e;e&&!r&&bt({data:e,value:t,label:n},o)},yt=e=>{E||(Ge||pt(),He?"INPUT"!==e.currentTarget.tagName&&(He&&Xe(!1),Ke&&Ye("")):Oe&&ht(S.FIRST),"INPUT"!==e.currentTarget.tagName&&e.preventDefault())},wt=c((e=>{null==R||R(e),Je(!1),Xe(!1),Ye("")}),[R]),vt=c((e=>{null==U||U(e),Je(!0)}),[U]),xt=c((e=>{Be.current=!0,null==q||q(e.currentTarget.value||""),!Ve.current&&Xe(!0),Ye(e.currentTarget.value||"")}),[q]),Ct=c((e=>{ft(e,"mousedown"===e.type),lt(T),pt()}),[]),St=c((e=>{ft(e,"mousedown"===e.type),pt(),Ve.current?Xe(!1):ht(S.FIRST)}),[ht]),It=!be||be&&He,Et=E||!he||!!Qe,Dt=!(!V||E||!k(at)),Tt=E||Oe?void 0:St;return t.createElement(f,{theme:tt},t.createElement(Ie,Object.assign({id:s,"aria-controls":r,"aria-expanded":He,onKeyDown:e=>{if(!(E||g&&(g(e,Ke,_e),e.defaultPrevented))){switch(e.key){case"ArrowDown":case"ArrowUp":{const t="ArrowDown"===e.key;He?(e=>{if(!k(st))return;const t=e===S.DOWN?(_e.index+1)%st.length:_e.index>0?_e.index-1:st.length-1;Qe&&Ze(null),et(Se({index:t},st[t])),mt(t)})(t?S.DOWN:S.UP):ht(t?S.FIRST:S.LAST);break}case"ArrowLeft":case"ArrowRight":if(!n||Ke||ie)return;(e=>{if(!k(at))return;let t=-1;const n=at.length-1,o=Qe?at.findIndex((e=>e.value===Qe)):-1;switch(e){case C.NEXT:t=o>-1&&o<n?o+1:-1;break;case C.PREVIOUS:t=0!==o?-1===o?n:o-1:0}const r=t>=0?at[t].value:null;_e.data&&et(D),r!==Qe&&Ze(r)})("ArrowLeft"===e.key?C.PREVIOUS:C.NEXT);break;case" ":if(Ke)return;if(He){if(!_e.data)return;Ot()}else ht(S.FIRST);break;case"Enter":He&&229!==e.keyCode&&Ot();break;case"Escape":He&&(Xe(!1),Ye(""));break;case"Tab":if(!He||!we||!_e.data||e.shiftKey)return;Ot();break;case"Delete":case"Backspace":if(Ke)return;if(Qe){const e=at.findIndex((e=>e.value===Qe)),t=e>-1&&e<at.length-1?at[e+1].value:null;gt(Qe),Ze(t)}else{if(!Te)return;if(k(at))if(n&&!ie){const{value:e}=at[at.length-1];gt(e)}else V&<(T)}break;default:return}e.preventDefault()}}},y),t.createElement(De,{ref:qe,isInvalid:O,isFocused:Ge,isDisabled:E,className:"rfs-control-container",onTouchEnd:yt,onMouseDown:yt,"data-testid":undefined},t.createElement(Ee,null,t.createElement(oe,{isMulti:n,inputValue:Ke,placeholder:ze,selectedOption:at,focusedMultiValue:Qe,renderOptionLabel:rt,renderMultiOptions:ie,removeSelectedOption:gt}),t.createElement(ue,{id:r,ref:Ue,required:u,ariaLabel:w,inputValue:Ke,readOnly:Et,onBlur:wt,onFocus:vt,onChange:xt,ariaLabelledBy:K,selectedOption:at})),t.createElement(xe,{menuOpen:He,clearIcon:h,caretIcon:b,isInvalid:O,isLoading:m,showClear:Dt,isDisabled:E,loadingNode:B,onClearMouseDown:Ct,onCaretMouseDown:Tt})),It&&t.createElement(X,{menuRef:We,menuOpen:He,isLoading:m,menuTop:ct,height:dt,itemSize:Le,loadingMsg:Pe,menuOptions:st,fixedSizeListRef:$e,noOptionsMsg:je,selectOption:bt,itemKeySelector:Q,overscanCount:te,menuPortalTarget:_,width:I||tt.menu.width,onMenuMouseDown:e=>{ft(e),pt()},renderOptionLabel:rt,focusedOptionIndex:_e.index}),ee&&t.createElement(me,{menuOpen:He,isFocused:Ge,ariaLabel:w,inputValue:Ke,isSearchable:he,focusedOption:_e,selectedOption:at,optionCount:st.length})))}));Te.displayName="Select";export{Te as Select}; |
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("styled-components"),require("react-dom"),require("react-window")):"function"==typeof define&&define.amd?define(["exports","react","styled-components","react-dom","react-window"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ReactFunctionalSelect={},e.React,e.styled,e.ReactDOM,e.ReactWindow)}(this,(function(e,t,n,o,r){"use strict";function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=i(t),l=i(n);function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const d="rfs-option",u="rfs-option-focused",c="rfs-option-selected",p="rfs-option-disabled",f={role:"combobox","aria-haspopup":"listbox",className:"rfs-select-container","data-testid":undefined},m={tabIndex:0,type:"text",spellCheck:!1,autoCorrect:"off",autoComplete:"off",autoCapitalize:"none","aria-autocomplete":"list",className:"rfs-autosize-input","data-testid":undefined};var g,h,b,y;!function(e){e.TOP="top",e.AUTO="auto",e.BOTTOM="bottom"}(g||(g={})),function(e){e.ANY="any",e.START="start"}(h||(h={})),function(e){e.NEXT="next",e.PREVIOUS="prev"}(b||(b={})),function(e){e.UP="up",e.DOWN="down",e.LAST="last",e.FIRST="first"}(y||(y={}));const O=n.keyframes(["0%,80%,100%{transform:scale(0);}40%{transform:scale(1.0);}"]),w=n.keyframes(["from{opacity:0;}to{opacity:1;}"]),v=n.css([""," 0.2s ease-out both"],w),x=/[\u0300-\u036f]/g,S={index:-1},C=[],E={color:{border:"#ced4da",danger:"#dc3545",primary:"#007bff",disabled:"#e9ecef",placeholder:"#6E7276",dangerLight:"rgba(220, 53, 69, 0.25)"},input:{},select:{},loader:{size:"0.625rem",padding:"0.375rem 0.75rem",animation:n.css([""," 1.19s ease-in-out infinite"],O),color:"rgba(0, 123, 255, 0.42)"},icon:{color:"#ccc",hoverColor:"#A6A6A6",padding:"0 0.9375rem",clear:{width:"14px",height:"16px",animation:v,transition:"color 0.2s ease-out"},caret:{size:"7px",transition:"transform 0.3s ease-in-out, color 0.2s ease-out"}},control:{minHeight:"38px",borderWidth:"1px",borderStyle:"solid",borderRadius:"0.25rem",boxShadow:"0 0 0 0.2rem",padding:"0.375rem 0.75rem",boxShadowColor:"rgba(0, 123, 255, 0.25)",focusedBorderColor:"rgba(0, 123, 255, 0.75)",transition:"box-shadow 0.2s ease-out, border-color 0.2s ease-out"},menu:{padding:"0",width:"100%",margin:"0.5rem 0",borderRadius:"0.25rem",backgroundColor:"#fff",animation:v,boxShadow:"0 0 0 1px rgba(0, 0, 0, 0.1), 0 4px 11px rgba(0, 0, 0, 0.1)",option:{textAlign:"left",selectedColor:"#fff",selectedBgColor:"#007bff",padding:"0.375rem 0.75rem",focusedBgColor:"rgba(0, 123, 255, 0.20)"}},noOptions:{fontSize:"1.25rem",margin:"0.25rem 0",color:"hsl(0, 0%, 60%)",padding:"0.375rem 0.75rem"},multiValue:{margin:"1px 2px",borderRadius:"0.25rem",backgroundColor:"#e7edf3",animation:v,label:{fontSize:"0.825em",borderRadius:"0.25rem",padding:"1px 2px 1px 6px"},clear:{fontWeight:700,padding:"0 7px",color:"#a6a6a6",fontSize:"0.65em",alignSelf:"center",focusColor:"#808080",transition:"color 0.2s ease-out, transform 0.2s ease-out, z-index 0.2s ease-out"}}};function I(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function T(e){return Array.isArray(e)&&!!e.length}function k(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function D(e,t,n){let o=e.trim();return t&&(o=o.toLowerCase()),n?function(e){return e.normalize("NFD").replace(x,"")}(o):o}function N(e,t,n){const o=Array.isArray(e)?e:k(e)?[e]:C;return T(o)?o.map((e=>({data:e,value:t(e),label:n(e)}))):o}const R=(e,t)=>{const n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?M(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e);return Object.keys(t).forEach((o=>{const r=t[o];n[o]=k(r)&&"animation"!==o?o in e?R(e[o],r):r:r||""})),n};function j(e){return P(e)?window.pageYOffset:e.scrollTop}function P(e){return e===document.documentElement||e===document.body||e===window}function z({overflow:e,overflowX:t,overflowY:n}){const o=e=>"auto"===e||"scroll"===e;return o(e)||o(t)||o(n)}function L(e){let t=getComputedStyle(e);const n="absolute"===t.position;if("fixed"===t.position)return document.documentElement;for(let o=e;o=o?o.parentElement:null;)if(t=getComputedStyle(o),(!n||"static"!==t.position)&&z(t))return o;return document.documentElement}function A(e,t,n=300,o){let r=0;const i=j(e),a=t-i;window.requestAnimationFrame((function t(){var l;r+=5,function(e,t){P(e)?window.scrollTo(0,t):e.scrollTop=t}(e,a*((l=(l=r)/n-1)*l*l+1)+i),r<n?window.requestAnimationFrame(t):null==o||o()}))}const F="undefined"!=typeof window&&"ontouchstart"in window||"undefined"!=typeof navigator&&!!navigator.maxTouchPoints,V="undefined"!=typeof navigator&&/(MSIE|Trident\/|Edge\/|Edg\/)/i.test(navigator.userAgent),B=t.memo((({index:e,style:t,data:{menuOptions:n,selectOption:o,renderOptionLabel:r,focusedOptionIndex:i}})=>{const{data:l,value:s,label:u,isDisabled:c,isSelected:p}=n[e],f=function(e,t,n){let o=d;return e&&(o+=" rfs-option-disabled"),t&&(o+=" rfs-option-selected"),n&&(o+=" rfs-option-focused"),o}(c,p,e===i),m=c?void 0:()=>o({data:l,value:s,label:u},p);return a.default.createElement("div",{style:t,onClick:m,className:f},r(l))}),r.areEqual);B.displayName="Option";const $=l.default.div.withConfig({displayName:"NoOptionsMsg",componentId:"v1y124-0"})(["text-align:center;color:",";margin:",";padding:",";font-size:",";",""],(({theme:e})=>e.noOptions.color),(({theme:e})=>e.noOptions.margin),(({theme:e})=>e.noOptions.padding),(({theme:e})=>e.noOptions.fontSize),(({theme:e})=>e.noOptions.css)),W=({width:e,height:n,itemSize:o,isLoading:i,loadingMsg:l,menuOptions:s,selectOption:d,noOptionsMsg:u,overscanCount:c,itemKeySelector:p,fixedSizeListRef:f,renderOptionLabel:m,focusedOptionIndex:g})=>{const h=t.useMemo((()=>({menuOptions:s,selectOption:d,renderOptionLabel:m,focusedOptionIndex:g})),[s,g,d,m]);if(i)return a.default.createElement($,null,l);const b=p?(e,t)=>t.menuOptions[e][p]:void 0;return a.default.createElement(t.Fragment,null,a.default.createElement(r.FixedSizeList,{width:e,height:n,itemKey:b,itemSize:o,itemData:h,ref:f,overscanCount:c,itemCount:s.length},B),!T(s)&&a.default.createElement($,null,u))},q=l.default.div.withConfig({displayName:"MenuWrapper",componentId:"yf5myu-0"})(["z-index:999;cursor:default;position:absolute;"," "," .","{display:block;overflow:hidden;user-select:none;white-space:nowrap;text-overflow:ellipsis;-webkit-tap-highlight-color:transparent;","}"],(({menuTop:e,menuOpen:t,theme:{menu:o}})=>n.css(["width:",";margin:",";padding:",";animation:",";box-shadow:",";border-radius:",";background-color:",";"," ",""],o.width,o.margin,o.padding,o.animation,o.boxShadow,o.borderRadius,o.backgroundColor,t?"":"display: none;",e?`top: ${e};`:"")),(({theme:e})=>e.menu.css),d,(({theme:{menu:{option:e}}})=>n.css(["padding:",";text-align:",";&.",",&:hover:not(.","):not(.","){background-color:",";}&.","{color:",";background-color:",";}&.","{opacity:0.35;}"],e.padding,e.textAlign,u,p,c,e.focusedBgColor,c,e.selectedColor,e.selectedBgColor,p))),U=e=>{let{menuRef:t,menuTop:n,menuOpen:r,onMenuMouseDown:i,menuPortalTarget:l}=e,s=I(e,["menuRef","menuTop","menuOpen","onMenuMouseDown","menuPortalTarget"]);const d=a.default.createElement(q,{ref:t,menuTop:n,menuOpen:r,onMouseDown:i,className:"rfs-menu-container","data-testid":undefined},a.default.createElement(W,Object.assign({},s)));return l?o.createPortal(d,l):d},K=n.css(["z-index:5000;transform:scale(1.26);color:",";"],(({theme:e})=>e.multiValue.clear.focusColor)),Y=l.default.div.withConfig({displayName:"MultiValueWrapper",componentId:"sc-211cx7-0"})(["min-width:0;display:flex;"," ",""],(({theme:{multiValue:e}})=>n.css(["margin:",";animation:",";border-radius:",";background-color:",";"],e.margin,e.animation,e.borderRadius,e.backgroundColor)),(({theme:e})=>e.multiValue.css)),H=l.default.div.withConfig({displayName:"Label",componentId:"sc-211cx7-1"})(["overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:",";font-size:",";border-radius:",";"],(({theme:e})=>e.multiValue.label.padding),(({theme:e})=>e.multiValue.label.fontSize),(({theme:e})=>e.multiValue.label.borderRadius)),X=l.default.i.withConfig({displayName:"Clear",componentId:"sc-211cx7-2"})(["display:flex;font-style:inherit;"," ",""],(({theme:{multiValue:{clear:e}}})=>n.css(["color:",";padding:",";font-size:",";align-self:",";transition:",";font-weight:",";:hover{","}"],e.color,e.padding,e.fontSize,e.alignSelf,e.transition,e.fontWeight,K)),(({isFocused:e})=>e&&K)),_=t.memo((({data:e,value:t,isFocused:n,renderOptionLabel:o,removeSelectedOption:r})=>a.default.createElement(Y,null,a.default.createElement(H,null,o(e)),a.default.createElement(X,{isFocused:n,"data-testid":undefined,onTouchEnd:e=>r(t,e),onMouseDown:e=>r(t,e)},"✖"))));_.displayName="MultiValue";const G=n.css(["top:50%;overflow:hidden;position:absolute;white-space:nowrap;box-sizing:border-box;text-overflow:ellipsis;transform:translateY(-50%);"]),J=l.default.div.withConfig({displayName:"SingleValue",componentId:"sc-153h0ct-0"})([""," max-width:calc(100% - 0.5rem);"],G),Q=l.default.div.withConfig({displayName:"Placeholder",componentId:"sc-153h0ct-1"})([""," color:",";",""],G,(({theme:e})=>e.color.placeholder),(({theme:e,isMulti:t})=>t&&n.css(["animation:",";"],e.multiValue.animation))),Z=({isMulti:e,inputValue:n,placeholder:o,selectedOption:r,focusedMultiValue:i,renderOptionLabel:l,renderMultiOptions:s,removeSelectedOption:d})=>!n||e&&(!e||T(r)&&!s)?T(r)?e?a.default.createElement(t.Fragment,null,s?s({renderOptionLabel:l,selected:r}):r.map((({data:e,value:t})=>a.default.createElement(_,{key:t,data:e,value:t,renderOptionLabel:l,isFocused:t===i,removeSelectedOption:d})))):a.default.createElement(J,null,l(r[0].data)):a.default.createElement(Q,{isMulti:e},o):null;function ee(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function te(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ee(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ee(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const ne=(e,n,o,r,i,a,l,s,d,u,c,p,f)=>{const[m,g]=t.useState(C),b=f?"":n,y="boolean"!=typeof p?!!c:p;return t.useEffect((()=>{const t=D(b,d,u),n=r.length?new Set(r.map((e=>e.value))):void 0,c=l||(e=>!!e.isDisabled),p=s||(e=>"string"==typeof e.label?e.label:`${e.label}`),f=e=>{const r=i(e),l=te(te({data:e,value:r,label:a(e)},c(e)&&{isDisabled:!0}),(null==n?void 0:n.has(r))&&{isSelected:!0});if(!(t&&!(e=>{const n=D(p(e),d,u);return o===h.ANY?n.indexOf(t)>-1:n.substr(0,t.length)===t})(l)||y&&l.isSelected))return l},m=[];for(let t=0;t<e.length;t++){const n=f(e[t]);n&&m.push(n)}g(m)}),[e,r,b,y,o,d,u,s,l,i,a]),m},oe=(e,n)=>{const o=t.useRef(!0);t.useEffect((()=>{if(!o.current)return e();o.current=!1}),n)},re=(e,n,o,r,i,a,l,s,d,u,c)=>{const p=t.useRef(!1),f=t.useRef(!1),[m,h]=t.useState(a),[b,y]=t.useState(r===g.TOP);t.useEffect((()=>{const t=r===g.TOP||r===g.AUTO&&!(e=>{if(!e)return!0;const t=L(e),{top:n,height:o}=e.getBoundingClientRect();return t.getBoundingClientRect().height-j(t)-n>=o})(e.current);y(t),f.current=b}),[e,r]),oe((()=>{if(o){const t=e=>{null==u||u(),e&&(p.current=!0,h(e))};f.current?t():((e,t,n,o)=>{if(!e)return void o();const{top:r,height:i,bottom:a}=e.getBoundingClientRect(),l=window.innerHeight;if(l-r>=i)return void o();const s=L(e),d=j(s),u=s.getBoundingClientRect().height-d-r,c=u<i;if(c||!n)return void o(c?u:void 0);A(s,a-l+d+parseInt(getComputedStyle(e).marginBottom,10),t,o)})(e.current,s,d,t)}else null==c||c(),p.current&&(p.current=!1,h(a))}),[e,o,c,u,a,d,s]);const O=Math.min(m,l*i);return[b?((e,t,n)=>{const o=e>0||!t?e:t.getBoundingClientRect().height,r=n?n.getBoundingClientRect().height:0,i=t&&getComputedStyle(t),a=i?parseInt(i.marginBottom,10):0,l=i?parseInt(i.marginTop,10):0;return"calc("+-Math.abs(o+r)+"px + "+(a+l)+"px)"})(O,e.current,n.current):void 0,O]},ie=l.default.div.withConfig({displayName:"SizerDiv",componentId:"o2ype2-0"})(["top:0;left:0;height:0;overflow:scroll;white-space:pre;position:absolute;visibility:hidden;font-size:inherit;font-weight:inherit;font-family:inherit;",""],(({theme:e})=>e.input.css)),ae=l.default.input.withConfig({displayName:"Input",componentId:"o2ype2-1"})(["border:0;outline:0;padding:0;cursor:text;background:0;color:inherit;font-size:inherit;font-weight:inherit;font-family:inherit;box-sizing:content-box;:read-only{opacity:0;cursor:default;}:required{","}"," ",""],(({theme:e,isInvalid:t})=>t&&e.input.cssRequired),(({theme:e})=>e.input.css),V&&"::-ms-clear{display:none;}"),le=t.memo(t.forwardRef((({id:e,onBlur:n,onFocus:o,readOnly:r,required:i,onChange:l,ariaLabel:s,inputValue:d,ariaLabelledBy:u,selectedOption:c},p)=>{const f=t.useRef(null),[g,h]=t.useState(2),b=i&&!T(c);return oe((()=>{f.current&&h(f.current.scrollWidth+2)}),[d]),a.default.createElement(t.Fragment,null,a.default.createElement(ae,Object.assign({id:e,ref:p,isInvalid:!0,onBlur:n,onFocus:o,value:d,readOnly:r,required:b,"aria-label":s,style:{width:g}},m,{"aria-labelledby":u,onChange:r?void 0:l})),a.default.createElement(ie,{ref:f},d))})));le.displayName="AutosizeInput";const se=l.default.span.withConfig({displayName:"A11yText",componentId:"zxgkbx-0"})(["border:0;padding:0;width:1px;height:1px;margin:-1px;overflow:hidden;position:absolute;white-space:nowrap;clip:rect(0 0 0 0);clip-path:inset(50%);"]),de=({menuOpen:e,isFocused:t,ariaLabel:n,inputValue:o,optionCount:r,isSearchable:i,focusedOption:l,selectedOption:s})=>{if(!t)return null;const d=`${r} result(s) available${o?" for search input "+o:""}.`,u=l.value?`Focused option: ${l.label}${l.isDisabled?" - disabled":""}, ${l.index+1} of ${r}.`:"",c=e?"Use Up and Down arrow keys to choose options, press Enter or Tab to select the currently focused option, press Escape to close the menu.":`${n||"Select"} is focused${i?", type to filter options":""}, press Down arrow key to open the menu.`,p=`Selected option: ${T(s)?s.map((({label:e})=>e)).join(" "):"N/A"}`,f=`${u} ${d} ${c}`;return a.default.createElement(se,{"aria-live":"polite","data-testid":undefined},a.default.createElement("span",null," ",p),a.default.createElement("span",null," ",f))},ue=l.default.div.withConfig({displayName:"StyledLoadingDots",componentId:"sc-1j9e0pa-0"})(["display:flex;align-self:center;text-align:center;margin-right:0.25rem;padding:",";> div{border-radius:100%;display:inline-block;",":nth-of-type(1){animation-delay:-0.272s;}:nth-of-type(2){animation-delay:-0.136s;}}"],(({theme:e})=>e.loader.padding),(({theme:{loader:e}})=>n.css(["width:",";height:",";animation:",";background-color:",";"],e.size,e.size,e.animation,e.color))),ce=()=>a.default.createElement(ue,{"aria-hidden":"true",className:"rfs-loading-dots"},a.default.createElement("div",null),a.default.createElement("div",null),a.default.createElement("div",null)),pe=l.default.svg.withConfig({displayName:"ClearSvg",componentId:"sc-1v5ipi2-0"})(["fill:currentColor;",""],(({theme:e})=>n.css(["width:",";height:",";animation:",";transition:",";"],e.icon.clear.width,e.icon.clear.height,e.icon.clear.animation,e.icon.clear.transition))),fe=()=>a.default.createElement(pe,{"aria-hidden":"true",viewBox:"0 0 14 16",className:"rfs-clear-icon"},a.default.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"})),me=l.default.div.withConfig({displayName:"IndicatorIconsWrapper",componentId:"sc-1561oeb-0"})(["display:flex;flex-shrink:0;align-items:center;align-self:stretch;box-sizing:border-box;"]),ge=l.default.div.withConfig({displayName:"IndicatorIcon",componentId:"sc-1561oeb-1"})(["height:100%;display:flex;align-items:center;box-sizing:border-box;color:",";padding:",";:hover{color:",";}",""],(({theme:e})=>e.icon.color),(({theme:e})=>e.icon.padding),(({theme:e})=>e.icon.hoverColor),(({theme:e})=>e.icon.css)),he=l.default.div.withConfig({displayName:"Caret",componentId:"sc-1561oeb-2"})(["transition:",";border-top:"," dashed;border-left:"," solid transparent;border-right:"," solid transparent;",""],(({theme:e})=>e.icon.caret.transition),(({theme:e})=>e.icon.caret.size),(({theme:e})=>e.icon.caret.size),(({theme:e})=>e.icon.caret.size),(({theme:e,menuOpen:t,isInvalid:o})=>t&&n.css(["transform:rotate(180deg);color:",";"],o?e.color.danger:e.color.caretActive||e.color.primary))),be=l.default.div.withConfig({displayName:"Separator",componentId:"sc-1561oeb-3"})(["width:1px;margin:0.5rem 0;align-self:stretch;box-sizing:border-box;background-color:",";"],(({theme:e})=>e.color.iconSeparator||e.color.border)),ye=t.memo((({menuOpen:e,clearIcon:t,caretIcon:n,isInvalid:o,showClear:r,isLoading:i,isDisabled:l,loadingNode:s,onCaretMouseDown:d,onClearMouseDown:u})=>{const c="function"==typeof n||"function"==typeof t?{menuOpen:e,isLoading:!!i,isInvalid:!!o,isDisabled:!!l}:void 0,p=e=>"function"==typeof e?e(c):e;return a.default.createElement(me,null,r&&!i&&a.default.createElement(ge,{onTouchEnd:u,onMouseDown:u,"data-testid":undefined},p(t)||a.default.createElement(fe,null)),i&&(s||a.default.createElement(ce,null)),a.default.createElement(be,null),a.default.createElement(ge,{onTouchEnd:d,onMouseDown:d,"data-testid":undefined},p(n)||a.default.createElement(he,{"aria-hidden":"true",menuOpen:e,isInvalid:o,className:"rfs-caret-icon"})))}));function Oe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function we(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Oe(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Oe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}ye.displayName="IndicatorIcons";const ve=l.default.div.withConfig({displayName:"SelectWrapper",componentId:"kcrmu9-0"})(["position:relative;box-sizing:border-box;",""],(({theme:e})=>e.select.css)),xe=l.default.div.withConfig({displayName:"ValueWrapper",componentId:"kcrmu9-1"})(["flex:1 1 0%;display:flex;flex-wrap:wrap;overflow:hidden;position:relative;align-items:center;box-sizing:border-box;padding:",";"],(({theme:e})=>e.control.padding)),Se=l.default.div.withConfig({displayName:"ControlWrapper",componentId:"kcrmu9-2"})(["outline:0;display:flex;flex-wrap:wrap;cursor:default;position:relative;align-items:center;box-sizing:border-box;justify-content:space-between;"," "," ",""],(({isDisabled:e,isFocused:t,isInvalid:o,theme:{control:r,color:i}})=>n.css(["transition:",";border-style:",";border-width:",";border-radius:",";min-height:",";border-color:",";"," "," "," ",""],r.transition,r.borderStyle,r.borderWidth,r.borderRadius,r.height||r.minHeight,o?i.danger:t?r.focusedBorderColor:i.border,r.height?`height: ${r.height};`:"",e?"pointer-events:none;user-select:none;":"",r.backgroundColor||e?`background-color: ${e?i.disabled:r.backgroundColor};`:"",t?`box-shadow: ${r.boxShadow} ${o?i.dangerLight:r.boxShadowColor};`:"")),(({theme:e})=>e.control.css),(({isFocused:e,theme:t})=>e&&t.control.focusedCss)),Ce=t.forwardRef((({async:e,isMulti:o,inputId:r,selectId:i,required:l,autoFocus:s,isLoading:d,onKeyDown:u,clearIcon:c,caretIcon:p,isInvalid:m,ariaLabel:O,menuWidth:w,isDisabled:v,inputDelay:x,onMenuOpen:I,onMenuClose:M,onInputBlur:D,isClearable:j,themeConfig:P,loadingNode:z,initialValue:L,onInputFocus:A,onInputChange:V,ariaLabelledBy:B,onOptionChange:$,onSearchChange:W,getOptionLabel:q,getOptionValue:K,itemKeySelector:Y,openMenuOnFocus:H,menuPortalTarget:X,isAriaLiveEnabled:_,menuOverscanCount:G,blurInputOnSelect:J,renderOptionLabel:Q,renderMultiOptions:ee,menuScrollDuration:te,filterIgnoreAccents:ie,hideSelectedOptions:ae,getIsOptionDisabled:se,getFilterOptionString:ue,isSearchable:ce=!0,lazyLoadMenu:pe=!1,openMenuOnClick:fe=!0,filterIgnoreCase:me=!0,tabSelectsOption:ge=!0,closeMenuOnSelect:he=!0,scrollMenuIntoView:be=!0,backspaceClearsValue:Oe=!0,filterMatchFrom:Ce=h.ANY,menuPosition:Ee=g.BOTTOM,options:Ie=C,loadingMsg:Me="Loading..",placeholder:Te="Select option..",noOptionsMsg:ke="No options",menuItemSize:De=35,menuMaxHeight:Ne=300},Re)=>{const je=t.useRef(!1),Pe=t.useRef(),ze=t.useRef(!1),Le=t.useRef(null),Ae=t.useRef(null),Fe=t.useRef(null),Ve=t.useRef(null),[Be,$e]=t.useState(""),[We,qe]=t.useState(!1),[Ue,Ke]=t.useState(!1),[Ye,He]=t.useState(null),[Xe,_e]=t.useState(S),Ge=t.useMemo((()=>k(P)?R(E,P):E),[P]),Je=t.useMemo((()=>q||(e=>e.label)),[q]),Qe=t.useMemo((()=>K||(e=>e.value)),[K]),Ze=t.useMemo((()=>Q||Je),[Q,Je]),et=((e,n)=>{const[o,r]=t.useState(e);return t.useEffect((()=>{if(void 0===n)return;const t=setTimeout((()=>{r(e)}),n);return()=>{clearTimeout(t)}}),[e,n]),void 0===n?e:o})(Be,x),[tt,nt]=t.useState((()=>N(L,Qe,Je))),ot=ne(Ie,et,Ce,tt,Qe,Je,se,ue,me,ie,o,ae,e),[rt,it]=re(Ae,Ve,We,Ee,De,Ne,ot.length,te,be,I,M),at=()=>{var e;return null===(e=Fe.current)||void 0===e?void 0:e.blur()},lt=()=>{var e;return null===(e=Fe.current)||void 0===e?void 0:e.focus()},st=e=>{var t;return null===(t=Le.current)||void 0===t?void 0:t.scrollToItem(e)},dt=(e,t=!0)=>{e.stopPropagation(),t&&e.preventDefault()},ut=t.useCallback(((e,t)=>{t&&dt(t,"mousedown"===t.type),nt((t=>t.filter((t=>t.value!==e))))}),[]),ct=t.useCallback((e=>{if(!T(ot))return void(!je.current&&qe(!0));const t=o?-1:ot.findIndex((({isSelected:e})=>e)),n=t>-1?t:e===y.FIRST?0:ot.length-1;!je.current&&qe(!0),_e(we({index:n},ot[n])),st(n)}),[o,ot]),pt=t.useCallback(((e,t)=>{t?o&&ut(e.value):nt((t=>o?[...t,e]:[e]));("boolean"==typeof J?J:F)?at():he&&(qe(!1),$e(""))}),[o,he,ut,J]);var ft;t.useImperativeHandle(Re,(()=>({menuOpen:We,empty:!T(tt),blur:at,focus:lt,clearValue:()=>{nt(C),_e(S)},setValue:e=>{const t=N(e,Qe,Je);nt(t)},toggleMenu:e=>{!0===e||void 0===e&&!We?(!Ue&<(),ct(y.FIRST)):at()}}))),ft=()=>{s&<()},t.useEffect(ft,[]),t.useEffect((()=>{je.current=We}),[We]),t.useEffect((()=>{Ue&&H&&ct(y.FIRST)}),[Ue,H,ct]),t.useEffect((()=>{W&&ze.current&&(ze.current=!1,W(et))}),[W,et]),oe((()=>{if(!$)return;const e=o?tt.map((({data:e})=>e)):T(tt)?tt[0].data:null;$(e)}),[o,tt,$]),oe((()=>{const t=ot.length>0&&(e||ot.length!==Ie.length||0===Pe.current);0===ot.length?_e(S):(1===ot.length||t)&&(_e(we({index:0},ot[0])),st(0)),Pe.current=ot.length}),[e,Ie,ot]);const mt=()=>{const{data:e,value:t,label:n,isSelected:o,isDisabled:r}=Xe;e&&!r&&pt({data:e,value:t,label:n},o)},gt=e=>{v||(Ue||lt(),We?"INPUT"!==e.currentTarget.tagName&&(We&&qe(!1),Be&&$e("")):fe&&ct(y.FIRST),"INPUT"!==e.currentTarget.tagName&&e.preventDefault())},ht=t.useCallback((e=>{null==D||D(e),Ke(!1),qe(!1),$e("")}),[D]),bt=t.useCallback((e=>{null==A||A(e),Ke(!0)}),[A]),yt=t.useCallback((e=>{ze.current=!0,null==V||V(e.currentTarget.value||""),!je.current&&qe(!0),$e(e.currentTarget.value||"")}),[V]),Ot=t.useCallback((e=>{dt(e,"mousedown"===e.type),nt(C),lt()}),[]),wt=t.useCallback((e=>{dt(e,"mousedown"===e.type),lt(),je.current?qe(!1):ct(y.FIRST)}),[ct]),vt=!pe||pe&&We,xt=v||!ce||!!Ye,St=!(!j||v||!T(tt)),Ct=v||fe?void 0:wt;return a.default.createElement(n.ThemeProvider,{theme:Ge},a.default.createElement(ve,Object.assign({id:i,"aria-controls":r,"aria-expanded":We,onKeyDown:e=>{if(!(v||u&&(u(e,Be,Xe),e.defaultPrevented))){switch(e.key){case"ArrowDown":case"ArrowUp":const t="ArrowDown"===e.key;We?(e=>{if(!T(ot))return;const t=e===y.DOWN?(Xe.index+1)%ot.length:Xe.index>0?Xe.index-1:ot.length-1;Ye&&He(null),_e(we({index:t},ot[t])),st(t)})(t?y.DOWN:y.UP):ct(t?y.FIRST:y.LAST);break;case"ArrowLeft":case"ArrowRight":if(!o||Be||ee)return;(e=>{if(!T(tt))return;let t=-1;const n=tt.length-1,o=Ye?tt.findIndex((e=>e.value===Ye)):-1;switch(e){case b.NEXT:t=o>-1&&o<n?o+1:-1;break;case b.PREVIOUS:t=0!==o?-1===o?n:o-1:0}const r=t>=0?tt[t].value:null;Xe.data&&_e(S),r!==Ye&&He(r)})("ArrowLeft"===e.key?b.PREVIOUS:b.NEXT);break;case" ":if(Be)return;if(We){if(!Xe.data)return;mt()}else ct(y.FIRST);break;case"Enter":We&&229!==e.keyCode&&mt();break;case"Escape":We&&(qe(!1),$e(""));break;case"Tab":if(!We||!ge||!Xe.data||e.shiftKey)return;mt();break;case"Delete":case"Backspace":if(Be)return;if(Ye){const e=tt.findIndex((e=>e.value===Ye)),t=e>-1&&e<tt.length-1?tt[e+1].value:null;ut(Ye),He(t)}else{if(!Oe)return;if(T(tt))if(o&&!ee){const{value:e}=tt[tt.length-1];ut(e)}else j&&nt(C)}break;default:return}e.preventDefault()}}},f),a.default.createElement(Se,{ref:Ve,isInvalid:m,isFocused:Ue,isDisabled:v,className:"rfs-control-container",onTouchEnd:gt,onMouseDown:gt,"data-testid":undefined},a.default.createElement(xe,null,a.default.createElement(Z,{isMulti:o,inputValue:Be,placeholder:Te,selectedOption:tt,focusedMultiValue:Ye,renderOptionLabel:Ze,renderMultiOptions:ee,removeSelectedOption:ut}),a.default.createElement(le,{id:r,ref:Fe,required:l,ariaLabel:O,inputValue:Be,readOnly:xt,onBlur:ht,onFocus:bt,onChange:yt,ariaLabelledBy:B,selectedOption:tt})),a.default.createElement(ye,{menuOpen:We,clearIcon:c,caretIcon:p,isInvalid:m,isLoading:d,showClear:St,isDisabled:v,loadingNode:z,onClearMouseDown:Ot,onCaretMouseDown:Ct})),vt&&a.default.createElement(U,{menuRef:Ae,menuOpen:We,isLoading:d,menuTop:rt,height:it,itemSize:De,loadingMsg:Me,menuOptions:ot,fixedSizeListRef:Le,noOptionsMsg:ke,selectOption:pt,itemKeySelector:Y,overscanCount:G,menuPortalTarget:X,width:w||Ge.menu.width,onMenuMouseDown:e=>{dt(e),lt()},renderOptionLabel:Ze,focusedOptionIndex:Xe.index}),_&&a.default.createElement(de,{menuOpen:We,isFocused:Ue,ariaLabel:O,inputValue:Be,isSearchable:ce,focusedOption:Xe,selectedOption:tt,optionCount:ot.length})))}));Ce.displayName="Select",e.Select=Ce,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("styled-components"),require("react-dom"),require("react-window")):"function"==typeof define&&define.amd?define(["exports","react","styled-components","react-dom","react-window"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ReactFunctionalSelect={},e.React,e.styled,e.ReactDOM,e.ReactWindow)}(this,(function(e,t,n,o,r){"use strict";function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=i(t),l=i(n);function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const d="rfs-option",c="rfs-option-focused",u="rfs-option-selected",p="rfs-option-disabled",f={role:"combobox","aria-haspopup":"listbox",className:"rfs-select-container","data-testid":undefined},m={tabIndex:0,type:"text",spellCheck:!1,autoCorrect:"off",autoComplete:"off",autoCapitalize:"none","aria-autocomplete":"list",className:"rfs-autosize-input","data-testid":undefined};var g,h,b,y;!function(e){e.TOP="top",e.AUTO="auto",e.BOTTOM="bottom"}(g||(g={})),function(e){e.ANY="any",e.START="start"}(h||(h={})),function(e){e.NEXT="next",e.PREVIOUS="prev"}(b||(b={})),function(e){e.UP="up",e.DOWN="down",e.LAST="last",e.FIRST="first"}(y||(y={}));const O=n.keyframes(["0%,80%,100%{transform:scale(0);}40%{transform:scale(1.0);}"]),w=n.keyframes(["from{opacity:0;}to{opacity:1;}"]),v=n.css([""," 0.2s ease-out both"],w),x={index:-1},S=[],C={color:{border:"#ced4da",danger:"#dc3545",primary:"#007bff",disabled:"#e9ecef",placeholder:"#6E7276",dangerLight:"rgba(220, 53, 69, 0.25)"},input:{},select:{},loader:{size:"0.625rem",padding:"0.375rem 0.75rem",animation:n.css([""," 1.19s ease-in-out infinite"],O),color:"rgba(0, 123, 255, 0.42)"},icon:{color:"#ccc",hoverColor:"#A6A6A6",padding:"0 0.9375rem",clear:{width:"14px",height:"16px",animation:v,transition:"color 0.2s ease-out"},caret:{size:"7px",transition:"transform 0.3s ease-in-out, color 0.2s ease-out"}},control:{minHeight:"38px",borderWidth:"1px",borderStyle:"solid",borderRadius:"3px",boxShadow:"0 0 0 0.2rem",padding:"0.375rem 0.75rem",boxShadowColor:"rgba(0, 123, 255, 0.25)",focusedBorderColor:"rgba(0, 123, 255, 0.75)",transition:"box-shadow 0.2s ease-out, border-color 0.2s ease-out"},menu:{padding:"0",width:"100%",margin:"0.5rem 0",borderRadius:"3px",backgroundColor:"#fff",animation:v,boxShadow:"0 0.5em 1em -0.125em rgb(10 10 10 / 12%), 0 0 0 1px rgb(10 10 10 / 4%)",option:{textAlign:"left",selectedColor:"#fff",selectedBgColor:"#007bff",padding:"0.375rem 0.75rem",focusedBgColor:"rgba(0, 123, 255, 0.15)"}},noOptions:{fontSize:"1.25rem",margin:"0.25rem 0",color:"hsl(0, 0%, 60%)",padding:"0.375rem 0.75rem"},multiValue:{margin:"1px 2px",borderRadius:"3px",backgroundColor:"#e7edf3",animation:v,label:{borderRadius:"3px",fontSize:"0.825em",padding:"1px 0 1px 6px"},clear:{fontWeight:600,padding:"0 6px",color:"#a6a6a6",fontSize:"0.65em",alignSelf:"center",focusColor:"#808080",transition:"color 0.2s ease-out, transform 0.2s ease-out, z-index 0.2s ease-out"}}};function E(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function I(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function M(e){return Array.isArray(e)&&!!e.length}const T=/[\u0300-\u036f]/g;function k(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function D(e,t,n){let o=e.trim();return t&&(o=o.toLowerCase()),n?function(e){return e.normalize("NFD").replace(T,"")}(o):o}function N(e,t,n){const o=Array.isArray(e)?e:k(e)?[e]:S;return M(o)?o.map((e=>({data:e,value:t(e),label:n(e)}))):o}const R=(e,t)=>{const n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?I(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e);return Object.keys(t).forEach((o=>{const r=t[o];n[o]=k(r)&&"animation"!==o?o in e?R(e[o],r):r:r||""})),n};function j(e){return P(e)?window.pageYOffset:e.scrollTop}function P(e){return e===document.documentElement||e===document.body||e===window}function z({overflow:e,overflowX:t,overflowY:n}){const o=e=>"auto"===e||"scroll"===e;return o(e)||o(t)||o(n)}function L(e){let t=getComputedStyle(e);const n="absolute"===t.position;if("fixed"===t.position)return document.documentElement;for(let o=e;o=o?o.parentElement:null;)if(t=getComputedStyle(o),(!n||"static"!==t.position)&&z(t))return o;return document.documentElement}function A(e,t,n=300,o){let r=0;const i=j(e),a=t-i;window.requestAnimationFrame((function t(){var l;r+=5,function(e,t){P(e)?window.scrollTo(0,t):e.scrollTop=t}(e,a*((l=(l=r)/n-1)*l*l+1)+i),r<n?window.requestAnimationFrame(t):null==o||o()}))}const F="undefined"!=typeof window&&"ontouchstart"in window||"undefined"!=typeof navigator&&!!navigator.maxTouchPoints,V="undefined"!=typeof navigator&&/(MSIE|Trident\/|Edge\/|Edg\/)/i.test(navigator.userAgent),B=t.memo((({index:e,style:t,data:{menuOptions:n,selectOption:o,renderOptionLabel:r,focusedOptionIndex:i}})=>{const{data:l,value:s,label:c,isDisabled:u,isSelected:p}=n[e],f=function(e,t,n){let o=d;return e&&(o+=" rfs-option-disabled"),t&&(o+=" rfs-option-selected"),n&&(o+=" rfs-option-focused"),o}(u,p,e===i),m=u?void 0:()=>o({data:l,value:s,label:c},p);return a.default.createElement("div",{style:t,onClick:m,className:f},r(l))}),r.areEqual);B.displayName="Option";const $=l.default.div.withConfig({displayName:"NoOptionsMsg",componentId:"v1y124-0"})(["text-align:center;color:",";margin:",";padding:",";font-size:",";",""],(({theme:e})=>e.noOptions.color),(({theme:e})=>e.noOptions.margin),(({theme:e})=>e.noOptions.padding),(({theme:e})=>e.noOptions.fontSize),(({theme:e})=>e.noOptions.css)),W=({width:e,height:n,itemSize:o,isLoading:i,loadingMsg:l,menuOptions:s,selectOption:d,noOptionsMsg:c,overscanCount:u,itemKeySelector:p,fixedSizeListRef:f,renderOptionLabel:m,focusedOptionIndex:g})=>{const h=t.useMemo((()=>({menuOptions:s,selectOption:d,renderOptionLabel:m,focusedOptionIndex:g})),[s,g,d,m]);if(i)return a.default.createElement($,null,l);const b=p?(e,t)=>t.menuOptions[e][p]:void 0;return a.default.createElement(t.Fragment,null,a.default.createElement(r.FixedSizeList,{width:e,height:n,itemKey:b,itemSize:o,itemData:h,ref:f,overscanCount:u,itemCount:s.length},B),!M(s)&&c&&a.default.createElement($,null,c))},q=l.default.div.withConfig({displayName:"MenuWrapper",componentId:"yf5myu-0"})(["z-index:999;cursor:default;position:absolute;"," "," .","{display:block;overflow:hidden;user-select:none;white-space:nowrap;text-overflow:ellipsis;-webkit-tap-highlight-color:transparent;","}"],(({menuTop:e,menuOpen:t,hideNoOptionsMsg:o,theme:{menu:r}})=>n.css(["width:",";margin:",";padding:",";animation:",";border-radius:",";background-color:",";box-shadow:",";"," ",""],r.width,r.margin,r.padding,r.animation,r.borderRadius,r.backgroundColor,o?"none":r.boxShadow,t?"":"display: none;",e?`top: ${e};`:"")),(({theme:e})=>e.menu.css),d,(({theme:{menu:{option:e}}})=>n.css(["padding:",";text-align:",";&.",",&:hover:not(.","):not(.","){background-color:",";}&.","{color:",";background-color:",";}&.","{opacity:0.35;}"],e.padding,e.textAlign,c,p,u,e.focusedBgColor,u,e.selectedColor,e.selectedBgColor,p))),U=e=>{let{menuRef:t,menuTop:n,menuOpen:r,onMenuMouseDown:i,menuPortalTarget:l}=e,s=E(e,["menuRef","menuTop","menuOpen","onMenuMouseDown","menuPortalTarget"]);const d=r&&!Boolean(s.noOptionsMsg)&&!M(s.menuOptions),c=a.default.createElement(q,{ref:t,menuTop:n,menuOpen:r,onMouseDown:i,className:"rfs-menu-container","data-testid":undefined,hideNoOptionsMsg:d},a.default.createElement(W,Object.assign({},s)));return l?o.createPortal(c,l):c},K=n.css(["z-index:5000;transform:scale(1.26);color:",";"],(({theme:e})=>e.multiValue.clear.focusColor)),Y=l.default.div.withConfig({displayName:"MultiValueWrapper",componentId:"sc-211cx7-0"})(["min-width:0;display:flex;"," ",""],(({theme:{multiValue:e}})=>n.css(["margin:",";animation:",";border-radius:",";background-color:",";"],e.margin,e.animation,e.borderRadius,e.backgroundColor)),(({theme:e})=>e.multiValue.css)),H=l.default.div.withConfig({displayName:"Label",componentId:"sc-211cx7-1"})(["overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:",";font-size:",";border-radius:",";"],(({theme:e})=>e.multiValue.label.padding),(({theme:e})=>e.multiValue.label.fontSize),(({theme:e})=>e.multiValue.label.borderRadius)),X=l.default.i.withConfig({displayName:"Clear",componentId:"sc-211cx7-2"})(["display:flex;font-style:inherit;"," ",""],(({theme:{multiValue:{clear:e}}})=>n.css(["color:",";padding:",";font-size:",";align-self:",";transition:",";font-weight:",";:hover{","}"],e.color,e.padding,e.fontSize,e.alignSelf,e.transition,e.fontWeight,K)),(({isFocused:e})=>e&&K)),_=t.memo((({data:e,value:t,isFocused:n,renderOptionLabel:o,removeSelectedOption:r})=>a.default.createElement(Y,null,a.default.createElement(H,null,o(e)),a.default.createElement(X,{isFocused:n,"data-testid":undefined,onTouchEnd:e=>r(t,e),onMouseDown:e=>r(t,e)},"✖"))));_.displayName="MultiValue";const G=n.css(["top:50%;overflow:hidden;position:absolute;white-space:nowrap;box-sizing:border-box;text-overflow:ellipsis;transform:translateY(-50%);"]),J=l.default.div.withConfig({displayName:"SingleValue",componentId:"sc-153h0ct-0"})([""," max-width:calc(100% - 0.5rem);"],G),Q=l.default.div.withConfig({displayName:"Placeholder",componentId:"sc-153h0ct-1"})([""," color:",";",""],G,(({theme:e})=>e.color.placeholder),(({theme:e,isMulti:t})=>t&&n.css(["animation:",";"],e.multiValue.animation))),Z=({isMulti:e,inputValue:n,placeholder:o,selectedOption:r,focusedMultiValue:i,renderOptionLabel:l,renderMultiOptions:s,removeSelectedOption:d})=>!n||e&&(!e||M(r)&&!s)?M(r)?e?a.default.createElement(t.Fragment,null,s?s({renderOptionLabel:l,selected:r}):r.map((({data:e,value:t})=>a.default.createElement(_,{key:t,data:e,value:t,renderOptionLabel:l,isFocused:t===i,removeSelectedOption:d})))):a.default.createElement(J,null,l(r[0].data)):a.default.createElement(Q,{isMulti:e},o):null;function ee(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function te(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ee(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ee(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const ne=(e,n,o,r,i,a,l,s,d,c,u,p,f)=>{const[m,g]=t.useState(S),b=f?"":n,y="boolean"!=typeof p?!!u:p;return t.useEffect((()=>{const t=D(b,d,c),n=r.length?new Set(r.map((e=>e.value))):void 0,u=l||(e=>!!e.isDisabled),p=s||(e=>"string"==typeof e.label?e.label:`${e.label}`),f=e=>{const r=i(e),l=te(te({data:e,value:r,label:a(e)},u(e)&&{isDisabled:!0}),(null==n?void 0:n.has(r))&&{isSelected:!0});if(!(t&&!(e=>{const n=D(p(e),d,c);return o===h.ANY?n.indexOf(t)>-1:n.substr(0,t.length)===t})(l)||y&&l.isSelected))return l},m=[];for(let t=0;t<e.length;t++){const n=f(e[t]);n&&m.push(n)}g(m)}),[e,r,b,y,o,d,c,s,l,i,a]),m},oe=(e,n)=>{const o=t.useRef(!0);t.useEffect((()=>{if(!o.current)return e();o.current=!1}),n)},re=(e,n,o,r,i,a,l,s,d,c,u)=>{const p=t.useRef(!1),f=t.useRef(!1),[m,h]=t.useState(a),[b,y]=t.useState(r===g.TOP);t.useEffect((()=>{const t=r===g.TOP||r===g.AUTO&&!(e=>{if(!e)return!0;const t=L(e),{top:n,height:o}=e.getBoundingClientRect();return t.getBoundingClientRect().height-j(t)-n>=o})(e.current);y(t),f.current=b}),[e,r]),oe((()=>{if(o){const t=e=>{null==c||c(),e&&(p.current=!0,h(e))};f.current?t():((e,t,n,o)=>{if(!e)return void o();const{top:r,height:i,bottom:a}=e.getBoundingClientRect(),l=window.innerHeight;if(l-r>=i)return void o();const s=L(e),d=j(s),c=s.getBoundingClientRect().height-d-r,u=c<i;if(u||!n)return void o(u?c:void 0);A(s,a-l+d+parseInt(getComputedStyle(e).marginBottom,10),t,o)})(e.current,s,d,t)}else null==u||u(),p.current&&(p.current=!1,h(a))}),[e,o,u,c,a,d,s]);const O=Math.min(m,l*i);return[b?((e,t,n)=>{const o=e>0||!t?e:t.getBoundingClientRect().height,r=n?n.getBoundingClientRect().height:0,i=t&&getComputedStyle(t),a=i?parseInt(i.marginBottom,10):0,l=i?parseInt(i.marginTop,10):0;return"calc("+-Math.abs(o+r)+"px + "+(a+l)+"px)"})(O,e.current,n.current):void 0,O]},ie=l.default.div.withConfig({displayName:"SizerDiv",componentId:"o2ype2-0"})(["top:0;left:0;height:0;overflow:scroll;white-space:pre;position:absolute;visibility:hidden;font-size:inherit;font-weight:inherit;font-family:inherit;",""],(({theme:e})=>e.input.css)),ae=l.default.input.withConfig({displayName:"Input",componentId:"o2ype2-1"})(["border:0;outline:0;padding:0;cursor:text;background:0;color:inherit;font-size:inherit;font-weight:inherit;font-family:inherit;box-sizing:content-box;:read-only{opacity:0;cursor:default;}:required{","}"," ",""],(({theme:e,isInvalid:t})=>t&&e.input.cssRequired),(({theme:e})=>e.input.css),V&&"::-ms-clear{display:none;}"),le=t.memo(t.forwardRef((({id:e,onBlur:n,onFocus:o,readOnly:r,required:i,onChange:l,ariaLabel:s,inputValue:d,ariaLabelledBy:c,selectedOption:u},p)=>{const f=t.useRef(null),[g,h]=t.useState(2),b=i&&!M(u);return oe((()=>{f.current&&h(f.current.scrollWidth+2)}),[d]),a.default.createElement(t.Fragment,null,a.default.createElement(ae,Object.assign({id:e,ref:p,isInvalid:!0,onBlur:n,onFocus:o,value:d,readOnly:r,required:b,"aria-label":s,style:{width:g}},m,{"aria-labelledby":c,onChange:r?void 0:l})),a.default.createElement(ie,{ref:f},d))})));le.displayName="AutosizeInput";const se=l.default.span.withConfig({displayName:"A11yText",componentId:"zxgkbx-0"})(["border:0;padding:0;width:1px;height:1px;margin:-1px;overflow:hidden;position:absolute;white-space:nowrap;clip:rect(0 0 0 0);clip-path:inset(50%);"]),de=({menuOpen:e,isFocused:t,ariaLabel:n,inputValue:o,optionCount:r,isSearchable:i,focusedOption:l,selectedOption:s})=>{if(!t)return null;const d=`${r} result(s) available${o?" for search input "+o:""}.`,c=l.value?`Focused option: ${l.label}${l.isDisabled?" - disabled":""}, ${l.index+1} of ${r}.`:"",u=e?"Use Up and Down arrow keys to choose options, press Enter or Tab to select the currently focused option, press Escape to close the menu.":`${n||"Select"} is focused${i?", type to filter options":""}, press Down arrow key to open the menu.`,p=`Selected option: ${M(s)?s.map((({label:e})=>e)).join(" "):"N/A"}`,f=`${c} ${d} ${u}`;return a.default.createElement(se,{"aria-live":"polite","data-testid":undefined},a.default.createElement("span",null," ",p),a.default.createElement("span",null," ",f))},ce=l.default.div.withConfig({displayName:"StyledLoadingDots",componentId:"sc-1j9e0pa-0"})(["display:flex;align-self:center;text-align:center;margin-right:0.25rem;padding:",";> div{border-radius:100%;display:inline-block;",":nth-of-type(1){animation-delay:-0.272s;}:nth-of-type(2){animation-delay:-0.136s;}}"],(({theme:e})=>e.loader.padding),(({theme:{loader:e}})=>n.css(["width:",";height:",";animation:",";background-color:",";"],e.size,e.size,e.animation,e.color))),ue=()=>a.default.createElement(ce,{"aria-hidden":!0,className:"rfs-loading-dots"},a.default.createElement("div",null),a.default.createElement("div",null),a.default.createElement("div",null)),pe=l.default.svg.withConfig({displayName:"ClearSvg",componentId:"sc-1v5ipi2-0"})(["fill:currentColor;",""],(({theme:e})=>n.css(["width:",";height:",";animation:",";transition:",";"],e.icon.clear.width,e.icon.clear.height,e.icon.clear.animation,e.icon.clear.transition))),fe=()=>a.default.createElement(pe,{"aria-hidden":!0,viewBox:"0 0 14 16",className:"rfs-clear-icon"},a.default.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"})),me=l.default.div.withConfig({displayName:"IndicatorIconsWrapper",componentId:"sc-1561oeb-0"})(["display:flex;flex-shrink:0;align-items:center;align-self:stretch;box-sizing:border-box;"]),ge=l.default.div.withConfig({displayName:"IndicatorIcon",componentId:"sc-1561oeb-1"})(["height:100%;display:flex;align-items:center;box-sizing:border-box;color:",";padding:",";:hover{color:",";}",""],(({theme:e})=>e.icon.color),(({theme:e})=>e.icon.padding),(({theme:e})=>e.icon.hoverColor),(({theme:e})=>e.icon.css)),he=l.default.div.withConfig({displayName:"Caret",componentId:"sc-1561oeb-2"})(["transition:",";border-top:"," dashed;border-left:"," solid transparent;border-right:"," solid transparent;",""],(({theme:e})=>e.icon.caret.transition),(({theme:e})=>e.icon.caret.size),(({theme:e})=>e.icon.caret.size),(({theme:e})=>e.icon.caret.size),(({theme:e,menuOpen:t,isInvalid:o})=>t&&n.css(["transform:rotate(180deg);color:",";"],o?e.color.danger:e.color.caretActive||e.color.primary))),be=l.default.div.withConfig({displayName:"Separator",componentId:"sc-1561oeb-3"})(["width:1px;margin:0.5rem 0;align-self:stretch;box-sizing:border-box;background-color:",";"],(({theme:e})=>e.color.iconSeparator||e.color.border)),ye=t.memo((({menuOpen:e,clearIcon:t,caretIcon:n,isInvalid:o,showClear:r,isLoading:i,isDisabled:l,loadingNode:s,onCaretMouseDown:d,onClearMouseDown:c})=>{const u="function"==typeof n||"function"==typeof t?{menuOpen:e,isLoading:!!i,isInvalid:!!o,isDisabled:!!l}:void 0,p=e=>"function"==typeof e?e(u):e;return a.default.createElement(me,null,r&&!i&&a.default.createElement(ge,{onTouchEnd:c,onMouseDown:c,"data-testid":undefined},p(t)||a.default.createElement(fe,null)),i&&(s||a.default.createElement(ue,null)),a.default.createElement(be,null),a.default.createElement(ge,{onTouchEnd:d,onMouseDown:d,"data-testid":undefined},p(n)||a.default.createElement(he,{"aria-hidden":!0,menuOpen:e,isInvalid:o,className:"rfs-caret-icon"})))}));function Oe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function we(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Oe(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Oe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}ye.displayName="IndicatorIcons";const ve=l.default.div.withConfig({displayName:"SelectWrapper",componentId:"kcrmu9-0"})(["position:relative;box-sizing:border-box;",""],(({theme:e})=>e.select.css)),xe=l.default.div.withConfig({displayName:"ValueWrapper",componentId:"kcrmu9-1"})(["flex:1 1 0%;display:flex;flex-wrap:wrap;overflow:hidden;position:relative;align-items:center;box-sizing:border-box;padding:",";"],(({theme:e})=>e.control.padding)),Se=l.default.div.withConfig({displayName:"ControlWrapper",componentId:"kcrmu9-2"})(["outline:0;display:flex;flex-wrap:wrap;cursor:default;position:relative;align-items:center;box-sizing:border-box;justify-content:space-between;"," "," ",""],(({isDisabled:e,isFocused:t,isInvalid:o,theme:{control:r,color:i}})=>n.css(["transition:",";border-style:",";border-width:",";border-radius:",";min-height:",";border-color:",";"," "," "," ",""],r.transition,r.borderStyle,r.borderWidth,r.borderRadius,r.height||r.minHeight,o?i.danger:t?r.focusedBorderColor:i.border,r.height?`height: ${r.height};`:"",e?"pointer-events:none;user-select:none;":"",r.backgroundColor||e?`background-color: ${e?i.disabled:r.backgroundColor};`:"",t?`box-shadow: ${r.boxShadow} ${o?i.dangerLight:r.boxShadowColor};`:"")),(({theme:e})=>e.control.css),(({isFocused:e,theme:t})=>e&&t.control.focusedCss)),Ce=t.forwardRef((({async:e,isMulti:o,inputId:r,selectId:i,required:l,autoFocus:s,isLoading:d,onKeyDown:c,clearIcon:u,caretIcon:p,isInvalid:m,ariaLabel:O,menuWidth:w,isDisabled:v,inputDelay:E,onMenuOpen:I,onMenuClose:T,onInputBlur:D,isClearable:j,themeConfig:P,loadingNode:z,initialValue:L,onInputFocus:A,onInputChange:V,ariaLabelledBy:B,onOptionChange:$,onSearchChange:W,getOptionLabel:q,getOptionValue:K,itemKeySelector:Y,openMenuOnFocus:H,menuPortalTarget:X,isAriaLiveEnabled:_,menuOverscanCount:G,blurInputOnSelect:J,renderOptionLabel:Q,renderMultiOptions:ee,menuScrollDuration:te,filterIgnoreAccents:ie,hideSelectedOptions:ae,getIsOptionDisabled:se,getFilterOptionString:ce,isSearchable:ue=!0,lazyLoadMenu:pe=!1,openMenuOnClick:fe=!0,filterIgnoreCase:me=!0,tabSelectsOption:ge=!0,closeMenuOnSelect:he=!0,scrollMenuIntoView:be=!0,backspaceClearsValue:Oe=!0,filterMatchFrom:Ce=h.ANY,menuPosition:Ee=g.BOTTOM,options:Ie=S,loadingMsg:Me="Loading..",placeholder:Te="Select option..",noOptionsMsg:ke="No options",menuItemSize:De=35,menuMaxHeight:Ne=300},Re)=>{const je=t.useRef(!1),Pe=t.useRef(),ze=t.useRef(!1),Le=t.useRef(null),Ae=t.useRef(null),Fe=t.useRef(null),Ve=t.useRef(null),[Be,$e]=t.useState(""),[We,qe]=t.useState(!1),[Ue,Ke]=t.useState(!1),[Ye,He]=t.useState(null),[Xe,_e]=t.useState(x),Ge=t.useMemo((()=>k(P)?R(C,P):C),[P]),Je=t.useMemo((()=>q||(e=>e.label)),[q]),Qe=t.useMemo((()=>K||(e=>e.value)),[K]),Ze=t.useMemo((()=>Q||Je),[Q,Je]),et=((e,n)=>{const[o,r]=t.useState(e);return t.useEffect((()=>{if(void 0===n)return;const t=setTimeout((()=>{r(e)}),n);return()=>{clearTimeout(t)}}),[e,n]),void 0===n?e:o})(Be,E),[tt,nt]=t.useState((()=>N(L,Qe,Je))),ot=ne(Ie,et,Ce,tt,Qe,Je,se,ce,me,ie,o,ae,e),[rt,it]=re(Ae,Ve,We,Ee,De,Ne,ot.length,te,be,I,T),at=()=>{var e;return null===(e=Fe.current)||void 0===e?void 0:e.blur()},lt=()=>{var e;return null===(e=Fe.current)||void 0===e?void 0:e.focus()},st=e=>{var t;return null===(t=Le.current)||void 0===t?void 0:t.scrollToItem(e)},dt=(e,t=!0)=>{e.stopPropagation(),t&&e.preventDefault()},ct=t.useCallback(((e,t)=>{t&&dt(t,"mousedown"===t.type),nt((t=>t.filter((t=>t.value!==e))))}),[]),ut=t.useCallback((e=>{if(!M(ot))return void(!je.current&&qe(!0));const t=o?-1:ot.findIndex((({isSelected:e})=>e)),n=t>-1?t:e===y.FIRST?0:ot.length-1;!je.current&&qe(!0),_e(we({index:n},ot[n])),st(n)}),[o,ot]),pt=t.useCallback(((e,t)=>{t?o&&ct(e.value):nt((t=>o?[...t,e]:[e]));("boolean"==typeof J?J:F)?at():he&&(qe(!1),$e(""))}),[o,he,ct,J]);var ft;t.useImperativeHandle(Re,(()=>({menuOpen:We,empty:!M(tt),blur:at,focus:lt,clearValue:()=>{nt(S),_e(x)},setValue:e=>{const t=N(e,Qe,Je);nt(t)},toggleMenu:e=>{!0===e||void 0===e&&!We?(!Ue&<(),ut(y.FIRST)):at()}}))),ft=()=>{s&<()},t.useEffect(ft,[]),t.useEffect((()=>{je.current=We}),[We]),t.useEffect((()=>{Ue&&H&&ut(y.FIRST)}),[Ue,H,ut]),t.useEffect((()=>{W&&ze.current&&(ze.current=!1,W(et))}),[W,et]),oe((()=>{if(!$)return;const e=o?tt.map((({data:e})=>e)):M(tt)?tt[0].data:null;$(e)}),[o,tt,$]),oe((()=>{const t=ot.length>0&&(e||ot.length!==Ie.length||0===Pe.current);0===ot.length?_e(x):(1===ot.length||t)&&(_e(we({index:0},ot[0])),st(0)),Pe.current=ot.length}),[e,Ie,ot]);const mt=()=>{const{data:e,value:t,label:n,isSelected:o,isDisabled:r}=Xe;e&&!r&&pt({data:e,value:t,label:n},o)},gt=e=>{v||(Ue||lt(),We?"INPUT"!==e.currentTarget.tagName&&(We&&qe(!1),Be&&$e("")):fe&&ut(y.FIRST),"INPUT"!==e.currentTarget.tagName&&e.preventDefault())},ht=t.useCallback((e=>{null==D||D(e),Ke(!1),qe(!1),$e("")}),[D]),bt=t.useCallback((e=>{null==A||A(e),Ke(!0)}),[A]),yt=t.useCallback((e=>{ze.current=!0,null==V||V(e.currentTarget.value||""),!je.current&&qe(!0),$e(e.currentTarget.value||"")}),[V]),Ot=t.useCallback((e=>{dt(e,"mousedown"===e.type),nt(S),lt()}),[]),wt=t.useCallback((e=>{dt(e,"mousedown"===e.type),lt(),je.current?qe(!1):ut(y.FIRST)}),[ut]),vt=!pe||pe&&We,xt=v||!ue||!!Ye,St=!(!j||v||!M(tt)),Ct=v||fe?void 0:wt;return a.default.createElement(n.ThemeProvider,{theme:Ge},a.default.createElement(ve,Object.assign({id:i,"aria-controls":r,"aria-expanded":We,onKeyDown:e=>{if(!(v||c&&(c(e,Be,Xe),e.defaultPrevented))){switch(e.key){case"ArrowDown":case"ArrowUp":{const t="ArrowDown"===e.key;We?(e=>{if(!M(ot))return;const t=e===y.DOWN?(Xe.index+1)%ot.length:Xe.index>0?Xe.index-1:ot.length-1;Ye&&He(null),_e(we({index:t},ot[t])),st(t)})(t?y.DOWN:y.UP):ut(t?y.FIRST:y.LAST);break}case"ArrowLeft":case"ArrowRight":if(!o||Be||ee)return;(e=>{if(!M(tt))return;let t=-1;const n=tt.length-1,o=Ye?tt.findIndex((e=>e.value===Ye)):-1;switch(e){case b.NEXT:t=o>-1&&o<n?o+1:-1;break;case b.PREVIOUS:t=0!==o?-1===o?n:o-1:0}const r=t>=0?tt[t].value:null;Xe.data&&_e(x),r!==Ye&&He(r)})("ArrowLeft"===e.key?b.PREVIOUS:b.NEXT);break;case" ":if(Be)return;if(We){if(!Xe.data)return;mt()}else ut(y.FIRST);break;case"Enter":We&&229!==e.keyCode&&mt();break;case"Escape":We&&(qe(!1),$e(""));break;case"Tab":if(!We||!ge||!Xe.data||e.shiftKey)return;mt();break;case"Delete":case"Backspace":if(Be)return;if(Ye){const e=tt.findIndex((e=>e.value===Ye)),t=e>-1&&e<tt.length-1?tt[e+1].value:null;ct(Ye),He(t)}else{if(!Oe)return;if(M(tt))if(o&&!ee){const{value:e}=tt[tt.length-1];ct(e)}else j&&nt(S)}break;default:return}e.preventDefault()}}},f),a.default.createElement(Se,{ref:Ve,isInvalid:m,isFocused:Ue,isDisabled:v,className:"rfs-control-container",onTouchEnd:gt,onMouseDown:gt,"data-testid":undefined},a.default.createElement(xe,null,a.default.createElement(Z,{isMulti:o,inputValue:Be,placeholder:Te,selectedOption:tt,focusedMultiValue:Ye,renderOptionLabel:Ze,renderMultiOptions:ee,removeSelectedOption:ct}),a.default.createElement(le,{id:r,ref:Fe,required:l,ariaLabel:O,inputValue:Be,readOnly:xt,onBlur:ht,onFocus:bt,onChange:yt,ariaLabelledBy:B,selectedOption:tt})),a.default.createElement(ye,{menuOpen:We,clearIcon:u,caretIcon:p,isInvalid:m,isLoading:d,showClear:St,isDisabled:v,loadingNode:z,onClearMouseDown:Ot,onCaretMouseDown:Ct})),vt&&a.default.createElement(U,{menuRef:Ae,menuOpen:We,isLoading:d,menuTop:rt,height:it,itemSize:De,loadingMsg:Me,menuOptions:ot,fixedSizeListRef:Le,noOptionsMsg:ke,selectOption:pt,itemKeySelector:Y,overscanCount:G,menuPortalTarget:X,width:w||Ge.menu.width,onMenuMouseDown:e=>{dt(e),lt()},renderOptionLabel:Ze,focusedOptionIndex:Xe.index}),_&&a.default.createElement(de,{menuOpen:We,isFocused:Ue,ariaLabel:O,inputValue:Be,isSearchable:ue,focusedOption:Xe,selectedOption:tt,optionCount:ot.length})))}));Ce.displayName="Select",e.Select=Ce,Object.defineProperty(e,"__esModule",{value:!0})})); |
import React, { ReactNode, ReactText, KeyboardEvent, FocusEventHandler } from 'react'; | ||
import { DefaultTheme } from 'styled-components'; | ||
import { OptionData, PartialDeep, SelectedOption, IndicatorIconsProps } from './types'; | ||
import { OptionData, SelectedOption, IndicatorIconsProps } from './types'; | ||
declare type PartialDeep<T> = { | ||
[P in keyof T]?: PartialDeep<T[P]>; | ||
}; | ||
export declare type Theme = PartialDeep<DefaultTheme>; | ||
@@ -48,3 +51,2 @@ export interface FocusedOption extends SelectedOption { | ||
isClearable?: boolean; | ||
noOptionsMsg?: string; | ||
lazyLoadMenu?: boolean; | ||
@@ -68,2 +70,3 @@ options?: OptionData[]; | ||
scrollMenuIntoView?: boolean; | ||
noOptionsMsg?: string | null; | ||
hideSelectedOptions?: boolean; | ||
@@ -110,3 +113,2 @@ filterIgnoreAccents?: boolean; | ||
isClearable?: boolean | undefined; | ||
noOptionsMsg?: string | undefined; | ||
lazyLoadMenu?: boolean | undefined; | ||
@@ -130,2 +132,3 @@ options?: any[] | undefined; | ||
scrollMenuIntoView?: boolean | undefined; | ||
noOptionsMsg?: string | null | undefined; | ||
hideSelectedOptions?: boolean | undefined; | ||
@@ -132,0 +135,0 @@ filterIgnoreAccents?: boolean | undefined; |
@@ -214,3 +214,3 @@ import React, { useRef, useMemo, useState, useEffect, forwardRef, useCallback, useImperativeHandle } from 'react'; | ||
switch (direction) { | ||
case ValueIndexEnum.NEXT: | ||
case ValueIndexEnum.NEXT: { | ||
nextFocusedIdx = (curFocusedIdx > -1 && curFocusedIdx < lastValueIdx) | ||
@@ -220,3 +220,4 @@ ? (curFocusedIdx + 1) | ||
break; | ||
case ValueIndexEnum.PREVIOUS: | ||
} | ||
case ValueIndexEnum.PREVIOUS: { | ||
nextFocusedIdx = | ||
@@ -229,2 +230,3 @@ curFocusedIdx !== 0 | ||
break; | ||
} | ||
} | ||
@@ -261,3 +263,3 @@ const nextFocusedVal = (nextFocusedIdx >= 0) | ||
case 'ArrowDown': | ||
case 'ArrowUp': | ||
case 'ArrowUp': { | ||
const downKey = e.key === 'ArrowDown'; | ||
@@ -268,4 +270,5 @@ menuOpen | ||
break; | ||
} | ||
case 'ArrowLeft': | ||
case 'ArrowRight': | ||
case 'ArrowRight': { | ||
if (!isMulti || inputValue || renderMultiOptions) | ||
@@ -275,3 +278,4 @@ return; | ||
break; | ||
case ' ': | ||
} | ||
case ' ': { | ||
if (inputValue) { | ||
@@ -290,8 +294,9 @@ return; | ||
break; | ||
case 'Enter': | ||
if (menuOpen && e.keyCode !== 229) { | ||
} | ||
case 'Enter': { | ||
if (menuOpen && e.keyCode !== 229) | ||
selectOptionFromFocused(); | ||
} | ||
break; | ||
case 'Escape': | ||
} | ||
case 'Escape': { | ||
if (menuOpen) { | ||
@@ -302,3 +307,4 @@ setMenuOpen(false); | ||
break; | ||
case 'Tab': | ||
} | ||
case 'Tab': { | ||
if (!menuOpen || !tabSelectsOption || !focusedOption.data || e.shiftKey) { | ||
@@ -309,4 +315,5 @@ return; | ||
break; | ||
} | ||
case 'Delete': | ||
case 'Backspace': | ||
case 'Backspace': { | ||
if (inputValue) | ||
@@ -336,2 +343,3 @@ return; | ||
break; | ||
} | ||
default: | ||
@@ -338,0 +346,0 @@ return; |
@@ -38,3 +38,3 @@ import { BOUNCE_ANIMATION_CSS, FADE_IN_ANIMATION_CSS } from './constants'; | ||
borderStyle: 'solid', | ||
borderRadius: '0.25rem', | ||
borderRadius: '3px', | ||
boxShadow: '0 0 0 0.2rem', | ||
@@ -50,6 +50,6 @@ padding: '0.375rem 0.75rem', | ||
margin: '0.5rem 0', | ||
borderRadius: '0.25rem', | ||
borderRadius: '3px', | ||
backgroundColor: '#fff', | ||
animation: FADE_IN_ANIMATION_CSS, | ||
boxShadow: '0 0 0 1px rgba(0, 0, 0, 0.1), 0 4px 11px rgba(0, 0, 0, 0.1)', | ||
boxShadow: '0 0.5em 1em -0.125em rgb(10 10 10 / 12%), 0 0 0 1px rgb(10 10 10 / 4%)', | ||
option: { | ||
@@ -60,3 +60,3 @@ textAlign: 'left', | ||
padding: '0.375rem 0.75rem', | ||
focusedBgColor: 'rgba(0, 123, 255, 0.20)' | ||
focusedBgColor: 'rgba(0, 123, 255, 0.15)' | ||
} | ||
@@ -72,13 +72,13 @@ }, | ||
margin: '1px 2px', | ||
borderRadius: '0.25rem', | ||
borderRadius: '3px', | ||
backgroundColor: '#e7edf3', | ||
animation: FADE_IN_ANIMATION_CSS, | ||
label: { | ||
borderRadius: '3px', | ||
fontSize: '0.825em', | ||
borderRadius: '0.25rem', | ||
padding: '1px 2px 1px 6px' | ||
padding: '1px 0 1px 6px' | ||
}, | ||
clear: { | ||
fontWeight: 700, | ||
padding: '0 7px', | ||
fontWeight: 600, | ||
padding: '0 6px', | ||
color: '#a6a6a6', | ||
@@ -85,0 +85,0 @@ fontSize: '0.65em', |
@@ -1,4 +0,4 @@ | ||
import { IE_EDGE_BROWSER_REGEXP } from '../constants'; | ||
export const IS_TOUCH_DEVICE = (typeof window !== 'undefined' && 'ontouchstart' in window) || | ||
(typeof navigator !== 'undefined' && !!navigator.maxTouchPoints); | ||
const IE_EDGE_BROWSER_REGEXP = /(MSIE|Trident\/|Edge\/|Edg\/)/i; | ||
export const IS_MICROSOFT_BROWSER = typeof navigator !== 'undefined' && IE_EDGE_BROWSER_REGEXP.test(navigator.userAgent); |
@@ -6,4 +6,4 @@ import { ReactText } from 'react'; | ||
export declare function trimAndFormatFilterStr(value: string, filterIgnoreCase?: boolean, filterIgnoreAccents?: boolean): string; | ||
export declare function buildOptionClassName(isDisabled?: boolean, isSelected?: boolean, isFocused?: boolean): string; | ||
export declare function optionClassNames(isDisabled?: boolean, isSelected?: boolean, isFocused?: boolean): string; | ||
export declare function normalizeValue(value: any, getOptionValue: (data: OptionData) => ReactText, getOptionLabel: (data: OptionData) => ReactText): SelectedOption[]; | ||
export declare const mergeDeep: <T>(target: any, source: any) => T; |
@@ -1,5 +0,6 @@ | ||
import { EMPTY_ARRAY, DIACRITICS_REGEXP, OPTION_CLS, OPTION_FOCUSED_CLS, OPTION_SELECTED_CLS, OPTION_DISABLED_CLS } from '../constants'; | ||
import { EMPTY_ARRAY, OPTION_CLS, OPTION_FOCUSED_CLS, OPTION_SELECTED_CLS, OPTION_DISABLED_CLS } from '../constants'; | ||
export function isArrayWithLength(test) { | ||
return Array.isArray(test) && !!test.length; | ||
} | ||
const DIACRITICS_REGEXP = /[\u0300-\u036f]/g; | ||
function stripDiacritics(value) { | ||
@@ -18,3 +19,3 @@ return value.normalize('NFD').replace(DIACRITICS_REGEXP, ''); | ||
} | ||
export function buildOptionClassName(isDisabled, isSelected, isFocused) { | ||
export function optionClassNames(isDisabled, isSelected, isFocused) { | ||
let className = OPTION_CLS; | ||
@@ -21,0 +22,0 @@ if (isDisabled) |
{ | ||
"name": "react-functional-select", | ||
"version": "3.0.0", | ||
"author": "Matt Areddia <mareddia@protonmail.com> (https://github.com/based-ghost/)", | ||
"version": "3.0.1", | ||
"description": "Miro-sized and micro-optimized select component for React.js", | ||
@@ -15,5 +14,6 @@ "main": "./dist/index.cjs.js", | ||
"license": "MIT", | ||
"contributors": [ | ||
"Matt Areddia <mareddia@protonmail.com> (https://github.com/based-ghost/)" | ||
], | ||
"author": { | ||
"name": "Matt Areddia", | ||
"email": "mareddia@protonmail.com" | ||
}, | ||
"bugs": { | ||
@@ -29,26 +29,23 @@ "url": "https://github.com/based-ghost/react-functional-select/issues" | ||
"react", | ||
"reactjs", | ||
"react-component", | ||
"react-virtualized", | ||
"react-components", | ||
"react-functional-select", | ||
"select", | ||
"react-select", | ||
"dropdown", | ||
"styled-components", | ||
"virtualized", | ||
"windowed", | ||
"react-window", | ||
"combobox", | ||
"form", | ||
"input", | ||
"ui" | ||
"virtualization", | ||
"windowing", | ||
"multi-select", | ||
"performance", | ||
"functional" | ||
], | ||
"devDependencies": { | ||
"@babel/cli": "^7.12.16", | ||
"@babel/core": "^7.12.16", | ||
"@babel/cli": "^7.12.17", | ||
"@babel/core": "^7.12.17", | ||
"@babel/plugin-proposal-object-rest-spread": "^7.12.13", | ||
"@babel/plugin-proposal-optional-chaining": "^7.12.16", | ||
"@babel/plugin-transform-runtime": "^7.12.15", | ||
"@babel/preset-env": "^7.12.16", | ||
"@babel/plugin-proposal-optional-chaining": "^7.12.17", | ||
"@babel/plugin-transform-runtime": "^7.12.17", | ||
"@babel/preset-env": "^7.12.17", | ||
"@babel/preset-react": "^7.12.13", | ||
"@babel/preset-typescript": "^7.12.16", | ||
"@babel/runtime": "^7.12.13", | ||
"@babel/preset-typescript": "^7.12.17", | ||
"@babel/runtime": "^7.12.18", | ||
"@rollup/plugin-babel": "^5.3.0", | ||
@@ -64,3 +61,3 @@ "@rollup/plugin-replace": "^2.3.4", | ||
"@types/jest": "^26.0.20", | ||
"@types/node": "^14.14.28", | ||
"@types/node": "^14.14.31", | ||
"@types/react": "^17.0.2", | ||
@@ -75,3 +72,3 @@ "@types/react-dom": "^17.0.1", | ||
"babel-plugin-styled-components": "^1.12.0", | ||
"concurrently": "^5.3.0", | ||
"concurrently": "^6.0.0", | ||
"cross-env": "^7.0.3", | ||
@@ -81,3 +78,3 @@ "enzyme": "^3.11.0", | ||
"eslint-config-poetez": "^1.0.0", | ||
"eslint-config-prettier": "^7.2.0", | ||
"eslint-config-prettier": "^8.0.0", | ||
"eslint-plugin-prettier": "^3.3.1", | ||
@@ -84,0 +81,0 @@ "jest": "^26.6.3", |
@@ -1,2 +0,2 @@ | ||
# react-functional-select | ||
# React-Functional-Select | ||
@@ -128,3 +128,3 @@ > Micro-sized & micro-optimized select component for React.js. | ||
|`isClearable`| bool | `false` | Is the select value clearable | ||
|`noOptionsMsg`| string | `No options` | The text displayed in the menu when there are no options available | ||
|`noOptionsMsg`| string | `No options` | The text displayed in the menu when there are no options available (to hide menu when search returns no items, set to `null` or `''`) | ||
|`loadingMsg`| string | `Loading...` | The text displayed in the menu when `isLoading` === `true` | ||
@@ -178,2 +178,2 @@ |`clearIcon`| ReactNode OR ((state: any) => ReactNode) | `undefined` | Custom clear icon node - `state` forwarded to a function is `{ menuOpen, isLoading, isInvalid, isDisabled }` | ||
MIT licensed. [Matt Areddia](https://github.com/based-ghost) © 2019. | ||
MIT licensed. Copyright (c) [Matt Areddia](https://github.com/based-ghost) 2021. |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
167664
1893
178
0
74