sodtrack-web-ui 0.36.0 → 0.36.2
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/chunk-D26TO3SD.mjs +1 -0
- package/dist/chunk-K5PSD3YW.mjs +1 -0
- package/dist/{chunk-U3IVW6EK.mjs → chunk-KTDHWUYX.mjs} +1 -1
- package/dist/{chunk-GPNLU6DM.mjs → chunk-OW7HKLXO.mjs} +1 -1
- package/dist/{chunk-6AGR3HBL.mjs → chunk-PNMNJVCI.mjs} +1 -1
- package/dist/{chunk-FY54GKOC.mjs → chunk-RBK5XJ4J.mjs} +1 -1
- package/dist/{chunk-HFJV6IIY.mjs → chunk-TLVCDPTA.mjs} +1 -1
- package/dist/common.css +37 -0
- package/dist/date-picker.js +1 -1
- package/dist/date-picker.mjs +1 -1
- package/dist/flag-select.js +1 -1
- package/dist/flag-select.mjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/list-item-arrow.css +1 -1
- package/dist/list-item-arrow.mjs +1 -1
- package/dist/list-item-checkbox.css +1 -1
- package/dist/list-item-checkbox.mjs +1 -1
- package/dist/list-item.css +1 -1
- package/dist/list-item.mjs +1 -1
- package/dist/search-bar.js +1 -1
- package/dist/search-bar.mjs +1 -1
- package/dist/select.js +1 -1
- package/dist/select.mjs +1 -1
- package/dist/tailwind-preset.js +1 -1
- package/dist/tailwind-preset.mjs +1 -1
- package/dist/text-field.js +1 -1
- package/dist/text-field.mjs +1 -1
- package/dist/time-picker.js +1 -1
- package/dist/time-picker.mjs +1 -1
- package/package.json +2 -2
- package/dist/chunk-DFTBHRBX.mjs +0 -1
- package/dist/chunk-HEKB3FHS.mjs +0 -1
package/dist/time-picker.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
'use strict';var de=require('react'),reactLabel=require('@radix-ui/react-label'),jsxRuntime=require('react/jsx-runtime'),ze=require('@radix-ui/react-portal'),dateFns=require('date-fns'),B=require('@radix-ui/react-scroll-area');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 de__default=/*#__PURE__*/_interopDefault(de);var ze__namespace=/*#__PURE__*/_interopNamespace(ze);var B__namespace=/*#__PURE__*/_interopNamespace(B);function pe(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=pe(e[t]))&&(o&&(o+=" "),o+=a);}else for(a in e)e[a]&&(o&&(o+=" "),o+=a);return o}function me(){for(var e,t,a=0,o="",r=arguments.length;a<r;a++)(e=arguments[a])&&(t=pe(e))&&(o&&(o+=" "),o+=t);return o}var re="-",Ve=e=>{let t=Ne(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:o}=e;return {getClassGroupId:d=>{let l=d.split(re);return l[0]===""&&l.length!==1&&l.shift(),Ie(l,t)||We(d)},getConflictingClassGroupIds:(d,l)=>{let i=a[d]||[];return l&&o[d]?[...i,...o[d]]:i}}},Ie=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],o=t.nextPart.get(a),r=o?Ie(e.slice(1),o):void 0;if(r)return r;if(t.validators.length===0)return;let u=e.join(re);return t.validators.find(({validator:d})=>d(u))?.classGroupId},Le=/^\[(.+)\]$/,We=e=>{if(Le.test(e)){let t=Le.exec(e)[1],a=t?.substring(0,t.indexOf(":"));if(a)return "arbitrary.."+a}},Ne=e=>{let{theme:t,prefix:a}=e,o={nextPart:new Map,validators:[]};return Ke(Object.entries(e.classGroups),a).forEach(([u,d])=>{ue(d,o,u,t);}),o},ue=(e,t,a,o)=>{e.forEach(r=>{if(typeof r=="string"){let u=r===""?t:xe(t,r);u.classGroupId=a;return}if(typeof r=="function"){if(Xe(r)){ue(r(o),t,a,o);return}t.validators.push({validator:r,classGroupId:a});return}Object.entries(r).forEach(([u,d])=>{ue(d,xe(t,u),a,o);});});},xe=(e,t)=>{let a=e;return t.split(re).forEach(o=>{a.nextPart.has(o)||a.nextPart.set(o,{nextPart:new Map,validators:[]}),a=a.nextPart.get(o);}),a},Xe=e=>e.isThemeGetter,Ke=(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,Ze=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);}}},Ce="!",Je=e=>{let{separator:t,experimentalParseClassName:a}=e,o=t.length===1,r=t[0],u=t.length,d=l=>{let i=[],p=0,c=0,g;for(let x=0;x<l.length;x++){let m=l[x];if(p===0){if(m===r&&(o||l.slice(x,x+u)===t)){i.push(l.slice(c,x)),c=x+u;continue}if(m==="/"){g=x;continue}}m==="["?p++:m==="]"&&p--;}let S=i.length===0?l:l.substring(c),b=S.startsWith(Ce),w=b?S.substring(1):S,n=g&&g>c?g-c:void 0;return {modifiers:i,hasImportantModifier:b,baseClassName:w,maybePostfixModifierPosition:n}};return a?l=>a({className:l,parseClassName:d}):d},Qe=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},je=e=>({cache:Ze(e.cacheSize),parseClassName:Je(e),...Ve(e)}),_e=/\s+/,$e=(e,t)=>{let{parseClassName:a,getClassGroupId:o,getConflictingClassGroupIds:r}=t,u=[],d=e.trim().split(_e),l="";for(let i=d.length-1;i>=0;i-=1){let p=d[i],{modifiers:c,hasImportantModifier:g,baseClassName:S,maybePostfixModifierPosition:b}=a(p),w=!!b,n=o(w?S.substring(0,b):S);if(!n){if(!w){l=p+(l.length>0?" "+l:l);continue}if(n=o(S),!n){l=p+(l.length>0?" "+l:l);continue}w=!1;}let x=Qe(c).join(":"),m=g?x+Ce:x,L=m+n;if(u.includes(L))continue;u.push(L);let P=r(n,w);for(let A=0;A<P.length;++A){let F=P[A];u.push(m+F);}l=p+(l.length>0?" "+l:l);}return l};function Ye(){let e=0,t,a,o="";for(;e<arguments.length;)(t=arguments[e++])&&(a=ge(t))&&(o&&(o+=" "),o+=a);return o}var ge=e=>{if(typeof e=="string")return e;let t,a="";for(let o=0;o<e.length;o++)e[o]&&(t=ge(e[o]))&&(a&&(a+=" "),a+=t);return a};function ea(e,...t){let a,o,r,u=d;function d(i){let p=t.reduce((c,g)=>g(c),e());return a=je(p),o=a.cache.get,r=a.cache.set,u=l,l(i)}function l(i){let p=o(i);if(p)return p;let c=$e(i,a);return r(i,c),c}return function(){return u(Ye.apply(null,arguments))}}var C=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},he=/^\[(?:([a-z-]+):)?(.+)\]$/i,aa=/^\d+\/\d+$/,ta=new Set(["px","full","screen"]),oa=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,la=/\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$/,ua=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,ra=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,da=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,R=e=>G(e)||ta.has(e)||aa.test(e),q=e=>E(e,"length",La),G=e=>!!e&&!Number.isNaN(Number(e)),le=e=>E(e,"number",G),X=e=>!!e&&Number.isInteger(Number(e)),sa=e=>e.endsWith("%")&&G(e.slice(0,-1)),s=e=>he.test(e),U=e=>oa.test(e),fa=new Set(["length","size","percentage"]),ia=e=>E(e,fa,Se),ca=e=>E(e,"position",Se),na=new Set(["image","url"]),pa=e=>E(e,na,Ia),ma=e=>E(e,"",xa),K=()=>!0,E=(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},La=e=>la.test(e)&&!ua.test(e),Se=()=>!1,xa=e=>ra.test(e),Ia=e=>da.test(e);var Ca=()=>{let e=C("colors"),t=C("spacing"),a=C("blur"),o=C("brightness"),r=C("borderColor"),u=C("borderRadius"),d=C("borderSpacing"),l=C("borderWidth"),i=C("contrast"),p=C("grayscale"),c=C("hueRotate"),g=C("invert"),S=C("gap"),b=C("gradientColorStops"),w=C("gradientColorStopPositions"),n=C("inset"),x=C("margin"),m=C("opacity"),L=C("padding"),P=C("saturate"),A=C("scale"),F=C("sepia"),y=C("skew"),M=C("space"),W=C("translate"),f=()=>["auto","contain","none"],k=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto",s,t],I=()=>[s,t],Y=()=>["",R,q],ee=()=>["auto",G,s],ie=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ae=()=>["solid","dashed","dotted","double","none"],ce=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],oe=()=>["start","end","center","between","around","evenly","stretch"],N=()=>["","0",s],ne=()=>["auto","avoid","all","avoid-page","page","left","right","column"],D=()=>[G,s];return {cacheSize:500,separator:":",theme:{colors:[K],spacing:[R,q],blur:["none","",U,s],brightness:D(),borderColor:[e],borderRadius:["none","","full",U,s],borderSpacing:I(),borderWidth:Y(),contrast:D(),grayscale:N(),hueRotate:D(),invert:N(),gap:I(),gradientColorStops:[e],gradientColorStopPositions:[sa,q],inset:T(),margin:T(),opacity:D(),padding:I(),saturate:D(),scale:D(),sepia:N(),skew:D(),space:I(),translate:I()},classGroups:{aspect:[{aspect:["auto","square","video",s]}],container:["container"],columns:[{columns:[U]}],"break-after":[{"break-after":ne()}],"break-before":[{"break-before":ne()}],"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:[...ie(),s]}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:f()}],"overscroll-x":[{"overscroll-x":f()}],"overscroll-y":[{"overscroll-y":f()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[n]}],"inset-x":[{"inset-x":[n]}],"inset-y":[{"inset-y":[n]}],start:[{start:[n]}],end:[{end:[n]}],top:[{top:[n]}],right:[{right:[n]}],bottom:[{bottom:[n]}],left:[{left:[n]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",X,s]}],basis:[{basis:T()}],"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:N()}],shrink:[{shrink:N()}],order:[{order:["first","last","none",X,s]}],"grid-cols":[{"grid-cols":[K]}],"col-start-end":[{col:["auto",{span:["full",X,s]},s]}],"col-start":[{"col-start":ee()}],"col-end":[{"col-end":ee()}],"grid-rows":[{"grid-rows":[K]}],"row-start-end":[{row:["auto",{span:[X,s]},s]}],"row-start":[{"row-start":ee()}],"row-end":[{"row-end":ee()}],"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",...oe()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...oe(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...oe(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[L]}],px:[{px:[L]}],py:[{py:[L]}],ps:[{ps:[L]}],pe:[{pe:[L]}],pt:[{pt:[L]}],pr:[{pr:[L]}],pb:[{pb:[L]}],pl:[{pl:[L]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[M]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[M]}],"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:[U]},U]}],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",U,q]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",le]}],"font-family":[{font:[K]}],"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",G,le]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",R,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":[m]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[m]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ae(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",R,q]}],"underline-offset":[{"underline-offset":["auto",R,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":[m]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ie(),ca]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",ia]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},pa]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[w]}],"gradient-via-pos":[{via:[w]}],"gradient-to-pos":[{to:[w]}],"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":[m]}],"border-style":[{border:[...ae(),"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":[m]}],"divide-style":[{divide:ae()}],"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:["",...ae()]}],"outline-offset":[{"outline-offset":[R,s]}],"outline-w":[{outline:[R,q]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Y()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[m]}],"ring-offset-w":[{"ring-offset":[R,q]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",U,ma]}],"shadow-color":[{shadow:[K]}],opacity:[{opacity:[m]}],"mix-blend":[{"mix-blend":[...ce(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ce()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[o]}],contrast:[{contrast:[i]}],"drop-shadow":[{"drop-shadow":["","none",U,s]}],grayscale:[{grayscale:[p]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[g]}],saturate:[{saturate:[P]}],sepia:[{sepia:[F]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[i]}],"backdrop-grayscale":[{"backdrop-grayscale":[p]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[m]}],"backdrop-saturate":[{"backdrop-saturate":[P]}],"backdrop-sepia":[{"backdrop-sepia":[F]}],"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:D()}],ease:[{ease:["linear","in","out","in-out",s]}],delay:[{delay:D()}],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:[X,s]}],"translate-x":[{"translate-x":[W]}],"translate-y":[{"translate-y":[W]}],"skew-x":[{"skew-x":[y]}],"skew-y":[{"skew-y":[y]}],"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:[R,q,le]}],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 we=ea(Ca);function h(...e){return we(me(e))}var Pe=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),te=(...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 Ae=de.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:a=2,absoluteStrokeWidth:o,className:r="",children:u,iconNode:d,...l},i)=>de.createElement("svg",{ref:i,...ke,width:t,height:t,stroke:e,strokeWidth:o?Number(a)*24/Number(t):a,className:te("lucide",r),...l},[...d.map(([p,c])=>de.createElement(p,c)),...Array.isArray(u)?u:[u]]));var O=(e,t)=>{let a=de.forwardRef(({className:o,...r},u)=>de.createElement(Ae,{ref:u,iconNode:t,className:te(`lucide-${Pe(e)}`,o),...r}));return a.displayName=`${e}`,a};var Z=O("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);var H=O("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 J=O("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);var Q=O("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var ye=H,Me=Q;var Be=Z;var Fe=J;var wa=({error:e,helperText:t,disabled:a})=>jsxRuntime.jsx(jsxRuntime.Fragment,{children:t&&jsxRuntime.jsx("span",{className:h("mx-1 mt-1 text-start text-xs leading-[110%] text-neutral-600 transition-all ease-linear peer-hover:text-primary-500",e&&"text-error-700 peer-hover:text-error-700 peer-focus:text-error-700",a&&"text-neutral-400"),children:t})}),Re=wa;var Te=de.forwardRef(({label:e,placeholder:t,error:a,selectMode:o=!1,showClearButton:r=!0,helperText:u,className:d,size:l="lg",onClean:i,onChange:p,startIcon:c,endIcon:g,startComponent:S,fixedTopLabel:b,startText:w,disabled:n,...x},m)=>{let L=de.useRef(null),[P,A]=de.useState(!1),F=!L.current?.value,y=de.useCallback(()=>{if(L.current&&!n){L.current.value="",A(!1),i?.();let M={target:L.current,currentTarget:L.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?.(M);}},[n,p,L.current]);return de.useEffect(()=>{L.current&&A(L.current.value.length>0);},[]),jsxRuntime.jsxs("div",{className:h("flex flex-col",d),children:[jsxRuntime.jsxs("div",{className:h("relative flex flex-col",l==="lg"&&"h-12",l==="md"&&"h-10",l==="sm"&&"h-8"),children:[jsxRuntime.jsx("input",{disabled:n,className:h("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",c?l==="lg"?"pl-[2.75rem]":"pl-[2.38rem]":S?"pl-[6.5rem]":"pl-4",w&&"pl-[1.94rem]",g?l==="lg"?"pr-[2.75rem]":"pr-[2.38rem]":"pr-4"),placeholder:t??"",ref:M=>{typeof m=="function"?m(M):m&&(m.current=M),L.current=M;},onChange:M=>{A(M.target.value.length>0),p?.(M);},...x}),S&&de__default.default.cloneElement(S,{className:h("absolute z-20 flex left-3 top-1/2 transform -translate-y-1/2 items-center rounded-full peer-disabled:text-neutral-400",a&&!P&&"text-error-700 peer-hover:text-error-700 peer-focus:text-error-700")}),c&&de__default.default.cloneElement(c,{size:l==="lg"?24:18,className:h("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&&!P&&"text-error-700 peer-hover:text-error-700 peer-focus:text-error-700")}),w&&jsxRuntime.jsx("p",{className:h("items-center pl-3 pt-3 text-neutral-700",l==="lg"?"pt-3":"pt-2",a&&"text-error-700"),children:w}),e&&jsxRuntime.jsx(reactLabel.Label,{className:h("peer-hover:text-neutral-00 absolute -top-[0.5625rem] z-10 ml-3 bg-neutral-50 px-1 tracking-normal text-neutral-600 transition-all duration-75 ease-linear peer-disabled:z-20 peer-disabled:bg-neutral-100 peer-disabled: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",P&&"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]",!F&&"text-xs",a&&"text-error-700 peer-hover:text-error-700 peer-focus:text-error-700",c?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",w&&"peer-placeholder-shown:ml-[1.94rem]"),children:e}),r&&(!F||P)&&jsxRuntime.jsx("div",{className:h("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(ye,{onMouseDown:y,size:l==="lg"?24:l==="md"?18:14,className:"text-error-700"}):jsxRuntime.jsx(Me,{onMouseDown:y,size:l==="lg"?24:l==="md"?18:14,className:"text-neutral-900"})}),g&&de__default.default.cloneElement(g,{size:l==="lg"?24:l==="md"?18:14,className:h("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&&!P&&"text-error-700 peer-hover:text-error-700 peer-focus:text-error-700")}),o&&jsxRuntime.jsx("div",{className:h("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(Re,{helperText:u,error:a,disabled:n})]})});var se=de.forwardRef(({className:e,children:t,onScrollEnd:a,isInfiniteScroll:o=!1,viewPortClassName:r,...u},d)=>{let l=de.useRef(null);return de.useEffect(()=>{if(!o)return;let i=()=>{if(l.current){let{scrollTop:c,scrollHeight:g,clientHeight:S}=l.current;c+S>=g-10&&a?.();}},p=l.current;return p?.addEventListener("scroll",i),()=>{p?.removeEventListener("scroll",i);}},[a,o]),de.useImperativeHandle(d,()=>l.current,[l]),jsxRuntime.jsxs(B__namespace.Root,{className:h("relative overflow-hidden",e),...u,children:[jsxRuntime.jsx(B__namespace.Viewport,{ref:l,className:h("h-full w-full rounded-[inherit] [&>div]:!flex [&>div]:h-full [&>div]:flex-col",r),children:t}),jsxRuntime.jsx(Ue,{forceMount:o},o?l.current?.scrollHeight:1),jsxRuntime.jsx(B__namespace.Corner,{})]})});se.displayName=B__namespace.Root.displayName;var Ue=de.forwardRef(({className:e,orientation:t="vertical",...a},o)=>jsxRuntime.jsx(B__namespace.ScrollAreaScrollbar,{ref:o,orientation:t,className:h("flex touch-none select-none bg-neutral-100 transition-colors",t==="vertical"&&"h-full w-4 py-2",t==="horizontal"&&"h-4 flex-col px-2",e),...a,children:jsxRuntime.jsx(B__namespace.ScrollAreaThumb,{className:h("relative flex-1 rounded bg-primary-500",t==="vertical"&&"mx-1 w-2",t==="horizontal"&&"my-1 h-2")})}));Ue.displayName=B__namespace.ScrollAreaScrollbar.displayName;var Ua=(e,t)=>{let a=de.useCallback(o=>{e.current&&!e.current.contains(o.target)&&t();},[]);de.useEffect(()=>(document.addEventListener("pointerdown",a),()=>{document.removeEventListener("pointerdown",a);}),[]);},Oe=Ua;var Oa=["00:00:00","00:30:00","01:00:00","01:30:00","02:00:00","02:30:00","03:00:00","03:30:00","04:00:00","04:30:00","05:00:00","05:30:00","06:00:00","06:30:00","07:00:00","07:30:00","08:00:00","08:30:00","09:00:00","09:30:00","10:00:00","10:30:00","11:00:00","11:30:00","12:00:00","12:30:00","13:00:00","13:30:00","14:00:00","14:30:00","15:00:00","15:30:00","16:00:00","16:30:00","17:00:00","17:30:00","18:00:00","18:30:00","19:00:00","19:30:00","20:00:00","20:30:00","21:00:00","21:30:00","22:00:00","22:30:00","23:00:00","23:30:00"],z=56,$=6,Ha=({value:e,onChange:t,locale:a,minTime:o,maxTime:r,...u})=>{let[d,l]=de.useState(!1),[i,p]=de.useState(e),[c,g]=de.useState(),[S,b]=de.useState("bottom"),w=de.useRef(null),n=de.useRef(null),x=de.useRef(null),[m,L]=de.useState(-1),P=f=>{p(f),t?.(f),l(!1),L(-1);},A=de.useMemo(()=>i?dateFns.format(new Date("2024-01-01T"+i),"p",{locale:a}):"",[i,a]),F=()=>{p(void 0),L(-1),t?.(void 0);},y=de.useMemo(()=>Oa.map(f=>({value:f,label:dateFns.format(new Date("2024-01-01T"+f),"p",{locale:a}),disabled:o&&f<o||r&&f>r})),[a,o,r]),M=f=>{if(f.preventDefault(),f.key==="ArrowDown"){if(m===y.length-1)return;L(k=>k+1),l(!0),W();}else if(f.key==="ArrowUp"){if(m===0)return;L(k=>k-1),W();}else f.key==="Enter"&&(P(y[m].value),L(-1));},W=()=>{let f=z*$;x.current.scroll({top:(m+2)*z<=f?0:z*(m+2)-f,behavior:"smooth"});};return de.useEffect(()=>{p(e);},[e]),Oe(w,()=>{l(!1);}),de.useEffect(()=>{if(!n.current)return;let f=()=>{if(!n.current)return;let k=z*(y.length<$?y.length:$)+16,T=n.current.getBoundingClientRect();g(T);let I=window.innerHeight-T.bottom>k,Y=T.top+T.height>k;b(I?"bottom":Y?"top":"bottom");};return f(),n.current.addEventListener("mousedown",f),window.addEventListener("scroll",f,!0),window.addEventListener("resize",f),()=>{n.current?.removeEventListener("mousedown",f),window.removeEventListener("scroll",f,!0),window.removeEventListener("resize",f);}},[n.current]),jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Te,{ref:n,autoComplete:"off",startIcon:jsxRuntime.jsx(Fe,{}),onClean:F,readOnly:!0,value:A,onKeyDown:M,onClick:f=>{g(f.currentTarget.getBoundingClientRect()),l(k=>!k);},...u}),jsxRuntime.jsx(ze__namespace.Root,{children:jsxRuntime.jsx("div",{ref:w,className:h("pointer-events-auto fixed z-50 hidden",d&&"block"),style:c?{width:`${c.width}px`,top:S==="bottom"?`${c.height+c.top}px`:c.top-(y.length<$?y.length:$)*z-16,left:c?.left}:void 0,children:jsxRuntime.jsx(se,{className:"elevation-8 my-2 flex max-h-84 w-full flex-col rounded-lg bg-neutral-50",ref:x,children:y.map((f,k)=>jsxRuntime.jsx("div",{onClick:()=>!f.disabled&&P(f.value),className:h("flex w-full items-center px-2 hover:cursor-pointer",!f.disabled&&"hover:bg-primary-100",i===f.value&&"bg-primary-200",m===k&&"bg-primary-200",f.disabled&&"text-neutral-500 hover:cursor-not-allowed"),style:{height:z},children:f.label},f.value))})})})]})};Ha.displayName="TimePicker";/*! Bundled license information:
|
|
1
|
+
'use strict';var de=require('react'),reactLabel=require('@radix-ui/react-label'),jsxRuntime=require('react/jsx-runtime'),ze=require('@radix-ui/react-portal'),dateFns=require('date-fns'),B=require('@radix-ui/react-scroll-area');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 de__default=/*#__PURE__*/_interopDefault(de);var ze__namespace=/*#__PURE__*/_interopNamespace(ze);var B__namespace=/*#__PURE__*/_interopNamespace(B);function pe(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=pe(e[t]))&&(o&&(o+=" "),o+=a);}else for(a in e)e[a]&&(o&&(o+=" "),o+=a);return o}function me(){for(var e,t,a=0,o="",r=arguments.length;a<r;a++)(e=arguments[a])&&(t=pe(e))&&(o&&(o+=" "),o+=t);return o}var re="-",Ve=e=>{let t=Ne(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:o}=e;return {getClassGroupId:d=>{let l=d.split(re);return l[0]===""&&l.length!==1&&l.shift(),Ie(l,t)||We(d)},getConflictingClassGroupIds:(d,l)=>{let i=a[d]||[];return l&&o[d]?[...i,...o[d]]:i}}},Ie=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],o=t.nextPart.get(a),r=o?Ie(e.slice(1),o):void 0;if(r)return r;if(t.validators.length===0)return;let u=e.join(re);return t.validators.find(({validator:d})=>d(u))?.classGroupId},Le=/^\[(.+)\]$/,We=e=>{if(Le.test(e)){let t=Le.exec(e)[1],a=t?.substring(0,t.indexOf(":"));if(a)return "arbitrary.."+a}},Ne=e=>{let{theme:t,prefix:a}=e,o={nextPart:new Map,validators:[]};return Ke(Object.entries(e.classGroups),a).forEach(([u,d])=>{ue(d,o,u,t);}),o},ue=(e,t,a,o)=>{e.forEach(r=>{if(typeof r=="string"){let u=r===""?t:xe(t,r);u.classGroupId=a;return}if(typeof r=="function"){if(Xe(r)){ue(r(o),t,a,o);return}t.validators.push({validator:r,classGroupId:a});return}Object.entries(r).forEach(([u,d])=>{ue(d,xe(t,u),a,o);});});},xe=(e,t)=>{let a=e;return t.split(re).forEach(o=>{a.nextPart.has(o)||a.nextPart.set(o,{nextPart:new Map,validators:[]}),a=a.nextPart.get(o);}),a},Xe=e=>e.isThemeGetter,Ke=(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,Ze=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);}}},Ce="!",Je=e=>{let{separator:t,experimentalParseClassName:a}=e,o=t.length===1,r=t[0],u=t.length,d=l=>{let i=[],p=0,c=0,g;for(let x=0;x<l.length;x++){let m=l[x];if(p===0){if(m===r&&(o||l.slice(x,x+u)===t)){i.push(l.slice(c,x)),c=x+u;continue}if(m==="/"){g=x;continue}}m==="["?p++:m==="]"&&p--;}let S=i.length===0?l:l.substring(c),b=S.startsWith(Ce),w=b?S.substring(1):S,n=g&&g>c?g-c:void 0;return {modifiers:i,hasImportantModifier:b,baseClassName:w,maybePostfixModifierPosition:n}};return a?l=>a({className:l,parseClassName:d}):d},Qe=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},je=e=>({cache:Ze(e.cacheSize),parseClassName:Je(e),...Ve(e)}),_e=/\s+/,$e=(e,t)=>{let{parseClassName:a,getClassGroupId:o,getConflictingClassGroupIds:r}=t,u=[],d=e.trim().split(_e),l="";for(let i=d.length-1;i>=0;i-=1){let p=d[i],{modifiers:c,hasImportantModifier:g,baseClassName:S,maybePostfixModifierPosition:b}=a(p),w=!!b,n=o(w?S.substring(0,b):S);if(!n){if(!w){l=p+(l.length>0?" "+l:l);continue}if(n=o(S),!n){l=p+(l.length>0?" "+l:l);continue}w=!1;}let x=Qe(c).join(":"),m=g?x+Ce:x,L=m+n;if(u.includes(L))continue;u.push(L);let P=r(n,w);for(let A=0;A<P.length;++A){let F=P[A];u.push(m+F);}l=p+(l.length>0?" "+l:l);}return l};function Ye(){let e=0,t,a,o="";for(;e<arguments.length;)(t=arguments[e++])&&(a=ge(t))&&(o&&(o+=" "),o+=a);return o}var ge=e=>{if(typeof e=="string")return e;let t,a="";for(let o=0;o<e.length;o++)e[o]&&(t=ge(e[o]))&&(a&&(a+=" "),a+=t);return a};function ea(e,...t){let a,o,r,u=d;function d(i){let p=t.reduce((c,g)=>g(c),e());return a=je(p),o=a.cache.get,r=a.cache.set,u=l,l(i)}function l(i){let p=o(i);if(p)return p;let c=$e(i,a);return r(i,c),c}return function(){return u(Ye.apply(null,arguments))}}var C=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},he=/^\[(?:([a-z-]+):)?(.+)\]$/i,aa=/^\d+\/\d+$/,ta=new Set(["px","full","screen"]),oa=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,la=/\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$/,ua=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,ra=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,da=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,R=e=>G(e)||ta.has(e)||aa.test(e),q=e=>E(e,"length",La),G=e=>!!e&&!Number.isNaN(Number(e)),le=e=>E(e,"number",G),X=e=>!!e&&Number.isInteger(Number(e)),sa=e=>e.endsWith("%")&&G(e.slice(0,-1)),s=e=>he.test(e),U=e=>oa.test(e),fa=new Set(["length","size","percentage"]),ia=e=>E(e,fa,Se),ca=e=>E(e,"position",Se),na=new Set(["image","url"]),pa=e=>E(e,na,Ia),ma=e=>E(e,"",xa),K=()=>!0,E=(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},La=e=>la.test(e)&&!ua.test(e),Se=()=>!1,xa=e=>ra.test(e),Ia=e=>da.test(e);var Ca=()=>{let e=C("colors"),t=C("spacing"),a=C("blur"),o=C("brightness"),r=C("borderColor"),u=C("borderRadius"),d=C("borderSpacing"),l=C("borderWidth"),i=C("contrast"),p=C("grayscale"),c=C("hueRotate"),g=C("invert"),S=C("gap"),b=C("gradientColorStops"),w=C("gradientColorStopPositions"),n=C("inset"),x=C("margin"),m=C("opacity"),L=C("padding"),P=C("saturate"),A=C("scale"),F=C("sepia"),y=C("skew"),M=C("space"),W=C("translate"),f=()=>["auto","contain","none"],k=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto",s,t],I=()=>[s,t],Y=()=>["",R,q],ee=()=>["auto",G,s],ie=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ae=()=>["solid","dashed","dotted","double","none"],ce=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],oe=()=>["start","end","center","between","around","evenly","stretch"],N=()=>["","0",s],ne=()=>["auto","avoid","all","avoid-page","page","left","right","column"],D=()=>[G,s];return {cacheSize:500,separator:":",theme:{colors:[K],spacing:[R,q],blur:["none","",U,s],brightness:D(),borderColor:[e],borderRadius:["none","","full",U,s],borderSpacing:I(),borderWidth:Y(),contrast:D(),grayscale:N(),hueRotate:D(),invert:N(),gap:I(),gradientColorStops:[e],gradientColorStopPositions:[sa,q],inset:T(),margin:T(),opacity:D(),padding:I(),saturate:D(),scale:D(),sepia:N(),skew:D(),space:I(),translate:I()},classGroups:{aspect:[{aspect:["auto","square","video",s]}],container:["container"],columns:[{columns:[U]}],"break-after":[{"break-after":ne()}],"break-before":[{"break-before":ne()}],"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:[...ie(),s]}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:f()}],"overscroll-x":[{"overscroll-x":f()}],"overscroll-y":[{"overscroll-y":f()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[n]}],"inset-x":[{"inset-x":[n]}],"inset-y":[{"inset-y":[n]}],start:[{start:[n]}],end:[{end:[n]}],top:[{top:[n]}],right:[{right:[n]}],bottom:[{bottom:[n]}],left:[{left:[n]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",X,s]}],basis:[{basis:T()}],"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:N()}],shrink:[{shrink:N()}],order:[{order:["first","last","none",X,s]}],"grid-cols":[{"grid-cols":[K]}],"col-start-end":[{col:["auto",{span:["full",X,s]},s]}],"col-start":[{"col-start":ee()}],"col-end":[{"col-end":ee()}],"grid-rows":[{"grid-rows":[K]}],"row-start-end":[{row:["auto",{span:[X,s]},s]}],"row-start":[{"row-start":ee()}],"row-end":[{"row-end":ee()}],"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",...oe()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...oe(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...oe(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[L]}],px:[{px:[L]}],py:[{py:[L]}],ps:[{ps:[L]}],pe:[{pe:[L]}],pt:[{pt:[L]}],pr:[{pr:[L]}],pb:[{pb:[L]}],pl:[{pl:[L]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[M]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[M]}],"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:[U]},U]}],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",U,q]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",le]}],"font-family":[{font:[K]}],"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",G,le]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",R,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":[m]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[m]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ae(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",R,q]}],"underline-offset":[{"underline-offset":["auto",R,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":[m]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ie(),ca]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",ia]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},pa]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[w]}],"gradient-via-pos":[{via:[w]}],"gradient-to-pos":[{to:[w]}],"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":[m]}],"border-style":[{border:[...ae(),"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":[m]}],"divide-style":[{divide:ae()}],"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:["",...ae()]}],"outline-offset":[{"outline-offset":[R,s]}],"outline-w":[{outline:[R,q]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Y()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[m]}],"ring-offset-w":[{"ring-offset":[R,q]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",U,ma]}],"shadow-color":[{shadow:[K]}],opacity:[{opacity:[m]}],"mix-blend":[{"mix-blend":[...ce(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ce()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[o]}],contrast:[{contrast:[i]}],"drop-shadow":[{"drop-shadow":["","none",U,s]}],grayscale:[{grayscale:[p]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[g]}],saturate:[{saturate:[P]}],sepia:[{sepia:[F]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[i]}],"backdrop-grayscale":[{"backdrop-grayscale":[p]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[m]}],"backdrop-saturate":[{"backdrop-saturate":[P]}],"backdrop-sepia":[{"backdrop-sepia":[F]}],"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:D()}],ease:[{ease:["linear","in","out","in-out",s]}],delay:[{delay:D()}],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:[X,s]}],"translate-x":[{"translate-x":[W]}],"translate-y":[{"translate-y":[W]}],"skew-x":[{"skew-x":[y]}],"skew-y":[{"skew-y":[y]}],"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:[R,q,le]}],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 we=ea(Ca);function h(...e){return we(me(e))}var Pe=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),te=(...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 Ae=de.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:a=2,absoluteStrokeWidth:o,className:r="",children:u,iconNode:d,...l},i)=>de.createElement("svg",{ref:i,...ke,width:t,height:t,stroke:e,strokeWidth:o?Number(a)*24/Number(t):a,className:te("lucide",r),...l},[...d.map(([p,c])=>de.createElement(p,c)),...Array.isArray(u)?u:[u]]));var O=(e,t)=>{let a=de.forwardRef(({className:o,...r},u)=>de.createElement(Ae,{ref:u,iconNode:t,className:te(`lucide-${Pe(e)}`,o),...r}));return a.displayName=`${e}`,a};var Z=O("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);var H=O("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 J=O("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);var Q=O("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var ye=H,Me=Q;var Be=Z;var Fe=J;var wa=({error:e,helperText:t,disabled:a})=>jsxRuntime.jsx(jsxRuntime.Fragment,{children:t&&jsxRuntime.jsx("span",{className:h("mx-1 mt-1 text-start text-xs leading-[110%] text-neutral-600 transition-all ease-linear peer-hover:text-primary-500",e&&"text-error-700 peer-hover:text-error-700 peer-focus:text-error-700",a&&"text-neutral-400"),children:t})}),Re=wa;var Te=de.forwardRef(({label:e,placeholder:t,error:a,selectMode:o=!1,showClearButton:r=!0,helperText:u,className:d,size:l="lg",onClean:i,onChange:p,startIcon:c,endIcon:g,startComponent:S,fixedTopLabel:b,startText:w,disabled:n,...x},m)=>{let L=de.useRef(null),[P,A]=de.useState(!1),F=!L.current?.value,y=de.useCallback(()=>{if(L.current&&!n){L.current.value="",A(!1),i?.();let M={target:L.current,currentTarget:L.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?.(M);}},[n,p,L.current]);return de.useEffect(()=>{L.current&&A(L.current.value.length>0);},[]),jsxRuntime.jsxs("div",{className:h("flex flex-col",d),children:[jsxRuntime.jsxs("div",{className:h("relative flex flex-col",l==="lg"&&"h-12",l==="md"&&"h-10",l==="sm"&&"h-8"),children:[jsxRuntime.jsx("input",{disabled:n,className:h("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",c?l==="lg"?"pl-[2.75rem]":"pl-[2.38rem]":S?"pl-[6.5rem]":"pl-4",w&&"pl-[1.94rem]",g?l==="lg"?"pr-[2.75rem]":"pr-[2.38rem]":"pr-4"),placeholder:t??"",ref:M=>{typeof m=="function"?m(M):m&&(m.current=M),L.current=M;},onChange:M=>{A(M.target.value.length>0),p?.(M);},...x}),S&&de__default.default.cloneElement(S,{className:h("absolute z-20 flex left-3 top-1/2 transform -translate-y-1/2 items-center rounded-full peer-disabled:text-neutral-400",a&&!P&&"text-error-700 peer-hover:text-error-700 peer-focus:text-error-700")}),c&&de__default.default.cloneElement(c,{size:l==="lg"?24:18,className:h("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&&!P&&"text-error-700 peer-hover:text-error-700 peer-focus:text-error-700")}),w&&jsxRuntime.jsx("p",{className:h("items-center pl-3 pt-3 text-neutral-700",l==="lg"?"pt-3":"pt-2",a&&"text-error-700"),children:w}),e&&jsxRuntime.jsx(reactLabel.Label,{className:h("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",P&&"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]",!F&&"text-xs",a&&"text-error-700 peer-hover:text-error-700 peer-focus:text-error-700",c?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",w&&"peer-placeholder-shown:ml-[1.94rem]"),children:e}),r&&(!F||P)&&jsxRuntime.jsx("div",{className:h("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(ye,{onMouseDown:y,size:l==="lg"?24:l==="md"?18:14,className:"text-error-700"}):jsxRuntime.jsx(Me,{onMouseDown:y,size:l==="lg"?24:l==="md"?18:14,className:"text-neutral-900"})}),g&&de__default.default.cloneElement(g,{size:l==="lg"?24:l==="md"?18:14,className:h("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&&!P&&"text-error-700 peer-hover:text-error-700 peer-focus:text-error-700")}),o&&jsxRuntime.jsx("div",{className:h("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(Re,{helperText:u,error:a,disabled:n})]})});var se=de.forwardRef(({className:e,children:t,onScrollEnd:a,isInfiniteScroll:o=!1,viewPortClassName:r,...u},d)=>{let l=de.useRef(null);return de.useEffect(()=>{if(!o)return;let i=()=>{if(l.current){let{scrollTop:c,scrollHeight:g,clientHeight:S}=l.current;c+S>=g-10&&a?.();}},p=l.current;return p?.addEventListener("scroll",i),()=>{p?.removeEventListener("scroll",i);}},[a,o]),de.useImperativeHandle(d,()=>l.current,[l]),jsxRuntime.jsxs(B__namespace.Root,{className:h("relative overflow-hidden",e),...u,children:[jsxRuntime.jsx(B__namespace.Viewport,{ref:l,className:h("h-full w-full rounded-[inherit] [&>div]:!flex [&>div]:h-full [&>div]:flex-col",r),children:t}),jsxRuntime.jsx(Ue,{forceMount:o},o?l.current?.scrollHeight:1),jsxRuntime.jsx(B__namespace.Corner,{})]})});se.displayName=B__namespace.Root.displayName;var Ue=de.forwardRef(({className:e,orientation:t="vertical",...a},o)=>jsxRuntime.jsx(B__namespace.ScrollAreaScrollbar,{ref:o,orientation:t,className:h("flex touch-none select-none bg-neutral-100 transition-colors",t==="vertical"&&"h-full w-4 py-2",t==="horizontal"&&"h-4 flex-col px-2",e),...a,children:jsxRuntime.jsx(B__namespace.ScrollAreaThumb,{className:h("relative flex-1 rounded bg-primary-500",t==="vertical"&&"mx-1 w-2",t==="horizontal"&&"my-1 h-2")})}));Ue.displayName=B__namespace.ScrollAreaScrollbar.displayName;var Ua=(e,t)=>{let a=de.useCallback(o=>{e.current&&!e.current.contains(o.target)&&t();},[]);de.useEffect(()=>(document.addEventListener("pointerdown",a),()=>{document.removeEventListener("pointerdown",a);}),[]);},Oe=Ua;var Oa=["00:00:00","00:30:00","01:00:00","01:30:00","02:00:00","02:30:00","03:00:00","03:30:00","04:00:00","04:30:00","05:00:00","05:30:00","06:00:00","06:30:00","07:00:00","07:30:00","08:00:00","08:30:00","09:00:00","09:30:00","10:00:00","10:30:00","11:00:00","11:30:00","12:00:00","12:30:00","13:00:00","13:30:00","14:00:00","14:30:00","15:00:00","15:30:00","16:00:00","16:30:00","17:00:00","17:30:00","18:00:00","18:30:00","19:00:00","19:30:00","20:00:00","20:30:00","21:00:00","21:30:00","22:00:00","22:30:00","23:00:00","23:30:00"],z=56,$=6,Ha=({value:e,onChange:t,locale:a,minTime:o,maxTime:r,...u})=>{let[d,l]=de.useState(!1),[i,p]=de.useState(e),[c,g]=de.useState(),[S,b]=de.useState("bottom"),w=de.useRef(null),n=de.useRef(null),x=de.useRef(null),[m,L]=de.useState(-1),P=f=>{p(f),t?.(f),l(!1),L(-1);},A=de.useMemo(()=>i?dateFns.format(new Date("2024-01-01T"+i),"p",{locale:a}):"",[i,a]),F=()=>{p(void 0),L(-1),t?.(void 0);},y=de.useMemo(()=>Oa.map(f=>({value:f,label:dateFns.format(new Date("2024-01-01T"+f),"p",{locale:a}),disabled:o&&f<o||r&&f>r})),[a,o,r]),M=f=>{if(f.preventDefault(),f.key==="ArrowDown"){if(m===y.length-1)return;L(k=>k+1),l(!0),W();}else if(f.key==="ArrowUp"){if(m===0)return;L(k=>k-1),W();}else f.key==="Enter"&&(P(y[m].value),L(-1));},W=()=>{let f=z*$;x.current.scroll({top:(m+2)*z<=f?0:z*(m+2)-f,behavior:"smooth"});};return de.useEffect(()=>{p(e);},[e]),Oe(w,()=>{l(!1);}),de.useEffect(()=>{if(!n.current)return;let f=()=>{if(!n.current)return;let k=z*(y.length<$?y.length:$)+16,T=n.current.getBoundingClientRect();g(T);let I=window.innerHeight-T.bottom>k,Y=T.top+T.height>k;b(I?"bottom":Y?"top":"bottom");};return f(),n.current.addEventListener("mousedown",f),window.addEventListener("scroll",f,!0),window.addEventListener("resize",f),()=>{n.current?.removeEventListener("mousedown",f),window.removeEventListener("scroll",f,!0),window.removeEventListener("resize",f);}},[n.current]),jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Te,{ref:n,autoComplete:"off",startIcon:jsxRuntime.jsx(Fe,{}),onClean:F,readOnly:!0,value:A,onKeyDown:M,onClick:f=>{g(f.currentTarget.getBoundingClientRect()),l(k=>!k);},...u}),jsxRuntime.jsx(ze__namespace.Root,{children:jsxRuntime.jsx("div",{ref:w,className:h("pointer-events-auto fixed z-50 hidden",d&&"block"),style:c?{width:`${c.width}px`,top:S==="bottom"?`${c.height+c.top}px`:c.top-(y.length<$?y.length:$)*z-16,left:c?.left}:void 0,children:jsxRuntime.jsx(se,{className:"elevation-8 my-2 flex max-h-84 w-full flex-col rounded-lg bg-neutral-50",ref:x,children:y.map((f,k)=>jsxRuntime.jsx("div",{onClick:()=>!f.disabled&&P(f.value),className:h("flex w-full items-center px-2 hover:cursor-pointer",!f.disabled&&"hover:bg-primary-100",i===f.value&&"bg-primary-200",m===k&&"bg-primary-200",f.disabled&&"text-neutral-500 hover:cursor-not-allowed"),style:{height:z},children:f.label},f.value))})})})]})};Ha.displayName="TimePicker";/*! Bundled license information:
|
|
2
2
|
|
|
3
3
|
lucide-react/dist/esm/shared/src/utils.js:
|
|
4
4
|
(**
|
package/dist/time-picker.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as TimePicker}from'./chunk-
|
|
1
|
+
export{a as TimePicker}from'./chunk-RBK5XJ4J.mjs';import'./chunk-WWSXCOGT.mjs';import'./chunk-KTRSJBA4.mjs';import'./chunk-K5PSD3YW.mjs';import'./chunk-7TIDRZ27.mjs';import'./chunk-AF7XWQ5Y.mjs';import'./chunk-4SUP4N33.mjs';import'./chunk-2WINTZSS.mjs';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sodtrack-web-ui",
|
|
3
|
-
"version": "0.36.
|
|
3
|
+
"version": "0.36.2",
|
|
4
4
|
"description": "UI components for Sodtrack Web",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./dist/index.css": "./dist/index.css",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
],
|
|
21
21
|
"scripts": {
|
|
22
22
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
23
|
-
"build": "tsup",
|
|
23
|
+
"build": "tsup --publicDir",
|
|
24
24
|
"storybook": "storybook dev -p 6006",
|
|
25
25
|
"build-storybook": "storybook build"
|
|
26
26
|
},
|
package/dist/chunk-DFTBHRBX.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-7TIDRZ27.mjs';import {c,d,g}from'./chunk-AF7XWQ5Y.mjs';import {a}from'./chunk-2WINTZSS.mjs';import f,{forwardRef,useRef,useState,useCallback,useEffect}from'react';import {Label}from'@radix-ui/react-label';import {jsxs,jsx}from'react/jsx-runtime';var J=forwardRef(({label:h,placeholder:M,error:r,selectMode:g$1=!1,showClearButton:y=!0,helperText:H,className:N,size:e="lg",onClean:I,onChange:d$1,startIcon:u,endIcon:s,startComponent:p,fixedTopLabel:P,startText:c$1,disabled:i,...D},m)=>{let l=useRef(null),[o,x]=useState(!1),b=!l.current?.value,v=useCallback(()=>{if(l.current&&!i){l.current.value="",x(!1),I?.();let n={target:l.current,currentTarget:l.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")};d$1?.(n);}},[i,d$1,l.current]);return useEffect(()=>{l.current&&x(l.current.value.length>0);},[]),jsxs("div",{className:a("flex flex-col",N),children:[jsxs("div",{className:a("relative flex flex-col",e==="lg"&&"h-12",e==="md"&&"h-10",e==="sm"&&"h-8"),children:[jsx("input",{disabled:i,className:a("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",r&&"placeholder-error-700/0 ring-error-700 hover:text-neutral-900 hover:ring-error-700 focus:ring-error-700",e==="lg"&&"text-base",e==="md"&&"text-base",e==="sm"&&"text-sm",u?e==="lg"?"pl-[2.75rem]":"pl-[2.38rem]":p?"pl-[6.5rem]":"pl-4",c$1&&"pl-[1.94rem]",s?e==="lg"?"pr-[2.75rem]":"pr-[2.38rem]":"pr-4"),placeholder:M??"",ref:n=>{typeof m=="function"?m(n):m&&(m.current=n),l.current=n;},onChange:n=>{x(n.target.value.length>0),d$1?.(n);},...D}),p&&f.cloneElement(p,{className:a("absolute z-20 flex left-3 top-1/2 transform -translate-y-1/2 items-center rounded-full peer-disabled:text-neutral-400",r&&!o&&"text-error-700 peer-hover:text-error-700 peer-focus:text-error-700")}),u&&f.cloneElement(u,{size:e==="lg"?24:18,className:a("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",r&&!o&&"text-error-700 peer-hover:text-error-700 peer-focus:text-error-700")}),c$1&&jsx("p",{className:a("items-center pl-3 pt-3 text-neutral-700",e==="lg"?"pt-3":"pt-2",r&&"text-error-700"),children:c$1}),h&&jsx(Label,{className:a("peer-hover:text-neutral-00 absolute -top-[0.5625rem] z-10 ml-3 bg-neutral-50 px-1 tracking-normal text-neutral-600 transition-all duration-75 ease-linear peer-disabled:z-20 peer-disabled:bg-neutral-100 peer-disabled: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",o&&"peer-disabled:bg-neutral-50",e==="lg"?"text-base placeholder-shown:text-xs peer-placeholder-shown:top-3":e==="md"?"text-base placeholder-shown:text-xs peer-placeholder-shown:top-2":"text-sm placeholder-shown:text-xs peer-placeholder-shown:top-[6px]",!b&&"text-xs",r&&"text-error-700 peer-hover:text-error-700 peer-focus:text-error-700",u?e==="lg"?"peer-placeholder-shown:ml-[2.75rem]":"peer-placeholder-shown:ml-[2.38rem]":p?"peer-placeholder-shown:ml-[6rem]":"ml-3",P&&"!-top-[0.375rem] z-20 ml-3 !text-xs !transition-none",c$1&&"peer-placeholder-shown:ml-[1.94rem]"),children:h}),y&&(!b||o)&&jsx("div",{className:a("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",r&&"text-error-700 peer-hover:text-error-700 peer-focus:text-error-700",g$1||s?e==="lg"?"right-[2.81rem]":e==="md"?"right-[2.125rem]":"right-[1.875rem]":"right-4"),children:r?jsx(c,{onMouseDown:v,size:e==="lg"?24:e==="md"?18:14,className:"text-error-700"}):jsx(d,{onMouseDown:v,size:e==="lg"?24:e==="md"?18:14,className:"text-neutral-900"})}),s&&f.cloneElement(s,{size:e==="lg"?24:e==="md"?18:14,className:a("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",r&&!o&&"text-error-700 peer-hover:text-error-700 peer-focus:text-error-700")}),g$1&&jsx("div",{className:a("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:jsx(g,{className:e==="lg"?"h-6 w-6":"h-4.5 w-4.5"})})]}),jsx(a$1,{helperText:H,error:r,disabled:i})]})});export{J as a};
|
package/dist/chunk-HEKB3FHS.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
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-DFTBHRBX.mjs';import {a as a$3}from'./chunk-BVHU5ZT3.mjs';import {c}from'./chunk-YIEVS6EO.mjs';import {b}from'./chunk-442ZNBSP.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:l,...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:l,optionDescriptionLines:i,noResultsButtonLabel:g,filteredOptions:s,inputRect:w,inputRef:v,popoverPosition:k,optionsListRef:u,selectedOption:m,options:R,setFilteredOptions:b})=>jsx(Ct.Root,{asChild:!0,children:jsx("div",{ref:u,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:[s.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}),l&&jsxs(Fragment,{children:[jsx(a$1,{}),jsx(c,{variant:"ghost",className:"my-3 w-fit self-center",onClick:f=>{u.current.style.display="none",v.current.value="",b(R),l();},children:g})]})]}),s.map(f=>jsx(At,{title:f.label,disabled:f.disabled,description:f.description,descriptionLines:i,onClick:()=>t(f),className:a$2(m?.value===f.value&&"bg-primary-200")},f.key??f.value))]})})})),Mt=Ut;var qt=336,rr=({options:t,defaultSelectedOption:a,onSelect:r,onClick:e,onInputChange:n,error:o,helperText:l,label:i,placeholder:g,value:s,size:w="lg",optionDescriptionLines:v=1,noResultsLabel:k,noResultsIcon:u,noResultsDescription:m,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,lt]=useState(),[st,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]),M=useCallback(()=>{if(!p?.current)return;let y=p.current.getBoundingClientRect();lt(y);let z=V?V.height:G,A=window.innerHeight-y.bottom>z,Q=y.top>z;H(A?"bottom":Q?"top":"bottom");},[V?.height]),U=useCallback(()=>{let y=t.filter(z=>z.label.toLowerCase().includes(p?.current?.value.toLowerCase()??""));if(T(y),L?.current){let z=L.current.getBoundingClientRect();K(z);}},[t]);return useEffect(()=>{T(t);},[t]),useEffect(()=>{if(!s){x(null),p.current&&(p.current.value="");return}(!p.current?.value||c?.value!==s.value)&&(x(s),p.current.value=s.label);},[s]),a$5(L,()=>{L.current.style.display="none",c&&p.current&&(p.current.value=c.label);}),useEffect(()=>{if(p?.current)return M(),p.current.addEventListener("mousedown",M),p.current.addEventListener("input",U),window.addEventListener("scroll",M,!0),window.addEventListener("resize",M),()=>{p.current?.removeEventListener("mousedown",M),p.current?.removeEventListener("input",U),window.removeEventListener("scroll",M,!0),window.removeEventListener("resize",M);}},[M,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:l,placeholder:g,size:w,error:o,disabled:h}),jsx(Mt,{handleSelect:N,noResultsLabel:k,NoResultsIcon:u,optionDescriptionLines:v,noResultsAsColumn:b,noResultsButtonLabel:I,noResultsButtonOnClick:f,noResultsDescription:m,noResultsDescriptionLines:R,filteredOptions:st,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:l,...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 ur=({children:t,title:a,titleLines:r,description:e="",descriptionLines:n,startIcon:o,badgeContent:l,hasDivider:i=!1,disabled:g=!1,onSelect:s,className:w,...v})=>jsxs(_,{hasDescription:!!e,disabled:g,onClick:s,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:[l&&jsx(a$3,{content:l,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:l=!1,disabled:i=!1,checked:g,onCheckedChange:s,className:w,...v})=>jsxs(_,{hasDescription:!!e,disabled:i,hasDivider:l,...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:s,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,l]=useState(),[i,g]=useState(!1),[s,w]=useState([]),[v,k]=useState(-1),[u,m]=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:s,currentFocus:v,popoverPosition:u,setFilteredOptions:w,setCurrentFocus:k,setShowChips:g,setPopoverPosition:m,setInputRect:l,optionsListHeight:f,optionsListRect:R,setOptionsListRect:b,setOptionsListHeight:I},children:t})};var se=({option:t,onMountWidth:a,size:r})=>{let e=useRef(null);return useEffect(()=>{e.current&&a?.(e.current.clientWidth);},[]),jsx(d,{ref:e,className:"flex-shrink-0",size:r==="md"?"xs":"md",hasCloseIcon:!1,children:t.label})},Tt=se;var ge=150,we=bt.memo(({selectedOptions:t,error:a,onCleanSelectedOptions:r,size:e})=>{let{autocompleteId:n,inputRect:o,inputRef:l,optionsListRef:i}=P(),g=bt.useRef(null),[s,w]=bt.useState(new Map),v=useMemo(()=>{if(!o?.width)return [];let u=0,m=o.width-ge,R=0;for(let b=0;b<t.length&&(R+=s.get(b)??0,!(R>m));b++)u++;return t.slice(0,u)},[o?.width,t,s]),k=useCallback(()=>{l?.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((u,m)=>jsx(Tt,{option:u,onMountWidth:R=>w(b=>new Map(b).set(m,R)),size:e},`chip-input-${n}-${u.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:u=>{u.stopPropagation(),r();}})]})}),Ht=we;var be=bt.memo(({option:t,index:a,onPressOption:r,isSelected:e,optionDescriptionLines:n})=>{let{currentFocus:o,inputRef:l}=P();return jsx(St,{title:t.label,checked:e,disabled:t.disabled,className:o===a?"bg-primary-200":void 0,onMouseDown:i=>{l?.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:l,noResultsButtonOnClick:i,optionDescriptionLines:g,noResultsButtonLabel:s})=>{let{popoverPosition:w,scrollAreaRef:v,optionsListRef:k,filteredOptions:u,inputRect:m,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:m?{width:`${m.width}px`,left:m.left,top:w==="bottom"?`${m.bottom}px`:void 0,bottom:w==="top"?`${window.innerHeight-m.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:{height:f+"px"},ref:v,children:[u.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:l,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:s})]})]}),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}`)),u.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:l,onInputChange:i,size:g,disabled:s})=>{let{setCurrentFocus:w,setFilteredOptions:v,optionsListRef:k,inputRef:u}=P();return jsx(a$4,{ref:u,autoComplete:"off",list:"",disabled:s,selectMode:!0,onChange:m=>{w(-1),i?.(m.target.value);},onClean:()=>{w(-1),v(l),a?.(null,t);},onClick:()=>{s||(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:l,noResultsLabel:i,noResultsIcon:g,noResultsDescription:s,noResultsDescriptionLines:w,noResultsAsColumn:v,noResultsButtonOnClick:k,noResultsButtonLabel:u,className:m,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:lt,setCurrentFocus:st,showChips:T,setOptionsListRect:ct,optionsListRect:H,setOptionsListHeight:V}=P(),K=useRef(!1),[G,N]=useState(a??[]),M=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);},[]),z=useCallback(()=>{p(!0);},[]),A=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;lt(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",st(-1);}),useEffect(()=>{if(c?.current)return A(),c.current.addEventListener("mousedown",A),c.current.addEventListener("input",Q),c.current.addEventListener("focusin",y),c.current.addEventListener("focusout",z),window.addEventListener("scroll",A,!0),window.addEventListener("resize",A),()=>{c.current?.removeEventListener("mousedown",A),c.current?.removeEventListener("input",A),c.current?.removeEventListener("focusout",z),c.current?.removeEventListener("focusin",y),window.removeEventListener("scroll",A,!0),window.removeEventListener("resize",A);}},[A,z,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",m),children:[jsx(Bt,{selectedOptions:G,onSelect:r,error:e,helperText:n,label:o,placeholder:l,handleSelect:M,options:t,onInputChange:R,size:I,disabled:h}),T&&jsx(Ht,{selectedOptions:G,error:e,onCleanSelectedOptions:U,size:I}),jsx(Xt,{handleSelect:M,selectedOptions:G,noResultsLabel:i,NoResultsIcon:g,optionDescriptionLines:j,noResultsAsColumn:v,noResultsButtonLabel:u,noResultsButtonOnClick:k,noResultsDescription:s,noResultsDescriptionLines:w})]})};var zo=t=>jsx(Dt,{children:jsx(Yt,{...t})});var Oe=({children:t,hasDescription:a=!1,disabled:r=!1,hasDivider:e=!1,className:n,onClick:o,...l})=>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);},...l,children:t}),e&&jsx(a$1,{})]}),_=Oe;var At=({children:t,title:a,titleLines:r,description:e="",descriptionLines:n,startIcon:o,hasDivider:l=!1,disabled:i=!1,className:g,...s})=>jsxs(_,{hasDescription:!!e,disabled:i,hasDivider:l,className:g,...s,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,At as b,ur as c,St as d,zo as e};
|