sodtrack-web-ui 0.36.4 → 0.36.6
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.
- package/dist/chip-input.js +1 -1
- package/dist/chip-input.mjs +1 -1
- package/dist/{chunk-PDKUK5KM.mjs → chunk-BRYDEYOA.mjs} +1 -1
- package/dist/{chunk-UIZZ5N2R.mjs → chunk-EQDJ7IIM.mjs} +1 -1
- package/dist/chunk-J5VJYUNT.mjs +1 -0
- package/dist/date-picker.js +2 -2
- package/dist/date-picker.mjs +1 -1
- package/dist/index.js +2 -2
- package/dist/index.mjs +1 -1
- package/dist/list-item-arrow.mjs +1 -1
- package/dist/list-item-checkbox.mjs +1 -1
- package/dist/list-item.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-36LFA3WC.mjs +0 -1
package/dist/chip-input.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
'use strict';var react=require('react'),tailwindVariants=require('tailwind-variants'),jsxRuntime=require('react/jsx-runtime');function _(e){var a,t,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var d=e.length;for(a=0;a<d;a++)e[a]&&(t=_(e[a]))&&(o&&(o+=" "),o+=t);}else for(t in e)e[t]&&(o&&(o+=" "),o+=t);return o}function $(){for(var e,a,t=0,o="",d=arguments.length;t<d;t++)(e=arguments[t])&&(a=_(e))&&(o&&(o+=" "),o+=a);return o}var X="-",Ie=e=>{let a=Ce(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:o}=e;return {getClassGroupId:r=>{let l=r.split(X);return l[0]===""&&l.length!==1&&l.shift(),te(l,a)||xe(r)},getConflictingClassGroupIds:(r,l)=>{let i=t[r]||[];return l&&o[r]?[...i,...o[r]]:i}}},te=(e,a)=>{if(e.length===0)return a.classGroupId;let t=e[0],o=a.nextPart.get(t),d=o?te(e.slice(1),o):void 0;if(d)return d;if(a.validators.length===0)return;let u=e.join(X);return a.validators.find(({validator:r})=>r(u))?.classGroupId},ee=/^\[(.+)\]$/,xe=e=>{if(ee.test(e)){let a=ee.exec(e)[1],t=a?.substring(0,a.indexOf(":"));if(t)return "arbitrary.."+t}},Ce=e=>{let{theme:a,prefix:t}=e,o={nextPart:new Map,validators:[]};return he(Object.entries(e.classGroups),t).forEach(([u,r])=>{E(r,o,u,a);}),o},E=(e,a,t,o)=>{e.forEach(d=>{if(typeof d=="string"){let u=d===""?a:ae(a,d);u.classGroupId=t;return}if(typeof d=="function"){if(ge(d)){E(d(o),a,t,o);return}a.validators.push({validator:d,classGroupId:t});return}Object.entries(d).forEach(([u,r])=>{E(r,ae(a,u),t,o);});});},ae=(e,a)=>{let t=e;return a.split(X).forEach(o=>{t.nextPart.has(o)||t.nextPart.set(o,{nextPart:new Map,validators:[]}),t=t.nextPart.get(o);}),t},ge=e=>e.isThemeGetter,he=(e,a)=>a?e.map(([t,o])=>{let d=o.map(u=>typeof u=="string"?a+u:typeof u=="object"?Object.fromEntries(Object.entries(u).map(([r,l])=>[a+r,l])):u);return [t,d]}):e,Se=e=>{if(e<1)return {get:()=>{},set:()=>{}};let a=0,t=new Map,o=new Map,d=(u,r)=>{t.set(u,r),a++,a>e&&(a=0,o=t,t=new Map);};return {get(u){let r=t.get(u);if(r!==void 0)return r;if((r=o.get(u))!==void 0)return d(u,r),r},set(u,r){t.has(u)?t.set(u,r):d(u,r);}}},oe="!",we=e=>{let{separator:a,experimentalParseClassName:t}=e,o=a.length===1,d=a[0],u=a.length,r=l=>{let i=[],p=0,m=0,x;for(let n=0;n<l.length;n++){let I=l[n];if(p===0){if(I===d&&(o||l.slice(n,n+u)===a)){i.push(l.slice(m,n)),m=n+u;continue}if(I==="/"){x=n;continue}}I==="["?p++:I==="]"&&p--;}let C=i.length===0?l:l.substring(m),h=C.startsWith(oe),S=h?C.substring(1):C,L=x&&x>m?x-m:void 0;return {modifiers:i,hasImportantModifier:h,baseClassName:S,maybePostfixModifierPosition:L}};return t?l=>t({className:l,parseClassName:r}):r},ke=e=>{if(e.length<=1)return e;let a=[],t=[];return e.forEach(o=>{o[0]==="["?(a.push(...t.sort(),o),t=[]):t.push(o);}),a.push(...t.sort()),a},Pe=e=>({cache:Se(e.cacheSize),parseClassName:we(e),...Ie(e)}),be=/\s+/,Ae=(e,a)=>{let{parseClassName:t,getClassGroupId:o,getConflictingClassGroupIds:d}=a,u=[],r=e.trim().split(be),l="";for(let i=r.length-1;i>=0;i-=1){let p=r[i],{modifiers:m,hasImportantModifier:x,baseClassName:C,maybePostfixModifierPosition:h}=t(p),S=!!h,L=o(S?C.substring(0,h):C);if(!L){if(!S){l=p+(l.length>0?" "+l:l);continue}if(L=o(C),!L){l=p+(l.length>0?" "+l:l);continue}S=!1;}let n=ke(m).join(":"),I=x?n+oe:n,g=I+L;if(u.includes(g))continue;u.push(g);let M=d(L,S);for(let A=0;A<M.length;++A){let q=M[A];u.push(I+q);}l=p+(l.length>0?" "+l:l);}return l};function Be(){let e=0,a,t,o="";for(;e<arguments.length;)(a=arguments[e++])&&(t=ue(a))&&(o&&(o+=" "),o+=t);return o}var ue=e=>{if(typeof e=="string")return e;let a,t="";for(let o=0;o<e.length;o++)e[o]&&(a=ue(e[o]))&&(t&&(t+=" "),t+=a);return t};function ye(e,...a){let t,o,d,u=r;function r(i){let p=a.reduce((m,x)=>x(m),e());return t=Pe(p),o=t.cache.get,d=t.cache.set,u=l,l(i)}function l(i){let p=o(i);if(p)return p;let m=Ae(i,t);return d(i,m),m}return function(){return u(Be.apply(null,arguments))}}var f=e=>{let a=t=>t[e]||[];return a.isThemeGetter=!0,a},le=/^\[(?:([a-z-]+):)?(.+)\]$/i,Me=/^\d+\/\d+$/,Fe=new Set(["px","full","screen"]),De=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Re=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Te=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,qe=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ve=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,k=e=>B(e)||Fe.has(e)||Me.test(e),P=e=>y(e,"length",Ee),B=e=>!!e&&!Number.isNaN(Number(e)),W=e=>y(e,"number",B),D=e=>!!e&&Number.isInteger(Number(e)),Ue=e=>e.endsWith("%")&&B(e.slice(0,-1)),s=e=>le.test(e),b=e=>De.test(e),Oe=new Set(["length","size","percentage"]),He=e=>y(e,Oe,de),Ge=e=>y(e,"position",de),ze=new Set(["image","url"]),Ve=e=>y(e,ze,Ne),We=e=>y(e,"",Xe),R=()=>!0,y=(e,a,t)=>{let o=le.exec(e);return o?o[1]?typeof a=="string"?o[1]===a:a.has(o[1]):t(o[2]):!1},Ee=e=>Re.test(e)&&!Te.test(e),de=()=>!1,Xe=e=>qe.test(e),Ne=e=>ve.test(e);var Ke=()=>{let e=f("colors"),a=f("spacing"),t=f("blur"),o=f("brightness"),d=f("borderColor"),u=f("borderRadius"),r=f("borderSpacing"),l=f("borderWidth"),i=f("contrast"),p=f("grayscale"),m=f("hueRotate"),x=f("invert"),C=f("gap"),h=f("gradientColorStops"),S=f("gradientColorStopPositions"),L=f("inset"),n=f("margin"),I=f("opacity"),g=f("padding"),M=f("saturate"),A=f("scale"),q=f("sepia"),N=f("skew"),K=f("space"),Z=f("translate"),H=()=>["auto","contain","none"],G=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto",s,a],c=()=>[s,a],J=()=>["",k,P],v=()=>["auto",B,s],Q=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],U=()=>["solid","dashed","dotted","double","none"],j=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],V=()=>["start","end","center","between","around","evenly","stretch"],F=()=>["","0",s],Y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],w=()=>[B,s];return {cacheSize:500,separator:":",theme:{colors:[R],spacing:[k,P],blur:["none","",b,s],brightness:w(),borderColor:[e],borderRadius:["none","","full",b,s],borderSpacing:c(),borderWidth:J(),contrast:w(),grayscale:F(),hueRotate:w(),invert:F(),gap:c(),gradientColorStops:[e],gradientColorStopPositions:[Ue,P],inset:z(),margin:z(),opacity:w(),padding:c(),saturate:w(),scale:w(),sepia:F(),skew:w(),space:c(),translate:c()},classGroups:{aspect:[{aspect:["auto","square","video",s]}],container:["container"],columns:[{columns:[b]}],"break-after":[{"break-after":Y()}],"break-before":[{"break-before":Y()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Q(),s]}],overflow:[{overflow:G()}],"overflow-x":[{"overflow-x":G()}],"overflow-y":[{"overflow-y":G()}],overscroll:[{overscroll:H()}],"overscroll-x":[{"overscroll-x":H()}],"overscroll-y":[{"overscroll-y":H()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[L]}],"inset-x":[{"inset-x":[L]}],"inset-y":[{"inset-y":[L]}],start:[{start:[L]}],end:[{end:[L]}],top:[{top:[L]}],right:[{right:[L]}],bottom:[{bottom:[L]}],left:[{left:[L]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",D,s]}],basis:[{basis:z()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",s]}],grow:[{grow:F()}],shrink:[{shrink:F()}],order:[{order:["first","last","none",D,s]}],"grid-cols":[{"grid-cols":[R]}],"col-start-end":[{col:["auto",{span:["full",D,s]},s]}],"col-start":[{"col-start":v()}],"col-end":[{"col-end":v()}],"grid-rows":[{"grid-rows":[R]}],"row-start-end":[{row:["auto",{span:[D,s]},s]}],"row-start":[{"row-start":v()}],"row-end":[{"row-end":v()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",s]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",s]}],gap:[{gap:[C]}],"gap-x":[{"gap-x":[C]}],"gap-y":[{"gap-y":[C]}],"justify-content":[{justify:["normal",...V()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...V(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...V(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[g]}],px:[{px:[g]}],py:[{py:[g]}],ps:[{ps:[g]}],pe:[{pe:[g]}],pt:[{pt:[g]}],pr:[{pr:[g]}],pb:[{pb:[g]}],pl:[{pl:[g]}],m:[{m:[n]}],mx:[{mx:[n]}],my:[{my:[n]}],ms:[{ms:[n]}],me:[{me:[n]}],mt:[{mt:[n]}],mr:[{mr:[n]}],mb:[{mb:[n]}],ml:[{ml:[n]}],"space-x":[{"space-x":[K]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[K]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",s,a]}],"min-w":[{"min-w":[s,a,"min","max","fit"]}],"max-w":[{"max-w":[s,a,"none","full","min","max","fit","prose",{screen:[b]},b]}],h:[{h:[s,a,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[s,a,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[s,a,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[s,a,"auto","min","max","fit"]}],"font-size":[{text:["base",b,P]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",W]}],"font-family":[{font:[R]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",s]}],"line-clamp":[{"line-clamp":["none",B,W]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",k,s]}],"list-image":[{"list-image":["none",s]}],"list-style-type":[{list:["none","disc","decimal",s]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[I]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[I]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...U(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",k,P]}],"underline-offset":[{"underline-offset":["auto",k,s]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:c()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",s]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",s]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[I]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Q(),Ge]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",He]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Ve]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[S]}],"gradient-via-pos":[{via:[S]}],"gradient-to-pos":[{to:[S]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[u]}],"rounded-s":[{"rounded-s":[u]}],"rounded-e":[{"rounded-e":[u]}],"rounded-t":[{"rounded-t":[u]}],"rounded-r":[{"rounded-r":[u]}],"rounded-b":[{"rounded-b":[u]}],"rounded-l":[{"rounded-l":[u]}],"rounded-ss":[{"rounded-ss":[u]}],"rounded-se":[{"rounded-se":[u]}],"rounded-ee":[{"rounded-ee":[u]}],"rounded-es":[{"rounded-es":[u]}],"rounded-tl":[{"rounded-tl":[u]}],"rounded-tr":[{"rounded-tr":[u]}],"rounded-br":[{"rounded-br":[u]}],"rounded-bl":[{"rounded-bl":[u]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[I]}],"border-style":[{border:[...U(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[I]}],"divide-style":[{divide:U()}],"border-color":[{border:[d]}],"border-color-x":[{"border-x":[d]}],"border-color-y":[{"border-y":[d]}],"border-color-s":[{"border-s":[d]}],"border-color-e":[{"border-e":[d]}],"border-color-t":[{"border-t":[d]}],"border-color-r":[{"border-r":[d]}],"border-color-b":[{"border-b":[d]}],"border-color-l":[{"border-l":[d]}],"divide-color":[{divide:[d]}],"outline-style":[{outline:["",...U()]}],"outline-offset":[{"outline-offset":[k,s]}],"outline-w":[{outline:[k,P]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:J()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[I]}],"ring-offset-w":[{"ring-offset":[k,P]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",b,We]}],"shadow-color":[{shadow:[R]}],opacity:[{opacity:[I]}],"mix-blend":[{"mix-blend":[...j(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":j()}],filter:[{filter:["","none"]}],blur:[{blur:[t]}],brightness:[{brightness:[o]}],contrast:[{contrast:[i]}],"drop-shadow":[{"drop-shadow":["","none",b,s]}],grayscale:[{grayscale:[p]}],"hue-rotate":[{"hue-rotate":[m]}],invert:[{invert:[x]}],saturate:[{saturate:[M]}],sepia:[{sepia:[q]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[t]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[i]}],"backdrop-grayscale":[{"backdrop-grayscale":[p]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[m]}],"backdrop-invert":[{"backdrop-invert":[x]}],"backdrop-opacity":[{"backdrop-opacity":[I]}],"backdrop-saturate":[{"backdrop-saturate":[M]}],"backdrop-sepia":[{"backdrop-sepia":[q]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[r]}],"border-spacing-x":[{"border-spacing-x":[r]}],"border-spacing-y":[{"border-spacing-y":[r]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",s]}],duration:[{duration:w()}],ease:[{ease:["linear","in","out","in-out",s]}],delay:[{delay:w()}],animate:[{animate:["none","spin","ping","pulse","bounce",s]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[A]}],"scale-x":[{"scale-x":[A]}],"scale-y":[{"scale-y":[A]}],rotate:[{rotate:[D,s]}],"translate-x":[{"translate-x":[Z]}],"translate-y":[{"translate-y":[Z]}],"skew-x":[{"skew-x":[N]}],"skew-y":[{"skew-y":[N]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",s]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",s]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":c()}],"scroll-mx":[{"scroll-mx":c()}],"scroll-my":[{"scroll-my":c()}],"scroll-ms":[{"scroll-ms":c()}],"scroll-me":[{"scroll-me":c()}],"scroll-mt":[{"scroll-mt":c()}],"scroll-mr":[{"scroll-mr":c()}],"scroll-mb":[{"scroll-mb":c()}],"scroll-ml":[{"scroll-ml":c()}],"scroll-p":[{"scroll-p":c()}],"scroll-px":[{"scroll-px":c()}],"scroll-py":[{"scroll-py":c()}],"scroll-ps":[{"scroll-ps":c()}],"scroll-pe":[{"scroll-pe":c()}],"scroll-pt":[{"scroll-pt":c()}],"scroll-pr":[{"scroll-pr":c()}],"scroll-pb":[{"scroll-pb":c()}],"scroll-pl":[{"scroll-pl":c()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",s]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[k,P,W]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var re=ye(Ke);function se(...e){return re($(e))}var fe=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),O=(...e)=>e.filter((a,t,o)=>!!a&&a.trim()!==""&&o.indexOf(a)===t).join(" ").trim();var ie={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};var ne=react.forwardRef(({color:e="currentColor",size:a=24,strokeWidth:t=2,absoluteStrokeWidth:o,className:d="",children:u,iconNode:r,...l},i)=>react.createElement("svg",{ref:i,...ie,width:a,height:a,stroke:e,strokeWidth:o?Number(t)*24/Number(a):t,className:O("lucide",d),...l},[...r.map(([p,m])=>react.createElement(p,m)),...Array.isArray(u)?u:[u]]));var pe=(e,a)=>{let t=react.forwardRef(({className:o,...d},u)=>react.createElement(ne,{ref:u,iconNode:a,className:O(`lucide-${fe(e)}`,o),...d}));return t.displayName=`${e}`,t};var T=pe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var me=T;var Wa=["xs","sm","md"],Ea=["standard","primary"],Xa=["fill","outlined"],_e=tailwindVariants.tv({slots:{container:"flex cursor-default items-center rounded-3xl transition-all",startIcon:"",closeIcon:"cursor-pointer"},variants:{variant:{standard:{},primary:{}},type:{fill:{},outlined:{}},size:{md:{container:"gap-2.75 min-h-8 px-3",startIcon:"h-4.5 w-4.5",closeIcon:"h-4.5 w-4.5"},sm:{container:"gap-3.25 min-h-6 px-3 text-sm",startIcon:"w-3.5 h-3.5",closeIcon:"w-3.5 h-3.5"},xs:{container:"gap-4.5 min-h-4 px-2 text-xs",startIcon:"w-3.5 h-3.5",closeIcon:"w-3.5 h-3.5"}},disabled:{true:{},false:{}}},compoundVariants:[{disabled:!0,className:{container:"cursor-not-allowed",closeIcon:"cursor-not-allowed"}},{disabled:!1,variant:"standard",type:"fill",className:{container:"bg-neutral-100 text-neutral-700 hover:bg-neutral-200"}},{disabled:!0,variant:"standard",type:"fill",className:{container:"bg-neutral-100 text-neutral-400"}},{disabled:!1,variant:"primary",type:"fill",className:{container:"bg-primary-200 text-primary-800 hover:bg-primary-300"}},{disabled:!1,variant:"standard",type:"outlined",className:{container:"text-neutral-700 ring-1 ring-inset ring-neutral-700 hover:bg-neutral-200"}},{disabled:!0,variant:"standard",type:"outlined",className:{container:"text-neutral-400 ring-1 ring-inset ring-neutral-400"}},{disabled:!1,variant:"primary",type:"outlined",className:{container:"text-primary-500 ring-1 ring-inset ring-primary-500 hover:bg-primary-100"}}],defaultVariants:{disabled:!1,size:"md"}}),$e=react.forwardRef(({children:e,onClose:a,StartIcon:t,className:o,hasCloseIcon:d=!0,disabled:u,variant:r,type:l,size:i,...p},m)=>{let{container:x,startIcon:C,closeIcon:h}=_e({variant:r,type:l,size:i,disabled:u});return jsxRuntime.jsxs("span",{ref:m,className:se(x(),o),...p,children:[t&&jsxRuntime.jsx(t,{className:C()}),e,d&&jsxRuntime.jsx(me,{onClick:()=>!u&&a?.(),className:h()})]})});$e.displayName="ChipInput";/*! Bundled license information:
|
|
1
|
+
'use strict';var react=require('react'),tailwindVariants=require('tailwind-variants'),jsxRuntime=require('react/jsx-runtime');function _(e){var a,t,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var d=e.length;for(a=0;a<d;a++)e[a]&&(t=_(e[a]))&&(o&&(o+=" "),o+=t);}else for(t in e)e[t]&&(o&&(o+=" "),o+=t);return o}function $(){for(var e,a,t=0,o="",d=arguments.length;t<d;t++)(e=arguments[t])&&(a=_(e))&&(o&&(o+=" "),o+=a);return o}var X="-",Ie=e=>{let a=Ce(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:o}=e;return {getClassGroupId:r=>{let l=r.split(X);return l[0]===""&&l.length!==1&&l.shift(),te(l,a)||xe(r)},getConflictingClassGroupIds:(r,l)=>{let i=t[r]||[];return l&&o[r]?[...i,...o[r]]:i}}},te=(e,a)=>{if(e.length===0)return a.classGroupId;let t=e[0],o=a.nextPart.get(t),d=o?te(e.slice(1),o):void 0;if(d)return d;if(a.validators.length===0)return;let u=e.join(X);return a.validators.find(({validator:r})=>r(u))?.classGroupId},ee=/^\[(.+)\]$/,xe=e=>{if(ee.test(e)){let a=ee.exec(e)[1],t=a?.substring(0,a.indexOf(":"));if(t)return "arbitrary.."+t}},Ce=e=>{let{theme:a,prefix:t}=e,o={nextPart:new Map,validators:[]};return he(Object.entries(e.classGroups),t).forEach(([u,r])=>{E(r,o,u,a);}),o},E=(e,a,t,o)=>{e.forEach(d=>{if(typeof d=="string"){let u=d===""?a:ae(a,d);u.classGroupId=t;return}if(typeof d=="function"){if(ge(d)){E(d(o),a,t,o);return}a.validators.push({validator:d,classGroupId:t});return}Object.entries(d).forEach(([u,r])=>{E(r,ae(a,u),t,o);});});},ae=(e,a)=>{let t=e;return a.split(X).forEach(o=>{t.nextPart.has(o)||t.nextPart.set(o,{nextPart:new Map,validators:[]}),t=t.nextPart.get(o);}),t},ge=e=>e.isThemeGetter,he=(e,a)=>a?e.map(([t,o])=>{let d=o.map(u=>typeof u=="string"?a+u:typeof u=="object"?Object.fromEntries(Object.entries(u).map(([r,l])=>[a+r,l])):u);return [t,d]}):e,Se=e=>{if(e<1)return {get:()=>{},set:()=>{}};let a=0,t=new Map,o=new Map,d=(u,r)=>{t.set(u,r),a++,a>e&&(a=0,o=t,t=new Map);};return {get(u){let r=t.get(u);if(r!==void 0)return r;if((r=o.get(u))!==void 0)return d(u,r),r},set(u,r){t.has(u)?t.set(u,r):d(u,r);}}},oe="!",we=e=>{let{separator:a,experimentalParseClassName:t}=e,o=a.length===1,d=a[0],u=a.length,r=l=>{let i=[],p=0,m=0,x;for(let n=0;n<l.length;n++){let I=l[n];if(p===0){if(I===d&&(o||l.slice(n,n+u)===a)){i.push(l.slice(m,n)),m=n+u;continue}if(I==="/"){x=n;continue}}I==="["?p++:I==="]"&&p--;}let C=i.length===0?l:l.substring(m),h=C.startsWith(oe),S=h?C.substring(1):C,L=x&&x>m?x-m:void 0;return {modifiers:i,hasImportantModifier:h,baseClassName:S,maybePostfixModifierPosition:L}};return t?l=>t({className:l,parseClassName:r}):r},ke=e=>{if(e.length<=1)return e;let a=[],t=[];return e.forEach(o=>{o[0]==="["?(a.push(...t.sort(),o),t=[]):t.push(o);}),a.push(...t.sort()),a},Pe=e=>({cache:Se(e.cacheSize),parseClassName:we(e),...Ie(e)}),be=/\s+/,Ae=(e,a)=>{let{parseClassName:t,getClassGroupId:o,getConflictingClassGroupIds:d}=a,u=[],r=e.trim().split(be),l="";for(let i=r.length-1;i>=0;i-=1){let p=r[i],{modifiers:m,hasImportantModifier:x,baseClassName:C,maybePostfixModifierPosition:h}=t(p),S=!!h,L=o(S?C.substring(0,h):C);if(!L){if(!S){l=p+(l.length>0?" "+l:l);continue}if(L=o(C),!L){l=p+(l.length>0?" "+l:l);continue}S=!1;}let n=ke(m).join(":"),I=x?n+oe:n,g=I+L;if(u.includes(g))continue;u.push(g);let M=d(L,S);for(let A=0;A<M.length;++A){let q=M[A];u.push(I+q);}l=p+(l.length>0?" "+l:l);}return l};function Be(){let e=0,a,t,o="";for(;e<arguments.length;)(a=arguments[e++])&&(t=ue(a))&&(o&&(o+=" "),o+=t);return o}var ue=e=>{if(typeof e=="string")return e;let a,t="";for(let o=0;o<e.length;o++)e[o]&&(a=ue(e[o]))&&(t&&(t+=" "),t+=a);return t};function ye(e,...a){let t,o,d,u=r;function r(i){let p=a.reduce((m,x)=>x(m),e());return t=Pe(p),o=t.cache.get,d=t.cache.set,u=l,l(i)}function l(i){let p=o(i);if(p)return p;let m=Ae(i,t);return d(i,m),m}return function(){return u(Be.apply(null,arguments))}}var f=e=>{let a=t=>t[e]||[];return a.isThemeGetter=!0,a},le=/^\[(?:([a-z-]+):)?(.+)\]$/i,Me=/^\d+\/\d+$/,Fe=new Set(["px","full","screen"]),De=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Re=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Te=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,qe=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ve=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,k=e=>B(e)||Fe.has(e)||Me.test(e),P=e=>y(e,"length",Ee),B=e=>!!e&&!Number.isNaN(Number(e)),W=e=>y(e,"number",B),D=e=>!!e&&Number.isInteger(Number(e)),Ue=e=>e.endsWith("%")&&B(e.slice(0,-1)),s=e=>le.test(e),b=e=>De.test(e),Oe=new Set(["length","size","percentage"]),He=e=>y(e,Oe,de),Ge=e=>y(e,"position",de),ze=new Set(["image","url"]),Ve=e=>y(e,ze,Ne),We=e=>y(e,"",Xe),R=()=>!0,y=(e,a,t)=>{let o=le.exec(e);return o?o[1]?typeof a=="string"?o[1]===a:a.has(o[1]):t(o[2]):!1},Ee=e=>Re.test(e)&&!Te.test(e),de=()=>!1,Xe=e=>qe.test(e),Ne=e=>ve.test(e);var Ke=()=>{let e=f("colors"),a=f("spacing"),t=f("blur"),o=f("brightness"),d=f("borderColor"),u=f("borderRadius"),r=f("borderSpacing"),l=f("borderWidth"),i=f("contrast"),p=f("grayscale"),m=f("hueRotate"),x=f("invert"),C=f("gap"),h=f("gradientColorStops"),S=f("gradientColorStopPositions"),L=f("inset"),n=f("margin"),I=f("opacity"),g=f("padding"),M=f("saturate"),A=f("scale"),q=f("sepia"),N=f("skew"),K=f("space"),Z=f("translate"),H=()=>["auto","contain","none"],G=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto",s,a],c=()=>[s,a],J=()=>["",k,P],v=()=>["auto",B,s],Q=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],U=()=>["solid","dashed","dotted","double","none"],j=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],V=()=>["start","end","center","between","around","evenly","stretch"],F=()=>["","0",s],Y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],w=()=>[B,s];return {cacheSize:500,separator:":",theme:{colors:[R],spacing:[k,P],blur:["none","",b,s],brightness:w(),borderColor:[e],borderRadius:["none","","full",b,s],borderSpacing:c(),borderWidth:J(),contrast:w(),grayscale:F(),hueRotate:w(),invert:F(),gap:c(),gradientColorStops:[e],gradientColorStopPositions:[Ue,P],inset:z(),margin:z(),opacity:w(),padding:c(),saturate:w(),scale:w(),sepia:F(),skew:w(),space:c(),translate:c()},classGroups:{aspect:[{aspect:["auto","square","video",s]}],container:["container"],columns:[{columns:[b]}],"break-after":[{"break-after":Y()}],"break-before":[{"break-before":Y()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Q(),s]}],overflow:[{overflow:G()}],"overflow-x":[{"overflow-x":G()}],"overflow-y":[{"overflow-y":G()}],overscroll:[{overscroll:H()}],"overscroll-x":[{"overscroll-x":H()}],"overscroll-y":[{"overscroll-y":H()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[L]}],"inset-x":[{"inset-x":[L]}],"inset-y":[{"inset-y":[L]}],start:[{start:[L]}],end:[{end:[L]}],top:[{top:[L]}],right:[{right:[L]}],bottom:[{bottom:[L]}],left:[{left:[L]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",D,s]}],basis:[{basis:z()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",s]}],grow:[{grow:F()}],shrink:[{shrink:F()}],order:[{order:["first","last","none",D,s]}],"grid-cols":[{"grid-cols":[R]}],"col-start-end":[{col:["auto",{span:["full",D,s]},s]}],"col-start":[{"col-start":v()}],"col-end":[{"col-end":v()}],"grid-rows":[{"grid-rows":[R]}],"row-start-end":[{row:["auto",{span:[D,s]},s]}],"row-start":[{"row-start":v()}],"row-end":[{"row-end":v()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",s]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",s]}],gap:[{gap:[C]}],"gap-x":[{"gap-x":[C]}],"gap-y":[{"gap-y":[C]}],"justify-content":[{justify:["normal",...V()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...V(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...V(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[g]}],px:[{px:[g]}],py:[{py:[g]}],ps:[{ps:[g]}],pe:[{pe:[g]}],pt:[{pt:[g]}],pr:[{pr:[g]}],pb:[{pb:[g]}],pl:[{pl:[g]}],m:[{m:[n]}],mx:[{mx:[n]}],my:[{my:[n]}],ms:[{ms:[n]}],me:[{me:[n]}],mt:[{mt:[n]}],mr:[{mr:[n]}],mb:[{mb:[n]}],ml:[{ml:[n]}],"space-x":[{"space-x":[K]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[K]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",s,a]}],"min-w":[{"min-w":[s,a,"min","max","fit"]}],"max-w":[{"max-w":[s,a,"none","full","min","max","fit","prose",{screen:[b]},b]}],h:[{h:[s,a,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[s,a,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[s,a,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[s,a,"auto","min","max","fit"]}],"font-size":[{text:["base",b,P]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",W]}],"font-family":[{font:[R]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",s]}],"line-clamp":[{"line-clamp":["none",B,W]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",k,s]}],"list-image":[{"list-image":["none",s]}],"list-style-type":[{list:["none","disc","decimal",s]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[I]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[I]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...U(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",k,P]}],"underline-offset":[{"underline-offset":["auto",k,s]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:c()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",s]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",s]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[I]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Q(),Ge]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",He]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Ve]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[S]}],"gradient-via-pos":[{via:[S]}],"gradient-to-pos":[{to:[S]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[u]}],"rounded-s":[{"rounded-s":[u]}],"rounded-e":[{"rounded-e":[u]}],"rounded-t":[{"rounded-t":[u]}],"rounded-r":[{"rounded-r":[u]}],"rounded-b":[{"rounded-b":[u]}],"rounded-l":[{"rounded-l":[u]}],"rounded-ss":[{"rounded-ss":[u]}],"rounded-se":[{"rounded-se":[u]}],"rounded-ee":[{"rounded-ee":[u]}],"rounded-es":[{"rounded-es":[u]}],"rounded-tl":[{"rounded-tl":[u]}],"rounded-tr":[{"rounded-tr":[u]}],"rounded-br":[{"rounded-br":[u]}],"rounded-bl":[{"rounded-bl":[u]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[I]}],"border-style":[{border:[...U(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[I]}],"divide-style":[{divide:U()}],"border-color":[{border:[d]}],"border-color-x":[{"border-x":[d]}],"border-color-y":[{"border-y":[d]}],"border-color-s":[{"border-s":[d]}],"border-color-e":[{"border-e":[d]}],"border-color-t":[{"border-t":[d]}],"border-color-r":[{"border-r":[d]}],"border-color-b":[{"border-b":[d]}],"border-color-l":[{"border-l":[d]}],"divide-color":[{divide:[d]}],"outline-style":[{outline:["",...U()]}],"outline-offset":[{"outline-offset":[k,s]}],"outline-w":[{outline:[k,P]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:J()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[I]}],"ring-offset-w":[{"ring-offset":[k,P]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",b,We]}],"shadow-color":[{shadow:[R]}],opacity:[{opacity:[I]}],"mix-blend":[{"mix-blend":[...j(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":j()}],filter:[{filter:["","none"]}],blur:[{blur:[t]}],brightness:[{brightness:[o]}],contrast:[{contrast:[i]}],"drop-shadow":[{"drop-shadow":["","none",b,s]}],grayscale:[{grayscale:[p]}],"hue-rotate":[{"hue-rotate":[m]}],invert:[{invert:[x]}],saturate:[{saturate:[M]}],sepia:[{sepia:[q]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[t]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[i]}],"backdrop-grayscale":[{"backdrop-grayscale":[p]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[m]}],"backdrop-invert":[{"backdrop-invert":[x]}],"backdrop-opacity":[{"backdrop-opacity":[I]}],"backdrop-saturate":[{"backdrop-saturate":[M]}],"backdrop-sepia":[{"backdrop-sepia":[q]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[r]}],"border-spacing-x":[{"border-spacing-x":[r]}],"border-spacing-y":[{"border-spacing-y":[r]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",s]}],duration:[{duration:w()}],ease:[{ease:["linear","in","out","in-out",s]}],delay:[{delay:w()}],animate:[{animate:["none","spin","ping","pulse","bounce",s]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[A]}],"scale-x":[{"scale-x":[A]}],"scale-y":[{"scale-y":[A]}],rotate:[{rotate:[D,s]}],"translate-x":[{"translate-x":[Z]}],"translate-y":[{"translate-y":[Z]}],"skew-x":[{"skew-x":[N]}],"skew-y":[{"skew-y":[N]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",s]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",s]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":c()}],"scroll-mx":[{"scroll-mx":c()}],"scroll-my":[{"scroll-my":c()}],"scroll-ms":[{"scroll-ms":c()}],"scroll-me":[{"scroll-me":c()}],"scroll-mt":[{"scroll-mt":c()}],"scroll-mr":[{"scroll-mr":c()}],"scroll-mb":[{"scroll-mb":c()}],"scroll-ml":[{"scroll-ml":c()}],"scroll-p":[{"scroll-p":c()}],"scroll-px":[{"scroll-px":c()}],"scroll-py":[{"scroll-py":c()}],"scroll-ps":[{"scroll-ps":c()}],"scroll-pe":[{"scroll-pe":c()}],"scroll-pt":[{"scroll-pt":c()}],"scroll-pr":[{"scroll-pr":c()}],"scroll-pb":[{"scroll-pb":c()}],"scroll-pl":[{"scroll-pl":c()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",s]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[k,P,W]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var re=ye(Ke);function se(...e){return re($(e))}var fe=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),O=(...e)=>e.filter((a,t,o)=>!!a&&a.trim()!==""&&o.indexOf(a)===t).join(" ").trim();var ie={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};var ne=react.forwardRef(({color:e="currentColor",size:a=24,strokeWidth:t=2,absoluteStrokeWidth:o,className:d="",children:u,iconNode:r,...l},i)=>react.createElement("svg",{ref:i,...ie,width:a,height:a,stroke:e,strokeWidth:o?Number(t)*24/Number(a):t,className:O("lucide",d),...l},[...r.map(([p,m])=>react.createElement(p,m)),...Array.isArray(u)?u:[u]]));var pe=(e,a)=>{let t=react.forwardRef(({className:o,...d},u)=>react.createElement(ne,{ref:u,iconNode:a,className:O(`lucide-${fe(e)}`,o),...d}));return t.displayName=`${e}`,t};var T=pe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var me=T;var Wa=["xs","sm","md"],Ea=["standard","primary"],Xa=["fill","outlined"],_e=tailwindVariants.tv({slots:{container:"flex cursor-default items-center rounded-3xl transition-all",startIcon:"",closeIcon:"cursor-pointer"},variants:{variant:{standard:{},primary:{}},type:{fill:{},outlined:{}},size:{md:{container:"min-h-8 gap-2.75 px-3",startIcon:"h-4.5 w-4.5",closeIcon:"h-4.5 w-4.5"},sm:{container:"min-h-6 gap-3.25 px-3 text-sm",startIcon:"h-3.5 w-3.5",closeIcon:"h-3.5 w-3.5"},xs:{container:"min-h-4 gap-4.5 px-2 text-xs",startIcon:"h-3.5 w-3.5",closeIcon:"h-3.5 w-3.5"}},disabled:{true:{},false:{}}},compoundVariants:[{disabled:!0,className:{container:"cursor-not-allowed",closeIcon:"cursor-not-allowed"}},{disabled:!1,variant:"standard",type:"fill",className:{container:"bg-neutral-100 text-neutral-700 hover:bg-neutral-200"}},{disabled:!0,variant:"standard",type:"fill",className:{container:"bg-neutral-100 text-neutral-400"}},{disabled:!1,variant:"primary",type:"fill",className:{container:"bg-primary-200 text-primary-800 hover:bg-primary-300"}},{disabled:!1,variant:"standard",type:"outlined",className:{container:"text-neutral-700 ring-1 ring-inset ring-neutral-700 hover:bg-primary-100"}},{disabled:!0,variant:"standard",type:"outlined",className:{container:"text-neutral-400 ring-1 ring-inset ring-neutral-400"}},{disabled:!1,variant:"primary",type:"outlined",className:{container:"text-primary-500 ring-1 ring-inset ring-primary-500 hover:bg-primary-100"}}],defaultVariants:{disabled:!1,size:"md"}}),$e=react.forwardRef(({children:e,onClose:a,StartIcon:t,className:o,hasCloseIcon:d=!0,disabled:u,variant:r,type:l,size:i,...p},m)=>{let{container:x,startIcon:C,closeIcon:h}=_e({variant:r,type:l,size:i,disabled:u});return jsxRuntime.jsxs("span",{ref:m,className:se(x(),o),...p,children:[t&&jsxRuntime.jsx(t,{className:C()}),e,d&&jsxRuntime.jsx(me,{onClick:()=>!u&&a?.(),className:h()})]})});$e.displayName="ChipInput";/*! Bundled license information:
|
|
2
2
|
|
|
3
3
|
lucide-react/dist/esm/shared/src/utils.js:
|
|
4
4
|
(**
|
package/dist/chip-input.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{d as ChipInput,a as ChipInputSizes,c as ChipInputTypes,b as ChipInputVariants}from'./chunk-
|
|
1
|
+
export{d as ChipInput,a as ChipInputSizes,c as ChipInputTypes,b as ChipInputVariants}from'./chunk-BRYDEYOA.mjs';import'./chunk-AF7XWQ5Y.mjs';import'./chunk-4SUP4N33.mjs';import'./chunk-2WINTZSS.mjs';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {d}from'./chunk-AF7XWQ5Y.mjs';import {a}from'./chunk-2WINTZSS.mjs';import {forwardRef}from'react';import {tv}from'tailwind-variants';import {jsxs,jsx}from'react/jsx-runtime';var V=["xs","sm","md"],L=["standard","primary"],R=["fill","outlined"],x=tv({slots:{container:"flex cursor-default items-center rounded-3xl transition-all",startIcon:"",closeIcon:"cursor-pointer"},variants:{variant:{standard:{},primary:{}},type:{fill:{},outlined:{}},size:{md:{container:"gap-2.75
|
|
1
|
+
import {d}from'./chunk-AF7XWQ5Y.mjs';import {a}from'./chunk-2WINTZSS.mjs';import {forwardRef}from'react';import {tv}from'tailwind-variants';import {jsxs,jsx}from'react/jsx-runtime';var V=["xs","sm","md"],L=["standard","primary"],R=["fill","outlined"],x=tv({slots:{container:"flex cursor-default items-center rounded-3xl transition-all",startIcon:"",closeIcon:"cursor-pointer"},variants:{variant:{standard:{},primary:{}},type:{fill:{},outlined:{}},size:{md:{container:"min-h-8 gap-2.75 px-3",startIcon:"h-4.5 w-4.5",closeIcon:"h-4.5 w-4.5"},sm:{container:"min-h-6 gap-3.25 px-3 text-sm",startIcon:"h-3.5 w-3.5",closeIcon:"h-3.5 w-3.5"},xs:{container:"min-h-4 gap-4.5 px-2 text-xs",startIcon:"h-3.5 w-3.5",closeIcon:"h-3.5 w-3.5"}},disabled:{true:{},false:{}}},compoundVariants:[{disabled:!0,className:{container:"cursor-not-allowed",closeIcon:"cursor-not-allowed"}},{disabled:!1,variant:"standard",type:"fill",className:{container:"bg-neutral-100 text-neutral-700 hover:bg-neutral-200"}},{disabled:!0,variant:"standard",type:"fill",className:{container:"bg-neutral-100 text-neutral-400"}},{disabled:!1,variant:"primary",type:"fill",className:{container:"bg-primary-200 text-primary-800 hover:bg-primary-300"}},{disabled:!1,variant:"standard",type:"outlined",className:{container:"text-neutral-700 ring-1 ring-inset ring-neutral-700 hover:bg-primary-100"}},{disabled:!0,variant:"standard",type:"outlined",className:{container:"text-neutral-400 ring-1 ring-inset ring-neutral-400"}},{disabled:!1,variant:"primary",type:"outlined",className:{container:"text-primary-500 ring-1 ring-inset ring-primary-500 hover:bg-primary-100"}}],defaultVariants:{disabled:!1,size:"md"}}),b=forwardRef(({children:i,onClose:s,StartIcon:t,className:o,hasCloseIcon:p=!0,disabled:a$1,variant:l,type:c,size:d$1,...m},u)=>{let{container:y,startIcon:I,closeIcon:f}=x({variant:l,type:c,size:d$1,disabled:a$1});return jsxs("span",{ref:u,className:a(y(),o),...m,children:[t&&jsx(t,{className:I()}),i,p&&jsx(d,{onClick:()=>!a$1&&s?.(),className:f()})]})});b.displayName="ChipInput";export{V as a,L as b,R as c,b as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-WGMDH4XX.mjs';import {d}from'./chunk-PDKUK5KM.mjs';import {a}from'./chunk-WWSXCOGT.mjs';import {a as a$5}from'./chunk-KTRSJBA4.mjs';import {a as a$4}from'./chunk-W2YOW3FA.mjs';import {a as a$3}from'./chunk-BVHU5ZT3.mjs';import {c}from'./chunk-WKE76KK4.mjs';import {b}from'./chunk-UBOAGDGR.mjs';import {c as c$1,h}from'./chunk-AF7XWQ5Y.mjs';import {a as a$2}from'./chunk-2WINTZSS.mjs';import bt,{createContext,useMemo,useCallback,useState,useRef,useEffect,useContext,useId}from'react';import*as Ct from'@radix-ui/react-portal';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var Vt=({title:t,titleLines:a=1,description:r,descriptionLines:e=1,Icon:n,iconAsColumn:o=!0,className:s,...i})=>jsxs("div",{className:a$2("flex gap-2 py-4 pl-4 pr-6",o&&"flex-col items-center gap-1",!o&&!r&&"items-center"),...i,children:[n&&jsx(n,{className:a$2("shrink-0 text-neutral-300"),size:24}),jsxs("div",{className:a$2("flex flex-col gap-1",o&&"text-center"),children:[jsx("p",{className:a$2("leading-[130%] text-neutral-500",!!r&&"font-medium"),style:a?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:a}:void 0,children:t}),r&&jsx("p",{className:"text-sm leading-[130%] text-neutral-500",style:e?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:e}:void 0,children:r})]})]}),at=Vt;var Ut=bt.memo(({handleSelect:t,NoResultsIcon:a$3,noResultsLabel:r,noResultsDescription:e,noResultsDescriptionLines:n,noResultsAsColumn:o,noResultsButtonOnClick:s,optionDescriptionLines:i,noResultsButtonLabel:g,filteredOptions:l,inputRect:w,inputRef:v,popoverPosition:k,optionsListRef:m,selectedOption:u,options:R,setFilteredOptions:b})=>jsx(Ct.Root,{asChild:!0,children:jsx("div",{ref:m,className:"pointer-events-auto fixed z-50 hidden w-full",style:w?{width:`${w.width}px`,left:w.left,top:k==="bottom"?`${w.bottom}px`:void 0,bottom:k==="top"?`${window.innerHeight-w.top}px`:void 0}:void 0,children:jsxs(a,{className:"elevation-8 mb-2 flex max-h-[336px] w-full flex-col rounded-lg bg-neutral-50",children:[l.length===0&&jsxs("div",{className:"elevation-8 max-h-88 flex flex-1 flex-col justify-center rounded-lg bg-neutral-50",children:[jsx(at,{title:r,description:e,Icon:a$3,iconAsColumn:o,descriptionLines:n}),s&&jsxs(Fragment,{children:[jsx(a$1,{}),jsx(c,{variant:"ghost",className:"my-3 w-fit self-center",onClick:f=>{m.current.style.display="none",v.current.value="",b(R),s();},children:g})]})]}),l.map(f=>jsx(Mt,{title:f.label,disabled:f.disabled,description:f.description,descriptionLines:i,onClick:()=>t(f),className:a$2(u?.value===f.value&&"bg-primary-200")},f.key??f.value))]})})})),zt=Ut;var qt=336,rr=({options:t,defaultSelectedOption:a,onSelect:r,onClick:e,onInputChange:n,error:o,helperText:s,label:i,placeholder:g,value:l,size:w="lg",optionDescriptionLines:v=1,noResultsLabel:k,noResultsIcon:m,noResultsDescription:u,noResultsDescriptionLines:R,noResultsAsColumn:b,noResultsButtonOnClick:f,noResultsButtonLabel:I,className:j,disabled:h})=>{let[c,x]=useState(a??null),L=useRef(null),p=useRef(null),[nt,st]=useState(),[lt,T]=useState([]),[ct,H]=useState("bottom"),[V,K]=useState(),G=qt,N=useCallback(y=>{L.current.style.display="none",p.current.value=y.label,x(y),r?.(y);},[r]),z=useCallback(()=>{if(!p?.current)return;let y=p.current.getBoundingClientRect();st(y);let A=V?V.height:G,M=window.innerHeight-y.bottom>A,Q=y.top>A;H(M?"bottom":Q?"top":"bottom");},[V?.height]),U=useCallback(()=>{let y=t.filter(A=>A.label.toLowerCase().includes(p?.current?.value.toLowerCase()??""));if(T(y),L?.current){let A=L.current.getBoundingClientRect();K(A);}},[t]);return useEffect(()=>{T(t);},[t]),useEffect(()=>{if(!l){x(null),p.current&&(p.current.value="");return}(!p.current?.value||c?.value!==l.value)&&(x(l),p.current.value=l.label);},[l]),a$5(L,()=>{L.current.style.display="none",c&&p.current&&(p.current.value=c.label);}),useEffect(()=>{if(p?.current)return z(),p.current.addEventListener("mousedown",z),p.current.addEventListener("input",U),window.addEventListener("scroll",z,!0),window.addEventListener("resize",z),()=>{p.current?.removeEventListener("mousedown",z),p.current?.removeEventListener("input",U),window.removeEventListener("scroll",z,!0),window.removeEventListener("resize",z);}},[z,U]),jsxs("div",{className:a$2("relative",j),children:[jsx(a$4,{ref:p,autoComplete:"off",list:"",selectMode:!0,onChange:y=>{y.target.value||(x(null),r?.(null)),n?.(y);},onClean:()=>{x(null),T(t),r?.(null);},onClick:y=>{L.current.style.display="flex",e?.(y);},onBlur:()=>{c&&p.current&&(p.current.value=c.label);},label:i,helperText:s,placeholder:g,size:w,error:o,disabled:h}),jsx(zt,{handleSelect:N,noResultsLabel:k,NoResultsIcon:m,optionDescriptionLines:v,noResultsAsColumn:b,noResultsButtonLabel:I,noResultsButtonOnClick:f,noResultsDescription:u,noResultsDescriptionLines:R,filteredOptions:lt,inputRect:nt,inputRef:p,popoverPosition:ct,optionsListRef:L,selectedOption:c,options:t,setFilteredOptions:T})]})};var Kt=({children:t,title:a,titleLines:r,description:e="",descriptionLines:n,disabled:o=!1,className:s,...i})=>jsxs("div",{className:"flex w-full flex-col",...i,children:[jsx("p",{className:a$2(!!e&&"font-medium"),style:r?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:r}:void 0,children:a}),e&&jsx("p",{className:a$2("text-sm",o?"text-neutral-400":"text-neutral-700"),style:n?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:n}:void 0,children:e})]}),Y=Kt;var mr=({children:t,title:a,titleLines:r,description:e="",descriptionLines:n,startIcon:o,badgeContent:s,hasDivider:i=!1,disabled:g=!1,onSelect:l,className:w,...v})=>jsxs(_,{hasDescription:!!e,disabled:g,onClick:l,hasDivider:i,className:a$2(!g&&"cursor-pointer",w),...v,children:[o&&bt.cloneElement(o,{className:a$2(e?"mt-[0.4rem]":"self-center","shrink-0"),size:18}),jsx(Y,{title:a,titleLines:r,description:e,descriptionLines:n,disabled:g}),jsxs("div",{className:"flex gap-2",children:[s&&jsx(a$3,{content:s,size:"lg",variant:"alert",className:a$2("self-center",g&&"bg-neutral-400")}),jsx(h,{className:"h-4.5 w-4.5 self-center"})]})]});var St=({children:t,title:a,titleLines:r,description:e="",descriptionLines:n,startIcon:o,hasDivider:s=!1,disabled:i=!1,checked:g,onCheckedChange:l,className:w,...v})=>jsxs(_,{hasDescription:!!e,disabled:i,hasDivider:s,...v,className:a$2("pr-6",w),children:[o&&bt.cloneElement(o,{className:a$2(e?"mt-[0.4rem]":"self-center","shrink-0"),size:18}),jsx(Y,{title:a,titleLines:r,description:e,descriptionLines:n,disabled:i}),jsx(b,{size:"sm",checked:g,onCheckedChange:l,className:"self-center",disabled:i})]});var E=336,Ft=createContext({inputRef:null,optionsListRef:null,scrollAreaRef:null,autocompleteId:"",inputRect:void 0,showChips:!1,filteredOptions:[],currentFocus:-1,popoverPosition:"bottom",setFilteredOptions:()=>{},setCurrentFocus:()=>{},setShowChips:()=>{},setPopoverPosition:()=>{},setInputRect:()=>{},optionsListHeight:E,setOptionsListHeight:()=>{},optionsListRect:void 0,setOptionsListRect:()=>{}}),P=()=>{let t=useContext(Ft);if(t===null)throw new Error("useAutocompleteMultipleContext must be used within a AutocompleteMultipleProvider");return t},Dt=({children:t})=>{let a=useRef(null),r=useRef(null),e=useRef(null),n=useId(),[o,s]=useState(),[i,g]=useState(!0),[l,w]=useState([]),[v,k]=useState(-1),[m,u]=useState("bottom"),[R,b]=useState(),[f,I]=useState(E);return jsx(Ft.Provider,{value:{optionsListRef:a,inputRef:r,scrollAreaRef:e,autocompleteId:n,inputRect:o,showChips:i,filteredOptions:l,currentFocus:v,popoverPosition:m,setFilteredOptions:w,setCurrentFocus:k,setShowChips:g,setPopoverPosition:u,setInputRect:s,optionsListHeight:f,optionsListRect:R,setOptionsListRect:b,setOptionsListHeight:I},children:t})};var le=({option:t,onMountWidth:a,size:r})=>{let e=useRef(null);return useEffect(()=>{e.current&&a?.(e.current.clientWidth);},[]),jsx(d,{type:"fill",variant:"standard",ref:e,className:"flex-shrink-0",size:r==="md"?"xs":"sm",hasCloseIcon:!1,children:t.label})},Tt=le;var ge=150,we=bt.memo(({selectedOptions:t,error:a,onCleanSelectedOptions:r,size:e})=>{let{autocompleteId:n,inputRect:o,inputRef:s,optionsListRef:i}=P(),g=bt.useRef(null),[l,w]=bt.useState(new Map),v=useMemo(()=>{if(!o?.width)return [];let m=0,u=o.width-ge,R=0;for(let b=0;b<t.length&&(R+=l.get(b)??0,!(R>u));b++)m++;return t.slice(0,m)},[o?.width,t,l]),k=useCallback(()=>{s?.current?.focus(),i.current.style.display="flex";},[]);return jsxs("div",{onClick:k,className:"absolute top-0 z-30 flex w-full cursor-pointer flex-nowrap items-center gap-2 pl-3 pr-12",style:{maxWidth:o?.width?o?.width:void 0,height:o?.height?o?.height:void 0},children:[jsx("div",{className:"flex flex-1 gap-1 overflow-hidden",ref:g,children:v.map((m,u)=>jsx(Tt,{option:m,onMountWidth:R=>w(b=>new Map(b).set(u,R)),size:e},`chip-input-${n}-${m.value}`))}),t.length>v.length&&jsx("span",{className:"text-base",children:"..."}),t.length>0&&!a&&jsx(a$3,{content:String(t.length),size:e}),a&&t.length>0&&jsx(c$1,{className:"h-6 w-6 text-error-700",onClick:m=>{m.stopPropagation(),r();}})]})}),Ht=we;var be=bt.memo(({option:t,index:a,onPressOption:r,isSelected:e,optionDescriptionLines:n})=>{let{currentFocus:o,inputRef:s}=P();return jsx(St,{title:t.label,checked:e,disabled:t.disabled,className:o===a?"bg-primary-200":void 0,onMouseDown:i=>{s?.current?.value&&i.preventDefault(),r?.(t,i);},description:t.description,descriptionLines:n})}),ht=be;var xe=bt.memo(({selectedOptions:t,handleSelect:a$2,NoResultsIcon:r,noResultsLabel:e,noResultsDescription:n,noResultsDescriptionLines:o,noResultsAsColumn:s,noResultsButtonOnClick:i,optionDescriptionLines:g,noResultsButtonLabel:l})=>{let{popoverPosition:w,scrollAreaRef:v,optionsListRef:k,filteredOptions:m,inputRect:u,autocompleteId:R,inputRef:b,optionsListHeight:f}=P(),I=useCallback(h=>t.some(c=>c.value===h.value),[t]),j=useMemo(()=>t.filter(h=>h.label.toLowerCase().includes(b?.current?.value.toLowerCase()??"")),[t,b?.current?.value]);return jsx(Ct.Root,{asChild:!0,children:jsx("div",{ref:k,className:"pointer-events-auto fixed z-50 hidden w-full",style:u?{width:`${u.width}px`,left:u.left,top:w==="bottom"?`${u.bottom}px`:void 0,bottom:w==="top"?`${window.innerHeight-u.top}px`:void 0}:void 0,children:jsxs(a,{className:"elevation-8 mb-2 flex w-full flex-col rounded-lg bg-neutral-50",style:{maxHeight:f+"px"},ref:v,children:[m.length===0&&jsxs("div",{className:"elevation-8 max-h-88 flex flex-1 flex-col justify-center rounded-lg bg-neutral-50",children:[jsx(at,{title:e,description:n,Icon:r,iconAsColumn:s,descriptionLines:o}),i&&jsxs(Fragment,{children:[jsx(a$1,{}),jsx(c,{variant:"ghost",className:"my-3 w-fit self-center",onClick:h=>{k.current.style.display="none",b.current.value="",i();},children:l})]})]}),j.map((h,c)=>jsx(ht,{option:h,index:c,onPressOption:(x,L)=>a$2(x),isSelected:I(h),optionDescriptionLines:g},`autocomplete-option-${R}-${h.key??h.value}`)),m.map((h,c)=>!t.some(x=>x.value===h.value)&&jsx(ht,{option:h,index:c,onPressOption:(x,L)=>a$2(x),isSelected:I(h),optionDescriptionLines:g},`autocomplete-option-${R}-${h.key??h.value}`))]})})})}),Xt=xe;var Le=bt.memo(({selectedOptions:t,onSelect:a,error:r,helperText:e,label:n,placeholder:o,options:s,onInputChange:i,size:g,disabled:l})=>{let{setCurrentFocus:w,setFilteredOptions:v,optionsListRef:k,inputRef:m}=P();return jsx(a$4,{ref:m,autoComplete:"off",list:"",disabled:l,selectMode:!0,onChange:u=>{w(-1),i?.(u.target.value);},onClean:()=>{w(-1),v(s),a?.(null,t);},onClick:()=>{l||(k.current.style.display="flex");},error:r,helperText:e,label:n,placeholder:o,fixedTopLabel:t.length>0,size:g})}),Bt=Le;var Yt=({options:t,defaultSelectedOptions:a,onSelect:r,error:e,helperText:n,label:o,placeholder:s,noResultsLabel:i,noResultsIcon:g,noResultsDescription:l,noResultsDescriptionLines:w,noResultsAsColumn:v,noResultsButtonOnClick:k,noResultsButtonLabel:m,className:u,onInputChange:R,value:b,loading:f,size:I="lg",optionDescriptionLines:j=1,disabled:h})=>{let{inputRef:c,optionsListRef:x,setFilteredOptions:L,setShowChips:p,setInputRect:nt,setPopoverPosition:st,setCurrentFocus:lt,showChips:T,setOptionsListRect:ct,optionsListRect:H,setOptionsListHeight:V}=P(),K=useRef(!1),[G,N]=useState(a??[]),z=useCallback(C=>{N(O=>{let S,$=O.findIndex(jt=>jt.value===C.value);return $===-1?(S=O.concat(C),r?.(C,S),S):(S=O.toSpliced($,1),r?.(C,S),S)});},[]),U=useCallback(()=>{N([]),L(t),r?.(null,[]);},[]),y=useCallback(()=>{p(!1);},[]),A=useCallback(()=>{p(!0);},[]),M=useCallback(()=>{if(!c?.current)return;let C=c.current.getBoundingClientRect();nt(C);let O=H?H.height>E?E:H.height:E,S=window.innerHeight-C.bottom>O,$=C.top>O;st(S?"bottom":$?"top":"bottom"),V($?E:window.innerHeight-C.bottom>E?E:window.innerHeight-C.bottom);},[H?.height]),Q=useCallback(()=>{let C=t.filter(O=>O.label.toLowerCase().includes(c?.current?.value.toLowerCase()??""));if(L(C),x?.current){let O=x.current.getBoundingClientRect();ct(O);}},[t,x?.current]);return useEffect(()=>{L(t);},[t]),a$5(x,()=>{x.current.style.display="none",lt(-1);}),useEffect(()=>{if(c?.current)return M(),c.current.addEventListener("mousedown",M),c.current.addEventListener("input",Q),c.current.addEventListener("focusin",y),c.current.addEventListener("focusout",A),window.addEventListener("scroll",M,!0),window.addEventListener("resize",M),()=>{c.current?.removeEventListener("mousedown",M),c.current?.removeEventListener("input",M),c.current?.removeEventListener("focusout",A),c.current?.removeEventListener("focusin",y),window.removeEventListener("scroll",M,!0),window.removeEventListener("resize",M);}},[M,A,y,Q]),useEffect(()=>{b&&(N(b),p(!0));},[b]),useEffect(()=>{f||a&&a.length&&!K.current&&(N(a),K.current=!0,p(!0));},[a,f]),jsxs("div",{className:a$2("relative",u),children:[jsx(Bt,{selectedOptions:G,onSelect:r,error:e,helperText:n,label:o,placeholder:s,handleSelect:z,options:t,onInputChange:R,size:I,disabled:h}),T&&jsx(Ht,{selectedOptions:G,error:e,onCleanSelectedOptions:U,size:I}),jsx(Xt,{handleSelect:z,selectedOptions:G,noResultsLabel:i,NoResultsIcon:g,optionDescriptionLines:j,noResultsAsColumn:v,noResultsButtonLabel:m,noResultsButtonOnClick:k,noResultsDescription:l,noResultsDescriptionLines:w})]})};var Ao=t=>jsx(Dt,{children:jsx(Yt,{...t})});var Oe=({children:t,hasDescription:a=!1,disabled:r=!1,hasDivider:e=!1,className:n,onClick:o,...s})=>jsxs(Fragment,{children:[jsx("div",{className:a$2("line-height-[120%] flex flex-row gap-4 pl-4 pr-3",a?"py-3":"py-[0.875rem]",r?"text-neutral-400":"hover:bg-primary-100 focus:bg-primary-200",n),onClick:i=>{r||o?.(i);},...s,children:t}),e&&jsx(a$1,{})]}),_=Oe;var Mt=({children:t,title:a,titleLines:r,description:e="",descriptionLines:n,startIcon:o,hasDivider:s=!1,disabled:i=!1,className:g,...l})=>jsxs(_,{hasDescription:!!e,disabled:i,hasDivider:s,className:g,...l,children:[o&&bt.cloneElement(o,{className:a$2(e?"mt-[0.4rem]":"self-center","shrink-0"),size:18}),jsx(Y,{title:a,titleLines:r,description:e,descriptionLines:n,disabled:i})]});export{rr as a,Mt as b,mr as c,St as d,Ao as e};
|
|
1
|
+
import {a as a$1}from'./chunk-WGMDH4XX.mjs';import {d}from'./chunk-BRYDEYOA.mjs';import {a}from'./chunk-WWSXCOGT.mjs';import {a as a$5}from'./chunk-KTRSJBA4.mjs';import {a as a$4}from'./chunk-W2YOW3FA.mjs';import {a as a$3}from'./chunk-BVHU5ZT3.mjs';import {c}from'./chunk-WKE76KK4.mjs';import {b}from'./chunk-UBOAGDGR.mjs';import {c as c$1,h}from'./chunk-AF7XWQ5Y.mjs';import {a as a$2}from'./chunk-2WINTZSS.mjs';import bt,{createContext,useMemo,useCallback,useState,useRef,useEffect,useContext,useId}from'react';import*as Ct from'@radix-ui/react-portal';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var Vt=({title:t,titleLines:a=1,description:r,descriptionLines:e=1,Icon:n,iconAsColumn:o=!0,className:s,...i})=>jsxs("div",{className:a$2("flex gap-2 py-4 pl-4 pr-6",o&&"flex-col items-center gap-1",!o&&!r&&"items-center"),...i,children:[n&&jsx(n,{className:a$2("shrink-0 text-neutral-300"),size:24}),jsxs("div",{className:a$2("flex flex-col gap-1",o&&"text-center"),children:[jsx("p",{className:a$2("leading-[130%] text-neutral-500",!!r&&"font-medium"),style:a?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:a}:void 0,children:t}),r&&jsx("p",{className:"text-sm leading-[130%] text-neutral-500",style:e?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:e}:void 0,children:r})]})]}),at=Vt;var Ut=bt.memo(({handleSelect:t,NoResultsIcon:a$3,noResultsLabel:r,noResultsDescription:e,noResultsDescriptionLines:n,noResultsAsColumn:o,noResultsButtonOnClick:s,optionDescriptionLines:i,noResultsButtonLabel:g,filteredOptions:l,inputRect:w,inputRef:v,popoverPosition:k,optionsListRef:m,selectedOption:u,options:R,setFilteredOptions:b})=>jsx(Ct.Root,{asChild:!0,children:jsx("div",{ref:m,className:"pointer-events-auto fixed z-50 hidden w-full",style:w?{width:`${w.width}px`,left:w.left,top:k==="bottom"?`${w.bottom}px`:void 0,bottom:k==="top"?`${window.innerHeight-w.top}px`:void 0}:void 0,children:jsxs(a,{className:"elevation-8 mb-2 flex max-h-[336px] w-full flex-col rounded-lg bg-neutral-50",children:[l.length===0&&jsxs("div",{className:"elevation-8 max-h-88 flex flex-1 flex-col justify-center rounded-lg bg-neutral-50",children:[jsx(at,{title:r,description:e,Icon:a$3,iconAsColumn:o,descriptionLines:n}),s&&jsxs(Fragment,{children:[jsx(a$1,{}),jsx(c,{variant:"ghost",className:"my-3 w-fit self-center",onClick:f=>{m.current.style.display="none",v.current.value="",b(R),s();},children:g})]})]}),l.map(f=>jsx(Mt,{title:f.label,disabled:f.disabled,description:f.description,descriptionLines:i,onClick:()=>t(f),className:a$2(u?.value===f.value&&"bg-primary-200")},f.key??f.value))]})})})),zt=Ut;var qt=336,rr=({options:t,defaultSelectedOption:a,onSelect:r,onClick:e,onInputChange:n,error:o,helperText:s,label:i,placeholder:g,value:l,size:w="lg",optionDescriptionLines:v=1,noResultsLabel:k,noResultsIcon:m,noResultsDescription:u,noResultsDescriptionLines:R,noResultsAsColumn:b,noResultsButtonOnClick:f,noResultsButtonLabel:I,className:j,disabled:h})=>{let[c,x]=useState(a??null),L=useRef(null),p=useRef(null),[nt,st]=useState(),[lt,T]=useState([]),[ct,H]=useState("bottom"),[V,K]=useState(),G=qt,N=useCallback(y=>{L.current.style.display="none",p.current.value=y.label,x(y),r?.(y);},[r]),z=useCallback(()=>{if(!p?.current)return;let y=p.current.getBoundingClientRect();st(y);let A=V?V.height:G,M=window.innerHeight-y.bottom>A,Q=y.top>A;H(M?"bottom":Q?"top":"bottom");},[V?.height]),U=useCallback(()=>{let y=t.filter(A=>A.label.toLowerCase().includes(p?.current?.value.toLowerCase()??""));if(T(y),L?.current){let A=L.current.getBoundingClientRect();K(A);}},[t]);return useEffect(()=>{T(t);},[t]),useEffect(()=>{if(!l){x(null),p.current&&(p.current.value="");return}(!p.current?.value||c?.value!==l.value)&&(x(l),p.current.value=l.label);},[l]),a$5(L,()=>{L.current.style.display="none",c&&p.current&&(p.current.value=c.label);}),useEffect(()=>{if(p?.current)return z(),p.current.addEventListener("mousedown",z),p.current.addEventListener("input",U),window.addEventListener("scroll",z,!0),window.addEventListener("resize",z),()=>{p.current?.removeEventListener("mousedown",z),p.current?.removeEventListener("input",U),window.removeEventListener("scroll",z,!0),window.removeEventListener("resize",z);}},[z,U]),jsxs("div",{className:a$2("relative",j),children:[jsx(a$4,{ref:p,autoComplete:"off",list:"",selectMode:!0,onChange:y=>{y.target.value||(x(null),r?.(null)),n?.(y);},onClean:()=>{x(null),T(t),r?.(null);},onClick:y=>{L.current.style.display="flex",e?.(y);},onBlur:()=>{c&&p.current&&(p.current.value=c.label);},label:i,helperText:s,placeholder:g,size:w,error:o,disabled:h}),jsx(zt,{handleSelect:N,noResultsLabel:k,NoResultsIcon:m,optionDescriptionLines:v,noResultsAsColumn:b,noResultsButtonLabel:I,noResultsButtonOnClick:f,noResultsDescription:u,noResultsDescriptionLines:R,filteredOptions:lt,inputRect:nt,inputRef:p,popoverPosition:ct,optionsListRef:L,selectedOption:c,options:t,setFilteredOptions:T})]})};var Kt=({children:t,title:a,titleLines:r,description:e="",descriptionLines:n,disabled:o=!1,className:s,...i})=>jsxs("div",{className:"flex w-full flex-col",...i,children:[jsx("p",{className:a$2(!!e&&"font-medium"),style:r?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:r}:void 0,children:a}),e&&jsx("p",{className:a$2("text-sm",o?"text-neutral-400":"text-neutral-700"),style:n?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:n}:void 0,children:e})]}),Y=Kt;var mr=({children:t,title:a,titleLines:r,description:e="",descriptionLines:n,startIcon:o,badgeContent:s,hasDivider:i=!1,disabled:g=!1,onSelect:l,className:w,...v})=>jsxs(_,{hasDescription:!!e,disabled:g,onClick:l,hasDivider:i,className:a$2(!g&&"cursor-pointer",w),...v,children:[o&&bt.cloneElement(o,{className:a$2(e?"mt-[0.4rem]":"self-center","shrink-0"),size:18}),jsx(Y,{title:a,titleLines:r,description:e,descriptionLines:n,disabled:g}),jsxs("div",{className:"flex gap-2",children:[s&&jsx(a$3,{content:s,size:"lg",variant:"alert",className:a$2("self-center",g&&"bg-neutral-400")}),jsx(h,{className:"h-4.5 w-4.5 self-center"})]})]});var St=({children:t,title:a,titleLines:r,description:e="",descriptionLines:n,startIcon:o,hasDivider:s=!1,disabled:i=!1,checked:g,onCheckedChange:l,className:w,...v})=>jsxs(_,{hasDescription:!!e,disabled:i,hasDivider:s,...v,className:a$2("pr-6",w),children:[o&&bt.cloneElement(o,{className:a$2(e?"mt-[0.4rem]":"self-center","shrink-0"),size:18}),jsx(Y,{title:a,titleLines:r,description:e,descriptionLines:n,disabled:i}),jsx(b,{size:"sm",checked:g,onCheckedChange:l,className:"self-center",disabled:i})]});var E=336,Ft=createContext({inputRef:null,optionsListRef:null,scrollAreaRef:null,autocompleteId:"",inputRect:void 0,showChips:!1,filteredOptions:[],currentFocus:-1,popoverPosition:"bottom",setFilteredOptions:()=>{},setCurrentFocus:()=>{},setShowChips:()=>{},setPopoverPosition:()=>{},setInputRect:()=>{},optionsListHeight:E,setOptionsListHeight:()=>{},optionsListRect:void 0,setOptionsListRect:()=>{}}),P=()=>{let t=useContext(Ft);if(t===null)throw new Error("useAutocompleteMultipleContext must be used within a AutocompleteMultipleProvider");return t},Dt=({children:t})=>{let a=useRef(null),r=useRef(null),e=useRef(null),n=useId(),[o,s]=useState(),[i,g]=useState(!0),[l,w]=useState([]),[v,k]=useState(-1),[m,u]=useState("bottom"),[R,b]=useState(),[f,I]=useState(E);return jsx(Ft.Provider,{value:{optionsListRef:a,inputRef:r,scrollAreaRef:e,autocompleteId:n,inputRect:o,showChips:i,filteredOptions:l,currentFocus:v,popoverPosition:m,setFilteredOptions:w,setCurrentFocus:k,setShowChips:g,setPopoverPosition:u,setInputRect:s,optionsListHeight:f,optionsListRect:R,setOptionsListRect:b,setOptionsListHeight:I},children:t})};var le=({option:t,onMountWidth:a,size:r})=>{let e=useRef(null);return useEffect(()=>{e.current&&a?.(e.current.clientWidth);},[]),jsx(d,{type:"fill",variant:"standard",ref:e,className:"flex-shrink-0",size:r==="md"?"xs":"sm",hasCloseIcon:!1,children:t.label})},Tt=le;var ge=150,we=bt.memo(({selectedOptions:t,error:a,onCleanSelectedOptions:r,size:e})=>{let{autocompleteId:n,inputRect:o,inputRef:s,optionsListRef:i}=P(),g=bt.useRef(null),[l,w]=bt.useState(new Map),v=useMemo(()=>{if(!o?.width)return [];let m=0,u=o.width-ge,R=0;for(let b=0;b<t.length&&(R+=l.get(b)??0,!(R>u));b++)m++;return t.slice(0,m)},[o?.width,t,l]),k=useCallback(()=>{s?.current?.focus(),i.current.style.display="flex";},[]);return jsxs("div",{onClick:k,className:"absolute top-0 z-30 flex w-full cursor-pointer flex-nowrap items-center gap-2 pl-3 pr-12",style:{maxWidth:o?.width?o?.width:void 0,height:o?.height?o?.height:void 0},children:[jsx("div",{className:"flex flex-1 gap-1 overflow-hidden",ref:g,children:v.map((m,u)=>jsx(Tt,{option:m,onMountWidth:R=>w(b=>new Map(b).set(u,R)),size:e},`chip-input-${n}-${m.value}`))}),t.length>v.length&&jsx("span",{className:"text-base",children:"..."}),t.length>0&&!a&&jsx(a$3,{content:String(t.length),size:e}),a&&t.length>0&&jsx(c$1,{className:"h-6 w-6 text-error-700",onClick:m=>{m.stopPropagation(),r();}})]})}),Ht=we;var be=bt.memo(({option:t,index:a,onPressOption:r,isSelected:e,optionDescriptionLines:n})=>{let{currentFocus:o,inputRef:s}=P();return jsx(St,{title:t.label,checked:e,disabled:t.disabled,className:o===a?"bg-primary-200":void 0,onMouseDown:i=>{s?.current?.value&&i.preventDefault(),r?.(t,i);},description:t.description,descriptionLines:n})}),ht=be;var xe=bt.memo(({selectedOptions:t,handleSelect:a$2,NoResultsIcon:r,noResultsLabel:e,noResultsDescription:n,noResultsDescriptionLines:o,noResultsAsColumn:s,noResultsButtonOnClick:i,optionDescriptionLines:g,noResultsButtonLabel:l})=>{let{popoverPosition:w,scrollAreaRef:v,optionsListRef:k,filteredOptions:m,inputRect:u,autocompleteId:R,inputRef:b,optionsListHeight:f}=P(),I=useCallback(h=>t.some(c=>c.value===h.value),[t]),j=useMemo(()=>t.filter(h=>h.label.toLowerCase().includes(b?.current?.value.toLowerCase()??"")),[t,b?.current?.value]);return jsx(Ct.Root,{asChild:!0,children:jsx("div",{ref:k,className:"pointer-events-auto fixed z-50 hidden w-full",style:u?{width:`${u.width}px`,left:u.left,top:w==="bottom"?`${u.bottom}px`:void 0,bottom:w==="top"?`${window.innerHeight-u.top}px`:void 0}:void 0,children:jsxs(a,{className:"elevation-8 mb-2 flex w-full flex-col rounded-lg bg-neutral-50",style:{maxHeight:f+"px"},ref:v,children:[m.length===0&&jsxs("div",{className:"elevation-8 max-h-88 flex flex-1 flex-col justify-center rounded-lg bg-neutral-50",children:[jsx(at,{title:e,description:n,Icon:r,iconAsColumn:s,descriptionLines:o}),i&&jsxs(Fragment,{children:[jsx(a$1,{}),jsx(c,{variant:"ghost",className:"my-3 w-fit self-center",onClick:h=>{k.current.style.display="none",b.current.value="",i();},children:l})]})]}),j.map((h,c)=>jsx(ht,{option:h,index:c,onPressOption:(x,L)=>a$2(x),isSelected:I(h),optionDescriptionLines:g},`autocomplete-option-${R}-${h.key??h.value}`)),m.map((h,c)=>!t.some(x=>x.value===h.value)&&jsx(ht,{option:h,index:c,onPressOption:(x,L)=>a$2(x),isSelected:I(h),optionDescriptionLines:g},`autocomplete-option-${R}-${h.key??h.value}`))]})})})}),Xt=xe;var Le=bt.memo(({selectedOptions:t,onSelect:a,error:r,helperText:e,label:n,placeholder:o,options:s,onInputChange:i,size:g,disabled:l})=>{let{setCurrentFocus:w,setFilteredOptions:v,optionsListRef:k,inputRef:m}=P();return jsx(a$4,{ref:m,autoComplete:"off",list:"",disabled:l,selectMode:!0,onChange:u=>{w(-1),i?.(u.target.value);},onClean:()=>{w(-1),v(s),a?.(null,t);},onClick:()=>{l||(k.current.style.display="flex");},error:r,helperText:e,label:n,placeholder:o,fixedTopLabel:t.length>0,size:g})}),Bt=Le;var Yt=({options:t,defaultSelectedOptions:a,onSelect:r,error:e,helperText:n,label:o,placeholder:s,noResultsLabel:i,noResultsIcon:g,noResultsDescription:l,noResultsDescriptionLines:w,noResultsAsColumn:v,noResultsButtonOnClick:k,noResultsButtonLabel:m,className:u,onInputChange:R,value:b,loading:f,size:I="lg",optionDescriptionLines:j=1,disabled:h})=>{let{inputRef:c,optionsListRef:x,setFilteredOptions:L,setShowChips:p,setInputRect:nt,setPopoverPosition:st,setCurrentFocus:lt,showChips:T,setOptionsListRect:ct,optionsListRect:H,setOptionsListHeight:V}=P(),K=useRef(!1),[G,N]=useState(a??[]),z=useCallback(C=>{N(O=>{let S,$=O.findIndex(jt=>jt.value===C.value);return $===-1?(S=O.concat(C),r?.(C,S),S):(S=O.toSpliced($,1),r?.(C,S),S)});},[]),U=useCallback(()=>{N([]),L(t),r?.(null,[]);},[]),y=useCallback(()=>{p(!1);},[]),A=useCallback(()=>{p(!0);},[]),M=useCallback(()=>{if(!c?.current)return;let C=c.current.getBoundingClientRect();nt(C);let O=H?H.height>E?E:H.height:E,S=window.innerHeight-C.bottom>O,$=C.top>O;st(S?"bottom":$?"top":"bottom"),V($?E:window.innerHeight-C.bottom>E?E:window.innerHeight-C.bottom);},[H?.height]),Q=useCallback(()=>{let C=t.filter(O=>O.label.toLowerCase().includes(c?.current?.value.toLowerCase()??""));if(L(C),x?.current){let O=x.current.getBoundingClientRect();ct(O);}},[t,x?.current]);return useEffect(()=>{L(t);},[t]),a$5(x,()=>{x.current.style.display="none",lt(-1);}),useEffect(()=>{if(c?.current)return M(),c.current.addEventListener("mousedown",M),c.current.addEventListener("input",Q),c.current.addEventListener("focusin",y),c.current.addEventListener("focusout",A),window.addEventListener("scroll",M,!0),window.addEventListener("resize",M),()=>{c.current?.removeEventListener("mousedown",M),c.current?.removeEventListener("input",M),c.current?.removeEventListener("focusout",A),c.current?.removeEventListener("focusin",y),window.removeEventListener("scroll",M,!0),window.removeEventListener("resize",M);}},[M,A,y,Q]),useEffect(()=>{b&&(N(b),p(!0));},[b]),useEffect(()=>{f||a&&a.length&&!K.current&&(N(a),K.current=!0,p(!0));},[a,f]),jsxs("div",{className:a$2("relative",u),children:[jsx(Bt,{selectedOptions:G,onSelect:r,error:e,helperText:n,label:o,placeholder:s,handleSelect:z,options:t,onInputChange:R,size:I,disabled:h}),T&&jsx(Ht,{selectedOptions:G,error:e,onCleanSelectedOptions:U,size:I}),jsx(Xt,{handleSelect:z,selectedOptions:G,noResultsLabel:i,NoResultsIcon:g,optionDescriptionLines:j,noResultsAsColumn:v,noResultsButtonLabel:m,noResultsButtonOnClick:k,noResultsDescription:l,noResultsDescriptionLines:w})]})};var Ao=t=>jsx(Dt,{children:jsx(Yt,{...t})});var Oe=({children:t,hasDescription:a=!1,disabled:r=!1,hasDivider:e=!1,className:n,onClick:o,...s})=>jsxs(Fragment,{children:[jsx("div",{className:a$2("line-height-[120%] flex flex-row gap-4 pl-4 pr-3",a?"py-3":"py-[0.875rem]",r?"text-neutral-400":"hover:bg-primary-100 focus:bg-primary-200",n),onClick:i=>{r||o?.(i);},...s,children:t}),e&&jsx(a$1,{})]}),_=Oe;var Mt=({children:t,title:a,titleLines:r,description:e="",descriptionLines:n,startIcon:o,hasDivider:s=!1,disabled:i=!1,className:g,...l})=>jsxs(_,{hasDescription:!!e,disabled:i,hasDivider:s,className:g,...l,children:[o&&bt.cloneElement(o,{className:a$2(e?"mt-[0.4rem]":"self-center","shrink-0"),size:18}),jsx(Y,{title:a,titleLines:r,description:e,descriptionLines:n,disabled:i})]});export{rr as a,Mt as b,mr as c,St as d,Ao as e};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a}from'./chunk-KTRSJBA4.mjs';import {a as a$1}from'./chunk-W2YOW3FA.mjs';import {a as a$3}from'./chunk-NUDVEK4R.mjs';import {n}from'./chunk-AF7XWQ5Y.mjs';import {a as a$2}from'./chunk-2WINTZSS.mjs';import {useState,useRef,useMemo,useCallback,useEffect}from'react';import*as E from'@radix-ui/react-portal';import {format}from'date-fns';import {jsxs,Fragment,jsx}from'react/jsx-runtime';var $=({value:l,onChange:f,locale:d,...L})=>{let[b,v]=useState(!1),[a$4,u]=useState(l),[r,C]=useState(),[k,x]=useState("bottom"),[T,F]=useState(0),c=useRef(null),e=useRef(null),[p,y]=useState();a(c,()=>{v(!1);});let H=n=>{u(n),f?.(n);},z=useMemo(()=>a$4?format(a$4,"P",{locale:d}):"",[a$4,d]),M=()=>{u(void 0),f?.(void 0);},t=useCallback(()=>{if(!e.current)return;let n=e.current.getBoundingClientRect();if(!p)return;let i=p.height;F(i),C(n);let N=window.innerHeight-n.bottom>i,O=n.top+n.height>i;x(N?"bottom":O?"top":"bottom");},[e.current,p]);return useEffect(()=>{u(l);},[l]),useEffect(()=>{if(e?.current)return t(),e.current.addEventListener("mousedown",t),e.current.addEventListener("input",t),window.addEventListener("scroll",t,!0),window.addEventListener("resize",t),()=>{e.current?.removeEventListener("mousedown",t),e.current?.removeEventListener("input",t),window.removeEventListener("scroll",t,!0),window.removeEventListener("resize",t);}},[e.current,t]),useEffect(()=>{y(c.current?.getBoundingClientRect());},[c.current]),jsxs(Fragment,{children:[jsx(a$1,{ref:e,startIcon:jsx(n,{}),onClean:M,readOnly:!0,value:z,onClick:n=>{C(n.currentTarget.getBoundingClientRect()),v(i=>!i);},...L}),jsx(E.Root,{asChild:!0,children:jsx("div",{ref:c,className:a$2("pointer-events-auto fixed z-50 hidden",b&&"block"),style:r?{top:k==="bottom"?`${r.height+r.y}px`:r.top-T,left:r?.left}:void 0,children:jsx(a$3,{className:"w-[20rem] max-w-full",mode:"single",selected:a$4,onDayClick:H,locale:d})})})]})};$.displayName="DatePicker";export{$ as a};
|
package/dist/date-picker.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
'use strict';var le=require('react'),reactLabel=require('@radix-ui/react-label'),jsxRuntime=require('react/jsx-runtime'),reactDayPicker=require('react-day-picker'),He=require('@radix-ui/react-portal'),dateFns=require('date-fns');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var le__default=/*#__PURE__*/_interopDefault(le);var He__namespace=/*#__PURE__*/_interopNamespace(He);function ce(e){var t,a,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(a=ce(e[t]))&&(o&&(o+=" "),o+=a);}else for(a in e)e[a]&&(o&&(o+=" "),o+=a);return o}function ne(){for(var e,t,a=0,o="",r=arguments.length;a<r;a++)(e=arguments[a])&&(t=ce(e))&&(o&&(o+=" "),o+=t);return o}var oe="-",Ge=e=>{let t=ze(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:o}=e;return {getClassGroupId:d=>{let l=d.split(oe);return l[0]===""&&l.length!==1&&l.shift(),Le(l,t)||Ee(d)},getConflictingClassGroupIds:(d,l)=>{let i=a[d]||[];return l&&o[d]?[...i,...o[d]]:i}}},Le=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],o=t.nextPart.get(a),r=o?Le(e.slice(1),o):void 0;if(r)return r;if(t.validators.length===0)return;let u=e.join(oe);return t.validators.find(({validator:d})=>d(u))?.classGroupId},pe=/^\[(.+)\]$/,Ee=e=>{if(pe.test(e)){let t=pe.exec(e)[1],a=t?.substring(0,t.indexOf(":"));if(a)return "arbitrary.."+a}},ze=e=>{let{theme:t,prefix:a}=e,o={nextPart:new Map,validators:[]};return We(Object.entries(e.classGroups),a).forEach(([u,d])=>{te(d,o,u,t);}),o},te=(e,t,a,o)=>{e.forEach(r=>{if(typeof r=="string"){let u=r===""?t:me(t,r);u.classGroupId=a;return}if(typeof r=="function"){if(Ve(r)){te(r(o),t,a,o);return}t.validators.push({validator:r,classGroupId:a});return}Object.entries(r).forEach(([u,d])=>{te(d,me(t,u),a,o);});});},me=(e,t)=>{let a=e;return t.split(oe).forEach(o=>{a.nextPart.has(o)||a.nextPart.set(o,{nextPart:new Map,validators:[]}),a=a.nextPart.get(o);}),a},Ve=e=>e.isThemeGetter,We=(e,t)=>t?e.map(([a,o])=>{let r=o.map(u=>typeof u=="string"?t+u:typeof u=="object"?Object.fromEntries(Object.entries(u).map(([d,l])=>[t+d,l])):u);return [a,r]}):e,Xe=e=>{if(e<1)return {get:()=>{},set:()=>{}};let t=0,a=new Map,o=new Map,r=(u,d)=>{a.set(u,d),t++,t>e&&(t=0,o=a,a=new Map);};return {get(u){let d=a.get(u);if(d!==void 0)return d;if((d=o.get(u))!==void 0)return r(u,d),d},set(u,d){a.has(u)?a.set(u,d):r(u,d);}}},xe="!",Ne=e=>{let{separator:t,experimentalParseClassName:a}=e,o=t.length===1,r=t[0],u=t.length,d=l=>{let i=[],n=0,L=0,w;for(let p=0;p<l.length;p++){let C=l[p];if(n===0){if(C===r&&(o||l.slice(p,p+u)===t)){i.push(l.slice(L,p)),L=p+u;continue}if(C==="/"){w=p;continue}}C==="["?n++:C==="]"&&n--;}let P=i.length===0?l:l.substring(L),k=P.startsWith(xe),S=k?P.substring(1):P,c=w&&w>L?w-L:void 0;return {modifiers:i,hasImportantModifier:k,baseClassName:S,maybePostfixModifierPosition:c}};return a?l=>a({className:l,parseClassName:d}):d},Ke=e=>{if(e.length<=1)return e;let t=[],a=[];return e.forEach(o=>{o[0]==="["?(t.push(...a.sort(),o),a=[]):a.push(o);}),t.push(...a.sort()),t},Ze=e=>({cache:Xe(e.cacheSize),parseClassName:Ne(e),...Ge(e)}),Je=/\s+/,_e=(e,t)=>{let{parseClassName:a,getClassGroupId:o,getConflictingClassGroupIds:r}=t,u=[],d=e.trim().split(Je),l="";for(let i=d.length-1;i>=0;i-=1){let n=d[i],{modifiers:L,hasImportantModifier:w,baseClassName:P,maybePostfixModifierPosition:k}=a(n),S=!!k,c=o(S?P.substring(0,k):P);if(!c){if(!S){l=n+(l.length>0?" "+l:l);continue}if(c=o(P),!c){l=n+(l.length>0?" "+l:l);continue}S=!1;}let p=Ke(L).join(":"),C=w?p+xe:p,x=C+c;if(u.includes(x))continue;u.push(x);let g=r(c,S);for(let h=0;h<g.length;++h){let A=g[h];u.push(C+A);}l=n+(l.length>0?" "+l:l);}return l};function Qe(){let e=0,t,a,o="";for(;e<arguments.length;)(t=arguments[e++])&&(a=Ie(t))&&(o&&(o+=" "),o+=a);return o}var Ie=e=>{if(typeof e=="string")return e;let t,a="";for(let o=0;o<e.length;o++)e[o]&&(t=Ie(e[o]))&&(a&&(a+=" "),a+=t);return a};function je(e,...t){let a,o,r,u=d;function d(i){let n=t.reduce((L,w)=>w(L),e());return a=Ze(n),o=a.cache.get,r=a.cache.set,u=l,l(i)}function l(i){let n=o(i);if(n)return n;let L=_e(i,a);return r(i,L),L}return function(){return u(Qe.apply(null,arguments))}}var m=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},Ce=/^\[(?:([a-z-]+):)?(.+)\]$/i,$e=/^\d+\/\d+$/,Ye=new Set(["px","full","screen"]),ea=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,aa=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,ta=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,oa=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,la=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,F=e=>q(e)||Ye.has(e)||$e.test(e),R=e=>U(e,"length",na),q=e=>!!e&&!Number.isNaN(Number(e)),ae=e=>U(e,"number",q),H=e=>!!e&&Number.isInteger(Number(e)),ua=e=>e.endsWith("%")&&q(e.slice(0,-1)),s=e=>Ce.test(e),v=e=>ea.test(e),ra=new Set(["length","size","percentage"]),da=e=>U(e,ra,he),sa=e=>U(e,"position",he),fa=new Set(["image","url"]),ia=e=>U(e,fa,ma),ca=e=>U(e,"",pa),G=()=>!0,U=(e,t,a)=>{let o=Ce.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):a(o[2]):!1},na=e=>aa.test(e)&&!ta.test(e),he=()=>!1,pa=e=>oa.test(e),ma=e=>la.test(e);var La=()=>{let e=m("colors"),t=m("spacing"),a=m("blur"),o=m("brightness"),r=m("borderColor"),u=m("borderRadius"),d=m("borderSpacing"),l=m("borderWidth"),i=m("contrast"),n=m("grayscale"),L=m("hueRotate"),w=m("invert"),P=m("gap"),k=m("gradientColorStops"),S=m("gradientColorStopPositions"),c=m("inset"),p=m("margin"),C=m("opacity"),x=m("padding"),g=m("saturate"),h=m("scale"),A=m("sepia"),B=m("skew"),b=m("space"),Z=m("translate"),j=()=>["auto","contain","none"],$=()=>["auto","hidden","clip","visible","scroll"],Y=()=>["auto",s,t],I=()=>[s,t],de=()=>["",F,R],J=()=>["auto",q,s],se=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],_=()=>["solid","dashed","dotted","double","none"],fe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ee=()=>["start","end","center","between","around","evenly","stretch"],O=()=>["","0",s],ie=()=>["auto","avoid","all","avoid-page","page","left","right","column"],M=()=>[q,s];return {cacheSize:500,separator:":",theme:{colors:[G],spacing:[F,R],blur:["none","",v,s],brightness:M(),borderColor:[e],borderRadius:["none","","full",v,s],borderSpacing:I(),borderWidth:de(),contrast:M(),grayscale:O(),hueRotate:M(),invert:O(),gap:I(),gradientColorStops:[e],gradientColorStopPositions:[ua,R],inset:Y(),margin:Y(),opacity:M(),padding:I(),saturate:M(),scale:M(),sepia:O(),skew:M(),space:I(),translate:I()},classGroups:{aspect:[{aspect:["auto","square","video",s]}],container:["container"],columns:[{columns:[v]}],"break-after":[{"break-after":ie()}],"break-before":[{"break-before":ie()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...se(),s]}],overflow:[{overflow:$()}],"overflow-x":[{"overflow-x":$()}],"overflow-y":[{"overflow-y":$()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[c]}],"inset-x":[{"inset-x":[c]}],"inset-y":[{"inset-y":[c]}],start:[{start:[c]}],end:[{end:[c]}],top:[{top:[c]}],right:[{right:[c]}],bottom:[{bottom:[c]}],left:[{left:[c]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",H,s]}],basis:[{basis:Y()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",s]}],grow:[{grow:O()}],shrink:[{shrink:O()}],order:[{order:["first","last","none",H,s]}],"grid-cols":[{"grid-cols":[G]}],"col-start-end":[{col:["auto",{span:["full",H,s]},s]}],"col-start":[{"col-start":J()}],"col-end":[{"col-end":J()}],"grid-rows":[{"grid-rows":[G]}],"row-start-end":[{row:["auto",{span:[H,s]},s]}],"row-start":[{"row-start":J()}],"row-end":[{"row-end":J()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",s]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",s]}],gap:[{gap:[P]}],"gap-x":[{"gap-x":[P]}],"gap-y":[{"gap-y":[P]}],"justify-content":[{justify:["normal",...ee()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...ee(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...ee(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],m:[{m:[p]}],mx:[{mx:[p]}],my:[{my:[p]}],ms:[{ms:[p]}],me:[{me:[p]}],mt:[{mt:[p]}],mr:[{mr:[p]}],mb:[{mb:[p]}],ml:[{ml:[p]}],"space-x":[{"space-x":[b]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[b]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",s,t]}],"min-w":[{"min-w":[s,t,"min","max","fit"]}],"max-w":[{"max-w":[s,t,"none","full","min","max","fit","prose",{screen:[v]},v]}],h:[{h:[s,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[s,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[s,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[s,t,"auto","min","max","fit"]}],"font-size":[{text:["base",v,R]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ae]}],"font-family":[{font:[G]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",s]}],"line-clamp":[{"line-clamp":["none",q,ae]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",F,s]}],"list-image":[{"list-image":["none",s]}],"list-style-type":[{list:["none","disc","decimal",s]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[C]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[C]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[..._(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",F,R]}],"underline-offset":[{"underline-offset":["auto",F,s]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",s]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",s]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[C]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...se(),sa]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",da]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},ia]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[S]}],"gradient-via-pos":[{via:[S]}],"gradient-to-pos":[{to:[S]}],"gradient-from":[{from:[k]}],"gradient-via":[{via:[k]}],"gradient-to":[{to:[k]}],rounded:[{rounded:[u]}],"rounded-s":[{"rounded-s":[u]}],"rounded-e":[{"rounded-e":[u]}],"rounded-t":[{"rounded-t":[u]}],"rounded-r":[{"rounded-r":[u]}],"rounded-b":[{"rounded-b":[u]}],"rounded-l":[{"rounded-l":[u]}],"rounded-ss":[{"rounded-ss":[u]}],"rounded-se":[{"rounded-se":[u]}],"rounded-ee":[{"rounded-ee":[u]}],"rounded-es":[{"rounded-es":[u]}],"rounded-tl":[{"rounded-tl":[u]}],"rounded-tr":[{"rounded-tr":[u]}],"rounded-br":[{"rounded-br":[u]}],"rounded-bl":[{"rounded-bl":[u]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[C]}],"border-style":[{border:[..._(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[C]}],"divide-style":[{divide:_()}],"border-color":[{border:[r]}],"border-color-x":[{"border-x":[r]}],"border-color-y":[{"border-y":[r]}],"border-color-s":[{"border-s":[r]}],"border-color-e":[{"border-e":[r]}],"border-color-t":[{"border-t":[r]}],"border-color-r":[{"border-r":[r]}],"border-color-b":[{"border-b":[r]}],"border-color-l":[{"border-l":[r]}],"divide-color":[{divide:[r]}],"outline-style":[{outline:["",..._()]}],"outline-offset":[{"outline-offset":[F,s]}],"outline-w":[{outline:[F,R]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:de()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[C]}],"ring-offset-w":[{"ring-offset":[F,R]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",v,ca]}],"shadow-color":[{shadow:[G]}],opacity:[{opacity:[C]}],"mix-blend":[{"mix-blend":[...fe(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":fe()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[o]}],contrast:[{contrast:[i]}],"drop-shadow":[{"drop-shadow":["","none",v,s]}],grayscale:[{grayscale:[n]}],"hue-rotate":[{"hue-rotate":[L]}],invert:[{invert:[w]}],saturate:[{saturate:[g]}],sepia:[{sepia:[A]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[i]}],"backdrop-grayscale":[{"backdrop-grayscale":[n]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[L]}],"backdrop-invert":[{"backdrop-invert":[w]}],"backdrop-opacity":[{"backdrop-opacity":[C]}],"backdrop-saturate":[{"backdrop-saturate":[g]}],"backdrop-sepia":[{"backdrop-sepia":[A]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[d]}],"border-spacing-x":[{"border-spacing-x":[d]}],"border-spacing-y":[{"border-spacing-y":[d]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",s]}],duration:[{duration:M()}],ease:[{ease:["linear","in","out","in-out",s]}],delay:[{delay:M()}],animate:[{animate:["none","spin","ping","pulse","bounce",s]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[h]}],"scale-x":[{"scale-x":[h]}],"scale-y":[{"scale-y":[h]}],rotate:[{rotate:[H,s]}],"translate-x":[{"translate-x":[Z]}],"translate-y":[{"translate-y":[Z]}],"skew-x":[{"skew-x":[B]}],"skew-y":[{"skew-y":[B]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",s]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",s]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",s]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[F,R,ae]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var ge=je(La);function f(...e){return ge(ne(e))}var Se=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Q=(...e)=>e.filter((t,a,o)=>!!t&&t.trim()!==""&&o.indexOf(t)===a).join(" ").trim();var we={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};var ke=le.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:a=2,absoluteStrokeWidth:o,className:r="",children:u,iconNode:d,...l},i)=>le.createElement("svg",{ref:i,...we,width:t,height:t,stroke:e,strokeWidth:o?Number(a)*24/Number(t):a,className:Q("lucide",r),...l},[...d.map(([n,L])=>le.createElement(n,L)),...Array.isArray(u)?u:[u]]));var y=(e,t)=>{let a=le.forwardRef(({className:o,...r},u)=>le.createElement(ke,{ref:u,iconNode:t,className:Q(`lucide-${Se(e)}`,o),...r}));return a.displayName=`${e}`,a};var E=y("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);var z=y("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);var V=y("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);var W=y("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);var T=y("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);var X=y("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var be=T,Ae=X;var ye=z,Be=W,Me=V;var Fe=E;var ha=({error:e,helperText:t,disabled:a})=>jsxRuntime.jsx(jsxRuntime.Fragment,{children:t&&jsxRuntime.jsx("span",{className:f("mx-4 mt-1 text-start text-xs leading-[130%] text-neutral-600",a&&"text-neutral-400",e&&"text-error-700"),children:t})}),Re=ha;var Te=le.forwardRef(({label:e,placeholder:t,error:a,selectMode:o=!1,showClearButton:r=!0,helperText:u,className:d,size:l="lg",onClean:i,onChange:n,startIcon:L,endIcon:w,startComponent:P,fixedTopLabel:k,startText:S,disabled:c,...p},C)=>{let x=le.useRef(null),[g,h]=le.useState(!1),A=!x.current?.value,B=le.useCallback(()=>{if(x.current&&!c){x.current.value="",h(!1),i?.();let b={target:x.current,currentTarget:x.current,type:"change",bubbles:!0,cancelable:!1,defaultPrevented:!1,eventPhase:0,isTrusted:!0,preventDefault:()=>{},stopPropagation:()=>{},persist:()=>{},isDefaultPrevented:()=>!1,isPropagationStopped:()=>!1,timeStamp:Date.now(),nativeEvent:new Event("change")};n?.(b);}},[c,n,x.current]);return le.useEffect(()=>{x.current&&h(x.current.value.length>0);},[]),jsxRuntime.jsxs("div",{className:f("flex flex-col",d),children:[jsxRuntime.jsxs("div",{className:f("relative flex flex-col",l==="lg"&&"h-12",l==="md"&&"h-10",l==="sm"&&"h-8"),children:[jsxRuntime.jsx("input",{disabled:c,className:f("hover:caret-neutral-text-neutral-600 hover:ring-neutral-text-neutral-600 hover:text-neutral peer absolute z-20 h-full w-full rounded-lg bg-neutral-50/0 text-left tracking-normal text-neutral-900 placeholder-neutral-500/0 caret-neutral-900 outline-0 ring-1 ring-inset ring-neutral-400 transition-all ease-linear hover:placeholder-neutral-500/0 focus:text-neutral-900 focus:placeholder-neutral-500 focus:placeholder-opacity-100 focus:caret-primary-800 focus:ring-[2px] focus:ring-primary-800 disabled:bg-neutral-100 disabled:text-neutral-400 disabled:ring-neutral-100 [&:not(:placeholder-shown)]:z-10",a&&"placeholder-error-700/0 ring-error-700 hover:text-neutral-900 hover:ring-error-700 focus:ring-error-700",l==="lg"&&"text-base",l==="md"&&"text-base",l==="sm"&&"text-sm",L?l==="lg"?"pl-[2.75rem]":"pl-[2.38rem]":P?"pl-[6.5rem]":"pl-4",S&&"pl-[1.94rem]",w?l==="lg"?"pr-[2.75rem]":"pr-[2.38rem]":"pr-4"),placeholder:t??"",ref:b=>{typeof C=="function"?C(b):C&&(C.current=b),x.current=b;},onChange:b=>{h(b.target.value.length>0),n?.(b);},...p}),P&&le__default.default.cloneElement(P,{className:f("absolute z-20 flex left-3 top-1/2 transform -translate-y-1/2 items-center rounded-full peer-disabled:text-neutral-400",a&&!g&&"text-error-700 peer-hover:text-error-700 peer-focus:text-error-700")}),L&&le__default.default.cloneElement(L,{size:l==="lg"?24:18,className:f("absolute flex peer-focus:text-neutral-900 z-20 text-neutral-500 left-3 h-full items-center rounded-full peer-disabled:text-neutral-400",a&&!g&&"text-error-700 peer-hover:text-error-700 peer-focus:text-error-700")}),S&&jsxRuntime.jsx("p",{className:f("items-center pl-3 pt-3 text-neutral-700",l==="lg"?"pt-3":"pt-2",a&&"text-error-700"),children:S}),e&&jsxRuntime.jsx(reactLabel.Label,{className:f("absolute -top-[0.5625rem] z-10 ml-3 bg-neutral-50 px-1 tracking-normal text-neutral-50 transition-all duration-75 ease-linear peer-hover:text-primary-800 peer-disabled:z-20 peer-disabled:text-neutral-400 peer-[:not(:focus)]:text-neutral-400","peer-focus:-top-[0.5625rem] peer-focus:z-20 peer-focus:ml-3 peer-focus:text-xs peer-focus:text-primary-800 peer-[:placeholder-shown]:peer-[:not(:focus)]:peer-[:disabled]:bg-neutral-100",g&&"peer-disabled:bg-neutral-50",l==="lg"?"text-base placeholder-shown:text-xs peer-placeholder-shown:top-3":l==="md"?"text-base placeholder-shown:text-xs peer-placeholder-shown:top-2":"text-sm placeholder-shown:text-xs peer-placeholder-shown:top-[6px]",!A&&"text-xs",a&&"text-error-700 peer-hover:text-error-700 peer-focus:text-error-700",L?l==="lg"?"peer-placeholder-shown:ml-[2.75rem]":"peer-placeholder-shown:ml-[2.38rem]":P?"peer-placeholder-shown:ml-[6rem]":"ml-3",k&&"!-top-[0.375rem] z-20 ml-3 !text-xs !transition-none",S&&"peer-placeholder-shown:ml-[1.94rem]"),children:e}),r&&(!A||g)&&jsxRuntime.jsx("div",{className:f("peer-hover:text-neutral absolute z-10 hidden h-full cursor-pointer items-center rounded-full peer-focus:flex peer-focus:text-primary-800 peer-disabled:cursor-not-allowed peer-disabled:text-neutral-400",a&&"text-error-700 peer-hover:text-error-700 peer-focus:text-error-700",o||w?l==="lg"?"right-[2.81rem]":l==="md"?"right-[2.125rem]":"right-[1.875rem]":"right-4"),children:a?jsxRuntime.jsx(be,{onMouseDown:B,size:l==="lg"?24:l==="md"?18:14,className:"text-error-700"}):jsxRuntime.jsx(Ae,{onMouseDown:B,size:l==="lg"?24:l==="md"?18:14,className:"text-neutral-900"})}),w&&le__default.default.cloneElement(w,{size:l==="lg"?24:l==="md"?18:14,className:f("absolute peer-focus:text-neutral-900 z-20 text-neutral-500 flex right-3 h-full items-center rounded-full peer-disabled:text-neutral-400",a&&!g&&"text-error-700 peer-hover:text-error-700 peer-focus:text-error-700")}),o&&jsxRuntime.jsx("div",{className:f("peer-hover:text-neutral absolute right-4 z-20 flex h-full items-center rounded-full transition-all ease-linear peer-focus:rotate-180 peer-focus:text-primary-900 peer-disabled:text-neutral-400"),children:jsxRuntime.jsx(ye,{className:l==="lg"?"h-6 w-6":"h-4.5 w-4.5"})})]}),jsxRuntime.jsx(Re,{helperText:u,error:a,disabled:c})]})});var re=({classNames:e,...t})=>jsxRuntime.jsx(reactDayPicker.DayPicker,{classNames:{caption_dropdowns:f("flex",e?.caption_dropdowns),months:f("flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",e?.months),month:f("overflow-hidden w-full rounded-[1.75rem] px-3 pb-4 bg-neutral-100",e?.month),table:f("w-full",e?.table),caption:f("flex ml-1 justify-between items-center py-1",e?.caption),caption_label:f("capitalize text-sm ml-2 mr-1 font-semibold",e?.caption_label),nav_button:f("p-3",e?.nav_button),head_row:f("flex",e?.head_row),head_cell:f("capitalize w-[14.3%] aspect-square font-normal flex justify-center items-center",e?.head_cell),row:f("flex w-full",e?.row),cell:f("w-[14.3%] aspect-square flex justify-center items-center",e?.cell),day:f("w-full disabled:ring-0 hover:bg-neutral-200 disabled:cursor-auto disabled:bg-opacity-0 disabled:text-neutral-500 h-full ring-inset rounded-full hover:cursor-pointer flex justify-center items-center text-small",e?.day),day_range_end:"day-range-end",day_selected:f("bg-primary-500 !text-neutral-50 hover:!bg-primary-500",e?.day_selected),day_hidden:f("hidden",e?.day_hidden),day_today:f("ring-[1px] ring-primary-500 text-primary-500 hover:bg-primary-50 hover:bg-opacity-0",e?.day_today)},formatters:{formatWeekdayName:(a,o)=>o?.locale?.localize.day(a.getDay(),{width:"narrow"})},components:{IconLeft:({...a})=>jsxRuntime.jsx(Me,{className:"h-6 w-6",...a}),IconRight:({...a})=>jsxRuntime.jsx(Be,{className:"h-6 w-6",...a})},...t});re.displayName="Calendar";var Fa=(e,t)=>{let a=le.useCallback(o=>{e.current&&!e.current.contains(o.target)&&t();},[]);le.useEffect(()=>(document.addEventListener("pointerdown",a),()=>{document.removeEventListener("pointerdown",a);}),[]);},qe=Fa;var va=({value:e,onChange:t,locale:a,...o})=>{let[r,u]=le.useState(!1),[d,l]=le.useState(e),[i,n]=le.useState(),[L,w]=le.useState("bottom"),[P,k]=le.useState(0),S=le.useRef(null),c=le.useRef(null);qe(S,()=>{u(!1);});let p=h=>{l(h),t?.(h);},C=le.useMemo(()=>d?dateFns.format(d,"P",{locale:a}):"",[d,a]),x=()=>{l(void 0),t?.(void 0);},g=()=>{if(!c.current)return;let h=c.current.getBoundingClientRect(),A=S.current?.getBoundingClientRect();if(!A)return;let B=A.height;k(B),n(h);let b=window.innerHeight-h.bottom>B,Z=h.top+h.height>B;w(b?"bottom":Z?"top":"bottom");};return le.useEffect(()=>{l(e);},[e]),le.useEffect(()=>{if(c.current)return g(),c.current.addEventListener("mousedown",g),window.addEventListener("scroll",g,!0),window.addEventListener("resize",g),()=>{c.current?.removeEventListener("mousedown",g),window.removeEventListener("scroll",g,!0),window.removeEventListener("resize",g);}},[c.current,g]),jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Te,{ref:c,startIcon:jsxRuntime.jsx(Fe,{}),onClean:x,readOnly:!0,value:C,onClick:h=>{n(h.currentTarget.getBoundingClientRect()),u(A=>!A);},...o}),jsxRuntime.jsx(He__namespace.Root,{children:jsxRuntime.jsx("div",{ref:S,className:f("pointer-events-auto fixed z-50 hidden",r&&"block"),style:i?{top:L==="bottom"?`${i.height+i.y}px`:i.top-P,left:i?.left}:void 0,children:jsxRuntime.jsx(re,{className:"w-[20rem] max-w-full",mode:"single",selected:d,onDayClick:p,locale:a})})})]})};va.displayName="DatePicker";/*! Bundled license information:
|
|
1
|
+
'use strict';var le=require('react'),reactLabel=require('@radix-ui/react-label'),jsxRuntime=require('react/jsx-runtime'),reactDayPicker=require('react-day-picker'),He=require('@radix-ui/react-portal'),dateFns=require('date-fns');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var le__default=/*#__PURE__*/_interopDefault(le);var He__namespace=/*#__PURE__*/_interopNamespace(He);function ne(e){var t,a,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(a=ne(e[t]))&&(o&&(o+=" "),o+=a);}else for(a in e)e[a]&&(o&&(o+=" "),o+=a);return o}function pe(){for(var e,t,a=0,o="",r=arguments.length;a<r;a++)(e=arguments[a])&&(t=ne(e))&&(o&&(o+=" "),o+=t);return o}var oe="-",Ge=e=>{let t=ze(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:o}=e;return {getClassGroupId:d=>{let l=d.split(oe);return l[0]===""&&l.length!==1&&l.shift(),xe(l,t)||Ee(d)},getConflictingClassGroupIds:(d,l)=>{let c=a[d]||[];return l&&o[d]?[...c,...o[d]]:c}}},xe=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],o=t.nextPart.get(a),r=o?xe(e.slice(1),o):void 0;if(r)return r;if(t.validators.length===0)return;let u=e.join(oe);return t.validators.find(({validator:d})=>d(u))?.classGroupId},me=/^\[(.+)\]$/,Ee=e=>{if(me.test(e)){let t=me.exec(e)[1],a=t?.substring(0,t.indexOf(":"));if(a)return "arbitrary.."+a}},ze=e=>{let{theme:t,prefix:a}=e,o={nextPart:new Map,validators:[]};return We(Object.entries(e.classGroups),a).forEach(([u,d])=>{te(d,o,u,t);}),o},te=(e,t,a,o)=>{e.forEach(r=>{if(typeof r=="string"){let u=r===""?t:Le(t,r);u.classGroupId=a;return}if(typeof r=="function"){if(Ve(r)){te(r(o),t,a,o);return}t.validators.push({validator:r,classGroupId:a});return}Object.entries(r).forEach(([u,d])=>{te(d,Le(t,u),a,o);});});},Le=(e,t)=>{let a=e;return t.split(oe).forEach(o=>{a.nextPart.has(o)||a.nextPart.set(o,{nextPart:new Map,validators:[]}),a=a.nextPart.get(o);}),a},Ve=e=>e.isThemeGetter,We=(e,t)=>t?e.map(([a,o])=>{let r=o.map(u=>typeof u=="string"?t+u:typeof u=="object"?Object.fromEntries(Object.entries(u).map(([d,l])=>[t+d,l])):u);return [a,r]}):e,Xe=e=>{if(e<1)return {get:()=>{},set:()=>{}};let t=0,a=new Map,o=new Map,r=(u,d)=>{a.set(u,d),t++,t>e&&(t=0,o=a,a=new Map);};return {get(u){let d=a.get(u);if(d!==void 0)return d;if((d=o.get(u))!==void 0)return r(u,d),d},set(u,d){a.has(u)?a.set(u,d):r(u,d);}}},Ie="!",Ne=e=>{let{separator:t,experimentalParseClassName:a}=e,o=t.length===1,r=t[0],u=t.length,d=l=>{let c=[],p=0,L=0,g;for(let n=0;n<l.length;n++){let C=l[n];if(p===0){if(C===r&&(o||l.slice(n,n+u)===t)){c.push(l.slice(L,n)),L=n+u;continue}if(C==="/"){g=n;continue}}C==="["?p++:C==="]"&&p--;}let S=c.length===0?l:l.substring(L),b=S.startsWith(Ie),h=b?S.substring(1):S,f=g&&g>L?g-L:void 0;return {modifiers:c,hasImportantModifier:b,baseClassName:h,maybePostfixModifierPosition:f}};return a?l=>a({className:l,parseClassName:d}):d},Ke=e=>{if(e.length<=1)return e;let t=[],a=[];return e.forEach(o=>{o[0]==="["?(t.push(...a.sort(),o),a=[]):a.push(o);}),t.push(...a.sort()),t},Ze=e=>({cache:Xe(e.cacheSize),parseClassName:Ne(e),...Ge(e)}),Je=/\s+/,_e=(e,t)=>{let{parseClassName:a,getClassGroupId:o,getConflictingClassGroupIds:r}=t,u=[],d=e.trim().split(Je),l="";for(let c=d.length-1;c>=0;c-=1){let p=d[c],{modifiers:L,hasImportantModifier:g,baseClassName:S,maybePostfixModifierPosition:b}=a(p),h=!!b,f=o(h?S.substring(0,b):S);if(!f){if(!h){l=p+(l.length>0?" "+l:l);continue}if(f=o(S),!f){l=p+(l.length>0?" "+l:l);continue}h=!1;}let n=Ke(L).join(":"),C=g?n+Ie:n,x=C+f;if(u.includes(x))continue;u.push(x);let A=r(f,h);for(let y=0;y<A.length;++y){let w=A[y];u.push(C+w);}l=p+(l.length>0?" "+l:l);}return l};function Qe(){let e=0,t,a,o="";for(;e<arguments.length;)(t=arguments[e++])&&(a=Ce(t))&&(o&&(o+=" "),o+=a);return o}var Ce=e=>{if(typeof e=="string")return e;let t,a="";for(let o=0;o<e.length;o++)e[o]&&(t=Ce(e[o]))&&(a&&(a+=" "),a+=t);return a};function je(e,...t){let a,o,r,u=d;function d(c){let p=t.reduce((L,g)=>g(L),e());return a=Ze(p),o=a.cache.get,r=a.cache.set,u=l,l(c)}function l(c){let p=o(c);if(p)return p;let L=_e(c,a);return r(c,L),L}return function(){return u(Qe.apply(null,arguments))}}var m=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},he=/^\[(?:([a-z-]+):)?(.+)\]$/i,$e=/^\d+\/\d+$/,Ye=new Set(["px","full","screen"]),ea=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,aa=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,ta=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,oa=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,la=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,F=e=>q(e)||Ye.has(e)||$e.test(e),R=e=>U(e,"length",na),q=e=>!!e&&!Number.isNaN(Number(e)),ae=e=>U(e,"number",q),E=e=>!!e&&Number.isInteger(Number(e)),ua=e=>e.endsWith("%")&&q(e.slice(0,-1)),s=e=>he.test(e),v=e=>ea.test(e),ra=new Set(["length","size","percentage"]),da=e=>U(e,ra,ge),sa=e=>U(e,"position",ge),fa=new Set(["image","url"]),ia=e=>U(e,fa,ma),ca=e=>U(e,"",pa),z=()=>!0,U=(e,t,a)=>{let o=he.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):a(o[2]):!1},na=e=>aa.test(e)&&!ta.test(e),ge=()=>!1,pa=e=>oa.test(e),ma=e=>la.test(e);var La=()=>{let e=m("colors"),t=m("spacing"),a=m("blur"),o=m("brightness"),r=m("borderColor"),u=m("borderRadius"),d=m("borderSpacing"),l=m("borderWidth"),c=m("contrast"),p=m("grayscale"),L=m("hueRotate"),g=m("invert"),S=m("gap"),b=m("gradientColorStops"),h=m("gradientColorStopPositions"),f=m("inset"),n=m("margin"),C=m("opacity"),x=m("padding"),A=m("saturate"),y=m("scale"),w=m("sepia"),P=m("skew"),k=m("space"),J=m("translate"),H=()=>["auto","contain","none"],$=()=>["auto","hidden","clip","visible","scroll"],Y=()=>["auto",s,t],I=()=>[s,t],se=()=>["",F,R],_=()=>["auto",q,s],fe=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Q=()=>["solid","dashed","dotted","double","none"],ie=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ee=()=>["start","end","center","between","around","evenly","stretch"],G=()=>["","0",s],ce=()=>["auto","avoid","all","avoid-page","page","left","right","column"],M=()=>[q,s];return {cacheSize:500,separator:":",theme:{colors:[z],spacing:[F,R],blur:["none","",v,s],brightness:M(),borderColor:[e],borderRadius:["none","","full",v,s],borderSpacing:I(),borderWidth:se(),contrast:M(),grayscale:G(),hueRotate:M(),invert:G(),gap:I(),gradientColorStops:[e],gradientColorStopPositions:[ua,R],inset:Y(),margin:Y(),opacity:M(),padding:I(),saturate:M(),scale:M(),sepia:G(),skew:M(),space:I(),translate:I()},classGroups:{aspect:[{aspect:["auto","square","video",s]}],container:["container"],columns:[{columns:[v]}],"break-after":[{"break-after":ce()}],"break-before":[{"break-before":ce()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...fe(),s]}],overflow:[{overflow:$()}],"overflow-x":[{"overflow-x":$()}],"overflow-y":[{"overflow-y":$()}],overscroll:[{overscroll:H()}],"overscroll-x":[{"overscroll-x":H()}],"overscroll-y":[{"overscroll-y":H()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[f]}],"inset-x":[{"inset-x":[f]}],"inset-y":[{"inset-y":[f]}],start:[{start:[f]}],end:[{end:[f]}],top:[{top:[f]}],right:[{right:[f]}],bottom:[{bottom:[f]}],left:[{left:[f]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",E,s]}],basis:[{basis:Y()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",s]}],grow:[{grow:G()}],shrink:[{shrink:G()}],order:[{order:["first","last","none",E,s]}],"grid-cols":[{"grid-cols":[z]}],"col-start-end":[{col:["auto",{span:["full",E,s]},s]}],"col-start":[{"col-start":_()}],"col-end":[{"col-end":_()}],"grid-rows":[{"grid-rows":[z]}],"row-start-end":[{row:["auto",{span:[E,s]},s]}],"row-start":[{"row-start":_()}],"row-end":[{"row-end":_()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",s]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",s]}],gap:[{gap:[S]}],"gap-x":[{"gap-x":[S]}],"gap-y":[{"gap-y":[S]}],"justify-content":[{justify:["normal",...ee()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...ee(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...ee(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],m:[{m:[n]}],mx:[{mx:[n]}],my:[{my:[n]}],ms:[{ms:[n]}],me:[{me:[n]}],mt:[{mt:[n]}],mr:[{mr:[n]}],mb:[{mb:[n]}],ml:[{ml:[n]}],"space-x":[{"space-x":[k]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[k]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",s,t]}],"min-w":[{"min-w":[s,t,"min","max","fit"]}],"max-w":[{"max-w":[s,t,"none","full","min","max","fit","prose",{screen:[v]},v]}],h:[{h:[s,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[s,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[s,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[s,t,"auto","min","max","fit"]}],"font-size":[{text:["base",v,R]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ae]}],"font-family":[{font:[z]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",s]}],"line-clamp":[{"line-clamp":["none",q,ae]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",F,s]}],"list-image":[{"list-image":["none",s]}],"list-style-type":[{list:["none","disc","decimal",s]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[C]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[C]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Q(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",F,R]}],"underline-offset":[{"underline-offset":["auto",F,s]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",s]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",s]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[C]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...fe(),sa]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",da]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},ia]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[h]}],"gradient-via-pos":[{via:[h]}],"gradient-to-pos":[{to:[h]}],"gradient-from":[{from:[b]}],"gradient-via":[{via:[b]}],"gradient-to":[{to:[b]}],rounded:[{rounded:[u]}],"rounded-s":[{"rounded-s":[u]}],"rounded-e":[{"rounded-e":[u]}],"rounded-t":[{"rounded-t":[u]}],"rounded-r":[{"rounded-r":[u]}],"rounded-b":[{"rounded-b":[u]}],"rounded-l":[{"rounded-l":[u]}],"rounded-ss":[{"rounded-ss":[u]}],"rounded-se":[{"rounded-se":[u]}],"rounded-ee":[{"rounded-ee":[u]}],"rounded-es":[{"rounded-es":[u]}],"rounded-tl":[{"rounded-tl":[u]}],"rounded-tr":[{"rounded-tr":[u]}],"rounded-br":[{"rounded-br":[u]}],"rounded-bl":[{"rounded-bl":[u]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[C]}],"border-style":[{border:[...Q(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[C]}],"divide-style":[{divide:Q()}],"border-color":[{border:[r]}],"border-color-x":[{"border-x":[r]}],"border-color-y":[{"border-y":[r]}],"border-color-s":[{"border-s":[r]}],"border-color-e":[{"border-e":[r]}],"border-color-t":[{"border-t":[r]}],"border-color-r":[{"border-r":[r]}],"border-color-b":[{"border-b":[r]}],"border-color-l":[{"border-l":[r]}],"divide-color":[{divide:[r]}],"outline-style":[{outline:["",...Q()]}],"outline-offset":[{"outline-offset":[F,s]}],"outline-w":[{outline:[F,R]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[C]}],"ring-offset-w":[{"ring-offset":[F,R]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",v,ca]}],"shadow-color":[{shadow:[z]}],opacity:[{opacity:[C]}],"mix-blend":[{"mix-blend":[...ie(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ie()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[o]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",v,s]}],grayscale:[{grayscale:[p]}],"hue-rotate":[{"hue-rotate":[L]}],invert:[{invert:[g]}],saturate:[{saturate:[A]}],sepia:[{sepia:[w]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[p]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[L]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[C]}],"backdrop-saturate":[{"backdrop-saturate":[A]}],"backdrop-sepia":[{"backdrop-sepia":[w]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[d]}],"border-spacing-x":[{"border-spacing-x":[d]}],"border-spacing-y":[{"border-spacing-y":[d]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",s]}],duration:[{duration:M()}],ease:[{ease:["linear","in","out","in-out",s]}],delay:[{delay:M()}],animate:[{animate:["none","spin","ping","pulse","bounce",s]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[y]}],"scale-x":[{"scale-x":[y]}],"scale-y":[{"scale-y":[y]}],rotate:[{rotate:[E,s]}],"translate-x":[{"translate-x":[J]}],"translate-y":[{"translate-y":[J]}],"skew-x":[{"skew-x":[P]}],"skew-y":[{"skew-y":[P]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",s]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",s]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",s]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[F,R,ae]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var Se=je(La);function i(...e){return Se(pe(e))}var we=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),j=(...e)=>e.filter((t,a,o)=>!!t&&t.trim()!==""&&o.indexOf(t)===a).join(" ").trim();var ke={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};var be=le.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:a=2,absoluteStrokeWidth:o,className:r="",children:u,iconNode:d,...l},c)=>le.createElement("svg",{ref:c,...ke,width:t,height:t,stroke:e,strokeWidth:o?Number(a)*24/Number(t):a,className:j("lucide",r),...l},[...d.map(([p,L])=>le.createElement(p,L)),...Array.isArray(u)?u:[u]]));var B=(e,t)=>{let a=le.forwardRef(({className:o,...r},u)=>le.createElement(be,{ref:u,iconNode:t,className:j(`lucide-${we(e)}`,o),...r}));return a.displayName=`${e}`,a};var V=B("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);var W=B("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);var X=B("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);var N=B("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);var T=B("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);var K=B("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var Ae=T,ye=K;var Be=W,Me=N,Fe=X;var De=V;var ha=({error:e,helperText:t,disabled:a})=>jsxRuntime.jsx(jsxRuntime.Fragment,{children:t&&jsxRuntime.jsx("span",{className:i("mx-4 mt-1 text-start text-xs leading-[130%] text-neutral-600",a&&"text-neutral-400",e&&"text-error-700"),children:t})}),ve=ha;var qe=le.forwardRef(({label:e,placeholder:t,error:a,selectMode:o=!1,showClearButton:r=!0,helperText:u,className:d,size:l="lg",onClean:c,onChange:p,startIcon:L,endIcon:g,startComponent:S,fixedTopLabel:b,startText:h,disabled:f,...n},C)=>{let x=le.useRef(null),[A,y]=le.useState(!1),w=!x.current?.value,P=le.useCallback(()=>{if(x.current&&!f){x.current.value="",y(!1),c?.();let k={target:x.current,currentTarget:x.current,type:"change",bubbles:!0,cancelable:!1,defaultPrevented:!1,eventPhase:0,isTrusted:!0,preventDefault:()=>{},stopPropagation:()=>{},persist:()=>{},isDefaultPrevented:()=>!1,isPropagationStopped:()=>!1,timeStamp:Date.now(),nativeEvent:new Event("change")};p?.(k);}},[f,p,x.current]);return le.useEffect(()=>{x.current&&y(x.current.value.length>0);},[]),jsxRuntime.jsxs("div",{className:i("flex flex-col",d),children:[jsxRuntime.jsxs("div",{className:i("relative flex flex-col",l==="lg"&&"h-12",l==="md"&&"h-10",l==="sm"&&"h-8"),children:[jsxRuntime.jsx("input",{disabled:f,className:i("hover:caret-neutral-text-neutral-600 hover:ring-neutral-text-neutral-600 hover:text-neutral peer absolute z-20 h-full w-full rounded-lg bg-neutral-50/0 text-left tracking-normal text-neutral-900 placeholder-neutral-500/0 caret-neutral-900 outline-0 ring-1 ring-inset ring-neutral-400 transition-all ease-linear hover:placeholder-neutral-500/0 focus:text-neutral-900 focus:placeholder-neutral-500 focus:placeholder-opacity-100 focus:caret-primary-800 focus:ring-[2px] focus:ring-primary-800 disabled:bg-neutral-100 disabled:text-neutral-400 disabled:ring-neutral-100 [&:not(:placeholder-shown)]:z-10",a&&"placeholder-error-700/0 ring-error-700 hover:text-neutral-900 hover:ring-error-700 focus:ring-error-700",l==="lg"&&"text-base",l==="md"&&"text-base",l==="sm"&&"text-sm",L?l==="lg"?"pl-[2.75rem]":"pl-[2.38rem]":S?"pl-[6.5rem]":"pl-4",h&&"pl-[1.94rem]",g?l==="lg"?"pr-[2.75rem]":"pr-[2.38rem]":"pr-4"),placeholder:t??"",ref:k=>{typeof C=="function"?C(k):C&&(C.current=k),x.current=k;},onChange:k=>{y(k.target.value.length>0),p?.(k);},...n}),S&&le__default.default.cloneElement(S,{className:i("absolute z-20 flex left-3 top-1/2 transform -translate-y-1/2 items-center rounded-full peer-disabled:text-neutral-400",a&&!A&&"text-error-700 peer-hover:text-error-700 peer-focus:text-error-700")}),L&&le__default.default.cloneElement(L,{size:l==="lg"?24:18,className:i("absolute flex peer-focus:text-neutral-900 z-20 text-neutral-500 left-3 h-full items-center rounded-full peer-disabled:text-neutral-400",a&&!A&&"text-error-700 peer-hover:text-error-700 peer-focus:text-error-700")}),h&&jsxRuntime.jsx("p",{className:i("items-center pl-3 pt-3 text-neutral-700",l==="lg"?"pt-3":"pt-2",a&&"text-error-700"),children:h}),e&&jsxRuntime.jsx(reactLabel.Label,{className:i("absolute -top-[0.5625rem] z-10 ml-3 bg-neutral-50 px-1 tracking-normal text-neutral-50 transition-all duration-75 ease-linear peer-hover:text-primary-800 peer-disabled:z-20 peer-disabled:text-neutral-400 peer-[:not(:focus)]:text-neutral-400","peer-focus:-top-[0.5625rem] peer-focus:z-20 peer-focus:ml-3 peer-focus:text-xs peer-focus:text-primary-800 peer-[:placeholder-shown]:peer-[:not(:focus)]:peer-[:disabled]:bg-neutral-100",A&&"peer-disabled:bg-neutral-50",l==="lg"?"text-base placeholder-shown:text-xs peer-placeholder-shown:top-3":l==="md"?"text-base placeholder-shown:text-xs peer-placeholder-shown:top-2":"text-sm placeholder-shown:text-xs peer-placeholder-shown:top-[6px]",!w&&"text-xs",a&&"text-error-700 peer-hover:text-error-700 peer-focus:text-error-700",L?l==="lg"?"peer-placeholder-shown:ml-[2.75rem]":"peer-placeholder-shown:ml-[2.38rem]":S?"peer-placeholder-shown:ml-[6rem]":"ml-3",b&&"!-top-[0.375rem] z-20 ml-3 !text-xs !transition-none",h&&"peer-placeholder-shown:ml-[1.94rem]"),children:e}),r&&(!w||A)&&jsxRuntime.jsx("div",{className:i("peer-hover:text-neutral absolute z-10 hidden h-full cursor-pointer items-center rounded-full peer-focus:flex peer-focus:text-primary-800 peer-disabled:cursor-not-allowed peer-disabled:text-neutral-400",a&&"text-error-700 peer-hover:text-error-700 peer-focus:text-error-700",o||g?l==="lg"?"right-[2.81rem]":l==="md"?"right-[2.125rem]":"right-[1.875rem]":"right-4"),children:a?jsxRuntime.jsx(Ae,{onMouseDown:P,size:l==="lg"?24:l==="md"?18:14,className:"text-error-700"}):jsxRuntime.jsx(ye,{onMouseDown:P,size:l==="lg"?24:l==="md"?18:14,className:"text-neutral-900"})}),g&&le__default.default.cloneElement(g,{size:l==="lg"?24:l==="md"?18:14,className:i("absolute peer-focus:text-neutral-900 z-20 text-neutral-500 flex right-3 h-full items-center rounded-full peer-disabled:text-neutral-400",a&&!A&&"text-error-700 peer-hover:text-error-700 peer-focus:text-error-700")}),o&&jsxRuntime.jsx("div",{className:i("peer-hover:text-neutral absolute right-4 z-20 flex h-full items-center rounded-full transition-all ease-linear peer-focus:rotate-180 peer-focus:text-primary-900 peer-disabled:text-neutral-400"),children:jsxRuntime.jsx(Be,{className:l==="lg"?"h-6 w-6":"h-4.5 w-4.5"})})]}),jsxRuntime.jsx(ve,{helperText:u,error:a,disabled:f})]})});var re=({classNames:e,...t})=>jsxRuntime.jsx(reactDayPicker.DayPicker,{classNames:{caption_dropdowns:i("flex",e?.caption_dropdowns),months:i("flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",e?.months),month:i("overflow-hidden w-full rounded-[1.75rem] px-3 pb-4 bg-neutral-100",e?.month),table:i("w-full",e?.table),caption:i("flex ml-1 justify-between items-center py-1",e?.caption),caption_label:i("capitalize text-sm ml-2 mr-1 font-semibold",e?.caption_label),nav_button:i("p-3",e?.nav_button),head_row:i("flex",e?.head_row),head_cell:i("capitalize w-[14.3%] aspect-square font-normal flex justify-center items-center",e?.head_cell),row:i("flex w-full",e?.row),cell:i("w-[14.3%] aspect-square flex justify-center items-center",e?.cell),day:i("w-full disabled:ring-0 hover:bg-neutral-200 disabled:cursor-auto disabled:bg-opacity-0 disabled:text-neutral-500 h-full ring-inset rounded-full hover:cursor-pointer flex justify-center items-center text-small",e?.day),day_range_end:"day-range-end",day_selected:i("bg-primary-500 !text-neutral-50 hover:!bg-primary-500",e?.day_selected),day_hidden:i("hidden",e?.day_hidden),day_today:i("ring-[1px] ring-primary-500 text-primary-500 hover:bg-primary-50 hover:bg-opacity-0",e?.day_today)},formatters:{formatWeekdayName:(a,o)=>o?.locale?.localize.day(a.getDay(),{width:"narrow"})},components:{IconLeft:({...a})=>jsxRuntime.jsx(Fe,{className:"h-6 w-6",...a}),IconRight:({...a})=>jsxRuntime.jsx(Me,{className:"h-6 w-6",...a})},...t});re.displayName="Calendar";var Fa=(e,t)=>{let a=le.useCallback(o=>{e.current&&!e.current.contains(o.target)&&t();},[]);le.useEffect(()=>(document.addEventListener("pointerdown",a),()=>{document.removeEventListener("pointerdown",a);}),[]);},Ue=Fa;var Ta=({value:e,onChange:t,locale:a,...o})=>{let[r,u]=le.useState(!1),[d,l]=le.useState(e),[c,p]=le.useState(),[L,g]=le.useState("bottom"),[S,b]=le.useState(0),h=le.useRef(null),f=le.useRef(null),[n,C]=le.useState();Ue(h,()=>{u(!1);});let x=P=>{l(P),t?.(P);},A=le.useMemo(()=>d?dateFns.format(d,"P",{locale:a}):"",[d,a]),y=()=>{l(void 0),t?.(void 0);},w=le.useCallback(()=>{if(!f.current)return;let P=f.current.getBoundingClientRect();if(!n)return;let k=n.height;b(k),p(P);let J=window.innerHeight-P.bottom>k,H=P.top+P.height>k;g(J?"bottom":H?"top":"bottom");},[f.current,n]);return le.useEffect(()=>{l(e);},[e]),le.useEffect(()=>{if(f?.current)return w(),f.current.addEventListener("mousedown",w),f.current.addEventListener("input",w),window.addEventListener("scroll",w,!0),window.addEventListener("resize",w),()=>{f.current?.removeEventListener("mousedown",w),f.current?.removeEventListener("input",w),window.removeEventListener("scroll",w,!0),window.removeEventListener("resize",w);}},[f.current,w]),le.useEffect(()=>{C(h.current?.getBoundingClientRect());},[h.current]),jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(qe,{ref:f,startIcon:jsxRuntime.jsx(De,{}),onClean:y,readOnly:!0,value:A,onClick:P=>{p(P.currentTarget.getBoundingClientRect()),u(k=>!k);},...o}),jsxRuntime.jsx(He__namespace.Root,{asChild:!0,children:jsxRuntime.jsx("div",{ref:h,className:i("pointer-events-auto fixed z-50 hidden",r&&"block"),style:c?{top:L==="bottom"?`${c.height+c.y}px`:c.top-S,left:c?.left}:void 0,children:jsxRuntime.jsx(re,{className:"w-[20rem] max-w-full",mode:"single",selected:d,onDayClick:x,locale:a})})})]})};Ta.displayName="DatePicker";/*! Bundled license information:
|
|
2
2
|
|
|
3
3
|
lucide-react/dist/esm/shared/src/utils.js:
|
|
4
4
|
(**
|
|
@@ -87,4 +87,4 @@ lucide-react/dist/esm/lucide-react.js:
|
|
|
87
87
|
* This source code is licensed under the ISC license.
|
|
88
88
|
* See the LICENSE file in the root directory of this source tree.
|
|
89
89
|
*)
|
|
90
|
-
*/exports.DatePicker=
|
|
90
|
+
*/exports.DatePicker=Ta;
|
package/dist/date-picker.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as DatePicker}from'./chunk-
|
|
1
|
+
export{a as DatePicker}from'./chunk-J5VJYUNT.mjs';import'./chunk-KTRSJBA4.mjs';import'./chunk-W2YOW3FA.mjs';import'./chunk-SVUSHVWV.mjs';import'./chunk-NUDVEK4R.mjs';import'./chunk-AF7XWQ5Y.mjs';import'./chunk-4SUP4N33.mjs';import'./chunk-2WINTZSS.mjs';
|