@vacano/ui 1.13.0 → 1.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- "use strict";const o=require("./X-CI1qRJDP.cjs"),h=require("react"),t=require("./keyboard-D8zOi0jU.cjs"),nt=require("@emotion/react"),I=require("./tooling-Dflq0Y98.cjs"),Be=require("react-dom");function wr(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const i in e)if(i!=="default"){const n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(r,i,n.get?n:{enumerable:!0,get:()=>e[i]})}}return r.default=e,Object.freeze(r)}const Ce=wr(h);function lt(){return lt=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var i=arguments[r];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},lt.apply(null,arguments)}var mr=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,jr=o.memoize(function(e){return mr.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),Pr=jr,Nr=function(r){return r!=="theme"},gt=function(r){return typeof r=="string"&&r.charCodeAt(0)>96?Pr:Nr},ft=function(r,i,n){var l;if(i){var s=i.shouldForwardProp;l=r.__emotion_forwardProp&&s?function(u){return r.__emotion_forwardProp(u)&&s(u)}:s}return typeof l!="function"&&n&&(l=r.__emotion_forwardProp),l},zr=function(r){var i=r.cache,n=r.serialized,l=r.isStringTag;return o.registerStyles(i,n,l),o.useInsertionEffectAlwaysWithSyncFallback(function(){return o.insertStyles(i,n,l)}),null},Tr=function e(r,i){var n=r.__emotion_real===r,l=n&&r.__emotion_base||r,s,u;i!==void 0&&(s=i.label,u=i.target);var d=ft(r,i,n),O=d||gt(l),p=!O("as");return function(){var f=arguments,b=n&&r.__emotion_styles!==void 0?r.__emotion_styles.slice(0):[];if(s!==void 0&&b.push("label:"+s+";"),f[0]==null||f[0].raw===void 0)b.push.apply(b,f);else{var w=f[0];b.push(w[0]);for(var k=f.length,L=1;L<k;L++)b.push(f[L],w[L])}var C=nt.withEmotionCache(function(R,j,$){var S=p&&R.as||l,c="",T=[],D=R;if(R.theme==null){D={};for(var z in R)D[z]=R[z];D.theme=Ce.useContext(nt.ThemeContext)}typeof R.className=="string"?c=o.getRegisteredStyles(j.registered,T,R.className):R.className!=null&&(c=R.className+" ");var Y=o.serializeStyles(b.concat(T),j.registered,D);c+=j.key+"-"+Y.name,u!==void 0&&(c+=" "+u);var F=p&&d===void 0?gt(S):O,A={};for(var M in R)p&&M==="as"||F(M)&&(A[M]=R[M]);return A.className=c,$&&(A.ref=$),Ce.createElement(Ce.Fragment,null,Ce.createElement(zr,{cache:j,serialized:Y,isStringTag:typeof S=="string"}),Ce.createElement(S,A))});return C.displayName=s!==void 0?s:"Styled("+(typeof l=="string"?l:l.displayName||l.name||"Component")+")",C.defaultProps=r.defaultProps,C.__emotion_real=C,C.__emotion_base=l,C.__emotion_styles=b,C.__emotion_forwardProp=d,Object.defineProperty(C,"toString",{value:function(){return"."+u}}),C.withComponent=function(R,j){var $=e(R,lt({},i,j,{shouldForwardProp:ft(C,j,!0)}));return $.apply(void 0,b)},C}},Dr=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],a=Tr.bind(null);Dr.forEach(function(e){a[e]=a(e)});const Ir=a.span`
1
+ "use strict";const o=require("./X-CI1qRJDP.cjs"),h=require("react"),t=require("./keyboard-D8zOi0jU.cjs"),nt=require("@emotion/react"),I=require("./tooling-Dflq0Y98.cjs"),He=require("react-dom");function wr(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const i in e)if(i!=="default"){const n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(r,i,n.get?n:{enumerable:!0,get:()=>e[i]})}}return r.default=e,Object.freeze(r)}const Ce=wr(h);function lt(){return lt=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var i=arguments[r];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},lt.apply(null,arguments)}var mr=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,jr=o.memoize(function(e){return mr.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),Pr=jr,Nr=function(r){return r!=="theme"},gt=function(r){return typeof r=="string"&&r.charCodeAt(0)>96?Pr:Nr},ft=function(r,i,n){var l;if(i){var s=i.shouldForwardProp;l=r.__emotion_forwardProp&&s?function(u){return r.__emotion_forwardProp(u)&&s(u)}:s}return typeof l!="function"&&n&&(l=r.__emotion_forwardProp),l},zr=function(r){var i=r.cache,n=r.serialized,l=r.isStringTag;return o.registerStyles(i,n,l),o.useInsertionEffectAlwaysWithSyncFallback(function(){return o.insertStyles(i,n,l)}),null},Tr=function e(r,i){var n=r.__emotion_real===r,l=n&&r.__emotion_base||r,s,u;i!==void 0&&(s=i.label,u=i.target);var d=ft(r,i,n),b=d||gt(l),p=!b("as");return function(){var f=arguments,O=n&&r.__emotion_styles!==void 0?r.__emotion_styles.slice(0):[];if(s!==void 0&&O.push("label:"+s+";"),f[0]==null||f[0].raw===void 0)O.push.apply(O,f);else{var w=f[0];O.push(w[0]);for(var k=f.length,L=1;L<k;L++)O.push(f[L],w[L])}var C=nt.withEmotionCache(function(R,j,$){var S=p&&R.as||l,c="",T=[],D=R;if(R.theme==null){D={};for(var z in R)D[z]=R[z];D.theme=Ce.useContext(nt.ThemeContext)}typeof R.className=="string"?c=o.getRegisteredStyles(j.registered,T,R.className):R.className!=null&&(c=R.className+" ");var Y=o.serializeStyles(O.concat(T),j.registered,D);c+=j.key+"-"+Y.name,u!==void 0&&(c+=" "+u);var F=p&&d===void 0?gt(S):b,A={};for(var M in R)p&&M==="as"||F(M)&&(A[M]=R[M]);return A.className=c,$&&(A.ref=$),Ce.createElement(Ce.Fragment,null,Ce.createElement(zr,{cache:j,serialized:Y,isStringTag:typeof S=="string"}),Ce.createElement(S,A))});return C.displayName=s!==void 0?s:"Styled("+(typeof l=="string"?l:l.displayName||l.name||"Component")+")",C.defaultProps=r.defaultProps,C.__emotion_real=C,C.__emotion_base=l,C.__emotion_styles=O,C.__emotion_forwardProp=d,Object.defineProperty(C,"toString",{value:function(){return"."+u}}),C.withComponent=function(R,j){var $=e(R,lt({},i,j,{shouldForwardProp:ft(C,j,!0)}));return $.apply(void 0,O)},C}},Dr=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],a=Tr.bind(null);Dr.forEach(function(e){a[e]=a(e)});const Ir=a.span`
2
2
  font-size: 12px;
3
3
  font-weight: 500;
4
4
  color: ${e=>e.$variant==="normal"?t.COLORS.black:t.COLORS.red};
@@ -8,7 +8,7 @@
8
8
  font-weight: 500;
9
9
  line-height: 1.4;
10
10
  color: ${e=>Er[e.$variant]};
11
- `,Mr=I.newClassNameGetter("field-message"),re=({children:e,className:r,ref:i,variant:n="normal",...l})=>e?o.jsx(Ar,{...l,ref:i,className:Mr("container",r),$variant:n,children:e}):null,Ue={compact:{height:"32px",padding:"0 10px",radius:"14px"},default:{height:"40px",padding:"0 14px",radius:"16px"}},oe={normal:{background:{static:t.alpha(t.COLORS.black,2),disabled:t.alpha(t.COLORS.black,10)},border:{static:t.alpha(t.COLORS.black,60),disabled:t.alpha(t.COLORS.black,10)},color:{static:t.COLORS.black,disabled:t.alpha(t.COLORS.black,65)},placeholder:{static:t.alpha(t.COLORS.black,40),disabled:t.alpha(t.COLORS.black,65)},focus:t.alpha(t.COLORS["iron-grey"],30)},error:{background:{static:t.alpha(t.COLORS.red,2),disabled:t.alpha(t.COLORS.red,10)},border:{static:t.alpha(t.COLORS.red,60),disabled:t.alpha(t.COLORS.red,10)},color:{static:t.COLORS.red,disabled:t.alpha(t.COLORS.red,65)},placeholder:{static:t.alpha(t.COLORS.red,40),disabled:t.alpha(t.COLORS.red,65)},focus:t.alpha(t.COLORS.red,30)}},Fr=a.div`
11
+ `,Mr=I.newClassNameGetter("field-message"),re=({children:e,className:r,ref:i,variant:n="normal",...l})=>e?o.jsx(Ar,{...l,ref:i,className:Mr("container",r),$variant:n,children:e}):null,qe={compact:{height:"32px",padding:"0 10px",radius:"14px"},default:{height:"40px",padding:"0 14px",radius:"16px"}},oe={normal:{background:{static:t.alpha(t.COLORS.black,2),disabled:t.alpha(t.COLORS.black,10)},border:{static:t.alpha(t.COLORS.black,60),disabled:t.alpha(t.COLORS.black,10)},color:{static:t.COLORS.black,disabled:t.alpha(t.COLORS.black,65)},placeholder:{static:t.alpha(t.COLORS.black,40),disabled:t.alpha(t.COLORS.black,65)},focus:t.alpha(t.COLORS["iron-grey"],30)},error:{background:{static:t.alpha(t.COLORS.red,2),disabled:t.alpha(t.COLORS.red,10)},border:{static:t.alpha(t.COLORS.red,60),disabled:t.alpha(t.COLORS.red,10)},color:{static:t.COLORS.red,disabled:t.alpha(t.COLORS.red,65)},placeholder:{static:t.alpha(t.COLORS.red,40),disabled:t.alpha(t.COLORS.red,65)},focus:t.alpha(t.COLORS.red,30)}},Fr=a.div`
12
12
  position: relative;
13
13
  display: grid;
14
14
  gap: 2px;
@@ -28,10 +28,10 @@
28
28
  outline: none;
29
29
  font-size: 14px;
30
30
  font-weight: 500;
31
- height: ${e=>Ue[e.$size].height};
32
- padding: ${e=>Ue[e.$size].padding};
31
+ height: ${e=>qe[e.$size].height};
32
+ padding: ${e=>qe[e.$size].padding};
33
33
  padding-right: 40px;
34
- border-radius: ${e=>Ue[e.$size].radius};
34
+ border-radius: ${e=>qe[e.$size].radius};
35
35
 
36
36
  color: ${e=>oe[e.$variant].color.static};
37
37
  border: 1px solid ${e=>oe[e.$variant].border.static};
@@ -120,7 +120,7 @@
120
120
  font-size: 14px;
121
121
  color: ${t.alpha(t.COLORS.black,50)};
122
122
  text-align: center;
123
- `,xt={xs:{size:"16px",borderWidth:"2px"},sm:{size:"20px",borderWidth:"2px"},md:{size:"32px",borderWidth:"3px"},lg:{size:"48px",borderWidth:"4px"}},St={track:t.alpha(t.COLORS.black,15),indicator:t.COLORS.black},qe=e=>xt[e]??xt.md,Zr=nt.keyframes`
123
+ `,xt={xs:{size:"16px",borderWidth:"2px"},sm:{size:"20px",borderWidth:"2px"},md:{size:"32px",borderWidth:"3px"},lg:{size:"48px",borderWidth:"4px"}},St={track:t.alpha(t.COLORS.black,15),indicator:t.COLORS.black},Xe=e=>xt[e]??xt.md,Zr=nt.keyframes`
124
124
  0% {
125
125
  transform: rotate(0deg);
126
126
  }
@@ -129,13 +129,13 @@
129
129
  }
130
130
  `,Jr=a.div`
131
131
  display: inline-block;
132
- width: ${e=>qe(e.$size).size};
133
- height: ${e=>qe(e.$size).size};
134
- border: ${e=>qe(e.$size).borderWidth} solid ${St.track};
132
+ width: ${e=>Xe(e.$size).size};
133
+ height: ${e=>Xe(e.$size).size};
134
+ border: ${e=>Xe(e.$size).borderWidth} solid ${St.track};
135
135
  border-top-color: ${St.indicator};
136
136
  border-radius: 50%;
137
137
  animation: ${Zr} 0.8s linear infinite;
138
- `,Qr=I.newClassNameGetter("spinner"),qt=({"aria-label":e="Loading",className:r,ref:i,size:n="md",...l})=>o.jsx(Jr,{...l,ref:i,className:Qr("container",r),role:"status","aria-label":e,$size:n}),ke=I.newClassNameGetter("autocomplete"),eo=({className:e,classnames:r,disabled:i,fullWidth:n,label:l,ref:s,message:u,size:d="default",variant:O="normal",value:p,onChange:f,onSearch:b,debounceMs:w=300,minChars:k=1,noResultsMessage:L="No results found",...C})=>{const[R,j]=h.useState((p==null?void 0:p.value)??""),[$,S]=h.useState([]),[c,T]=h.useState(!1),[D,z]=h.useState(!1),[Y,F]=h.useState(!1),A=h.useRef(null),M=h.useRef(null);h.useEffect(()=>{(p==null?void 0:p.value)!==void 0&&j(p.value)},[p==null?void 0:p.value]);const G=h.useCallback(async P=>{if(P.length<k){S([]),F(!1);return}T(!0),F(!0);try{const V=await b(P);S(V),z(!0)}catch{S([])}finally{T(!1)}},[b,k]),m=h.useCallback(P=>{const V=P.target.value;j(V),f==null||f({value:V,image_url:null}),M.current&&clearTimeout(M.current),M.current=setTimeout(()=>{G(V)},w)},[f,G,w]),g=h.useCallback(P=>{j(P.value),S([]),z(!1),F(!1),f==null||f({value:P.value,image_url:P.image_url})},[f]),_=h.useCallback(()=>{setTimeout(()=>{z(!1)},150)},[]),v=h.useCallback(()=>{$.length>0&&z(!0)},[$.length]);return h.useEffect(()=>()=>{M.current&&clearTimeout(M.current)},[]),o.jsxs(Fr,{ref:A,className:ke("container",e),$fullWidth:!!n,children:[l&&o.jsx(Yr,{variant:O,className:ke("label",r==null?void 0:r.label),children:l}),o.jsxs(Vr,{children:[o.jsx(Br,{...C,ref:s,type:"text",value:R,onChange:m,onBlur:_,onFocus:v,disabled:i,$size:d,$variant:O,className:ke("input",r==null?void 0:r.input)}),c&&o.jsx(Hr,{children:o.jsx(qt,{size:"xs"})})]}),u&&o.jsx(Gr,{variant:O,children:u}),o.jsx(Wr,{$open:D&&Y&&!c,className:ke("dropdown",r==null?void 0:r.dropdown),children:$.length>0?$.map(P=>o.jsxs(Kr,{onClick:()=>g(P),className:ke("item",r==null?void 0:r.item),children:[P.image_url&&o.jsx(Ur,{src:P.image_url,alt:P.value}),o.jsx(qr,{children:P.value})]},P.id)):!c&&o.jsx(Xr,{children:L})})]})},$t={compact:{height:"32px",padding:"0 8px",radius:"12px",iconSize:"16px"},default:{height:"40px",padding:"0 12px",radius:"16px",iconSize:"20px"}},Ct={normal:{background:{static:t.COLORS["steel-blue"],hover:t.alpha(t.COLORS["steel-blue"],90),active:t.alpha(t.COLORS["steel-blue"],80),disabled:t.alpha(t.COLORS["steel-blue"],50)},color:{static:t.COLORS.white,hover:t.COLORS.white,active:t.COLORS.white,disabled:t.COLORS.white},borderColor:{static:"transparent",hover:"transparent",active:"transparent",disabled:"transparent"}},system:{background:{static:t.COLORS.black,hover:t.alpha(t.COLORS.black,90),active:t.alpha(t.COLORS.black,80),disabled:t.alpha(t.COLORS.black,50)},color:{static:t.COLORS.white,hover:t.COLORS.white,active:t.COLORS.white,disabled:t.COLORS.white},borderColor:{static:"transparent",hover:"transparent",active:"transparent",disabled:"transparent"}},success:{background:{static:t.COLORS.green,hover:t.alpha(t.COLORS.green,90),active:t.alpha(t.COLORS.green,80),disabled:t.alpha(t.COLORS.green,50)},color:{static:t.COLORS.white,hover:t.COLORS.white,active:t.COLORS.white,disabled:t.COLORS.white},borderColor:{static:"transparent",hover:"transparent",active:"transparent",disabled:"transparent"}},warning:{background:{static:t.COLORS.yellow,hover:t.alpha(t.COLORS.yellow,90),active:t.alpha(t.COLORS.yellow,80),disabled:t.alpha(t.COLORS.yellow,50)},color:{static:t.COLORS.black,hover:t.COLORS.black,active:t.COLORS.black,disabled:t.COLORS.black},borderColor:{static:"transparent",hover:"transparent",active:"transparent",disabled:"transparent"}},danger:{background:{static:t.COLORS.red,hover:t.alpha(t.COLORS.red,90),active:t.alpha(t.COLORS.red,80),disabled:t.alpha(t.COLORS.red,50)},color:{static:t.COLORS.white,hover:t.COLORS.white,active:t.COLORS.white,disabled:t.COLORS.white},borderColor:{static:"transparent",hover:"transparent",active:"transparent",disabled:"transparent"}},transparent:{background:{static:t.alpha(t.COLORS["iron-grey"],1),hover:t.alpha(t.COLORS["iron-grey"],5),active:t.alpha(t.COLORS["iron-grey"],10),disabled:t.alpha(t.COLORS["iron-grey"],5)},color:{static:t.COLORS.black,hover:t.COLORS.black,active:t.COLORS.black,disabled:t.alpha(t.COLORS.black,30)},borderColor:{static:t.alpha(t.COLORS["iron-grey"],20),hover:t.alpha(t.COLORS["iron-grey"],20),active:t.alpha(t.COLORS["iron-grey"],20),disabled:t.alpha(t.COLORS["iron-grey"],10)}}},U=e=>{const r=Ct[e];return r||Ct.normal},Q=e=>{const r=$t[e];return r||$t.default},to=e=>e?"auto":"fit-content",ro=a.button`
138
+ `,Qr=I.newClassNameGetter("spinner"),qt=({"aria-label":e="Loading",className:r,ref:i,size:n="md",...l})=>o.jsx(Jr,{...l,ref:i,className:Qr("container",r),role:"status","aria-label":e,$size:n}),ke=I.newClassNameGetter("autocomplete"),eo=({className:e,classnames:r,disabled:i,fullWidth:n,label:l,ref:s,message:u,size:d="default",variant:b="normal",value:p,onChange:f,onSearch:O,debounceMs:w=300,minChars:k=1,noResultsMessage:L="No results found",...C})=>{const[R,j]=h.useState((p==null?void 0:p.value)??""),[$,S]=h.useState([]),[c,T]=h.useState(!1),[D,z]=h.useState(!1),[Y,F]=h.useState(!1),A=h.useRef(null),M=h.useRef(null);h.useEffect(()=>{(p==null?void 0:p.value)!==void 0&&j(p.value)},[p==null?void 0:p.value]);const G=h.useCallback(async P=>{if(P.length<k){S([]),F(!1);return}T(!0),F(!0);try{const V=await O(P);S(V),z(!0)}catch{S([])}finally{T(!1)}},[O,k]),m=h.useCallback(P=>{const V=P.target.value;j(V),f==null||f({value:V,image_url:null}),M.current&&clearTimeout(M.current),M.current=setTimeout(()=>{G(V)},w)},[f,G,w]),g=h.useCallback(P=>{j(P.value),S([]),z(!1),F(!1),f==null||f({value:P.value,image_url:P.image_url})},[f]),_=h.useCallback(()=>{setTimeout(()=>{z(!1)},150)},[]),v=h.useCallback(()=>{$.length>0&&z(!0)},[$.length]);return h.useEffect(()=>()=>{M.current&&clearTimeout(M.current)},[]),o.jsxs(Fr,{ref:A,className:ke("container",e),$fullWidth:!!n,children:[l&&o.jsx(Yr,{variant:b,className:ke("label",r==null?void 0:r.label),children:l}),o.jsxs(Vr,{children:[o.jsx(Br,{...C,ref:s,type:"text",value:R,onChange:m,onBlur:_,onFocus:v,disabled:i,$size:d,$variant:b,className:ke("input",r==null?void 0:r.input)}),c&&o.jsx(Hr,{children:o.jsx(qt,{size:"xs"})})]}),u&&o.jsx(Gr,{variant:b,children:u}),o.jsx(Wr,{$open:D&&Y&&!c,className:ke("dropdown",r==null?void 0:r.dropdown),children:$.length>0?$.map(P=>o.jsxs(Kr,{onClick:()=>g(P),className:ke("item",r==null?void 0:r.item),children:[P.image_url&&o.jsx(Ur,{src:P.image_url,alt:P.value}),o.jsx(qr,{children:P.value})]},P.id)):!c&&o.jsx(Xr,{children:L})})]})},$t={compact:{height:"32px",padding:"0 8px",radius:"12px",iconSize:"16px"},default:{height:"40px",padding:"0 12px",radius:"16px",iconSize:"20px"}},Ct={normal:{background:{static:t.COLORS["steel-blue"],hover:t.alpha(t.COLORS["steel-blue"],90),active:t.alpha(t.COLORS["steel-blue"],80),disabled:t.alpha(t.COLORS["steel-blue"],50)},color:{static:t.COLORS.white,hover:t.COLORS.white,active:t.COLORS.white,disabled:t.COLORS.white},borderColor:{static:"transparent",hover:"transparent",active:"transparent",disabled:"transparent"}},system:{background:{static:t.COLORS.black,hover:t.alpha(t.COLORS.black,90),active:t.alpha(t.COLORS.black,80),disabled:t.alpha(t.COLORS.black,50)},color:{static:t.COLORS.white,hover:t.COLORS.white,active:t.COLORS.white,disabled:t.COLORS.white},borderColor:{static:"transparent",hover:"transparent",active:"transparent",disabled:"transparent"}},success:{background:{static:t.COLORS.green,hover:t.alpha(t.COLORS.green,90),active:t.alpha(t.COLORS.green,80),disabled:t.alpha(t.COLORS.green,50)},color:{static:t.COLORS.white,hover:t.COLORS.white,active:t.COLORS.white,disabled:t.COLORS.white},borderColor:{static:"transparent",hover:"transparent",active:"transparent",disabled:"transparent"}},warning:{background:{static:t.COLORS.yellow,hover:t.alpha(t.COLORS.yellow,90),active:t.alpha(t.COLORS.yellow,80),disabled:t.alpha(t.COLORS.yellow,50)},color:{static:t.COLORS.black,hover:t.COLORS.black,active:t.COLORS.black,disabled:t.COLORS.black},borderColor:{static:"transparent",hover:"transparent",active:"transparent",disabled:"transparent"}},danger:{background:{static:t.COLORS.red,hover:t.alpha(t.COLORS.red,90),active:t.alpha(t.COLORS.red,80),disabled:t.alpha(t.COLORS.red,50)},color:{static:t.COLORS.white,hover:t.COLORS.white,active:t.COLORS.white,disabled:t.COLORS.white},borderColor:{static:"transparent",hover:"transparent",active:"transparent",disabled:"transparent"}},transparent:{background:{static:t.alpha(t.COLORS["iron-grey"],1),hover:t.alpha(t.COLORS["iron-grey"],5),active:t.alpha(t.COLORS["iron-grey"],10),disabled:t.alpha(t.COLORS["iron-grey"],5)},color:{static:t.COLORS.black,hover:t.COLORS.black,active:t.COLORS.black,disabled:t.alpha(t.COLORS.black,30)},borderColor:{static:t.alpha(t.COLORS["iron-grey"],20),hover:t.alpha(t.COLORS["iron-grey"],20),active:t.alpha(t.COLORS["iron-grey"],20),disabled:t.alpha(t.COLORS["iron-grey"],10)}}},U=e=>{const r=Ct[e];return r||Ct.normal},Q=e=>{const r=$t[e];return r||$t.default},to=e=>e?"auto":"fit-content",ro=a.button`
139
139
  display: flex;
140
140
  gap: 6px;
141
141
  text-decoration: none;
@@ -202,7 +202,7 @@
202
202
  border-radius: 4px;
203
203
  width: fit-content;
204
204
  background-color: ${e=>e.$variant==="light"?t.alpha(t.COLORS.white,25):t.alpha(t.COLORS.black,25)};
205
- `,co=I.newClassNameGetter("key-symbol"),Xt=({className:e,ref:r,symbol:i,variant:n="light",...l})=>i?o.jsx(lo,{...l,ref:r,className:co("container",e),$variant:n,children:i}):null,kt=I.newClassNameGetter("key-bindings"),Zt=({className:e,classnames:r,keys:i,ref:n,variant:l,...s})=>{const u=h.useMemo(()=>t.getKeySymbols(i),[i]);return u.length===0?null:o.jsx(no,{...s,ref:n,className:kt("container",e),children:u.map(d=>o.jsx(Xt,{symbol:d,className:kt("item",r==null?void 0:r.item),variant:l},d))})},yt=I.newClassNameGetter("button"),Jt=({children:e,className:r,classnames:i,disabled:n,fullWidth:l,icon:s,loading:u,onClick:d,ref:O=null,keyBindings:p=[],size:f="default",type:b="button",variant:w="normal",...k})=>{const L=h.useRef(null);h.useImperativeHandle(O,()=>L.current,[]),t.useKeyBinding(p,()=>{var R;(R=L.current)==null||R.click()});const C=h.useMemo(()=>{switch(b){case"link":return"button";default:return b}},[b]);return o.jsxs(ro,{...k,onClick:d,ref:L,type:C,disabled:n,className:yt("container",r),$variant:w,$size:f,$fullWidth:!!l,$iconOnly:!!s&&!(e||(p==null?void 0:p.length)>0),children:[u&&o.jsx(ao,{$size:f}),s&&!u&&o.jsx(oo,{$size:f,children:s}),e&&o.jsx(io,{className:yt("label",i==null?void 0:i.label),children:e}),o.jsx(Zt,{keys:p,variant:w==="system"?"light":"dark"})]})},Rt={normal:{box:{border:t.alpha(t.COLORS["iron-grey"],30),borderChecked:t.COLORS["iron-grey"],background:t.COLORS.white,backgroundChecked:t.COLORS.black,focusShadow:t.alpha(t.COLORS["iron-grey"],30)},label:t.COLORS.black,icon:t.COLORS.white},error:{box:{border:t.COLORS.red,borderChecked:t.COLORS.red,background:t.COLORS.white,backgroundChecked:t.COLORS.red,focusShadow:t.alpha(t.COLORS.red,30)},label:t.COLORS.red,icon:t.COLORS.white}},ge=e=>Rt[e]??Rt.normal,so=a.label`
205
+ `,co=I.newClassNameGetter("key-symbol"),Xt=({className:e,ref:r,symbol:i,variant:n="light",...l})=>i?o.jsx(lo,{...l,ref:r,className:co("container",e),$variant:n,children:i}):null,kt=I.newClassNameGetter("key-bindings"),Zt=({className:e,classnames:r,keys:i,ref:n,variant:l,...s})=>{const u=h.useMemo(()=>t.getKeySymbols(i),[i]);return u.length===0?null:o.jsx(no,{...s,ref:n,className:kt("container",e),children:u.map(d=>o.jsx(Xt,{symbol:d,className:kt("item",r==null?void 0:r.item),variant:l},d))})},yt=I.newClassNameGetter("button"),Jt=({children:e,className:r,classnames:i,disabled:n,fullWidth:l,icon:s,loading:u,onClick:d,ref:b=null,keyBindings:p=[],size:f="default",type:O="button",variant:w="normal",...k})=>{const L=h.useRef(null);h.useImperativeHandle(b,()=>L.current,[]),t.useKeyBinding(p,()=>{var R;(R=L.current)==null||R.click()});const C=h.useMemo(()=>{switch(O){case"link":return"button";default:return O}},[O]);return o.jsxs(ro,{...k,onClick:d,ref:L,type:C,disabled:n,className:yt("container",r),$variant:w,$size:f,$fullWidth:!!l,$iconOnly:!!s&&!(e||(p==null?void 0:p.length)>0),children:[u&&o.jsx(ao,{$size:f}),s&&!u&&o.jsx(oo,{$size:f,children:s}),e&&o.jsx(io,{className:yt("label",i==null?void 0:i.label),children:e}),o.jsx(Zt,{keys:p,variant:w==="system"?"light":"dark"})]})},Rt={normal:{box:{border:t.alpha(t.COLORS["iron-grey"],30),borderChecked:t.COLORS["iron-grey"],background:t.COLORS.white,backgroundChecked:t.COLORS.black,focusShadow:t.alpha(t.COLORS["iron-grey"],30)},label:t.COLORS.black,icon:t.COLORS.white},error:{box:{border:t.COLORS.red,borderChecked:t.COLORS.red,background:t.COLORS.white,backgroundChecked:t.COLORS.red,focusShadow:t.alpha(t.COLORS.red,30)},label:t.COLORS.red,icon:t.COLORS.white}},ge=e=>Rt[e]??Rt.normal,so=a.label`
206
206
  display: inline-flex;
207
207
  align-items: flex-start;
208
208
  gap: 8px;
@@ -260,7 +260,7 @@
260
260
  text-decoration: none;
261
261
  }
262
262
  }
263
- `,ye=I.newClassNameGetter("checkbox"),He=({checked:e,className:r,classnames:i,disabled:n,indeterminate:l=!1,label:s,onChange:u,ref:d,variant:O="normal",...p})=>o.jsxs(so,{className:ye("container",r),$disabled:!!n,$variant:O,children:[o.jsx(po,{...p,ref:d,type:"checkbox",className:ye("input",i==null?void 0:i.input),checked:e,disabled:n,onChange:u}),o.jsx(ho,{className:ye("box",i==null?void 0:i.box),$checked:e,$indeterminate:l,$variant:O,children:o.jsx(uo,{className:ye("icon",i==null?void 0:i.icon),$visible:l||e,$variant:O,children:l?o.jsx(o.Minus,{}):o.jsx(o.Check,{})})}),s&&o.jsx(bo,{className:ye("label",i==null?void 0:i.label),$variant:O,children:s})]}),Lt={normal:{border:{static:t.alpha(t.COLORS.black,20),hover:t.alpha(t.COLORS.black,40),active:t.alpha(t.COLORS.black,40),disabled:t.alpha(t.COLORS.black,10)},borderChecked:t.COLORS.black,background:{static:t.COLORS.white,hover:t.COLORS.white,active:t.COLORS.white,disabled:t.alpha(t.COLORS.black,5)},backgroundChecked:t.alpha(t.COLORS.black,5),focusRing:t.alpha(t.COLORS.black,20),label:{static:t.COLORS.black,hover:t.COLORS.black,active:t.COLORS.black,disabled:t.alpha(t.COLORS.black,40)},description:{static:t.alpha(t.COLORS.black,60),hover:t.alpha(t.COLORS.black,60),active:t.alpha(t.COLORS.black,60),disabled:t.alpha(t.COLORS.black,30)}},error:{border:{static:t.COLORS.red,hover:t.COLORS.red,active:t.COLORS.red,disabled:t.alpha(t.COLORS.red,30)},borderChecked:t.COLORS.red,background:{static:t.COLORS.white,hover:t.COLORS.white,active:t.COLORS.white,disabled:t.alpha(t.COLORS.red,5)},backgroundChecked:t.alpha(t.COLORS.red,5),focusRing:t.alpha(t.COLORS.red,20),label:{static:t.COLORS.red,hover:t.COLORS.red,active:t.COLORS.red,disabled:t.alpha(t.COLORS.red,40)},description:{static:t.alpha(t.COLORS.red,70),hover:t.alpha(t.COLORS.red,70),active:t.alpha(t.COLORS.red,70),disabled:t.alpha(t.COLORS.red,40)}}},de=e=>Lt[e]??Lt.normal,Oo=a.label`
263
+ `,ye=I.newClassNameGetter("checkbox"),We=({checked:e,className:r,classnames:i,disabled:n,indeterminate:l=!1,label:s,onChange:u,ref:d,variant:b="normal",...p})=>o.jsxs(so,{className:ye("container",r),$disabled:!!n,$variant:b,children:[o.jsx(po,{...p,ref:d,type:"checkbox",className:ye("input",i==null?void 0:i.input),checked:e,disabled:n,onChange:u}),o.jsx(ho,{className:ye("box",i==null?void 0:i.box),$checked:e,$indeterminate:l,$variant:b,children:o.jsx(uo,{className:ye("icon",i==null?void 0:i.icon),$visible:l||e,$variant:b,children:l?o.jsx(o.Minus,{}):o.jsx(o.Check,{})})}),s&&o.jsx(bo,{className:ye("label",i==null?void 0:i.label),$variant:b,children:s})]}),Lt={normal:{border:{static:t.alpha(t.COLORS.black,20),hover:t.alpha(t.COLORS.black,40),active:t.alpha(t.COLORS.black,40),disabled:t.alpha(t.COLORS.black,10)},borderChecked:t.COLORS.black,background:{static:t.COLORS.white,hover:t.COLORS.white,active:t.COLORS.white,disabled:t.alpha(t.COLORS.black,5)},backgroundChecked:t.alpha(t.COLORS.black,5),focusRing:t.alpha(t.COLORS.black,20),label:{static:t.COLORS.black,hover:t.COLORS.black,active:t.COLORS.black,disabled:t.alpha(t.COLORS.black,40)},description:{static:t.alpha(t.COLORS.black,60),hover:t.alpha(t.COLORS.black,60),active:t.alpha(t.COLORS.black,60),disabled:t.alpha(t.COLORS.black,30)}},error:{border:{static:t.COLORS.red,hover:t.COLORS.red,active:t.COLORS.red,disabled:t.alpha(t.COLORS.red,30)},borderChecked:t.COLORS.red,background:{static:t.COLORS.white,hover:t.COLORS.white,active:t.COLORS.white,disabled:t.alpha(t.COLORS.red,5)},backgroundChecked:t.alpha(t.COLORS.red,5),focusRing:t.alpha(t.COLORS.red,20),label:{static:t.COLORS.red,hover:t.COLORS.red,active:t.COLORS.red,disabled:t.alpha(t.COLORS.red,40)},description:{static:t.alpha(t.COLORS.red,70),hover:t.alpha(t.COLORS.red,70),active:t.alpha(t.COLORS.red,70),disabled:t.alpha(t.COLORS.red,40)}}},de=e=>Lt[e]??Lt.normal,Oo=a.label`
264
264
  display: grid;
265
265
  grid-template-columns: auto 1fr;
266
266
  align-items: start;
@@ -317,7 +317,7 @@
317
317
  label[data-disabled='true'] & {
318
318
  color: ${e=>de(e.$variant).description.disabled};
319
319
  }
320
- `,Ie=I.newClassNameGetter("checkbox-card"),$o=({checked:e,className:r,classnames:i,description:n,disabled:l,fullWidth:s=!1,label:u,onChange:d,ref:O,variant:p="normal",...f})=>o.jsxs(Oo,{className:Ie("container",r),$checked:e,$disabled:!!l,$fullWidth:s,$variant:p,"data-disabled":l,children:[o.jsx(go,{...f,ref:O,type:"checkbox",checked:e,disabled:l,onChange:d}),o.jsx(He,{className:i==null?void 0:i.checkbox,checked:e,disabled:l,variant:p,onChange:()=>{},tabIndex:-1,"aria-hidden":!0}),o.jsxs(fo,{className:Ie("content",i==null?void 0:i.content),children:[o.jsx(xo,{className:Ie("label",i==null?void 0:i.label),$variant:p,children:u}),n&&o.jsx(So,{className:Ie("description",i==null?void 0:i.description),$variant:p,children:n})]})]}),vt={label:{color:t.COLORS.black,disabledColor:t.alpha(t.COLORS.black,40)}},Co=a.div`
320
+ `,Ie=I.newClassNameGetter("checkbox-card"),$o=({checked:e,className:r,classnames:i,description:n,disabled:l,fullWidth:s=!1,label:u,onChange:d,ref:b,variant:p="normal",...f})=>o.jsxs(Oo,{className:Ie("container",r),$checked:e,$disabled:!!l,$fullWidth:s,$variant:p,"data-disabled":l,children:[o.jsx(go,{...f,ref:b,type:"checkbox",checked:e,disabled:l,onChange:d}),o.jsx(We,{className:i==null?void 0:i.checkbox,checked:e,disabled:l,variant:p,onChange:()=>{},tabIndex:-1,"aria-hidden":!0}),o.jsxs(fo,{className:Ie("content",i==null?void 0:i.content),children:[o.jsx(xo,{className:Ie("label",i==null?void 0:i.label),$variant:p,children:u}),n&&o.jsx(So,{className:Ie("description",i==null?void 0:i.description),$variant:p,children:n})]})]}),vt={label:{color:t.COLORS.black,disabledColor:t.alpha(t.COLORS.black,40)}},Co=a.div`
321
321
  display: flex;
322
322
  flex-direction: column;
323
323
  gap: 8px;
@@ -331,10 +331,10 @@
331
331
  display: flex;
332
332
  flex-direction: column;
333
333
  gap: 12px;
334
- `,Xe=I.newClassNameGetter("checkbox-group"),Ro=({className:e,classnames:r,disabled:i,label:n,onChange:l,options:s,ref:u,value:d,variant:O="normal",...p})=>{const f=(b,w)=>{l(w?[...d,b]:d.filter(k=>k!==b))};return o.jsxs(Co,{...p,ref:u,className:Xe("container",e),children:[n&&o.jsx(ko,{className:Xe("label",r==null?void 0:r.label),$disabled:i,children:n}),o.jsx(yo,{className:Xe("options",r==null?void 0:r.options),children:s.map(b=>o.jsx(He,{className:r==null?void 0:r.checkbox,checked:d.includes(b.value),label:b.label,disabled:i,variant:O,onChange:w=>f(b.value,w.target.checked)},b.value))})]})},wt={gray:{background:t.alpha(t.COLORS["iron-grey"],10),color:t.COLORS["iron-grey"],deleteHover:t.alpha(t.COLORS["iron-grey"],20)},red:{background:t.alpha(t.COLORS.red,10),color:t.COLORS.red,deleteHover:t.alpha(t.COLORS.red,20)},blue:{background:t.alpha(t.COLORS["steel-blue"],10),color:t.COLORS["steel-blue"],deleteHover:t.alpha(t.COLORS["steel-blue"],20)},black:{background:t.COLORS.black,color:t.COLORS.white,deleteHover:t.alpha(t.COLORS.white,20)}},dt=e=>wt[e]??wt.gray,Lo=a.span`
334
+ `,Ze=I.newClassNameGetter("checkbox-group"),Ro=({className:e,classnames:r,disabled:i,label:n,onChange:l,options:s,ref:u,value:d,variant:b="normal",...p})=>{const f=(O,w)=>{l(w?[...d,O]:d.filter(k=>k!==O))};return o.jsxs(Co,{...p,ref:u,className:Ze("container",e),children:[n&&o.jsx(ko,{className:Ze("label",r==null?void 0:r.label),$disabled:i,children:n}),o.jsx(yo,{className:Ze("options",r==null?void 0:r.options),children:s.map(O=>o.jsx(We,{className:r==null?void 0:r.checkbox,checked:d.includes(O.value),label:O.label,disabled:i,variant:b,onChange:w=>f(O.value,w.target.checked)},O.value))})]})},wt={gray:{background:t.alpha(t.COLORS["iron-grey"],10),color:t.COLORS["iron-grey"],deleteHover:t.alpha(t.COLORS["iron-grey"],20)},red:{background:t.alpha(t.COLORS.red,10),color:t.COLORS.red,deleteHover:t.alpha(t.COLORS.red,20)},blue:{background:t.alpha(t.COLORS["steel-blue"],10),color:t.COLORS["steel-blue"],deleteHover:t.alpha(t.COLORS["steel-blue"],20)},black:{background:t.COLORS.black,color:t.COLORS.white,deleteHover:t.alpha(t.COLORS.white,20)}},dt=e=>wt[e]??wt.gray,Lo=a.span`
335
335
  display: inline-flex;
336
336
  align-items: center;
337
- gap: 4px;
337
+ gap: 6px;
338
338
  padding: 0 ${e=>e.$deletable?"7px":"10px"} 0 10px;
339
339
  border-radius: 12px;
340
340
  height: 24px;
@@ -366,20 +366,31 @@
366
366
  height: 14px;
367
367
  }
368
368
  `,wo=a.span`
369
+ display: inline-flex;
370
+ align-items: center;
371
+ justify-content: center;
372
+ flex-shrink: 0;
373
+
374
+ & svg {
375
+ width: 14px;
376
+ height: 14px;
377
+ }
378
+ `,mo=a.span`
369
379
  flex: 1 0 auto;
370
380
  text-align: center;
371
- `,Ze=I.newClassNameGetter("chip"),Ve=({children:e,className:r,classnames:i,deletable:n,onDelete:l,ref:s,variant:u="gray",...d})=>o.jsxs(Lo,{...d,ref:s,className:Ze("container",r),$variant:u,$deletable:!!n,children:[o.jsx(wo,{className:Ze("label",i==null?void 0:i.label),children:e}),n&&o.jsx(vo,{type:"button",className:Ze("delete",i==null?void 0:i.delete),$variant:u,onClick:l,children:o.jsx(o.X,{})})]}),Ge={compact:{height:"32px",padding:"0 10px",radius:"14px",iconSize:16},default:{height:"40px",padding:"0 14px",radius:"16px",iconSize:20}},Re={normal:{background:{static:t.alpha(t.COLORS.black,2),disabled:t.alpha(t.COLORS.black,10)},border:{static:t.alpha(t.COLORS.black,60),disabled:t.alpha(t.COLORS.black,10)},color:{static:t.COLORS.black,disabled:t.alpha(t.COLORS.black,65)},placeholder:{static:t.alpha(t.COLORS.black,40),disabled:t.alpha(t.COLORS.black,65)},focus:t.alpha(t.COLORS["iron-grey"],30)},error:{background:{static:t.alpha(t.COLORS.red,2),disabled:t.alpha(t.COLORS.red,10)},border:{static:t.alpha(t.COLORS.red,60),disabled:t.alpha(t.COLORS.red,10)},color:{static:t.COLORS.red,disabled:t.alpha(t.COLORS.red,65)},placeholder:{static:t.alpha(t.COLORS.red,40),disabled:t.alpha(t.COLORS.red,65)},focus:t.alpha(t.COLORS.red,30)}},ee=36,We=2,mo=12,Qt=(e,r,i="en")=>{const n=e.getFullYear(),l=e.getMonth(),s=e.getDate(),u=e.getHours(),d=e.getMinutes(),O=e.getSeconds(),p=u%12||12,f=u>=12,b=new Intl.DateTimeFormat(i,{month:"long"}).format(e),w=new Intl.DateTimeFormat(i,{month:"short"}).format(e),k=new Intl.DateTimeFormat(i,{weekday:"long"}).format(e),L=new Intl.DateTimeFormat(i,{weekday:"short"}).format(e),C=c=>c.toString().padStart(2,"0"),R=c=>c.toString().padStart(2," "),j=c=>`\0${c}\0`,$=[["2006","YEARFOUR",n.toString()],["January","MONTHLONG",b],["Monday","WEEKDAYLONG",k],["Jan","MONTHSHORT",w],["Mon","WEEKDAYSHORT",L],["06","YEARTWO",n.toString().slice(-2)],["01","MONTHPAD",C(l+1)],["_2","DAYSPACE",R(s)],["02","DAYPAD",C(s)],["15","HOURTWENTYFOUR",C(u)],["03","HOURTWELVEPAD",C(p)],["04","MINUTE",C(d)],["05","SECOND",C(O)],["PM","AMPMUP",f?"PM":"AM"],["pm","AMPMLOW",f?"pm":"am"],["1","MONTH",(l+1).toString()],["2","DAY",s.toString()],["3","HOURTWELVE",p.toString()]];let S=r;for(const[c,T]of $)S=S.split(c).join(j(T));for(const[,c,T]of $)S=S.split(j(c)).join(T);return S},jo=(e,r)=>new Date(e,r+1,0).getDate(),Po=(e,r)=>new Date(e,r,1).getDay(),No=(e,r,i=1)=>{const n=jo(e,r);let s=Po(e,r)-i;s<0&&(s+=7);const u=[];for(let d=0;d<s;d++)u.push(null);for(let d=1;d<=n;d++)u.push(d);for(;u.length<42;)u.push(null);return u},zo=(e,r=1)=>{const i=[];for(let n=0;n<7;n++){const l=(r+n)%7,s=new Date(2024,0,7+l);i.push(new Intl.DateTimeFormat(e,{weekday:"short"}).format(s))}return i},To=e=>{const r=[];for(let i=0;i<12;i++){const n=new Date(2024,i,1);r.push(new Intl.DateTimeFormat(e,{month:"short"}).format(n))}return r},mt=(e,r)=>e.getFullYear()===r.getFullYear()&&e.getMonth()===r.getMonth()&&e.getDate()===r.getDate(),jt=(e,r)=>e.getFullYear()===r.getFullYear()&&e.getMonth()===r.getMonth(),Do=(e,r)=>e.getFullYear()===r.getFullYear(),Pt=(e,r,i,n,l)=>{const s=new Date(e,r,i);if(n){const u=new Date(n.getFullYear(),n.getMonth(),n.getDate());if(s<u)return!0}if(l){const u=new Date(l.getFullYear(),l.getMonth(),l.getDate());if(s>u)return!0}return!1},Nt=(e,r,i,n)=>{if(i){const l=i.getFullYear(),s=i.getMonth();if(e<l||e===l&&r<s)return!0}if(n){const l=n.getFullYear(),s=n.getMonth();if(e>l||e===l&&r>s)return!0}return!1},zt=(e,r,i)=>!!(r&&e<r.getFullYear()||i&&e>i.getFullYear()),Io=(e,r=12)=>{const i=e-Math.floor(r/2),n=[];for(let l=0;l<r;l++)n.push(i+l);return n},_o=e=>{switch(e){case"date":return"02.01.2006";case"month":return"January 2006";case"year":return"2006"}},Eo=a.div`
381
+ line-height: 1.4;
382
+ `,_e=I.newClassNameGetter("chip"),Be=({children:e,className:r,classnames:i,deletable:n,icon:l,onDelete:s,ref:u,variant:d="gray",...b})=>o.jsxs(Lo,{...b,ref:u,className:_e("container",r),$variant:d,$deletable:!!n,children:[l&&o.jsx(wo,{className:_e("icon",i==null?void 0:i.icon),children:l}),o.jsx(mo,{className:_e("label",i==null?void 0:i.label),children:e}),n&&o.jsx(vo,{type:"button",className:_e("delete",i==null?void 0:i.delete),$variant:d,onClick:s,children:o.jsx(o.X,{})})]}),Ve={compact:{height:"32px",padding:"0 10px",radius:"14px",iconSize:16},default:{height:"40px",padding:"0 14px",radius:"16px",iconSize:20}},Re={normal:{background:{static:t.alpha(t.COLORS.black,2),disabled:t.alpha(t.COLORS.black,10)},border:{static:t.alpha(t.COLORS.black,60),disabled:t.alpha(t.COLORS.black,10)},color:{static:t.COLORS.black,disabled:t.alpha(t.COLORS.black,65)},placeholder:{static:t.alpha(t.COLORS.black,40),disabled:t.alpha(t.COLORS.black,65)},focus:t.alpha(t.COLORS["iron-grey"],30)},error:{background:{static:t.alpha(t.COLORS.red,2),disabled:t.alpha(t.COLORS.red,10)},border:{static:t.alpha(t.COLORS.red,60),disabled:t.alpha(t.COLORS.red,10)},color:{static:t.COLORS.red,disabled:t.alpha(t.COLORS.red,65)},placeholder:{static:t.alpha(t.COLORS.red,40),disabled:t.alpha(t.COLORS.red,65)},focus:t.alpha(t.COLORS.red,30)}},ee=36,Ke=2,jo=12,Qt=(e,r,i="en")=>{const n=e.getFullYear(),l=e.getMonth(),s=e.getDate(),u=e.getHours(),d=e.getMinutes(),b=e.getSeconds(),p=u%12||12,f=u>=12,O=new Intl.DateTimeFormat(i,{month:"long"}).format(e),w=new Intl.DateTimeFormat(i,{month:"short"}).format(e),k=new Intl.DateTimeFormat(i,{weekday:"long"}).format(e),L=new Intl.DateTimeFormat(i,{weekday:"short"}).format(e),C=c=>c.toString().padStart(2,"0"),R=c=>c.toString().padStart(2," "),j=c=>`\0${c}\0`,$=[["2006","YEARFOUR",n.toString()],["January","MONTHLONG",O],["Monday","WEEKDAYLONG",k],["Jan","MONTHSHORT",w],["Mon","WEEKDAYSHORT",L],["06","YEARTWO",n.toString().slice(-2)],["01","MONTHPAD",C(l+1)],["_2","DAYSPACE",R(s)],["02","DAYPAD",C(s)],["15","HOURTWENTYFOUR",C(u)],["03","HOURTWELVEPAD",C(p)],["04","MINUTE",C(d)],["05","SECOND",C(b)],["PM","AMPMUP",f?"PM":"AM"],["pm","AMPMLOW",f?"pm":"am"],["1","MONTH",(l+1).toString()],["2","DAY",s.toString()],["3","HOURTWELVE",p.toString()]];let S=r;for(const[c,T]of $)S=S.split(c).join(j(T));for(const[,c,T]of $)S=S.split(j(c)).join(T);return S},Po=(e,r)=>new Date(e,r+1,0).getDate(),No=(e,r)=>new Date(e,r,1).getDay(),zo=(e,r,i=1)=>{const n=Po(e,r);let s=No(e,r)-i;s<0&&(s+=7);const u=[];for(let d=0;d<s;d++)u.push(null);for(let d=1;d<=n;d++)u.push(d);for(;u.length<42;)u.push(null);return u},To=(e,r=1)=>{const i=[];for(let n=0;n<7;n++){const l=(r+n)%7,s=new Date(2024,0,7+l);i.push(new Intl.DateTimeFormat(e,{weekday:"short"}).format(s))}return i},Do=e=>{const r=[];for(let i=0;i<12;i++){const n=new Date(2024,i,1);r.push(new Intl.DateTimeFormat(e,{month:"short"}).format(n))}return r},mt=(e,r)=>e.getFullYear()===r.getFullYear()&&e.getMonth()===r.getMonth()&&e.getDate()===r.getDate(),jt=(e,r)=>e.getFullYear()===r.getFullYear()&&e.getMonth()===r.getMonth(),Io=(e,r)=>e.getFullYear()===r.getFullYear(),Pt=(e,r,i,n,l)=>{const s=new Date(e,r,i);if(n){const u=new Date(n.getFullYear(),n.getMonth(),n.getDate());if(s<u)return!0}if(l){const u=new Date(l.getFullYear(),l.getMonth(),l.getDate());if(s>u)return!0}return!1},Nt=(e,r,i,n)=>{if(i){const l=i.getFullYear(),s=i.getMonth();if(e<l||e===l&&r<s)return!0}if(n){const l=n.getFullYear(),s=n.getMonth();if(e>l||e===l&&r>s)return!0}return!1},zt=(e,r,i)=>!!(r&&e<r.getFullYear()||i&&e>i.getFullYear()),_o=(e,r=12)=>{const i=e-Math.floor(r/2),n=[];for(let l=0;l<r;l++)n.push(i+l);return n},Eo=e=>{switch(e){case"date":return"02.01.2006";case"month":return"January 2006";case"year":return"2006"}},Ao=a.div`
372
383
  position: relative;
373
384
  display: inline-flex;
374
385
  flex-direction: column;
375
386
  gap: 2px;
376
387
  min-width: 180px;
377
388
  width: ${({$fullWidth:e})=>e?"100%":"fit-content"};
378
- `,Ao=a(te)`
389
+ `,Mo=a(te)`
379
390
  margin-left: 6px;
380
- `,Mo=a(re)`
391
+ `,Fo=a(re)`
381
392
  margin-left: 6px;
382
- `,Fo=a.button`
393
+ `,Yo=a.button`
383
394
  display: flex;
384
395
  align-items: center;
385
396
  justify-content: space-between;
@@ -390,9 +401,9 @@
390
401
  font-size: 14px;
391
402
  font-weight: 500;
392
403
  text-align: left;
393
- height: ${({$size:e})=>Ge[e].height};
394
- padding: ${({$size:e})=>Ge[e].padding};
395
- border-radius: ${({$size:e})=>Ge[e].radius};
404
+ height: ${({$size:e})=>Ve[e].height};
405
+ padding: ${({$size:e})=>Ve[e].padding};
406
+ border-radius: ${({$size:e})=>Ve[e].radius};
396
407
  color: ${({$variant:e,$disabled:r,$hasValue:i})=>i?Re[e].color[r?"disabled":"static"]:Re[e].placeholder[r?"disabled":"static"]};
397
408
  border: 1px solid
398
409
  ${({$variant:e,$disabled:r})=>Re[e].border[r?"disabled":"static"]};
@@ -401,12 +412,12 @@
401
412
  ${({$open:e,$variant:r})=>e&&`
402
413
  outline: 2px solid ${Re[r].focus};
403
414
  `}
404
- `,Yo=a.span`
415
+ `,Go=a.span`
405
416
  flex: 1;
406
417
  overflow: hidden;
407
418
  text-overflow: ellipsis;
408
419
  white-space: nowrap;
409
- `,Go=a.span`
420
+ `,Vo=a.span`
410
421
  display: flex;
411
422
  align-items: center;
412
423
  justify-content: center;
@@ -419,8 +430,8 @@
419
430
  border: 1px solid ${t.alpha(t.COLORS.black,15)};
420
431
  border-radius: 12px;
421
432
  box-shadow: 0 4px 16px ${t.alpha(t.COLORS.black,12)};
422
- padding: ${mo}px;
423
- `,tr=(e,r)=>e?"translateY(0)":r==="bottom"?"translateY(-8px)":"translateY(8px)",Vo=a.div`
433
+ padding: ${jo}px;
434
+ `,tr=(e,r)=>e?"translateY(0)":r==="bottom"?"translateY(-8px)":"translateY(8px)",Bo=a.div`
424
435
  position: absolute;
425
436
  ${({$position:e})=>e==="bottom"?"top: calc(100% + 4px);":"bottom: calc(100% + 4px);"}
426
437
  left: 0;
@@ -432,7 +443,7 @@
432
443
  opacity 0.15s ease,
433
444
  transform 0.15s ease,
434
445
  visibility 0.15s;
435
- `,Bo=a.div`
446
+ `,Ho=a.div`
436
447
  position: fixed;
437
448
  ${er}
438
449
  opacity: ${({$open:e})=>e?1:0};
@@ -490,12 +501,12 @@
490
501
  `,et=a.div`
491
502
  display: flex;
492
503
  gap: 4px;
493
- `,Ho=a.div`
504
+ `,Wo=a.div`
494
505
  display: grid;
495
506
  grid-template-columns: repeat(7, ${ee}px);
496
- gap: ${We}px;
507
+ gap: ${Ke}px;
497
508
  margin-bottom: 4px;
498
- `,Wo=a.div`
509
+ `,Ko=a.div`
499
510
  display: flex;
500
511
  align-items: center;
501
512
  justify-content: center;
@@ -504,11 +515,11 @@
504
515
  font-weight: 500;
505
516
  color: ${t.alpha(t.COLORS.black,50)};
506
517
  text-transform: uppercase;
507
- `,Ko=a.div`
518
+ `,Uo=a.div`
508
519
  display: grid;
509
520
  grid-template-columns: repeat(7, ${ee}px);
510
- gap: ${We}px;
511
- `,Uo=a.button`
521
+ gap: ${Ke}px;
522
+ `,qo=a.button`
512
523
  display: flex;
513
524
  align-items: center;
514
525
  justify-content: center;
@@ -533,12 +544,12 @@
533
544
  &:disabled {
534
545
  cursor: not-allowed;
535
546
  }
536
- `,qo=a.div`
547
+ `,Xo=a.div`
537
548
  display: grid;
538
549
  grid-template-columns: repeat(3, 1fr);
539
550
  gap: 8px;
540
- width: ${7*ee+6*We}px;
541
- `,Xo=a.button`
551
+ width: ${7*ee+6*Ke}px;
552
+ `,Zo=a.button`
542
553
  display: flex;
543
554
  align-items: center;
544
555
  justify-content: center;
@@ -558,12 +569,12 @@
558
569
  &:hover:not(:disabled) {
559
570
  background-color: ${({$selected:e})=>e?t.COLORS.black:t.alpha(t.COLORS.black,8)};
560
571
  }
561
- `,Zo=a.div`
572
+ `,Jo=a.div`
562
573
  display: grid;
563
574
  grid-template-columns: repeat(3, 1fr);
564
575
  gap: 8px;
565
- width: ${7*ee+6*We}px;
566
- `,Jo=a.button`
576
+ width: ${7*ee+6*Ke}px;
577
+ `,Qo=a.button`
567
578
  display: flex;
568
579
  align-items: center;
569
580
  justify-content: center;
@@ -583,26 +594,26 @@
583
594
  &:hover:not(:disabled) {
584
595
  background-color: ${({$selected:e})=>e?t.COLORS.black:t.alpha(t.COLORS.black,8)};
585
596
  }
586
- `,Qo=a.div`
597
+ `,ei=a.div`
587
598
  width: ${ee}px;
588
599
  height: ${ee}px;
589
- `,W=I.newClassNameGetter("date-picker"),_e=4,ei=300,ti=({value:e,onChange:r,mode:i="date",displayFormat:n,placeholder:l,locale:s="en",weekStartsOn:u=1,minDate:d,maxDate:O,size:p="default",variant:f="normal",disabled:b=!1,fullWidth:w=!1,label:k,message:L,portalRenderNode:C,open:R,onOpen:j,onClose:$,className:S,classnames:c,ref:T,...D})=>{const z=h.useMemo(()=>new Date,[]),[Y,F]=h.useState(!1),[A,M]=h.useState({top:0,left:0}),[G,m]=h.useState("bottom"),[g,_]=h.useState(()=>i==="year"?"years":i==="month"?"months":"days"),[v,P]=h.useState(()=>e??z),[V,Z]=h.useState(()=>((e==null?void 0:e.getFullYear())??z.getFullYear())-6),ae=h.useRef(null),y=h.useRef(null),N=h.useRef(null),B=R!==void 0,H=B?R:Y,pe=n??_o(i),Ne=h.useMemo(()=>zo(s,u),[s,u]),Ke=h.useMemo(()=>To(s),[s]),cr=h.useMemo(()=>No(v.getFullYear(),v.getMonth(),u),[v,u]),ze=h.useMemo(()=>Io(V+6,12),[V]),ht=h.useMemo(()=>e?Qt(e,pe,s):null,[e,pe,s]),sr=l??pe.replace(/2006|06|January|Jan|01|02/g,"__"),xe=h.useCallback(()=>{var $e;if(!y.current)return;const x=y.current.getBoundingClientRect(),E=(($e=N.current)==null?void 0:$e.offsetHeight)??ei,Se=window.innerHeight-x.bottom-_e,Te=x.top-_e,he=Se<E&&Te>Se?"top":"bottom";if(m(he),C){const De=he==="bottom"?x.bottom+_e:x.top-E-_e;M({top:De,left:x.left})}},[C]),ut=h.useCallback(()=>{if(b)return;B||F(!0),j==null||j(),_(i==="year"?"years":i==="month"?"months":"days");const x=e??z;P(x),Z(x.getFullYear()-6)},[b,B,j,i,e,z]),K=h.useCallback(()=>{B||F(!1),$==null||$()},[B,$]),pr=h.useCallback(()=>{H?K():ut()},[H,K,ut]),hr=h.useCallback(x=>{const E=new Date(v.getFullYear(),v.getMonth(),x);r==null||r(E),K()},[v,r,K]),ur=h.useCallback(x=>{if(i==="month"){const E=new Date(v.getFullYear(),x,1);r==null||r(E),K()}else P(new Date(v.getFullYear(),x,1)),_("days")},[i,v,r,K]),br=h.useCallback(x=>{if(i==="year"){const E=new Date(x,0,1);r==null||r(E),K()}else i==="month"?(P(new Date(x,v.getMonth(),1)),_("months")):(P(new Date(x,v.getMonth(),1)),_("months"))},[i,v,r,K]),Or=h.useCallback(()=>{P(x=>new Date(x.getFullYear(),x.getMonth()-1,1))},[]),gr=h.useCallback(()=>{P(x=>new Date(x.getFullYear(),x.getMonth()+1,1))},[]),fr=h.useCallback(()=>{P(x=>new Date(x.getFullYear()-1,x.getMonth(),1))},[]),xr=h.useCallback(()=>{P(x=>new Date(x.getFullYear()+1,x.getMonth(),1))},[]),Sr=h.useCallback(()=>{Z(x=>x-12)},[]),$r=h.useCallback(()=>{Z(x=>x+12)},[]),bt=h.useCallback(()=>{g==="days"?_("months"):g==="months"&&_("years")},[g]);h.useLayoutEffect(()=>{H&&xe()},[H,xe]),h.useEffect(()=>{const x=he=>{const $e=he.target,De=ae.current&&!ae.current.contains($e),vr=N.current&&!N.current.contains($e);C?De&&vr&&K():De&&K()},E=he=>{he.key==="Escape"&&K()},Se=()=>{H&&C&&xe()},Te=()=>{H&&C&&xe()};return H&&(document.addEventListener("mousedown",x),document.addEventListener("keydown",E),C&&(window.addEventListener("scroll",Se,!0),window.addEventListener("resize",Te))),()=>{document.removeEventListener("mousedown",x),document.removeEventListener("keydown",E),window.removeEventListener("scroll",Se,!0),window.removeEventListener("resize",Te)}},[H,K,C,xe]);const Cr=Ge[p].iconSize,kr=()=>o.jsxs(o.Fragment,{children:[o.jsxs(Je,{className:W("header",c==null?void 0:c.header),children:[o.jsx(Qe,{onClick:bt,type:"button",children:new Intl.DateTimeFormat(s,{month:"long",year:"numeric"}).format(v)}),o.jsxs(et,{children:[o.jsx(ue,{onClick:Or,type:"button","aria-label":"Previous month",children:o.jsx(o.ChevronLeft,{size:16})}),o.jsx(ue,{onClick:gr,type:"button","aria-label":"Next month",children:o.jsx(o.ChevronRight,{size:16})})]})]}),o.jsx(Ho,{children:Ne.map((x,E)=>o.jsx(Wo,{children:x},E))}),o.jsx(Ko,{className:W("grid",c==null?void 0:c.grid),children:cr.map((x,E)=>x===null?o.jsx(Qo,{},E):o.jsx(Uo,{type:"button",className:W("cell",c==null?void 0:c.cell),$selected:e?mt(e,new Date(v.getFullYear(),v.getMonth(),x)):!1,$today:mt(z,new Date(v.getFullYear(),v.getMonth(),x)),$disabled:Pt(v.getFullYear(),v.getMonth(),x,d,O),disabled:Pt(v.getFullYear(),v.getMonth(),x,d,O),onClick:()=>hr(x),children:x},E))})]}),yr=()=>o.jsxs(o.Fragment,{children:[o.jsxs(Je,{className:W("header",c==null?void 0:c.header),children:[o.jsx(Qe,{onClick:bt,type:"button",children:v.getFullYear()}),o.jsxs(et,{children:[o.jsx(ue,{onClick:fr,type:"button","aria-label":"Previous year",children:o.jsx(o.ChevronLeft,{size:16})}),o.jsx(ue,{onClick:xr,type:"button","aria-label":"Next year",children:o.jsx(o.ChevronRight,{size:16})})]})]}),o.jsx(qo,{className:W("grid",c==null?void 0:c.grid),children:Ke.map((x,E)=>o.jsx(Xo,{type:"button",className:W("cell",c==null?void 0:c.cell),$selected:e?jt(e,new Date(v.getFullYear(),E,1)):!1,$current:jt(z,new Date(v.getFullYear(),E,1)),$disabled:Nt(v.getFullYear(),E,d,O),disabled:Nt(v.getFullYear(),E,d,O),onClick:()=>ur(E),children:x},E))})]}),Rr=()=>o.jsxs(o.Fragment,{children:[o.jsxs(Je,{className:W("header",c==null?void 0:c.header),children:[o.jsxs(Qe,{type:"button",style:{cursor:"default"},children:[ze[0]," - ",ze[ze.length-1]]}),o.jsxs(et,{children:[o.jsx(ue,{onClick:Sr,type:"button","aria-label":"Previous years",children:o.jsx(o.ChevronLeft,{size:16})}),o.jsx(ue,{onClick:$r,type:"button","aria-label":"Next years",children:o.jsx(o.ChevronRight,{size:16})})]})]}),o.jsx(Zo,{className:W("grid",c==null?void 0:c.grid),children:ze.map(x=>o.jsx(Jo,{type:"button",className:W("cell",c==null?void 0:c.cell),$selected:e?Do(e,new Date(x,0,1)):!1,$current:z.getFullYear()===x,$disabled:zt(x,d,O),disabled:zt(x,d,O),onClick:()=>br(x),children:x},x))})]}),Ot=()=>{switch(g){case"days":return kr();case"months":return yr();case"years":return Rr()}},Lr=C?Be.createPortal(o.jsx(Bo,{ref:N,$open:H,$position:G,className:W("calendar",c==null?void 0:c.calendar),style:{top:A.top,left:A.left},children:Ot()}),C):o.jsx(Vo,{ref:N,$open:H,$position:G,className:W("calendar",c==null?void 0:c.calendar),children:Ot()});return o.jsxs(Eo,{...D,ref:T??ae,$fullWidth:w,className:W("container",S),children:[k&&o.jsx(Ao,{variant:f,children:k}),o.jsxs(Fo,{ref:y,type:"button",onClick:pr,disabled:b,$size:p,$variant:f,$disabled:b,$open:H,$hasValue:!!ht,className:W("trigger",c==null?void 0:c.trigger),children:[o.jsx(Yo,{children:ht??sr}),o.jsx(Go,{$open:H,children:o.jsx(o.ChevronDown,{size:Cr})})]}),Lr,L&&o.jsx(Mo,{variant:f,children:L})]})},Tt={compact:{height:"32px",padding:"0 10px",radius:"14px",prefixSize:"16px"},default:{height:"40px",padding:"0 14px",radius:"16px",prefixSize:"20px"}},Dt={normal:{background:{static:t.alpha(t.COLORS.black,2),disabled:t.alpha(t.COLORS.black,10)},border:{static:t.alpha(t.COLORS.black,60),disabled:t.alpha(t.COLORS.black,10)},color:{static:t.COLORS.black,disabled:t.alpha(t.COLORS.black,65)},placeholder:{static:t.alpha(t.COLORS.black,40),disabled:t.alpha(t.COLORS.black,65)},focus:t.alpha(t.COLORS["iron-grey"],30)},error:{background:{static:t.alpha(t.COLORS.red,2),disabled:t.alpha(t.COLORS.red,10)},border:{static:t.alpha(t.COLORS.red,60),disabled:t.alpha(t.COLORS.red,10)},color:{static:t.COLORS.red,disabled:t.alpha(t.COLORS.red,65)},placeholder:{static:t.alpha(t.COLORS.red,40),disabled:t.alpha(t.COLORS.red,65)},focus:t.alpha(t.COLORS.red,30)}},J=e=>Dt[e]??Dt.normal,Pe=e=>Tt[e]??Tt.default,ri=a.div`
600
+ `,W=I.newClassNameGetter("date-picker"),Ee=4,ti=300,ri=({value:e,onChange:r,mode:i="date",displayFormat:n,placeholder:l,locale:s="en",weekStartsOn:u=1,minDate:d,maxDate:b,size:p="default",variant:f="normal",disabled:O=!1,fullWidth:w=!1,label:k,message:L,portalRenderNode:C,open:R,onOpen:j,onClose:$,className:S,classnames:c,ref:T,...D})=>{const z=h.useMemo(()=>new Date,[]),[Y,F]=h.useState(!1),[A,M]=h.useState({top:0,left:0}),[G,m]=h.useState("bottom"),[g,_]=h.useState(()=>i==="year"?"years":i==="month"?"months":"days"),[v,P]=h.useState(()=>e??z),[V,Z]=h.useState(()=>((e==null?void 0:e.getFullYear())??z.getFullYear())-6),ae=h.useRef(null),y=h.useRef(null),N=h.useRef(null),B=R!==void 0,H=B?R:Y,pe=n??Eo(i),Ne=h.useMemo(()=>To(s,u),[s,u]),Ue=h.useMemo(()=>Do(s),[s]),cr=h.useMemo(()=>zo(v.getFullYear(),v.getMonth(),u),[v,u]),ze=h.useMemo(()=>_o(V+6,12),[V]),ht=h.useMemo(()=>e?Qt(e,pe,s):null,[e,pe,s]),sr=l??pe.replace(/2006|06|January|Jan|01|02/g,"__"),xe=h.useCallback(()=>{var $e;if(!y.current)return;const x=y.current.getBoundingClientRect(),E=(($e=N.current)==null?void 0:$e.offsetHeight)??ti,Se=window.innerHeight-x.bottom-Ee,Te=x.top-Ee,he=Se<E&&Te>Se?"top":"bottom";if(m(he),C){const De=he==="bottom"?x.bottom+Ee:x.top-E-Ee;M({top:De,left:x.left})}},[C]),ut=h.useCallback(()=>{if(O)return;B||F(!0),j==null||j(),_(i==="year"?"years":i==="month"?"months":"days");const x=e??z;P(x),Z(x.getFullYear()-6)},[O,B,j,i,e,z]),K=h.useCallback(()=>{B||F(!1),$==null||$()},[B,$]),pr=h.useCallback(()=>{H?K():ut()},[H,K,ut]),hr=h.useCallback(x=>{const E=new Date(v.getFullYear(),v.getMonth(),x);r==null||r(E),K()},[v,r,K]),ur=h.useCallback(x=>{if(i==="month"){const E=new Date(v.getFullYear(),x,1);r==null||r(E),K()}else P(new Date(v.getFullYear(),x,1)),_("days")},[i,v,r,K]),br=h.useCallback(x=>{if(i==="year"){const E=new Date(x,0,1);r==null||r(E),K()}else i==="month"?(P(new Date(x,v.getMonth(),1)),_("months")):(P(new Date(x,v.getMonth(),1)),_("months"))},[i,v,r,K]),Or=h.useCallback(()=>{P(x=>new Date(x.getFullYear(),x.getMonth()-1,1))},[]),gr=h.useCallback(()=>{P(x=>new Date(x.getFullYear(),x.getMonth()+1,1))},[]),fr=h.useCallback(()=>{P(x=>new Date(x.getFullYear()-1,x.getMonth(),1))},[]),xr=h.useCallback(()=>{P(x=>new Date(x.getFullYear()+1,x.getMonth(),1))},[]),Sr=h.useCallback(()=>{Z(x=>x-12)},[]),$r=h.useCallback(()=>{Z(x=>x+12)},[]),bt=h.useCallback(()=>{g==="days"?_("months"):g==="months"&&_("years")},[g]);h.useLayoutEffect(()=>{H&&xe()},[H,xe]),h.useEffect(()=>{const x=he=>{const $e=he.target,De=ae.current&&!ae.current.contains($e),vr=N.current&&!N.current.contains($e);C?De&&vr&&K():De&&K()},E=he=>{he.key==="Escape"&&K()},Se=()=>{H&&C&&xe()},Te=()=>{H&&C&&xe()};return H&&(document.addEventListener("mousedown",x),document.addEventListener("keydown",E),C&&(window.addEventListener("scroll",Se,!0),window.addEventListener("resize",Te))),()=>{document.removeEventListener("mousedown",x),document.removeEventListener("keydown",E),window.removeEventListener("scroll",Se,!0),window.removeEventListener("resize",Te)}},[H,K,C,xe]);const Cr=Ve[p].iconSize,kr=()=>o.jsxs(o.Fragment,{children:[o.jsxs(Je,{className:W("header",c==null?void 0:c.header),children:[o.jsx(Qe,{onClick:bt,type:"button",children:new Intl.DateTimeFormat(s,{month:"long",year:"numeric"}).format(v)}),o.jsxs(et,{children:[o.jsx(ue,{onClick:Or,type:"button","aria-label":"Previous month",children:o.jsx(o.ChevronLeft,{size:16})}),o.jsx(ue,{onClick:gr,type:"button","aria-label":"Next month",children:o.jsx(o.ChevronRight,{size:16})})]})]}),o.jsx(Wo,{children:Ne.map((x,E)=>o.jsx(Ko,{children:x},E))}),o.jsx(Uo,{className:W("grid",c==null?void 0:c.grid),children:cr.map((x,E)=>x===null?o.jsx(ei,{},E):o.jsx(qo,{type:"button",className:W("cell",c==null?void 0:c.cell),$selected:e?mt(e,new Date(v.getFullYear(),v.getMonth(),x)):!1,$today:mt(z,new Date(v.getFullYear(),v.getMonth(),x)),$disabled:Pt(v.getFullYear(),v.getMonth(),x,d,b),disabled:Pt(v.getFullYear(),v.getMonth(),x,d,b),onClick:()=>hr(x),children:x},E))})]}),yr=()=>o.jsxs(o.Fragment,{children:[o.jsxs(Je,{className:W("header",c==null?void 0:c.header),children:[o.jsx(Qe,{onClick:bt,type:"button",children:v.getFullYear()}),o.jsxs(et,{children:[o.jsx(ue,{onClick:fr,type:"button","aria-label":"Previous year",children:o.jsx(o.ChevronLeft,{size:16})}),o.jsx(ue,{onClick:xr,type:"button","aria-label":"Next year",children:o.jsx(o.ChevronRight,{size:16})})]})]}),o.jsx(Xo,{className:W("grid",c==null?void 0:c.grid),children:Ue.map((x,E)=>o.jsx(Zo,{type:"button",className:W("cell",c==null?void 0:c.cell),$selected:e?jt(e,new Date(v.getFullYear(),E,1)):!1,$current:jt(z,new Date(v.getFullYear(),E,1)),$disabled:Nt(v.getFullYear(),E,d,b),disabled:Nt(v.getFullYear(),E,d,b),onClick:()=>ur(E),children:x},E))})]}),Rr=()=>o.jsxs(o.Fragment,{children:[o.jsxs(Je,{className:W("header",c==null?void 0:c.header),children:[o.jsxs(Qe,{type:"button",style:{cursor:"default"},children:[ze[0]," - ",ze[ze.length-1]]}),o.jsxs(et,{children:[o.jsx(ue,{onClick:Sr,type:"button","aria-label":"Previous years",children:o.jsx(o.ChevronLeft,{size:16})}),o.jsx(ue,{onClick:$r,type:"button","aria-label":"Next years",children:o.jsx(o.ChevronRight,{size:16})})]})]}),o.jsx(Jo,{className:W("grid",c==null?void 0:c.grid),children:ze.map(x=>o.jsx(Qo,{type:"button",className:W("cell",c==null?void 0:c.cell),$selected:e?Io(e,new Date(x,0,1)):!1,$current:z.getFullYear()===x,$disabled:zt(x,d,b),disabled:zt(x,d,b),onClick:()=>br(x),children:x},x))})]}),Ot=()=>{switch(g){case"days":return kr();case"months":return yr();case"years":return Rr()}},Lr=C?He.createPortal(o.jsx(Ho,{ref:N,$open:H,$position:G,className:W("calendar",c==null?void 0:c.calendar),style:{top:A.top,left:A.left},children:Ot()}),C):o.jsx(Bo,{ref:N,$open:H,$position:G,className:W("calendar",c==null?void 0:c.calendar),children:Ot()});return o.jsxs(Ao,{...D,ref:T??ae,$fullWidth:w,className:W("container",S),children:[k&&o.jsx(Mo,{variant:f,children:k}),o.jsxs(Yo,{ref:y,type:"button",onClick:pr,disabled:O,$size:p,$variant:f,$disabled:O,$open:H,$hasValue:!!ht,className:W("trigger",c==null?void 0:c.trigger),children:[o.jsx(Go,{children:ht??sr}),o.jsx(Vo,{$open:H,children:o.jsx(o.ChevronDown,{size:Cr})})]}),Lr,L&&o.jsx(Fo,{variant:f,children:L})]})},Tt={compact:{height:"32px",padding:"0 10px",radius:"14px",prefixSize:"16px"},default:{height:"40px",padding:"0 14px",radius:"16px",prefixSize:"20px"}},Dt={normal:{background:{static:t.alpha(t.COLORS.black,2),disabled:t.alpha(t.COLORS.black,10)},border:{static:t.alpha(t.COLORS.black,60),disabled:t.alpha(t.COLORS.black,10)},color:{static:t.COLORS.black,disabled:t.alpha(t.COLORS.black,65)},placeholder:{static:t.alpha(t.COLORS.black,40),disabled:t.alpha(t.COLORS.black,65)},focus:t.alpha(t.COLORS["iron-grey"],30)},error:{background:{static:t.alpha(t.COLORS.red,2),disabled:t.alpha(t.COLORS.red,10)},border:{static:t.alpha(t.COLORS.red,60),disabled:t.alpha(t.COLORS.red,10)},color:{static:t.COLORS.red,disabled:t.alpha(t.COLORS.red,65)},placeholder:{static:t.alpha(t.COLORS.red,40),disabled:t.alpha(t.COLORS.red,65)},focus:t.alpha(t.COLORS.red,30)}},J=e=>Dt[e]??Dt.normal,Pe=e=>Tt[e]??Tt.default,oi=a.div`
590
601
  display: grid;
591
602
  flex-direction: column;
592
603
  gap: 2px;
593
604
  width: ${e=>e.$fullWidth?"100%":"fit-content"};
594
- `,oi=a(te)`
605
+ `,ii=a(te)`
595
606
  margin-left: 6px;
596
- `,ii=a(re)`
607
+ `,ai=a(re)`
597
608
  margin-left: 6px;
598
- `,ai=a.div`
609
+ `,ni=a.div`
599
610
  display: flex;
600
611
  align-items: stretch;
601
612
  border: 1px solid
602
613
  ${e=>J(e.$variant).border[e.$disabled?"disabled":"static"]};
603
614
  border-radius: ${e=>Pe(e.$size).radius};
604
615
  overflow: hidden;
605
- `,ni=a.span`
616
+ `,li=a.span`
606
617
  display: flex;
607
618
  align-items: center;
608
619
  flex-shrink: 0;
@@ -616,7 +627,7 @@
616
627
  background-color: ${e=>e.$variant==="error"?t.alpha(t.COLORS.red,8):t.alpha(t.COLORS.black,6)};
617
628
  border-right: 1px solid
618
629
  ${e=>J(e.$variant).border[e.$disabled?"disabled":"static"]};
619
- `,li=a.input`
630
+ `,di=a.input`
620
631
  flex: 1;
621
632
  min-width: 0;
622
633
  outline: none;
@@ -644,7 +655,7 @@
644
655
  color: ${e=>J(e.$variant).placeholder.disabled};
645
656
  }
646
657
  }
647
- `,Ee=I.newClassNameGetter("input"),rr=({className:e,classnames:r,disabled:i,fullWidth:n,label:l,ref:s,message:u,prefix:d,size:O="default",variant:p="normal",...f})=>{const b=d!=null,w=o.jsx(li,{...f,ref:s,disabled:i,$size:O,$variant:p,$hasPrefix:b,className:Ee("input",r==null?void 0:r.input)});return o.jsxs(ri,{className:Ee("container",e),$fullWidth:!!n,children:[o.jsx(oi,{variant:p,className:Ee("label",r==null?void 0:r.label),children:l}),b?o.jsxs(ai,{$size:O,$variant:p,$disabled:!!i,children:[o.jsx(ni,{$size:O,$variant:p,$disabled:!!i,className:Ee("prefix"),children:d}),w]}):w,u&&o.jsx(ii,{variant:p,children:u})]})},di=a.div`
658
+ `,Ae=I.newClassNameGetter("input"),rr=({className:e,classnames:r,disabled:i,fullWidth:n,label:l,ref:s,message:u,prefix:d,size:b="default",variant:p="normal",...f})=>{const O=d!=null,w=o.jsx(di,{...f,ref:s,disabled:i,$size:b,$variant:p,$hasPrefix:O,className:Ae("input",r==null?void 0:r.input)});return o.jsxs(oi,{className:Ae("container",e),$fullWidth:!!n,children:[o.jsx(ii,{variant:p,className:Ae("label",r==null?void 0:r.label),children:l}),O?o.jsxs(ni,{$size:b,$variant:p,$disabled:!!i,children:[o.jsx(li,{$size:b,$variant:p,$disabled:!!i,className:Ae("prefix"),children:d}),w]}):w,u&&o.jsx(ai,{variant:p,children:u})]})},ci=a.div`
648
659
  position: fixed;
649
660
  inset: 0;
650
661
  z-index: 1000;
@@ -653,7 +664,7 @@
653
664
  justify-content: center;
654
665
  background-color: ${t.alpha(t.COLORS.black,50)};
655
666
  animation: ${t.KEYFRAMES.fadeIn} ${e=>e.$animated?"0.15s":"0s"} ease-out forwards;
656
- `,ci=a.div`
667
+ `,si=a.div`
657
668
  position: relative;
658
669
  z-index: 1001;
659
670
  width: ${e=>e.$width};
@@ -664,13 +675,13 @@
664
675
  border-radius: 16px;
665
676
  box-shadow: 0 8px 32px ${t.alpha(t.COLORS.black,20)};
666
677
  animation: ${t.KEYFRAMES.scaleIn} ${e=>e.$animated?"0.15s":"0s"} ease-out forwards;
667
- `,It=I.newClassNameGetter("modal"),or=({animated:e,children:r,className:i,classnames:n,open:l,ref:s,width:u="500px",...d})=>l?Be.createPortal(o.jsx(di,{className:It("overlay",n==null?void 0:n.overlay),$animated:!!e,children:o.jsx(ci,{...d,ref:s,className:It("content",i,n==null?void 0:n.content),$animated:!!e,$width:u,children:r})}),document.body):null,ir={normal:{border:t.COLORS["iron-grey"],placeholder:t.COLORS["iron-grey"]},error:{border:t.COLORS.red,placeholder:t.alpha(t.COLORS.red,40)}},si=a.div`
678
+ `,It=I.newClassNameGetter("modal"),or=({animated:e,children:r,className:i,classnames:n,open:l,ref:s,width:u="500px",...d})=>l?He.createPortal(o.jsx(ci,{className:It("overlay",n==null?void 0:n.overlay),$animated:!!e,children:o.jsx(si,{...d,ref:s,className:It("content",i,n==null?void 0:n.content),$animated:!!e,$width:u,children:r})}),document.body):null,ir={normal:{border:t.COLORS["iron-grey"],placeholder:t.COLORS["iron-grey"]},error:{border:t.COLORS.red,placeholder:t.alpha(t.COLORS.red,40)}},pi=a.div`
668
679
  display: flex;
669
680
  flex-direction: column;
670
681
  gap: 4px;
671
- `,pi=a(te)`
682
+ `,hi=a(te)`
672
683
  margin-left: 6px;
673
- `,hi=a.div`
684
+ `,ui=a.div`
674
685
  display: flex;
675
686
  flex-wrap: wrap;
676
687
  align-items: center;
@@ -688,31 +699,31 @@
688
699
  &:hover {
689
700
  border-color: ${e=>e.$disabled?void 0:e.$variant==="error"?t.COLORS.red:t.COLORS.black};
690
701
  }
691
- `,ui=a.span`
702
+ `,bi=a.span`
692
703
  color: ${e=>ir[e.$variant].placeholder};
693
704
  font-size: 14px;
694
- `,bi=a.div`
705
+ `,Oi=a.div`
695
706
  display: flex;
696
707
  flex-direction: column;
697
708
  padding: 20px;
698
709
  gap: 16px;
699
- `,Oi=a.div`
710
+ `,gi=a.div`
700
711
  display: flex;
701
712
  align-items: center;
702
713
  justify-content: space-between;
703
- `,gi=a.h3`
714
+ `,fi=a.h3`
704
715
  margin: 0;
705
716
  font-size: 18px;
706
717
  font-weight: 600;
707
718
  color: ${t.COLORS.black};
708
- `,fi=a.div`
719
+ `,xi=a.div`
709
720
  display: flex;
710
721
  flex-direction: column;
711
722
  gap: 4px;
712
723
  min-height: 200px;
713
724
  max-height: 300px;
714
725
  overflow-y: auto;
715
- `,xi=a.label`
726
+ `,Si=a.label`
716
727
  display: flex;
717
728
  align-items: center;
718
729
  gap: 10px;
@@ -725,10 +736,10 @@
725
736
  &:hover {
726
737
  background-color: ${e=>e.$disabled?"transparent":t.COLORS.gray};
727
738
  }
728
- `,Si=a.span`
739
+ `,$i=a.span`
729
740
  font-size: 14px;
730
741
  color: ${t.COLORS.black};
731
- `,$i=a.div`
742
+ `,Ci=a.div`
732
743
  display: flex;
733
744
  align-items: center;
734
745
  justify-content: center;
@@ -736,18 +747,18 @@
736
747
  color: ${t.COLORS["iron-grey"]};
737
748
  font-size: 14px;
738
749
  text-align: center;
739
- `,Ci=a(re)`
750
+ `,ki=a(re)`
740
751
  margin-left: 6px;
741
- `,q=I.newClassNameGetter("multi-select"),ki=({className:e,classnames:r,disabled:i=!1,emptyMessage:n="No options found",label:l,maxVisible:s=1/0,message:u,modalTitle:d="Select options",onChange:O,options:p,placeholder:f="Select...",ref:b,searchPlaceholder:w="Search...",value:k,variant:L="normal",...C})=>{const[R,j]=h.useState(!1),[$,S]=h.useState(""),c=h.useRef(null),T=h.useMemo(()=>p.filter(m=>k.includes(m.value)),[p,k]),D=h.useMemo(()=>{if(!$.trim())return p;const m=$.toLowerCase().trim();return p.filter(g=>g.label.toLowerCase().includes(m))},[p,$]),z=s===1/0?T:T.slice(0,s),Y=T.length-z.length,F=()=>{i||(j(!0),S(""))},A=h.useCallback(()=>{j(!1),S("")},[]),M=m=>{k.includes(m)?O(k.filter(g=>g!==m)):O([...k,m])},G=m=>{O(k.filter(g=>g!==m))};return h.useEffect(()=>{if(!R)return;const m=g=>{c.current&&!c.current.contains(g.target)&&A()};return document.addEventListener("mousedown",m),()=>{document.removeEventListener("mousedown",m)}},[R,A]),o.jsxs(si,{...C,ref:b,className:q("container",e),children:[l&&o.jsx(pi,{variant:L,className:q("label",r==null?void 0:r.trigger),children:l}),o.jsx(hi,{$variant:L,$disabled:i,onClick:F,className:q("trigger",r==null?void 0:r.trigger),children:T.length===0?o.jsx(ui,{$variant:L,className:q("placeholder",r==null?void 0:r.placeholder),children:f}):o.jsxs(o.Fragment,{children:[z.map(m=>o.jsx(Ve,{variant:L==="error"?"red":"gray",deletable:!0,onDelete:()=>G(m.value),onClick:g=>g.stopPropagation(),className:q("chip",r==null?void 0:r.chip),children:m.label},m.value)),Y>0&&o.jsxs(Ve,{variant:L==="error"?"red":"gray",onClick:m=>m.stopPropagation(),className:q("chip",r==null?void 0:r.chip),children:["+",Y]})]})}),u&&o.jsx(Ci,{variant:L,className:q("message"),children:u}),o.jsx(or,{open:R,width:"400px",animated:!0,className:q("modal",r==null?void 0:r.modal),children:o.jsxs(bi,{ref:c,children:[o.jsxs(Oi,{children:[o.jsx(gi,{children:d}),o.jsx(Jt,{variant:"transparent",size:"compact",icon:o.jsx(o.X,{}),keyBindings:["Escape"],onClick:A})]}),o.jsx(rr,{type:"text",value:$,onChange:m=>S(m.target.value),placeholder:w,autoFocus:!0,fullWidth:!0,className:q("search",r==null?void 0:r.search)}),o.jsx(fi,{className:q("options",r==null?void 0:r.options),children:D.length===0?o.jsx($i,{className:q("empty",r==null?void 0:r.empty),children:n}):D.map(m=>o.jsxs(xi,{$disabled:!!m.disabled,className:q("option",r==null?void 0:r.option),children:[o.jsx(He,{checked:k.includes(m.value),disabled:m.disabled,onChange:()=>M(m.value)}),o.jsx(Si,{children:m.label})]},m.value))})]})})]})},_t={compact:{width:"36px",height:"40px",fontSize:"16px",radius:"10px",gap:"8px"},default:{width:"44px",height:"52px",fontSize:"20px",radius:"12px",gap:"10px"}},Et={normal:{background:{static:t.alpha(t.COLORS.black,2),disabled:t.alpha(t.COLORS.black,10)},border:{static:t.alpha(t.COLORS.black,60),disabled:t.alpha(t.COLORS.black,10)},color:{static:t.COLORS.black,disabled:t.alpha(t.COLORS.black,65)},focus:t.alpha(t.COLORS["iron-grey"],30)},error:{background:{static:t.alpha(t.COLORS.red,2),disabled:t.alpha(t.COLORS.red,10)},border:{static:t.alpha(t.COLORS.red,60),disabled:t.alpha(t.COLORS.red,10)},color:{static:t.COLORS.red,disabled:t.alpha(t.COLORS.red,65)},focus:t.alpha(t.COLORS.red,30)}},je=e=>_t[e]??_t.default,be=e=>Et[e]??Et.normal,yi=a.div`
752
+ `,q=I.newClassNameGetter("multi-select"),yi=({className:e,classnames:r,disabled:i=!1,emptyMessage:n="No options found",label:l,maxVisible:s=1/0,message:u,modalTitle:d="Select options",onChange:b,options:p,placeholder:f="Select...",ref:O,searchPlaceholder:w="Search...",value:k,variant:L="normal",...C})=>{const[R,j]=h.useState(!1),[$,S]=h.useState(""),c=h.useRef(null),T=h.useMemo(()=>p.filter(m=>k.includes(m.value)),[p,k]),D=h.useMemo(()=>{if(!$.trim())return p;const m=$.toLowerCase().trim();return p.filter(g=>g.label.toLowerCase().includes(m))},[p,$]),z=s===1/0?T:T.slice(0,s),Y=T.length-z.length,F=()=>{i||(j(!0),S(""))},A=h.useCallback(()=>{j(!1),S("")},[]),M=m=>{k.includes(m)?b(k.filter(g=>g!==m)):b([...k,m])},G=m=>{b(k.filter(g=>g!==m))};return h.useEffect(()=>{if(!R)return;const m=g=>{c.current&&!c.current.contains(g.target)&&A()};return document.addEventListener("mousedown",m),()=>{document.removeEventListener("mousedown",m)}},[R,A]),o.jsxs(pi,{...C,ref:O,className:q("container",e),children:[l&&o.jsx(hi,{variant:L,className:q("label",r==null?void 0:r.trigger),children:l}),o.jsx(ui,{$variant:L,$disabled:i,onClick:F,className:q("trigger",r==null?void 0:r.trigger),children:T.length===0?o.jsx(bi,{$variant:L,className:q("placeholder",r==null?void 0:r.placeholder),children:f}):o.jsxs(o.Fragment,{children:[z.map(m=>o.jsx(Be,{variant:L==="error"?"red":"gray",deletable:!0,onDelete:()=>G(m.value),onClick:g=>g.stopPropagation(),className:q("chip",r==null?void 0:r.chip),children:m.label},m.value)),Y>0&&o.jsxs(Be,{variant:L==="error"?"red":"gray",onClick:m=>m.stopPropagation(),className:q("chip",r==null?void 0:r.chip),children:["+",Y]})]})}),u&&o.jsx(ki,{variant:L,className:q("message"),children:u}),o.jsx(or,{open:R,width:"400px",animated:!0,className:q("modal",r==null?void 0:r.modal),children:o.jsxs(Oi,{ref:c,children:[o.jsxs(gi,{children:[o.jsx(fi,{children:d}),o.jsx(Jt,{variant:"transparent",size:"compact",icon:o.jsx(o.X,{}),keyBindings:["Escape"],onClick:A})]}),o.jsx(rr,{type:"text",value:$,onChange:m=>S(m.target.value),placeholder:w,autoFocus:!0,fullWidth:!0,className:q("search",r==null?void 0:r.search)}),o.jsx(xi,{className:q("options",r==null?void 0:r.options),children:D.length===0?o.jsx(Ci,{className:q("empty",r==null?void 0:r.empty),children:n}):D.map(m=>o.jsxs(Si,{$disabled:!!m.disabled,className:q("option",r==null?void 0:r.option),children:[o.jsx(We,{checked:k.includes(m.value),disabled:m.disabled,onChange:()=>M(m.value)}),o.jsx($i,{children:m.label})]},m.value))})]})})]})},_t={compact:{width:"36px",height:"40px",fontSize:"16px",radius:"10px",gap:"8px"},default:{width:"44px",height:"52px",fontSize:"20px",radius:"12px",gap:"10px"}},Et={normal:{background:{static:t.alpha(t.COLORS.black,2),disabled:t.alpha(t.COLORS.black,10)},border:{static:t.alpha(t.COLORS.black,60),disabled:t.alpha(t.COLORS.black,10)},color:{static:t.COLORS.black,disabled:t.alpha(t.COLORS.black,65)},focus:t.alpha(t.COLORS["iron-grey"],30)},error:{background:{static:t.alpha(t.COLORS.red,2),disabled:t.alpha(t.COLORS.red,10)},border:{static:t.alpha(t.COLORS.red,60),disabled:t.alpha(t.COLORS.red,10)},color:{static:t.COLORS.red,disabled:t.alpha(t.COLORS.red,65)},focus:t.alpha(t.COLORS.red,30)}},je=e=>_t[e]??_t.default,be=e=>Et[e]??Et.normal,Ri=a.div`
742
753
  display: inline-flex;
743
754
  flex-direction: column;
744
755
  gap: 2px;
745
- `,Ri=a(te)`
756
+ `,Li=a(te)`
746
757
  margin-left: 6px;
747
- `,Li=a.div`
758
+ `,vi=a.div`
748
759
  display: flex;
749
760
  gap: ${e=>je(e.$size).gap};
750
- `,vi=a.input`
761
+ `,wi=a.input`
751
762
  width: ${e=>je(e.$size).width};
752
763
  height: ${e=>je(e.$size).height};
753
764
  border-radius: ${e=>je(e.$size).radius};
@@ -772,21 +783,21 @@
772
783
  &::selection {
773
784
  background-color: transparent;
774
785
  }
775
- `,wi=a(re)`
786
+ `,mi=a(re)`
776
787
  margin-left: 6px;
777
- `,Ae=I.newClassNameGetter("otp-code"),mi=({autoFocus:e,className:r,classnames:i,disabled:n,label:l,length:s=6,message:u,onChange:d,ref:O,size:p="default",value:f="",variant:b="normal",...w})=>{const k=h.useRef([]);h.useEffect(()=>{e&&k.current[0]&&k.current[0].focus()},[e]);const L=h.useCallback($=>{const S=k.current[$];S&&(S.focus(),S.select())},[]),C=h.useCallback(($,S)=>{const T=S.target.value.replace(/\D/g,"").slice(-1);if(!T)return;const D=f.padEnd(s," ").split(""),z=D.findIndex(M=>M===" "||M===""),Y=z!==-1?z:$;D[Y]=T;const F=D.join("").replace(/ /g,"");d==null||d(F);const A=Y+1;A<s&&L(A)},[f,s,d,L]),R=h.useCallback(($,S)=>{if(S.key==="Backspace"){S.preventDefault();const c=f.split("");c[$]?(c[$]="",d==null||d(c.join(""))):$>0&&(c[$-1]="",d==null||d(c.join("")),L($-1))}else S.key==="ArrowLeft"&&$>0?(S.preventDefault(),L($-1)):S.key==="ArrowRight"&&$<s-1&&(S.preventDefault(),L($+1))},[f,s,d,L]),j=h.useCallback($=>{$.preventDefault();const S=$.clipboardData.getData("text").replace(/\D/g,"").slice(0,s);if(S){d==null||d(S);const c=Math.min(S.length,s-1);L(c)}},[s,d,L]);return o.jsxs(yi,{ref:O,className:Ae("container",r),...w,children:[l&&o.jsx(Ri,{variant:b,className:Ae("label",i==null?void 0:i.label),children:l}),o.jsx(Li,{$size:p,children:Array.from({length:s}).map(($,S)=>o.jsx(vi,{ref:c=>{k.current[S]=c},type:"text",inputMode:"numeric",autoComplete:"one-time-code",maxLength:2,disabled:n,value:f[S]??"",onChange:c=>C(S,c),onKeyDown:c=>R(S,c),onPaste:j,onFocus:c=>c.target.select(),$size:p,$variant:b,className:Ae("input",i==null?void 0:i.input)},S))}),u&&o.jsx(wi,{variant:b,className:Ae("message"),children:u})]})},At={normal:{box:{border:t.alpha(t.COLORS["iron-grey"],30),borderChecked:t.COLORS["iron-grey"],background:t.COLORS.white,backgroundChecked:t.COLORS.white,focusShadow:t.alpha(t.COLORS["iron-grey"],30)},dot:t.COLORS.black,label:t.COLORS.black},error:{box:{border:t.COLORS.red,borderChecked:t.COLORS.red,background:t.COLORS.white,backgroundChecked:t.COLORS.white,focusShadow:t.alpha(t.COLORS.red,30)},dot:t.COLORS.red,label:t.COLORS.red}},fe=e=>At[e]??At.normal,ji=a.label`
788
+ `,Me=I.newClassNameGetter("otp-code"),ji=({autoFocus:e,className:r,classnames:i,disabled:n,label:l,length:s=6,message:u,onChange:d,ref:b,size:p="default",value:f="",variant:O="normal",...w})=>{const k=h.useRef([]);h.useEffect(()=>{e&&k.current[0]&&k.current[0].focus()},[e]);const L=h.useCallback($=>{const S=k.current[$];S&&(S.focus(),S.select())},[]),C=h.useCallback(($,S)=>{const T=S.target.value.replace(/\D/g,"").slice(-1);if(!T)return;const D=f.padEnd(s," ").split(""),z=D.findIndex(M=>M===" "||M===""),Y=z!==-1?z:$;D[Y]=T;const F=D.join("").replace(/ /g,"");d==null||d(F);const A=Y+1;A<s&&L(A)},[f,s,d,L]),R=h.useCallback(($,S)=>{if(S.key==="Backspace"){S.preventDefault();const c=f.split("");c[$]?(c[$]="",d==null||d(c.join(""))):$>0&&(c[$-1]="",d==null||d(c.join("")),L($-1))}else S.key==="ArrowLeft"&&$>0?(S.preventDefault(),L($-1)):S.key==="ArrowRight"&&$<s-1&&(S.preventDefault(),L($+1))},[f,s,d,L]),j=h.useCallback($=>{$.preventDefault();const S=$.clipboardData.getData("text").replace(/\D/g,"").slice(0,s);if(S){d==null||d(S);const c=Math.min(S.length,s-1);L(c)}},[s,d,L]);return o.jsxs(Ri,{ref:b,className:Me("container",r),...w,children:[l&&o.jsx(Li,{variant:O,className:Me("label",i==null?void 0:i.label),children:l}),o.jsx(vi,{$size:p,children:Array.from({length:s}).map(($,S)=>o.jsx(wi,{ref:c=>{k.current[S]=c},type:"text",inputMode:"numeric",autoComplete:"one-time-code",maxLength:2,disabled:n,value:f[S]??"",onChange:c=>C(S,c),onKeyDown:c=>R(S,c),onPaste:j,onFocus:c=>c.target.select(),$size:p,$variant:O,className:Me("input",i==null?void 0:i.input)},S))}),u&&o.jsx(mi,{variant:O,className:Me("message"),children:u})]})},At={normal:{box:{border:t.alpha(t.COLORS["iron-grey"],30),borderChecked:t.COLORS["iron-grey"],background:t.COLORS.white,backgroundChecked:t.COLORS.white,focusShadow:t.alpha(t.COLORS["iron-grey"],30)},dot:t.COLORS.black,label:t.COLORS.black},error:{box:{border:t.COLORS.red,borderChecked:t.COLORS.red,background:t.COLORS.white,backgroundChecked:t.COLORS.white,focusShadow:t.alpha(t.COLORS.red,30)},dot:t.COLORS.red,label:t.COLORS.red}},fe=e=>At[e]??At.normal,Pi=a.label`
778
789
  display: inline-flex;
779
790
  align-items: flex-start;
780
791
  gap: 8px;
781
792
  cursor: ${e=>e.$disabled?"not-allowed":"pointer"};
782
793
  opacity: ${e=>e.$disabled?.5:1};
783
- `,Pi=a.input`
794
+ `,Ni=a.input`
784
795
  position: absolute;
785
796
  opacity: 0;
786
797
  width: 0;
787
798
  height: 0;
788
799
  pointer-events: none;
789
- `,Ni=a.span`
800
+ `,zi=a.span`
790
801
  display: inline-flex;
791
802
  align-items: center;
792
803
  justify-content: center;
@@ -801,7 +812,7 @@
801
812
  border-color 0.15s ease,
802
813
  background-color 0.15s ease,
803
814
  box-shadow 0.15s ease;
804
- `,zi=a.span`
815
+ `,Ti=a.span`
805
816
  width: 8px;
806
817
  height: 8px;
807
818
  border-radius: 50%;
@@ -811,7 +822,7 @@
811
822
  transition:
812
823
  opacity 0.15s ease,
813
824
  transform 0.15s ease;
814
- `,Ti=a.span`
825
+ `,Di=a.span`
815
826
  font-size: 14px;
816
827
  font-weight: 500;
817
828
  line-height: 1.5;
@@ -827,7 +838,7 @@
827
838
  text-decoration: none;
828
839
  }
829
840
  }
830
- `,Le=I.newClassNameGetter("radio"),st=({checked:e,className:r,classnames:i,disabled:n,label:l,onChange:s,ref:u,variant:d="normal",...O})=>o.jsxs(ji,{className:Le("container",r),$disabled:!!n,$variant:d,children:[o.jsx(Pi,{...O,ref:u,type:"radio",className:Le("input",i==null?void 0:i.input),checked:e,disabled:n,onChange:s}),o.jsx(Ni,{className:Le("box",i==null?void 0:i.box),$checked:e,$variant:d,children:o.jsx(zi,{className:Le("dot",i==null?void 0:i.dot),$visible:e,$variant:d})}),l&&o.jsx(Ti,{className:Le("label",i==null?void 0:i.label),$variant:d,children:l})]}),Mt={normal:{border:{static:t.alpha(t.COLORS.black,20),hover:t.alpha(t.COLORS.black,40),active:t.alpha(t.COLORS.black,40),disabled:t.alpha(t.COLORS.black,10)},borderChecked:t.COLORS.black,background:{static:t.COLORS.white,hover:t.COLORS.white,active:t.COLORS.white,disabled:t.alpha(t.COLORS.black,5)},backgroundChecked:t.alpha(t.COLORS.black,5),focusRing:t.alpha(t.COLORS.black,20),label:{static:t.COLORS.black,hover:t.COLORS.black,active:t.COLORS.black,disabled:t.alpha(t.COLORS.black,40)},description:{static:t.alpha(t.COLORS.black,60),hover:t.alpha(t.COLORS.black,60),active:t.alpha(t.COLORS.black,60),disabled:t.alpha(t.COLORS.black,30)}},error:{border:{static:t.COLORS.red,hover:t.COLORS.red,active:t.COLORS.red,disabled:t.alpha(t.COLORS.red,30)},borderChecked:t.COLORS.red,background:{static:t.COLORS.white,hover:t.COLORS.white,active:t.COLORS.white,disabled:t.alpha(t.COLORS.red,5)},backgroundChecked:t.alpha(t.COLORS.red,5),focusRing:t.alpha(t.COLORS.red,20),label:{static:t.COLORS.red,hover:t.COLORS.red,active:t.COLORS.red,disabled:t.alpha(t.COLORS.red,40)},description:{static:t.alpha(t.COLORS.red,70),hover:t.alpha(t.COLORS.red,70),active:t.alpha(t.COLORS.red,70),disabled:t.alpha(t.COLORS.red,40)}}},ce=e=>Mt[e]??Mt.normal,Di=a.label`
841
+ `,Le=I.newClassNameGetter("radio"),st=({checked:e,className:r,classnames:i,disabled:n,label:l,onChange:s,ref:u,variant:d="normal",...b})=>o.jsxs(Pi,{className:Le("container",r),$disabled:!!n,$variant:d,children:[o.jsx(Ni,{...b,ref:u,type:"radio",className:Le("input",i==null?void 0:i.input),checked:e,disabled:n,onChange:s}),o.jsx(zi,{className:Le("box",i==null?void 0:i.box),$checked:e,$variant:d,children:o.jsx(Ti,{className:Le("dot",i==null?void 0:i.dot),$visible:e,$variant:d})}),l&&o.jsx(Di,{className:Le("label",i==null?void 0:i.label),$variant:d,children:l})]}),Mt={normal:{border:{static:t.alpha(t.COLORS.black,20),hover:t.alpha(t.COLORS.black,40),active:t.alpha(t.COLORS.black,40),disabled:t.alpha(t.COLORS.black,10)},borderChecked:t.COLORS.black,background:{static:t.COLORS.white,hover:t.COLORS.white,active:t.COLORS.white,disabled:t.alpha(t.COLORS.black,5)},backgroundChecked:t.alpha(t.COLORS.black,5),focusRing:t.alpha(t.COLORS.black,20),label:{static:t.COLORS.black,hover:t.COLORS.black,active:t.COLORS.black,disabled:t.alpha(t.COLORS.black,40)},description:{static:t.alpha(t.COLORS.black,60),hover:t.alpha(t.COLORS.black,60),active:t.alpha(t.COLORS.black,60),disabled:t.alpha(t.COLORS.black,30)}},error:{border:{static:t.COLORS.red,hover:t.COLORS.red,active:t.COLORS.red,disabled:t.alpha(t.COLORS.red,30)},borderChecked:t.COLORS.red,background:{static:t.COLORS.white,hover:t.COLORS.white,active:t.COLORS.white,disabled:t.alpha(t.COLORS.red,5)},backgroundChecked:t.alpha(t.COLORS.red,5),focusRing:t.alpha(t.COLORS.red,20),label:{static:t.COLORS.red,hover:t.COLORS.red,active:t.COLORS.red,disabled:t.alpha(t.COLORS.red,40)},description:{static:t.alpha(t.COLORS.red,70),hover:t.alpha(t.COLORS.red,70),active:t.alpha(t.COLORS.red,70),disabled:t.alpha(t.COLORS.red,40)}}},ce=e=>Mt[e]??Mt.normal,Ii=a.label`
831
842
  display: grid;
832
843
  grid-template-columns: auto 1fr;
833
844
  align-items: start;
@@ -851,7 +862,7 @@
851
862
  .vacano_radio_container {
852
863
  pointer-events: none;
853
864
  }
854
- `,Ii=a.input`
865
+ `,_i=a.input`
855
866
  position: absolute;
856
867
  width: 1px;
857
868
  height: 1px;
@@ -861,12 +872,12 @@
861
872
  clip: rect(0, 0, 0, 0);
862
873
  white-space: nowrap;
863
874
  border: 0;
864
- `,_i=a.div`
875
+ `,Ei=a.div`
865
876
  display: flex;
866
877
  flex-direction: column;
867
878
  gap: 2px;
868
879
  min-width: 0;
869
- `,Ei=a.span`
880
+ `,Ai=a.span`
870
881
  font-size: 14px;
871
882
  font-weight: 500;
872
883
  line-height: 1.4;
@@ -875,7 +886,7 @@
875
886
  label[data-disabled='true'] & {
876
887
  color: ${e=>ce(e.$variant).label.disabled};
877
888
  }
878
- `,Ai=a.span`
889
+ `,Mi=a.span`
879
890
  font-size: 12px;
880
891
  font-weight: 400;
881
892
  line-height: 1.4;
@@ -884,31 +895,31 @@
884
895
  label[data-disabled='true'] & {
885
896
  color: ${e=>ce(e.$variant).description.disabled};
886
897
  }
887
- `,Me=I.newClassNameGetter("radio-card"),Mi=({checked:e,className:r,classnames:i,description:n,disabled:l,fullWidth:s=!1,label:u,onChange:d,ref:O,variant:p="normal",...f})=>o.jsxs(Di,{className:Me("container",r),$checked:e,$disabled:!!l,$fullWidth:s,$variant:p,"data-disabled":l,children:[o.jsx(Ii,{...f,ref:O,type:"radio",checked:e,disabled:l,onChange:d}),o.jsx(st,{className:i==null?void 0:i.radio,checked:e,disabled:l,variant:p,onChange:()=>{},tabIndex:-1,"aria-hidden":!0}),o.jsxs(_i,{className:Me("content",i==null?void 0:i.content),children:[o.jsx(Ei,{className:Me("label",i==null?void 0:i.label),$variant:p,children:u}),n&&o.jsx(Ai,{className:Me("description",i==null?void 0:i.description),$variant:p,children:n})]})]}),Ft={label:{color:t.COLORS.black,disabledColor:t.alpha(t.COLORS.black,40)}},Fi=a.div`
898
+ `,Fe=I.newClassNameGetter("radio-card"),Fi=({checked:e,className:r,classnames:i,description:n,disabled:l,fullWidth:s=!1,label:u,onChange:d,ref:b,variant:p="normal",...f})=>o.jsxs(Ii,{className:Fe("container",r),$checked:e,$disabled:!!l,$fullWidth:s,$variant:p,"data-disabled":l,children:[o.jsx(_i,{...f,ref:b,type:"radio",checked:e,disabled:l,onChange:d}),o.jsx(st,{className:i==null?void 0:i.radio,checked:e,disabled:l,variant:p,onChange:()=>{},tabIndex:-1,"aria-hidden":!0}),o.jsxs(Ei,{className:Fe("content",i==null?void 0:i.content),children:[o.jsx(Ai,{className:Fe("label",i==null?void 0:i.label),$variant:p,children:u}),n&&o.jsx(Mi,{className:Fe("description",i==null?void 0:i.description),$variant:p,children:n})]})]}),Ft={label:{color:t.COLORS.black,disabledColor:t.alpha(t.COLORS.black,40)}},Yi=a.div`
888
899
  display: flex;
889
900
  flex-direction: column;
890
901
  gap: 8px;
891
- `,Yi=a.span`
902
+ `,Gi=a.span`
892
903
  font-size: 13px;
893
904
  font-weight: 500;
894
905
  line-height: 1.5;
895
906
  color: ${e=>e.$disabled?Ft.label.disabledColor:Ft.label.color};
896
907
  margin-bottom: 4px;
897
- `,Gi=a.div`
908
+ `,Vi=a.div`
898
909
  display: flex;
899
910
  flex-direction: column;
900
911
  gap: 12px;
901
- `,tt=I.newClassNameGetter("radio-group"),Vi=({className:e,classnames:r,disabled:i,label:n,name:l,onChange:s,options:u,ref:d,value:O,variant:p="normal",...f})=>o.jsxs(Fi,{...f,ref:d,className:tt("container",e),children:[n&&o.jsx(Yi,{className:tt("label",r==null?void 0:r.label),$disabled:i,children:n}),o.jsx(Gi,{className:tt("options",r==null?void 0:r.options),children:u.map(b=>o.jsx(st,{className:r==null?void 0:r.radio,name:l,checked:O===b.value,label:b.label,disabled:i,variant:p,onChange:()=>s(b.value)},b.value))})]}),rt=40,ot=2,ve=4,Yt={compact:{height:"32px",padding:"0 10px",radius:"14px"},default:{height:"40px",padding:"0 14px",radius:"16px"}},Gt={normal:{background:{static:t.alpha(t.COLORS.black,2),disabled:t.alpha(t.COLORS.black,10)},border:{static:t.alpha(t.COLORS.black,60),disabled:t.alpha(t.COLORS.black,10)},color:{static:t.COLORS.black,disabled:t.alpha(t.COLORS.black,65)},placeholder:t.alpha(t.COLORS.black,40),focus:t.alpha(t.COLORS["iron-grey"],30)},error:{background:{static:t.alpha(t.COLORS.red,2),disabled:t.alpha(t.COLORS.red,10)},border:{static:t.alpha(t.COLORS.red,60),disabled:t.alpha(t.COLORS.red,10)},color:{static:t.COLORS.red,disabled:t.alpha(t.COLORS.red,65)},placeholder:t.alpha(t.COLORS.red,40),focus:t.alpha(t.COLORS.red,30)}},it=e=>Yt[e]??Yt.default,ne=e=>Gt[e]??Gt.normal,Bi=a.div`
912
+ `,tt=I.newClassNameGetter("radio-group"),Bi=({className:e,classnames:r,disabled:i,label:n,name:l,onChange:s,options:u,ref:d,value:b,variant:p="normal",...f})=>o.jsxs(Yi,{...f,ref:d,className:tt("container",e),children:[n&&o.jsx(Gi,{className:tt("label",r==null?void 0:r.label),$disabled:i,children:n}),o.jsx(Vi,{className:tt("options",r==null?void 0:r.options),children:u.map(O=>o.jsx(st,{className:r==null?void 0:r.radio,name:l,checked:b===O.value,label:O.label,disabled:i,variant:p,onChange:()=>s(O.value)},O.value))})]}),rt=40,ot=2,ve=4,Yt={compact:{height:"32px",padding:"0 10px",radius:"14px"},default:{height:"40px",padding:"0 14px",radius:"16px"}},Gt={normal:{background:{static:t.alpha(t.COLORS.black,2),disabled:t.alpha(t.COLORS.black,10)},border:{static:t.alpha(t.COLORS.black,60),disabled:t.alpha(t.COLORS.black,10)},color:{static:t.COLORS.black,disabled:t.alpha(t.COLORS.black,65)},placeholder:t.alpha(t.COLORS.black,40),focus:t.alpha(t.COLORS["iron-grey"],30)},error:{background:{static:t.alpha(t.COLORS.red,2),disabled:t.alpha(t.COLORS.red,10)},border:{static:t.alpha(t.COLORS.red,60),disabled:t.alpha(t.COLORS.red,10)},color:{static:t.COLORS.red,disabled:t.alpha(t.COLORS.red,65)},placeholder:t.alpha(t.COLORS.red,40),focus:t.alpha(t.COLORS.red,30)}},it=e=>Yt[e]??Yt.default,ne=e=>Gt[e]??Gt.normal,Hi=a.div`
902
913
  position: relative;
903
914
  display: grid;
904
915
  gap: 2px;
905
916
  min-width: 180px;
906
917
  width: ${e=>e.$fullWidth?"100%":"fit-content"};
907
- `,Hi=a(te)`
918
+ `,Wi=a(te)`
908
919
  margin-left: 6px;
909
- `,Wi=a(re)`
920
+ `,Ki=a(re)`
910
921
  margin-left: 6px;
911
- `,Ki=a.button`
922
+ `,Ui=a.button`
912
923
  display: flex;
913
924
  align-items: center;
914
925
  justify-content: space-between;
@@ -927,13 +938,13 @@
927
938
  border: 1px solid
928
939
  ${e=>e.$disabled?ne(e.$variant).border.disabled:ne(e.$variant).border.static};
929
940
  background-color: ${e=>e.$disabled?ne(e.$variant).background.disabled:ne(e.$variant).background.static};
930
- `,Ui=a.span`
941
+ `,qi=a.span`
931
942
  flex: 1;
932
943
  min-width: 0;
933
944
  overflow: hidden;
934
945
  text-overflow: ellipsis;
935
946
  white-space: nowrap;
936
- `,qi=a.span`
947
+ `,Xi=a.span`
937
948
  display: flex;
938
949
  align-items: center;
939
950
  justify-content: center;
@@ -949,17 +960,17 @@
949
960
  border-radius: 16px;
950
961
  box-shadow: 0 4px 20px ${t.alpha(t.COLORS.black,15)};
951
962
  z-index: 1000;
952
- `,Xi=a.div`
963
+ `,Zi=a.div`
953
964
  position: absolute;
954
965
  left: -4px;
955
966
  width: calc(100% + 8px);
956
967
  overflow: hidden;
957
968
  ${ar}
958
- `,Zi=a.div`
969
+ `,Ji=a.div`
959
970
  position: fixed;
960
971
  overflow: hidden;
961
972
  ${ar}
962
- `,Ji=a.button`
973
+ `,Qi=a.button`
963
974
  display: flex;
964
975
  align-items: center;
965
976
  justify-content: space-between;
@@ -988,20 +999,20 @@
988
999
  white-space: nowrap;
989
1000
  min-width: 0;
990
1001
  }
991
- `,Qi=a.span`
1002
+ `,ea=a.span`
992
1003
  display: flex;
993
1004
  align-items: center;
994
1005
  justify-content: center;
995
1006
  flex-shrink: 0;
996
1007
  color: ${t.COLORS.black};
997
- `,Oe=I.newClassNameGetter("select"),ea=({className:e,classnames:r,disabled:i=!1,fullWidth:n=!1,label:l,message:s,onChange:u,options:d,placeholder:O="Select...",portalRenderNode:p,ref:f,size:b="default",value:w,variant:k="normal",...L})=>{const[C,R]=h.useState(!1),[j,$]=h.useState({top:0,left:0,width:0}),S=h.useRef(null),c=h.useRef(null),T=h.useRef(null),D=d.find(g=>g.value===w),z=Math.max(0,d.findIndex(g=>g.value===w)),Y=-(z*(rt+ot)+ve),F=()=>{if(!c.current||!p)return;const g=c.current.getBoundingClientRect(),_=z*(rt+ot)+ve;let v=g.top-_;const P=d.length*rt+(d.length-1)*ot+ve*2,V=8,Z=window.innerHeight-P-8;v<V&&(v=V),v>Z&&(v=Z),$({top:v,left:g.left-ve,width:g.width+ve*2})},A=g=>{var _;u==null||u(g),R(!1),(_=c.current)==null||_.focus()},M=g=>{i||d.length===0||(g.key==="Enter"||g.key===" "?(g.preventDefault(),R(_=>!_)):g.key==="Escape"&&C?(g.preventDefault(),R(!1)):g.key==="ArrowDown"&&!C&&(g.preventDefault(),R(!0)))};h.useLayoutEffect(()=>{C&&p&&F()},[C,p,z,d.length]),h.useEffect(()=>{if(!C)return;const g=P=>{const V=P.target,Z=S.current&&!S.current.contains(V),ae=T.current&&!T.current.contains(V);p?Z&&ae&&R(!1):Z&&R(!1)},_=()=>{p&&F()},v=()=>{p&&F()};return document.addEventListener("mousedown",g),p&&(window.addEventListener("scroll",_,!0),window.addEventListener("resize",v)),()=>{document.removeEventListener("mousedown",g),window.removeEventListener("scroll",_,!0),window.removeEventListener("resize",v)}},[C,p]);const G=()=>d.map(g=>o.jsxs(Ji,{type:"button",role:"option",$selected:g.value===w,$disabled:g.disabled??!1,disabled:g.disabled,"aria-selected":g.value===w,onClick:()=>A(g.value),className:Oe("option",r==null?void 0:r.option),children:[o.jsx("span",{children:g.label}),g.value===w&&o.jsx(Qi,{children:o.jsx(o.Check,{size:16})})]},g.value)),m=p?Be.createPortal(o.jsx(Zi,{ref:T,role:"listbox",style:{top:j.top,left:j.left,width:j.width},className:Oe("dropdown",r==null?void 0:r.dropdown),children:G()}),p):o.jsx(Xi,{ref:T,role:"listbox",style:{top:Y},className:Oe("dropdown",r==null?void 0:r.dropdown),children:G()});return o.jsxs(Bi,{...L,ref:g=>{S.current=g,typeof f=="function"?f(g):f&&(f.current=g)},$fullWidth:n,className:Oe("container",e),children:[l&&o.jsx(Hi,{variant:k==="error"?"error":"normal",className:Oe("label",r==null?void 0:r.label),children:l}),o.jsxs(Ki,{ref:c,type:"button",$size:b,$variant:k,$disabled:i,$hasValue:!!D,disabled:i,onClick:()=>!i&&d.length>0&&R(g=>!g),onKeyDown:M,"aria-haspopup":"listbox","aria-expanded":C,className:Oe("trigger",r==null?void 0:r.trigger),children:[o.jsx(Ui,{children:(D==null?void 0:D.label)??O}),o.jsx(qi,{$open:C,children:o.jsx(o.ChevronDown,{size:16})})]}),C&&m,s&&o.jsx(Wi,{variant:k,children:s})]})},ct={normal:{border:t.COLORS["iron-grey"],placeholder:t.COLORS["iron-grey"]},error:{border:t.COLORS.red,placeholder:t.alpha(t.COLORS.red,40)}},ta=a.div`
1008
+ `,Oe=I.newClassNameGetter("select"),ta=({className:e,classnames:r,disabled:i=!1,fullWidth:n=!1,label:l,message:s,onChange:u,options:d,placeholder:b="Select...",portalRenderNode:p,ref:f,size:O="default",value:w,variant:k="normal",...L})=>{const[C,R]=h.useState(!1),[j,$]=h.useState({top:0,left:0,width:0}),S=h.useRef(null),c=h.useRef(null),T=h.useRef(null),D=d.find(g=>g.value===w),z=Math.max(0,d.findIndex(g=>g.value===w)),Y=-(z*(rt+ot)+ve),F=()=>{if(!c.current||!p)return;const g=c.current.getBoundingClientRect(),_=z*(rt+ot)+ve;let v=g.top-_;const P=d.length*rt+(d.length-1)*ot+ve*2,V=8,Z=window.innerHeight-P-8;v<V&&(v=V),v>Z&&(v=Z),$({top:v,left:g.left-ve,width:g.width+ve*2})},A=g=>{var _;u==null||u(g),R(!1),(_=c.current)==null||_.focus()},M=g=>{i||d.length===0||(g.key==="Enter"||g.key===" "?(g.preventDefault(),R(_=>!_)):g.key==="Escape"&&C?(g.preventDefault(),R(!1)):g.key==="ArrowDown"&&!C&&(g.preventDefault(),R(!0)))};h.useLayoutEffect(()=>{C&&p&&F()},[C,p,z,d.length]),h.useEffect(()=>{if(!C)return;const g=P=>{const V=P.target,Z=S.current&&!S.current.contains(V),ae=T.current&&!T.current.contains(V);p?Z&&ae&&R(!1):Z&&R(!1)},_=()=>{p&&F()},v=()=>{p&&F()};return document.addEventListener("mousedown",g),p&&(window.addEventListener("scroll",_,!0),window.addEventListener("resize",v)),()=>{document.removeEventListener("mousedown",g),window.removeEventListener("scroll",_,!0),window.removeEventListener("resize",v)}},[C,p]);const G=()=>d.map(g=>o.jsxs(Qi,{type:"button",role:"option",$selected:g.value===w,$disabled:g.disabled??!1,disabled:g.disabled,"aria-selected":g.value===w,onClick:()=>A(g.value),className:Oe("option",r==null?void 0:r.option),children:[o.jsx("span",{children:g.label}),g.value===w&&o.jsx(ea,{children:o.jsx(o.Check,{size:16})})]},g.value)),m=p?He.createPortal(o.jsx(Ji,{ref:T,role:"listbox",style:{top:j.top,left:j.left,width:j.width},className:Oe("dropdown",r==null?void 0:r.dropdown),children:G()}),p):o.jsx(Zi,{ref:T,role:"listbox",style:{top:Y},className:Oe("dropdown",r==null?void 0:r.dropdown),children:G()});return o.jsxs(Hi,{...L,ref:g=>{S.current=g,typeof f=="function"?f(g):f&&(f.current=g)},$fullWidth:n,className:Oe("container",e),children:[l&&o.jsx(Wi,{variant:k==="error"?"error":"normal",className:Oe("label",r==null?void 0:r.label),children:l}),o.jsxs(Ui,{ref:c,type:"button",$size:O,$variant:k,$disabled:i,$hasValue:!!D,disabled:i,onClick:()=>!i&&d.length>0&&R(g=>!g),onKeyDown:M,"aria-haspopup":"listbox","aria-expanded":C,className:Oe("trigger",r==null?void 0:r.trigger),children:[o.jsx(qi,{children:(D==null?void 0:D.label)??b}),o.jsx(Xi,{$open:C,children:o.jsx(o.ChevronDown,{size:16})})]}),C&&m,s&&o.jsx(Ki,{variant:k,children:s})]})},ct={normal:{border:t.COLORS["iron-grey"],placeholder:t.COLORS["iron-grey"]},error:{border:t.COLORS.red,placeholder:t.alpha(t.COLORS.red,40)}},ra=a.div`
998
1009
  position: relative;
999
1010
  display: flex;
1000
1011
  flex-direction: column;
1001
1012
  gap: 4px;
1002
- `,ra=a(te)`
1013
+ `,oa=a(te)`
1003
1014
  margin-left: 6px;
1004
- `,oa=a.div`
1015
+ `,ia=a.div`
1005
1016
  display: flex;
1006
1017
  flex-wrap: wrap;
1007
1018
  align-items: center;
@@ -1023,7 +1034,7 @@
1023
1034
  outline: 2px solid ${e.$variant==="error"?t.COLORS.red:t.COLORS["steel-blue"]};
1024
1035
  outline-offset: 2px;
1025
1036
  `}
1026
- `,ia=a.input`
1037
+ `,aa=a.input`
1027
1038
  flex: 1;
1028
1039
  min-width: 80px;
1029
1040
  border: none;
@@ -1052,7 +1063,7 @@
1052
1063
  opacity 0.15s ease,
1053
1064
  transform 0.15s ease,
1054
1065
  visibility 0.15s;
1055
- `,aa=a.div`
1066
+ `,na=a.div`
1056
1067
  position: absolute;
1057
1068
  left: 0;
1058
1069
  right: 0;
@@ -1062,7 +1073,7 @@
1062
1073
  visibility: ${e=>e.$open?"visible":"hidden"};
1063
1074
  transform: ${e=>lr(e.$open,e.$position)};
1064
1075
  transition: ${dr};
1065
- `,na=a.div`
1076
+ `,la=a.div`
1066
1077
  position: fixed;
1067
1078
  ${nr}
1068
1079
  opacity: ${e=>e.$open?1:0};
@@ -1105,16 +1116,16 @@
1105
1116
  color: ${t.COLORS["iron-grey"]};
1106
1117
  font-size: 14px;
1107
1118
  text-align: center;
1108
- `,la=a(re)`
1119
+ `,da=a(re)`
1109
1120
  margin-left: 6px;
1110
- `,X=I.newClassNameGetter("tags"),Fe=4,da=({className:e,classnames:r,createKey:i="Tab",disabled:n=!1,emptyMessage:l="No options",freeSolo:s=!0,label:u,message:d,onChange:O,options:p=[],placeholder:f="Add tag...",portalRenderNode:b,ref:w,value:k,variant:L="normal",...C})=>{const R=h.useRef(null),j=h.useRef(null),$=h.useRef(null),S=h.useRef(null),[c,T]=h.useState(""),[D,z]=h.useState(!1),[Y,F]=h.useState("bottom"),[A,M]=h.useState({top:0,left:0,width:0}),G=h.useMemo(()=>{const y=p.filter(B=>!k.includes(B.value));if(!c.trim())return y;const N=c.toLowerCase().trim();return y.filter(B=>B.label.toLowerCase().includes(N))},[p,k,c]),m=D&&p.length>0,g=h.useCallback(()=>{var Ne;if(!j.current)return;const y=j.current.getBoundingClientRect(),N=((Ne=$.current)==null?void 0:Ne.offsetHeight)??200,B=window.innerHeight-y.bottom-Fe,H=y.top-Fe,pe=B<N&&H>B?"top":"bottom";if(F(pe),b){const Ke=pe==="bottom"?y.bottom+Fe:y.top-N-Fe;M({top:Ke,left:y.left,width:y.width})}},[b]);h.useEffect(()=>{if(D)return g(),window.addEventListener("scroll",g,!0),window.addEventListener("resize",g),()=>{window.removeEventListener("scroll",g,!0),window.removeEventListener("resize",g)}},[D,g]);const _=h.useCallback(y=>{const N=y.trim();return!N||k.includes(N)?!1:(O([...k,N]),T(""),!0)},[k,O]),v=y=>{if(y.key===i&&c.trim())if(y.preventDefault(),s)_(c);else{const N=G.find(B=>B.label.toLowerCase()===c.toLowerCase().trim());N&&_(N.value)}else y.key==="Backspace"&&!c&&k.length>0&&O(k.slice(0,-1))},P=y=>{var N;_(y),(N=S.current)==null||N.focus()},V=y=>{O(k.filter(N=>N!==y))},Z=()=>{var y;n||(y=S.current)==null||y.focus()},ae=y=>{const N=p.find(B=>B.value===y);return(N==null?void 0:N.label)??y};return o.jsxs(ta,{...C,ref:w,className:X("container",e),children:[u&&o.jsx(ra,{variant:L,className:X("label"),children:u}),o.jsxs("div",{ref:R,style:{position:"relative"},children:[o.jsxs(oa,{ref:j,$variant:L,$disabled:n,$focused:D,onClick:Z,className:X("trigger",r==null?void 0:r.trigger),children:[k.map(y=>o.jsx(Ve,{variant:L==="error"?"red":"gray",deletable:!n,onDelete:()=>V(y),className:X("chip",r==null?void 0:r.chip),children:ae(y)},y)),o.jsx(ia,{ref:S,type:"text",value:c,onChange:y=>T(y.target.value),onFocus:()=>z(!0),onBlur:()=>setTimeout(()=>z(!1),150),onKeyDown:v,placeholder:k.length===0?f:"",disabled:n,$disabled:n,$variant:L,className:X("input",r==null?void 0:r.input)})]}),p.length>0&&(b?Be.createPortal(o.jsx(na,{ref:$,$open:m,$position:Y,style:{top:A.top,left:A.left,width:A.width},className:X("dropdown",r==null?void 0:r.dropdown),children:G.length===0?o.jsx(Bt,{className:X("empty",r==null?void 0:r.empty),children:l}):G.map(y=>o.jsx(Vt,{type:"button",onMouseDown:N=>N.preventDefault(),onClick:()=>P(y.value),className:X("option",r==null?void 0:r.option),children:y.label},y.value))}),b):o.jsx(aa,{ref:$,$open:m,$position:Y,className:X("dropdown",r==null?void 0:r.dropdown),children:G.length===0?o.jsx(Bt,{className:X("empty",r==null?void 0:r.empty),children:l}):G.map(y=>o.jsx(Vt,{type:"button",onMouseDown:N=>N.preventDefault(),onClick:()=>P(y.value),className:X("option",r==null?void 0:r.option),children:y.label},y.value))}))]}),d&&o.jsx(la,{variant:L,className:X("message"),children:d})]})},Ht={normal:{background:{static:t.alpha(t.COLORS.black,2),disabled:t.alpha(t.COLORS.black,10)},border:{static:t.alpha(t.COLORS.black,60),disabled:t.alpha(t.COLORS.black,10)},color:{static:t.COLORS.black,disabled:t.alpha(t.COLORS.black,65)},placeholder:{static:t.alpha(t.COLORS.black,40),disabled:t.alpha(t.COLORS.black,65)},focus:t.alpha(t.COLORS["iron-grey"],30)},error:{background:{static:t.alpha(t.COLORS.red,2),disabled:t.alpha(t.COLORS.red,10)},border:{static:t.alpha(t.COLORS.red,60),disabled:t.alpha(t.COLORS.red,10)},color:{static:t.COLORS.red,disabled:t.alpha(t.COLORS.red,65)},placeholder:{static:t.alpha(t.COLORS.red,40),disabled:t.alpha(t.COLORS.red,65)},focus:t.alpha(t.COLORS.red,30)}},ie=e=>Ht[e]??Ht.normal,ca=a.div`
1121
+ `,X=I.newClassNameGetter("tags"),Ye=4,ca=({className:e,classnames:r,createKey:i="Tab",disabled:n=!1,emptyMessage:l="No options",freeSolo:s=!0,label:u,message:d,onChange:b,options:p=[],placeholder:f="Add tag...",portalRenderNode:O,ref:w,value:k,variant:L="normal",...C})=>{const R=h.useRef(null),j=h.useRef(null),$=h.useRef(null),S=h.useRef(null),[c,T]=h.useState(""),[D,z]=h.useState(!1),[Y,F]=h.useState("bottom"),[A,M]=h.useState({top:0,left:0,width:0}),G=h.useMemo(()=>{const y=p.filter(B=>!k.includes(B.value));if(!c.trim())return y;const N=c.toLowerCase().trim();return y.filter(B=>B.label.toLowerCase().includes(N))},[p,k,c]),m=D&&p.length>0,g=h.useCallback(()=>{var Ne;if(!j.current)return;const y=j.current.getBoundingClientRect(),N=((Ne=$.current)==null?void 0:Ne.offsetHeight)??200,B=window.innerHeight-y.bottom-Ye,H=y.top-Ye,pe=B<N&&H>B?"top":"bottom";if(F(pe),O){const Ue=pe==="bottom"?y.bottom+Ye:y.top-N-Ye;M({top:Ue,left:y.left,width:y.width})}},[O]);h.useEffect(()=>{if(D)return g(),window.addEventListener("scroll",g,!0),window.addEventListener("resize",g),()=>{window.removeEventListener("scroll",g,!0),window.removeEventListener("resize",g)}},[D,g]);const _=h.useCallback(y=>{const N=y.trim();return!N||k.includes(N)?!1:(b([...k,N]),T(""),!0)},[k,b]),v=y=>{if(y.key===i&&c.trim())if(y.preventDefault(),s)_(c);else{const N=G.find(B=>B.label.toLowerCase()===c.toLowerCase().trim());N&&_(N.value)}else y.key==="Backspace"&&!c&&k.length>0&&b(k.slice(0,-1))},P=y=>{var N;_(y),(N=S.current)==null||N.focus()},V=y=>{b(k.filter(N=>N!==y))},Z=()=>{var y;n||(y=S.current)==null||y.focus()},ae=y=>{const N=p.find(B=>B.value===y);return(N==null?void 0:N.label)??y};return o.jsxs(ra,{...C,ref:w,className:X("container",e),children:[u&&o.jsx(oa,{variant:L,className:X("label"),children:u}),o.jsxs("div",{ref:R,style:{position:"relative"},children:[o.jsxs(ia,{ref:j,$variant:L,$disabled:n,$focused:D,onClick:Z,className:X("trigger",r==null?void 0:r.trigger),children:[k.map(y=>o.jsx(Be,{variant:L==="error"?"red":"gray",deletable:!n,onDelete:()=>V(y),className:X("chip",r==null?void 0:r.chip),children:ae(y)},y)),o.jsx(aa,{ref:S,type:"text",value:c,onChange:y=>T(y.target.value),onFocus:()=>z(!0),onBlur:()=>setTimeout(()=>z(!1),150),onKeyDown:v,placeholder:k.length===0?f:"",disabled:n,$disabled:n,$variant:L,className:X("input",r==null?void 0:r.input)})]}),p.length>0&&(O?He.createPortal(o.jsx(la,{ref:$,$open:m,$position:Y,style:{top:A.top,left:A.left,width:A.width},className:X("dropdown",r==null?void 0:r.dropdown),children:G.length===0?o.jsx(Bt,{className:X("empty",r==null?void 0:r.empty),children:l}):G.map(y=>o.jsx(Vt,{type:"button",onMouseDown:N=>N.preventDefault(),onClick:()=>P(y.value),className:X("option",r==null?void 0:r.option),children:y.label},y.value))}),O):o.jsx(na,{ref:$,$open:m,$position:Y,className:X("dropdown",r==null?void 0:r.dropdown),children:G.length===0?o.jsx(Bt,{className:X("empty",r==null?void 0:r.empty),children:l}):G.map(y=>o.jsx(Vt,{type:"button",onMouseDown:N=>N.preventDefault(),onClick:()=>P(y.value),className:X("option",r==null?void 0:r.option),children:y.label},y.value))}))]}),d&&o.jsx(da,{variant:L,className:X("message"),children:d})]})},Ht={normal:{background:{static:t.alpha(t.COLORS.black,2),disabled:t.alpha(t.COLORS.black,10)},border:{static:t.alpha(t.COLORS.black,60),disabled:t.alpha(t.COLORS.black,10)},color:{static:t.COLORS.black,disabled:t.alpha(t.COLORS.black,65)},placeholder:{static:t.alpha(t.COLORS.black,40),disabled:t.alpha(t.COLORS.black,65)},focus:t.alpha(t.COLORS["iron-grey"],30)},error:{background:{static:t.alpha(t.COLORS.red,2),disabled:t.alpha(t.COLORS.red,10)},border:{static:t.alpha(t.COLORS.red,60),disabled:t.alpha(t.COLORS.red,10)},color:{static:t.COLORS.red,disabled:t.alpha(t.COLORS.red,65)},placeholder:{static:t.alpha(t.COLORS.red,40),disabled:t.alpha(t.COLORS.red,65)},focus:t.alpha(t.COLORS.red,30)}},ie=e=>Ht[e]??Ht.normal,sa=a.div`
1111
1122
  display: grid;
1112
1123
  flex-direction: column;
1113
1124
  gap: 2px;
1114
1125
  width: ${e=>e.$fullWidth?"100%":"fit-content"};
1115
- `,sa=a(te)`
1126
+ `,pa=a(te)`
1116
1127
  margin-left: 6px;
1117
- `,pa=a.textarea`
1128
+ `,ha=a.textarea`
1118
1129
  flex: 1;
1119
1130
  min-width: 0;
1120
1131
  outline: none;
@@ -1144,33 +1155,33 @@
1144
1155
  color: ${e=>ie(e.$variant).placeholder.disabled};
1145
1156
  }
1146
1157
  }
1147
- `,ha=a.div`
1158
+ `,ua=a.div`
1148
1159
  display: flex;
1149
1160
  align-items: flex-start;
1150
1161
  gap: 8px;
1151
1162
  margin: 0 6px;
1152
- `,ua=a(re)`
1163
+ `,ba=a(re)`
1153
1164
  flex: 1;
1154
1165
  min-width: 0;
1155
- `,ba=a.span`
1166
+ `,Oa=a.span`
1156
1167
  flex-shrink: 0;
1157
1168
  margin-left: auto;
1158
1169
  font-size: 12px;
1159
1170
  font-weight: 500;
1160
1171
  color: ${e=>e.$variant==="error"?t.COLORS.red:t.COLORS["iron-grey"]};
1161
- `,we=I.newClassNameGetter("textarea"),Oa=({className:e,classnames:r,count:i,disabled:n,fullWidth:l,label:s,message:u,ref:d,value:O,variant:p="normal",rows:f=4,...b})=>{const w=typeof O=="string"?O.length:0,k=u||i!==void 0;return o.jsxs(ca,{className:we("container",e),$fullWidth:!!l,children:[s&&o.jsx(sa,{variant:p,className:we("label",r==null?void 0:r.label),children:s}),o.jsx(pa,{...b,ref:d,rows:f,value:O,disabled:n,$variant:p,className:we("textarea",r==null?void 0:r.textarea)}),k&&o.jsxs(ha,{children:[u&&o.jsx(ua,{variant:p,className:we("message"),children:u}),i!==void 0&&o.jsxs(ba,{$variant:p,className:we("counter"),children:[w,"/",i]})]})]})},Wt={normal:{track:{background:t.alpha(t.COLORS["iron-grey"],20),backgroundChecked:t.COLORS.black,border:t.alpha(t.COLORS["iron-grey"],30),borderChecked:t.COLORS.black},thumb:{background:t.COLORS.white,backgroundChecked:t.COLORS.white},label:t.COLORS.black},error:{track:{background:t.alpha(t.COLORS.red,15),backgroundChecked:t.COLORS.red,border:t.COLORS.red,borderChecked:t.COLORS.red},thumb:{background:t.COLORS.white,backgroundChecked:t.COLORS.white},label:t.COLORS.red}},le=e=>Wt[e]??Wt.normal,ga=a.label`
1172
+ `,we=I.newClassNameGetter("textarea"),ga=({className:e,classnames:r,count:i,disabled:n,fullWidth:l,label:s,message:u,ref:d,value:b,variant:p="normal",rows:f=4,...O})=>{const w=typeof b=="string"?b.length:0,k=u||i!==void 0;return o.jsxs(sa,{className:we("container",e),$fullWidth:!!l,children:[s&&o.jsx(pa,{variant:p,className:we("label",r==null?void 0:r.label),children:s}),o.jsx(ha,{...O,ref:d,rows:f,value:b,disabled:n,$variant:p,className:we("textarea",r==null?void 0:r.textarea)}),k&&o.jsxs(ua,{children:[u&&o.jsx(ba,{variant:p,className:we("message"),children:u}),i!==void 0&&o.jsxs(Oa,{$variant:p,className:we("counter"),children:[w,"/",i]})]})]})},Wt={normal:{track:{background:t.alpha(t.COLORS["iron-grey"],20),backgroundChecked:t.COLORS.black,border:t.alpha(t.COLORS["iron-grey"],30),borderChecked:t.COLORS.black},thumb:{background:t.COLORS.white,backgroundChecked:t.COLORS.white},label:t.COLORS.black},error:{track:{background:t.alpha(t.COLORS.red,15),backgroundChecked:t.COLORS.red,border:t.COLORS.red,borderChecked:t.COLORS.red},thumb:{background:t.COLORS.white,backgroundChecked:t.COLORS.white},label:t.COLORS.red}},le=e=>Wt[e]??Wt.normal,fa=a.label`
1162
1173
  display: inline-flex;
1163
1174
  align-items: flex-start;
1164
1175
  gap: 8px;
1165
1176
  cursor: ${e=>e.$disabled?"not-allowed":"pointer"};
1166
1177
  opacity: ${e=>e.$disabled?.5:1};
1167
- `,fa=a.input`
1178
+ `,xa=a.input`
1168
1179
  position: absolute;
1169
1180
  opacity: 0;
1170
1181
  width: 0;
1171
1182
  height: 0;
1172
1183
  pointer-events: none;
1173
- `,xa=a.span`
1184
+ `,Sa=a.span`
1174
1185
  position: relative;
1175
1186
  flex-shrink: 0;
1176
1187
  width: 36px;
@@ -1182,7 +1193,7 @@
1182
1193
  transition:
1183
1194
  border-color 0.2s ease,
1184
1195
  background-color 0.2s ease;
1185
- `,Sa=a.span`
1196
+ `,$a=a.span`
1186
1197
  position: absolute;
1187
1198
  top: 2px;
1188
1199
  left: ${e=>e.$checked?"18px":"2px"};
@@ -1192,7 +1203,7 @@
1192
1203
  background-color: ${e=>e.$checked?le(e.$variant).thumb.backgroundChecked:le(e.$variant).thumb.background};
1193
1204
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
1194
1205
  transition: left 0.2s ease;
1195
- `,$a=a.span`
1206
+ `,Ca=a.span`
1196
1207
  font-size: 14px;
1197
1208
  font-weight: 500;
1198
1209
  line-height: 1.3;
@@ -1208,7 +1219,7 @@
1208
1219
  text-decoration: none;
1209
1220
  }
1210
1221
  }
1211
- `,me=I.newClassNameGetter("toggle"),pt=({checked:e,className:r,classnames:i,disabled:n,label:l,onChange:s,ref:u,variant:d="normal",...O})=>o.jsxs(ga,{className:me("container",r),$disabled:!!n,$variant:d,children:[o.jsx(fa,{...O,ref:u,type:"checkbox",className:me("input",i==null?void 0:i.input),checked:e,disabled:n,onChange:s}),o.jsx(xa,{className:me("track",i==null?void 0:i.track),$checked:e,$variant:d,children:o.jsx(Sa,{className:me("thumb",i==null?void 0:i.thumb),$checked:e,$variant:d})}),l&&o.jsx($a,{className:me("label",i==null?void 0:i.label),$variant:d,children:l})]}),Kt={normal:{border:{static:t.alpha(t.COLORS.black,20),hover:t.alpha(t.COLORS.black,40),active:t.alpha(t.COLORS.black,40),disabled:t.alpha(t.COLORS.black,10)},borderChecked:t.COLORS.black,background:{static:t.COLORS.white,hover:t.COLORS.white,active:t.COLORS.white,disabled:t.alpha(t.COLORS.black,5)},backgroundChecked:t.alpha(t.COLORS.black,5),label:{static:t.COLORS.black,hover:t.COLORS.black,active:t.COLORS.black,disabled:t.alpha(t.COLORS.black,40)},description:{static:t.alpha(t.COLORS.black,60),hover:t.alpha(t.COLORS.black,60),active:t.alpha(t.COLORS.black,60),disabled:t.alpha(t.COLORS.black,30)}},error:{border:{static:t.COLORS.red,hover:t.COLORS.red,active:t.COLORS.red,disabled:t.alpha(t.COLORS.red,30)},borderChecked:t.COLORS.red,background:{static:t.COLORS.white,hover:t.COLORS.white,active:t.COLORS.white,disabled:t.alpha(t.COLORS.red,5)},backgroundChecked:t.alpha(t.COLORS.red,5),label:{static:t.COLORS.red,hover:t.COLORS.red,active:t.COLORS.red,disabled:t.alpha(t.COLORS.red,40)},description:{static:t.alpha(t.COLORS.red,70),hover:t.alpha(t.COLORS.red,70),active:t.alpha(t.COLORS.red,70),disabled:t.alpha(t.COLORS.red,40)}}},se=e=>Kt[e]??Kt.normal,Ca=a.label`
1222
+ `,me=I.newClassNameGetter("toggle"),pt=({checked:e,className:r,classnames:i,disabled:n,label:l,onChange:s,ref:u,variant:d="normal",...b})=>o.jsxs(fa,{className:me("container",r),$disabled:!!n,$variant:d,children:[o.jsx(xa,{...b,ref:u,type:"checkbox",className:me("input",i==null?void 0:i.input),checked:e,disabled:n,onChange:s}),o.jsx(Sa,{className:me("track",i==null?void 0:i.track),$checked:e,$variant:d,children:o.jsx($a,{className:me("thumb",i==null?void 0:i.thumb),$checked:e,$variant:d})}),l&&o.jsx(Ca,{className:me("label",i==null?void 0:i.label),$variant:d,children:l})]}),Kt={normal:{border:{static:t.alpha(t.COLORS.black,20),hover:t.alpha(t.COLORS.black,40),active:t.alpha(t.COLORS.black,40),disabled:t.alpha(t.COLORS.black,10)},borderChecked:t.COLORS.black,background:{static:t.COLORS.white,hover:t.COLORS.white,active:t.COLORS.white,disabled:t.alpha(t.COLORS.black,5)},backgroundChecked:t.alpha(t.COLORS.black,5),label:{static:t.COLORS.black,hover:t.COLORS.black,active:t.COLORS.black,disabled:t.alpha(t.COLORS.black,40)},description:{static:t.alpha(t.COLORS.black,60),hover:t.alpha(t.COLORS.black,60),active:t.alpha(t.COLORS.black,60),disabled:t.alpha(t.COLORS.black,30)}},error:{border:{static:t.COLORS.red,hover:t.COLORS.red,active:t.COLORS.red,disabled:t.alpha(t.COLORS.red,30)},borderChecked:t.COLORS.red,background:{static:t.COLORS.white,hover:t.COLORS.white,active:t.COLORS.white,disabled:t.alpha(t.COLORS.red,5)},backgroundChecked:t.alpha(t.COLORS.red,5),label:{static:t.COLORS.red,hover:t.COLORS.red,active:t.COLORS.red,disabled:t.alpha(t.COLORS.red,40)},description:{static:t.alpha(t.COLORS.red,70),hover:t.alpha(t.COLORS.red,70),active:t.alpha(t.COLORS.red,70),disabled:t.alpha(t.COLORS.red,40)}}},se=e=>Kt[e]??Kt.normal,ka=a.label`
1212
1223
  display: grid;
1213
1224
  grid-template-columns: 1fr auto;
1214
1225
  align-items: start;
@@ -1232,7 +1243,7 @@
1232
1243
  .vacano_toggle_container {
1233
1244
  pointer-events: none;
1234
1245
  }
1235
- `,ka=a.input`
1246
+ `,ya=a.input`
1236
1247
  position: absolute;
1237
1248
  width: 1px;
1238
1249
  height: 1px;
@@ -1242,12 +1253,12 @@
1242
1253
  clip: rect(0, 0, 0, 0);
1243
1254
  white-space: nowrap;
1244
1255
  border: 0;
1245
- `,ya=a.div`
1256
+ `,Ra=a.div`
1246
1257
  display: flex;
1247
1258
  flex-direction: column;
1248
1259
  gap: 2px;
1249
1260
  min-width: 0;
1250
- `,Ra=a.span`
1261
+ `,La=a.span`
1251
1262
  font-size: 14px;
1252
1263
  font-weight: 500;
1253
1264
  line-height: 1.4;
@@ -1256,7 +1267,7 @@
1256
1267
  label[data-disabled='true'] & {
1257
1268
  color: ${e=>se(e.$variant).label.disabled};
1258
1269
  }
1259
- `,La=a.span`
1270
+ `,va=a.span`
1260
1271
  font-size: 12px;
1261
1272
  font-weight: 400;
1262
1273
  line-height: 1.4;
@@ -1265,19 +1276,19 @@
1265
1276
  label[data-disabled='true'] & {
1266
1277
  color: ${e=>se(e.$variant).description.disabled};
1267
1278
  }
1268
- `,Ye=I.newClassNameGetter("toggle-card"),va=({checked:e,className:r,classnames:i,description:n,disabled:l,fullWidth:s=!1,label:u,onChange:d,ref:O,variant:p="normal",...f})=>o.jsxs(Ca,{className:Ye("container",r),$checked:e,$disabled:!!l,$fullWidth:s,$variant:p,"data-disabled":l,children:[o.jsx(ka,{...f,ref:O,type:"checkbox",checked:e,disabled:l,onChange:d}),o.jsxs(ya,{className:Ye("content",i==null?void 0:i.content),children:[o.jsx(Ra,{className:Ye("label",i==null?void 0:i.label),$variant:p,children:u}),n&&o.jsx(La,{className:Ye("description",i==null?void 0:i.description),$variant:p,children:n})]}),o.jsx(pt,{className:i==null?void 0:i.toggle,checked:e,disabled:l,variant:p,onChange:()=>{},tabIndex:-1,"aria-hidden":!0})]}),Ut={label:{color:t.COLORS.black,disabledColor:t.alpha(t.COLORS.black,40)}},wa=a.div`
1279
+ `,Ge=I.newClassNameGetter("toggle-card"),wa=({checked:e,className:r,classnames:i,description:n,disabled:l,fullWidth:s=!1,label:u,onChange:d,ref:b,variant:p="normal",...f})=>o.jsxs(ka,{className:Ge("container",r),$checked:e,$disabled:!!l,$fullWidth:s,$variant:p,"data-disabled":l,children:[o.jsx(ya,{...f,ref:b,type:"checkbox",checked:e,disabled:l,onChange:d}),o.jsxs(Ra,{className:Ge("content",i==null?void 0:i.content),children:[o.jsx(La,{className:Ge("label",i==null?void 0:i.label),$variant:p,children:u}),n&&o.jsx(va,{className:Ge("description",i==null?void 0:i.description),$variant:p,children:n})]}),o.jsx(pt,{className:i==null?void 0:i.toggle,checked:e,disabled:l,variant:p,onChange:()=>{},tabIndex:-1,"aria-hidden":!0})]}),Ut={label:{color:t.COLORS.black,disabledColor:t.alpha(t.COLORS.black,40)}},ma=a.div`
1269
1280
  display: flex;
1270
1281
  flex-direction: column;
1271
1282
  gap: 8px;
1272
- `,ma=a.span`
1283
+ `,ja=a.span`
1273
1284
  font-size: 13px;
1274
1285
  font-weight: 500;
1275
1286
  line-height: 1.5;
1276
1287
  color: ${e=>e.$disabled?Ut.label.disabledColor:Ut.label.color};
1277
1288
  margin-bottom: 4px;
1278
- `,ja=a.div`
1289
+ `,Pa=a.div`
1279
1290
  display: flex;
1280
1291
  flex-direction: column;
1281
1292
  gap: 12px;
1282
- `,at=I.newClassNameGetter("toggle-group"),Pa=({className:e,classnames:r,disabled:i,label:n,onChange:l,options:s,ref:u,value:d,variant:O="normal",...p})=>{const f=(b,w)=>{l(w?[...d,b]:d.filter(k=>k!==b))};return o.jsxs(wa,{...p,ref:u,className:at("container",e),children:[n&&o.jsx(ma,{className:at("label",r==null?void 0:r.label),$disabled:i,children:n}),o.jsx(ja,{className:at("options",r==null?void 0:r.options),children:s.map(b=>o.jsx(pt,{className:r==null?void 0:r.toggle,checked:d.includes(b.value),label:b.label,disabled:i,variant:O,onChange:w=>f(b.value,w.target.checked)},b.value))})]})};exports.Autocomplete=eo;exports.Button=Jt;exports.Checkbox=He;exports.CheckboxCard=$o;exports.CheckboxGroup=Ro;exports.Chip=Ve;exports.DatePicker=ti;exports.FieldLabel=te;exports.FieldMessage=re;exports.Input=rr;exports.KeySymbol=Xt;exports.KeysBindings=Zt;exports.Modal=or;exports.MultiSelect=ki;exports.OtpCode=mi;exports.Radio=st;exports.RadioCard=Mi;exports.RadioGroup=Vi;exports.Select=ea;exports.Spinner=qt;exports.Tags=da;exports.Textarea=Oa;exports.Toggle=pt;exports.ToggleCard=va;exports.ToggleGroup=Pa;exports.formatDateGo=Qt;exports.styled=a;
1283
- //# sourceMappingURL=ToggleGroup-DCWH4ngK.cjs.map
1293
+ `,at=I.newClassNameGetter("toggle-group"),Na=({className:e,classnames:r,disabled:i,label:n,onChange:l,options:s,ref:u,value:d,variant:b="normal",...p})=>{const f=(O,w)=>{l(w?[...d,O]:d.filter(k=>k!==O))};return o.jsxs(ma,{...p,ref:u,className:at("container",e),children:[n&&o.jsx(ja,{className:at("label",r==null?void 0:r.label),$disabled:i,children:n}),o.jsx(Pa,{className:at("options",r==null?void 0:r.options),children:s.map(O=>o.jsx(pt,{className:r==null?void 0:r.toggle,checked:d.includes(O.value),label:O.label,disabled:i,variant:b,onChange:w=>f(O.value,w.target.checked)},O.value))})]})};exports.Autocomplete=eo;exports.Button=Jt;exports.Checkbox=We;exports.CheckboxCard=$o;exports.CheckboxGroup=Ro;exports.Chip=Be;exports.DatePicker=ri;exports.FieldLabel=te;exports.FieldMessage=re;exports.Input=rr;exports.KeySymbol=Xt;exports.KeysBindings=Zt;exports.Modal=or;exports.MultiSelect=yi;exports.OtpCode=ji;exports.Radio=st;exports.RadioCard=Fi;exports.RadioGroup=Bi;exports.Select=ta;exports.Spinner=qt;exports.Tags=ca;exports.Textarea=ga;exports.Toggle=pt;exports.ToggleCard=wa;exports.ToggleGroup=Na;exports.formatDateGo=Qt;exports.styled=a;
1294
+ //# sourceMappingURL=ToggleGroup-COFNoVg9.cjs.map