sodtrack-web-ui 0.66.0 → 0.67.1
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-6UPBJM3U.mjs → chunk-24SVNG3S.mjs} +1 -1
- package/dist/{chunk-264CPSX6.mjs → chunk-2E73JYPC.mjs} +1 -1
- package/dist/{chunk-UUBNCKUK.mjs → chunk-3ATABD4Z.mjs} +1 -1
- package/dist/{chunk-LUTLWXF4.mjs → chunk-3RIPZHAQ.mjs} +1 -1
- package/dist/{chunk-662BFQHD.mjs → chunk-3SEVJXC3.mjs} +1 -1
- package/dist/{chunk-732T6GAF.mjs → chunk-3UAY6HMS.mjs} +1 -1
- package/dist/{chunk-Q2AROFBG.mjs → chunk-4OBAYMWQ.mjs} +1 -1
- package/dist/{chunk-DYCYUT6X.mjs → chunk-4YFRFH7D.mjs} +1 -1
- package/dist/{chunk-R5JK63U2.mjs → chunk-5SL2VRZD.mjs} +1 -1
- package/dist/{chunk-V52D52VZ.mjs → chunk-74UPUNDK.mjs} +1 -1
- package/dist/{chunk-OA4FUWKA.mjs → chunk-DAG275SA.mjs} +1 -1
- package/dist/{chunk-BHGQACYA.mjs → chunk-EXCX7TZT.mjs} +1 -1
- package/dist/{chunk-3GULVCNF.mjs → chunk-FM5VRV4O.mjs} +1 -1
- package/dist/{chunk-P4DOS5WA.mjs → chunk-GWGMTVLB.mjs} +1 -1
- package/dist/{chunk-66CEW3Q6.mjs → chunk-I4P6XVOL.mjs} +1 -1
- package/dist/{chunk-K2WL25TT.mjs → chunk-IMGMRTZB.mjs} +1 -1
- package/dist/{chunk-FU4U752N.mjs → chunk-IVP3SQT6.mjs} +1 -1
- package/dist/{chunk-2ZWNPYHN.mjs → chunk-JBSMJKVP.mjs} +1 -1
- package/dist/{chunk-HMEDZZ4J.mjs → chunk-K6GFJXYC.mjs} +1 -1
- package/dist/{chunk-GK5RQ5PL.mjs → chunk-NDF7TEOD.mjs} +1 -1
- package/dist/{chunk-ORV22CHM.mjs → chunk-O7YNHF7W.mjs} +1 -1
- package/dist/chunk-ORLQCFPI.mjs +1 -0
- package/dist/{chunk-FLWZO2OV.mjs → chunk-TLOOUV4I.mjs} +1 -1
- package/dist/chunk-VW4HZXAL.mjs +1 -0
- package/dist/{chunk-AHEVD6II.mjs → chunk-WXEFOJ3H.mjs} +1 -1
- package/dist/{chunk-JCB42QTZ.mjs → chunk-YO6PTC37.mjs} +1 -1
- package/dist/chunk-Z5V7WUXE.mjs +34 -0
- package/dist/{chunk-FT3VFPUZ.mjs → chunk-ZLCAROOS.mjs} +1 -1
- package/dist/components/accordion-form.js +2 -2
- package/dist/components/accordion-form.mjs +1 -1
- package/dist/components/accordion.js +2 -2
- package/dist/components/accordion.mjs +1 -1
- package/dist/components/alert-dialog.js +2 -2
- package/dist/components/alert-dialog.mjs +1 -1
- package/dist/components/alert-message.js +2 -2
- package/dist/components/alert-message.mjs +1 -1
- package/dist/components/button.js +2 -2
- package/dist/components/button.mjs +1 -1
- package/dist/components/calendar.mjs +1 -1
- package/dist/components/checkbox.js +2 -2
- package/dist/components/checkbox.mjs +1 -1
- package/dist/components/chip-input.js +2 -2
- package/dist/components/chip-input.mjs +1 -1
- package/dist/components/country-text-field.js +2 -2
- package/dist/components/country-text-field.mjs +1 -1
- package/dist/components/data-table.js +2 -2
- package/dist/components/data-table.mjs +1 -1
- package/dist/components/date-picker.mjs +1 -1
- package/dist/components/dialog-new.js +2 -2
- package/dist/components/dialog-new.mjs +1 -1
- package/dist/components/dialog.js +2 -2
- package/dist/components/dialog.mjs +1 -1
- package/dist/components/drawer-sticky.js +2 -2
- package/dist/components/drawer-sticky.mjs +1 -1
- package/dist/components/drawer.js +2 -2
- package/dist/components/drawer.mjs +1 -1
- package/dist/components/expandable-card.d.mts +20 -0
- package/dist/components/expandable-card.d.ts +20 -0
- package/dist/components/expandable-card.js +17 -0
- package/dist/components/expandable-card.mjs +1 -0
- package/dist/components/flag-select.js +2 -2
- package/dist/components/flag-select.mjs +1 -1
- package/dist/components/icons.d.mts +3 -1
- package/dist/components/icons.d.ts +3 -1
- package/dist/components/icons.js +4 -2
- package/dist/components/icons.mjs +1 -1
- package/dist/components/index.d.mts +2 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +4 -2
- package/dist/components/index.mjs +1 -1
- package/dist/components/list-item-arrow.js +2 -2
- package/dist/components/list-item-arrow.mjs +1 -1
- package/dist/components/list-item-button.js +2 -2
- package/dist/components/list-item-button.mjs +1 -1
- package/dist/components/list-item-checkbox.js +2 -2
- package/dist/components/list-item-checkbox.mjs +1 -1
- package/dist/components/list-item.mjs +1 -1
- package/dist/components/rating.js +2 -2
- package/dist/components/rating.mjs +1 -1
- package/dist/components/search-bar.js +2 -2
- package/dist/components/search-bar.mjs +1 -1
- package/dist/components/select.js +2 -2
- package/dist/components/select.mjs +1 -1
- package/dist/components/snackbar.js +2 -2
- package/dist/components/snackbar.mjs +1 -1
- package/dist/components/tab.js +2 -2
- package/dist/components/tab.mjs +1 -1
- package/dist/components/table.js +2 -2
- package/dist/components/table.mjs +1 -1
- package/dist/components/text-field.js +2 -2
- package/dist/components/text-field.mjs +1 -1
- package/dist/components/time-picker.mjs +1 -1
- package/dist/components/toast.js +2 -2
- package/dist/components/toast.mjs +1 -1
- package/dist/styles/index.css +1 -1
- package/dist/styles/variables.css +1 -0
- package/dist/styles/variables.d.mts +2 -0
- package/dist/styles/variables.d.ts +2 -0
- package/package.json +9 -8
- package/dist/chunk-QWBSZY37.mjs +0 -32
- package/dist/chunk-TTGZ5XCN.mjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import {c}from'./chunk-7NJTMO4L.mjs';import {b,e,f,c as c$1,d}from'./chunk-
|
|
1
|
+
import {c}from'./chunk-7NJTMO4L.mjs';import {b,e,f,c as c$1,d}from'./chunk-Z5V7WUXE.mjs';import {a as a$1}from'./chunk-BO6XI5BE.mjs';import {createToaster,Toaster,Toast}from'@ark-ui/react/toast';import {jsx,jsxs}from'react/jsx-runtime';var w=["success","warning","error","info","loading"],T=createToaster({placement:"top",overlap:false,gap:8,duration:5e3}),a="hidden h-6 w-6 animate-in fade-in-0 zoom-in duration-300",h=l=>jsx(Toaster,{toaster:T,...l,children:o=>jsxs(Toast.Root,{className:a$1("group z-(--z-index) flex h-(--height) min-w-70 max-w-100 translate-x-(--x) translate-y-(--y) items-center rounded-lg opacity-(--opacity) transition-all will-change-transform","p-3 pr-2 ring-1 ring-inset data-[state=close]:animate-slide-up data-[state=open]:animate-slide-down","data-[type=success]:bg-success-100 data-[type=success]:ring-success-300","data-[type=info]:bg-info-100 data-[type=info]:ring-info-300","data-[type=warning]:bg-warning-100 data-[type=warning]:ring-warning-300","data-[type=error]:bg-error-100 data-[type=error]:ring-error-300","data-[type=loading]:bg-primary-200 data-[type=loading]:ring-primary-500"),children:[jsx(c,{size:"md",className:"hidden group-data-[type=loading]:block"}),jsx(b,{className:a$1(a,"text-success-500 group-data-[type=success]:block")}),jsx(e,{className:a$1(a,"text-info-500 group-data-[type=info]:block")}),jsx(f,{className:a$1(a,"text-warning-700 group-data-[type=warning]:block")}),jsx(c$1,{className:a$1(a,"text-error-500 group-data-[type=error]:block")}),jsx(Toast.Title,{className:"ml-3 mr-4.5 line-clamp-1 flex-1 font-inter text-sm font-medium leading-[140%] text-neutral-900",children:o.title}),jsx(Toast.CloseTrigger,{className:"m-1.75",children:jsx(d,{className:"h-4.5 w-4.5"})})]},o.id)});export{w as a,T as b,h as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-YO6PTC37.mjs';import {a as a$1}from'./chunk-BO6XI5BE.mjs';import H,{useId,useRef,useState,useEffect}from'react';import*as x from'@radix-ui/react-portal';import {jsxs,Fragment,jsx}from'react/jsx-runtime';var g=56,s=6,D=({options:l,noResults:m,selectedOption:h,onSelect:y,onChange:O,onClick:E,className:S,...P})=>{let R=useId(),n=useRef(null),t=useRef(null),[L,C]=useState("bottom"),[o,I]=useState(),[p,f]=useState(h??null),N=e=>{n.current.style.display="none",t.current.value=e.label,f(e),y?.(e);};return useEffect(()=>{if(!t.current)return;let e=()=>{if(!t.current)return;let r=g*(l.length<s?l.length:s)+16,c=t.current.getBoundingClientRect();I(c);let T=window.innerHeight-c.bottom>r,k=c.top>r;C(T?"bottom":k?"top":"bottom");};return e(),t.current.addEventListener("mousedown",e),window.addEventListener("scroll",e,true),window.addEventListener("resize",e),()=>{t.current?.removeEventListener("mousedown",e),window.removeEventListener("scroll",e,true),window.removeEventListener("resize",e);}},[t.current]),useEffect(()=>{function e(r){n.current&&!n.current.contains(r.target)&&(n.current.style.display="none");}return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e);}},[n.current]),jsxs(Fragment,{children:[jsx(a,{className:a$1("w-full cursor-pointer!",S),readOnly:true,ref:t,autoComplete:"off",list:"",selectMode:true,value:p?.label,showClearButton:false,onClick:e=>{n.current.style.display="flex",E?.(e);},onChange:e=>{f(null),O?.(e);},...P}),jsx(x.Root,{asChild:true,children:jsxs("ul",{ref:n,className:"elevation-8 pointer-events-auto absolute z-10000 my-2 hidden max-h-[336px] w-full flex-col overflow-y-auto rounded-lg bg-neutral-50",style:o?{width:`${o.width}px`,left:o.left,top:L==="bottom"?`${o.height+o.top+window.scrollY}px`:window.scrollY+o.top-(l.length<s?l.length:s)*g-16}:void 0,children:[l.length===0&&jsxs("div",{className:"elevation-8 max-h-88 flex flex-1 flex-col items-center justify-center rounded-lg bg-neutral-50 px-8 py-6",children:[H.cloneElement(m.icon,{className:"mb-2 h-8 w-8 text-neutral-300"}),jsx("p",{className:"text-center text-sm leading-[120%] text-neutral-500",children:m.message})]}),l.map((e,r)=>jsx("li",{onClick:()=>{e.disabled||N(e);},className:a$1("w-full shrink-0 py-4 pl-4 pr-6 text-left",p?.value===e.value&&"bg-primary-200",e.disabled?"cursor-not-allowed text-neutral-400":"cursor-pointer hover:bg-primary-100"),children:e.label},`select-option-${R}-${e.key??e.value}`))]})})]})};export{D as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {c as c$1}from'./chunk-
|
|
1
|
+
import {c as c$1}from'./chunk-IVP3SQT6.mjs';import {f,b,c,e,d}from'./chunk-Z5V7WUXE.mjs';import {a}from'./chunk-BO6XI5BE.mjs';import {useState}from'react';import {tv}from'tailwind-variants';import {jsxs,jsx}from'react/jsx-runtime';var w=tv({slots:{container:"flex shrink-0 rounded-lg py-3 pl-4 pr-3",icon:"mr-3 h-5.5 w-5.5 shrink-0",closeIcon:"-mt-1 ml-4 h-4.5 w-4.5 shrink-0 cursor-pointer",title:"my-auto break-all font-inter text-sm leading-[130%] text-neutral-900",description:"mt-1 font-inter text-sm leading-[130%] text-neutral-700"},variants:{hasCloseButton:{true:{}},variant:{warning:{container:"bg-warning-100",icon:"text-warning-500"},success:{container:"bg-success-100",icon:"text-success-500"},error:{container:"bg-error-100",icon:"text-error-500"},info:{container:"bg-info-100",icon:"text-info-500"}}},defaultVariants:{variant:"info",size:"md",hasCloseButton:true}}),z=({variant:t,className:g,description:s,title:N,hasCloseButton:l=true,actionButton:o})=>{let[d$1,x]=useState(true),{container:y,icon:a$1,closeIcon:h,title:b$1,description:v}=w({variant:t,hasCloseButton:l});return jsxs("div",{className:a(y(),g,!d$1&&"hidden"),children:[jsxs("div",{className:"flex flex-1",children:[t==="warning"&&jsx(f,{className:a$1({className:!s&&"my-auto"})}),t==="success"&&jsx(b,{className:a$1({className:!s&&"my-auto"})}),t==="error"&&jsx(c,{className:a$1({className:!s&&"my-auto"})}),t==="info"&&jsx(e,{className:a$1({className:!s&&"my-auto"})}),jsxs("div",{className:"flex flex-col",children:[jsx("h6",{className:b$1({className:s&&"font-semibold"}),children:N}),s&&jsx("p",{className:v(),children:s})]})]}),o&&jsx(c$1,{...o,variant:"white",className:a("my-auto ml-2",o.className),size:"md"}),l&&jsx(d,{className:h(),onClick:()=>x(false)})]})};export{z as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {d}from'./chunk-FAMLJ6AJ.mjs';import {a as a$1}from'./chunk-SXEHG5TZ.mjs';import {g}from'./chunk-
|
|
1
|
+
import {d}from'./chunk-FAMLJ6AJ.mjs';import {a as a$1}from'./chunk-SXEHG5TZ.mjs';import {g}from'./chunk-Z5V7WUXE.mjs';import {a}from'./chunk-BO6XI5BE.mjs';import*as c from'react';import*as e from'@radix-ui/react-accordion';export{e as a };import {jsx,jsxs}from'react/jsx-runtime';var S=["sm","md"],k=c.forwardRef(({className:i,children:r,size:o="md",hasBorder:a$1=false,...s},m)=>jsx(e.Root,{"data-border":a$1,"data-size":o,className:a("group/root space-y-2",i),...s,ref:m,children:r})),y=c.forwardRef(({className:i,...r},o)=>jsx(e.Item,{ref:o,className:a("rounded-lg bg-neutral-50","group-data-[border=true]/root:ring-1 group-data-[border=true]/root:ring-neutral-200 group-data-[border=true]/root:ring-inset",i),...r}));y.displayName="AccordionItem";var P=c.forwardRef(({className:i,children:r,...o},a$1)=>jsx(e.Header,{className:"flex",children:jsxs(e.Trigger,{ref:a$1,className:a("group flex flex-1 items-center justify-between p-4 transition-all [&[data-state=open]>svg]:rotate-180",i),...o,children:[r,jsx(g,{className:"h-6 w-6 shrink-0 transition-transform duration-200 group-disabled:text-neutral-500"})]})}));P.displayName=e.Trigger.displayName;var x=c.forwardRef(({className:i,title:r,description:o,onEndButtonClick:a$2,StartIcon:s,EndIcon:m,children:N,badgeNumber:g$1,chipStatus:p,...v},A)=>jsx(e.Header,{className:"flex",children:jsxs(e.Trigger,{title:r,ref:A,className:a("group hover:not-disabled:bg-primary-100 flex flex-1 items-center justify-between gap-3 rounded-lg p-2 pl-3 transition-all [&[data-state=open]>div>.chevron-icon]:rotate-180",a(!o&&"min-h-12",o&&"group-data-[size=md]/root:min-h-15.75 group-data-[size=sm]/root:min-h-12"),i),...v,children:[jsxs("div",{className:"flex",children:[s&&jsx(s,{className:"mr-2 h-4.5 w-4.5 text-neutral-900 group-disabled:text-neutral-500 group-data-[size=md]/root:h-4.5 group-data-[size=md]/root:w-4.5 group-data-[size=sm]:h-3.5 group-data-[size=sm]/root:w-3.5"}),jsxs("div",{children:[jsx("p",{className:"text-left text-base leading-[125%]! font-semibold text-neutral-900 group-disabled:text-neutral-500 group-data-[size=sm]/root:text-sm",children:r}),jsx("p",{className:"text-left text-sm leading-[130%] font-normal tracking-[0.28px] text-neutral-700 group-disabled:text-neutral-500 group-data-[size=sm]/root:text-xs",children:o})]})]}),jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[p&&jsx(d,{variant:p.variant,type:p.type,size:"xs",className:"shrink-0",children:p.text}),g$1?.toString()&&jsx(a$1,{variant:"alert",size:"md",content:g$1.toString()}),m&&jsx(m,{className:"m-1.75 text-neutral-900 group-disabled:text-neutral-500",size:18,onClick:R=>{R.stopPropagation(),a$2?.();}}),jsx(g,{className:"chevron-icon h-4.5 w-4.5 shrink-0 transition-transform duration-200 group-disabled:text-neutral-500"})]})]})}));x.displayName=e.Trigger.displayName;var h=c.forwardRef(({className:i,children:r,...o},a$1)=>jsx(e.Content,{ref:a$1,className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden",...o,children:jsx("div",{className:a("pr-2 pl-3 group-data-[size=md]/root:py-4 group-data-[size=sm]/root:py-2",i),children:r})}));h.displayName=e.Content.displayName;export{S as b,k as c,y as d,P as e,x as f,h as g};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {j,k}from'./chunk-
|
|
1
|
+
import {j,k}from'./chunk-Z5V7WUXE.mjs';import {a}from'./chunk-BO6XI5BE.mjs';import {CheckboxRoot,CheckboxControl,CheckboxIndicator,CheckboxLabel,CheckboxHiddenInput}from'@ark-ui/react';import {useCallback}from'react';import {jsxs,jsx}from'react/jsx-runtime';var P=["sm","md"],N=[true,"indeterminate",false],R=({className:n,label:r,size:h="md",disabled:e=false,onCheckedChange:o,...m})=>{let p=useCallback(g=>{o?.(g.checked);},[o]);return jsxs(CheckboxRoot,{"data-size":h,className:a("group flex h-fit w-fit items-center data-disabled:cursor-not-allowed data-[size=md]:gap-2.5 data-[size=sm]:gap-2",n),disabled:e,onCheckedChange:p,...m,children:[jsxs(CheckboxControl,{className:a("relative flex items-center justify-center rounded-xs ring-1 ring-inset ring-neutral-900 transition-all after:absolute after:rounded-full group-data-[size=md]:mt-0.125 group-data-[size=sm]:mt-0.25","group-data-[size=sm]:h-4 group-data-[size=sm]:w-4 group-data-[size=sm]:after:h-6 group-data-[size=sm]:after:w-6","group-data-[size=md]:h-5 group-data-[size=md]:w-5 group-data-[size=md]:after:-left-1.5 group-data-[size=md]:after:-top-1.5 group-data-[size=md]:after:h-8 group-data-[size=md]:after:w-8",!e&&"group-hover:after:bg-transparent-primary-20 data-[state=unchecked]:group-hover:ring-primary-600",!e&&"data-[state=checked]:group-active:bg-primary-700 data-[state=indeterminate]:group-active:bg-primary-700 data-[state=unchecked]:group-active:ring-primary-700",!e&&"data-[state=checked]:bg-primary-500 data-[state=checked]:ring-0 data-[state=checked]:group-hover:bg-primary-600",!e&&"data-[state=indeterminate]:bg-primary-500 data-[state=indeterminate]:ring-0 data-[state=indeterminate]:group-hover:bg-primary-600",e&&"data-[state=checked]:data-disabled:bg-neutral-500 data-[state=checked]:data-disabled:ring-0",e&&"data-[state=unchecked]:data-disabled:ring-neutral-500",e&&"data-[state=indeterminate]:data-disabled:ring-neutral-500"),children:[jsx(CheckboxIndicator,{children:jsx(j,{className:a("text-neutral-50","group-data-[size=md]:h-4.5 group-data-[size=md]:w-4.5","group-data-[size=sm]:h-4 group-data-[size=sm]:w-4")})}),jsx(CheckboxIndicator,{indeterminate:true,children:jsx(k,{className:a("text-neutral-50","group-data-[size=md]:h-4.5 group-data-[size=md]:w-4.5","group-data-[size=sm]:h-4 group-data-[size=sm]:w-4")})})]}),r&&jsx(CheckboxLabel,{className:a("font-inter text-sm leading-[130%]!",!e&&"text-neutral-900",e&&"text-neutral-500"),children:r}),jsx(CheckboxHiddenInput,{})]})};export{P as a,N as b,R as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {d}from'./chunk-FAMLJ6AJ.mjs';import {a as a$1}from'./chunk-SXEHG5TZ.mjs';import {g}from'./chunk-
|
|
1
|
+
import {d}from'./chunk-FAMLJ6AJ.mjs';import {a as a$1}from'./chunk-SXEHG5TZ.mjs';import {g}from'./chunk-Z5V7WUXE.mjs';import {a}from'./chunk-BO6XI5BE.mjs';import*as n from'react';import*as e from'@radix-ui/react-accordion';import {jsx,jsxs}from'react/jsx-runtime';var b=["sm","md"],w=n.forwardRef(({className:i,children:o,size:r="md",...a$1},d)=>jsx(e.Root,{"data-size":r,className:a("group/root space-y-2",i),...a$1,ref:d,children:o})),y=n.forwardRef(({className:i,...o},r)=>jsx(e.Item,{ref:r,className:i,...o}));y.displayName="AccordionFormItem";var R=n.forwardRef(({className:i,title:o,onEndButtonClick:r,StartIcon:a$2,children:d$1,badgeNumber:p,chipStatus:c,...g$1},u)=>jsx(e.Header,{className:"flex",children:jsxs(e.Trigger,{title:o,ref:u,className:a("group flex h-8 items-center gap-4 [&[data-state=open]>div>.chevron-icon]:rotate-180",i),...g$1,children:[jsxs("div",{className:"group flex items-center",children:[a$2&&jsx(a$2,{className:"mr-2 h-4.5 w-4.5 shrink-0 text-primary-500 transition-colors group-enabled:group-hover:text-primary-700 group-disabled:text-neutral-500 group-data-[size=sm]/root:h-3.5 group-data-[size=sm]/root:w-3.5"}),jsx("div",{children:jsx("p",{className:"line-clamp-1 text-left text-base font-semibold leading-[130%]! text-primary-500 transition-colors group-enabled:group-hover:text-primary-700 group-disabled:text-neutral-500 group-data-[size=sm]/root:text-sm",children:o})})]}),jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[c&&jsx(d,{variant:c.variant,type:c.type,size:"xs",className:"shrink-0",children:c.text}),p?.toString()&&jsx(a$1,{variant:"alert",size:"md",content:p.toString()}),jsx(g,{className:"chevron-icon h-4.5 w-4.5 shrink-0 text-primary-500 transition-transform group-enabled:group-hover:text-primary-700 group-disabled:text-neutral-500"})]})]})}));R.displayName=e.Trigger.displayName;var A=n.forwardRef(({className:i,children:o,...r},a)=>jsx(e.Content,{ref:a,className:"overflow-hidden data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...r,children:jsx("div",{className:i,children:o})}));A.displayName=e.Content.displayName;export{b as a,w as b,y as c,R as d,A as e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-SXEHG5TZ.mjs';import {d}from'./chunk-
|
|
1
|
+
import {a as a$1}from'./chunk-SXEHG5TZ.mjs';import {d}from'./chunk-Z5V7WUXE.mjs';import {a}from'./chunk-BO6XI5BE.mjs';import*as e from'@radix-ui/react-tabs';import o from'react';import {cva}from'cva';import {jsx,jsxs}from'react/jsx-runtime';var k=["ghost","fill","fillWithCloseButton"],D=["sm","md"],y=cva({base:"group relative shrink-0 px-4 leading-[130%] text-neutral-900 transition-all disabled:text-neutral-500",variants:{variant:{ghost:"not-disabled:hover:bg-primary-100 rounded-sm font-semibold",fill:"[&:not(:disabled)]:aria-selected:elevation-10 not-disabled:hover:border-primary-300 not-disabled:hover:text-primary-700 not-disabled:aria-selected:text-primary-500 rounded-lg rounded-b-none! border-1 border-b-0! border-transparent aria-selected:bg-neutral-50 aria-selected:font-semibold",fillWithCloseButton:"[&:not(:disabled)]:aria-selected:elevation-10 bg-primary-100 not-disabled:hover:border-primary-300 not-disabled:hover:bg-primary-100 not-disabled:hover:text-primary-700 not-disabled:aria-selected:text-primary-500 rounded-lg rounded-b-none! border-1 border-b-0! border-transparent aria-selected:font-semibold not-disabled:not-[&:hover]:aria-selected:bg-neutral-50 not-disabled:hover:aria-selected:border-transparent not-disabled:hover:aria-selected:bg-neutral-50"},size:{sm:"h-10 text-sm",md:"h-12 text-base"}}}),P=cva({base:"mr-2 flex shrink-0 transition-all ease-linear group-aria-selected:not-disabled:text-neutral-900",variants:{size:{sm:"",md:""}}}),C=cva({base:"group-aria-selected:bg-primary-500 absolute bottom-0 h-0 w-full rounded-sm transition-all group-disabled:bg-neutral-500 group-aria-selected:h-1 group-disabled:group-aria-selected:h-0",variants:{variant:{ghost:"flex",fill:"hidden",fillWithCloseButton:"hidden"}}}),R=cva({variants:{variant:{ghost:"",fill:"elevation-10 rounded-lg bg-neutral-50 pt-6 before:absolute before:right-0 before:left-0 before:h-5 before:rounded-lg before:rounded-b-none before:bg-neutral-50 before:content-['']",fillWithCloseButton:"elevation-10 rounded-lg bg-neutral-50 pt-6 before:absolute before:right-0 before:left-0 before:h-5 before:rounded-lg before:rounded-b-none before:bg-neutral-50 before:content-['']"},size:{sm:"",md:""}},compoundVariants:[{variant:"fill",size:"sm",className:"before:top-10"},{variant:"fill",size:"md",className:"before:top-12"},{variant:"fillWithCloseButton",size:"sm",className:"before:top-10"},{variant:"fillWithCloseButton",size:"md",className:"before:top-12"}]}),f=o.createContext({}),I=o.forwardRef(({className:i,size:a$1="sm",variant:t="ghost",...s},l)=>jsx(f.Provider,{value:{size:a$1,variant:t},children:jsx(e.Root,{"data-tab-variant":t,ref:l,...s,className:a(i,"relative")})})),N=o.forwardRef(({className:i,...a$1},t)=>{let{variant:s}=o.useContext(f);return jsx(e.List,{ref:t,...a$1,className:a("no-scrollbar flex max-w-full space-x-2 overflow-x-scroll",s!=="ghost"&&"px-6",i)})});N.displayName=e.List.displayName;var z=o.forwardRef(({className:i,badgeNumber:a$2,disabled:t,variant:s,StartIcon:l,onClose:T,...v},h)=>{let{size:d$1,variant:x}=o.useContext(f),n=s??x;return jsx(e.Trigger,{"data-tab-variant":n,ref:h,disabled:t,className:y({size:d$1,variant:n,className:i}),...v,children:jsxs("div",{className:"flex flex-col items-center justify-center",children:[jsxs("div",{className:"flex items-center justify-center",children:[l&&jsx(l,{className:P({size:d$1}),size:d$1==="sm"?12:14}),v.children,jsxs("div",{className:a("flex items-center gap-1 empty:hidden",n==="ghost"&&"ml-1",n==="fill"&&"ml-3",n==="fillWithCloseButton"&&"ml-3"),children:[!t&&a$2&&jsx(a$1,{variant:"alert",size:d$1==="sm"?"sm":"md",content:String(a$2)}),n==="fillWithCloseButton"&&jsx(d,{onPointerDown:p=>{p.preventDefault(),p.stopPropagation(),T?.(p);},className:"transition-colors group-aria-selected:not-disabled:text-neutral-900",size:14})]})]}),jsx("div",{className:C({variant:n})})]})})});z.displayName=e.Trigger.displayName;var W=o.forwardRef(({className:i,...a},t)=>{let{variant:s,size:l}=o.useContext(f);return jsx(e.Content,{ref:t,className:R({variant:s,size:l,className:i}),...a})});W.displayName=e.Content.displayName;export{k as a,D as b,I as c,N as d,z as e,W as f};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {c}from'./chunk-
|
|
1
|
+
import {c}from'./chunk-IVP3SQT6.mjs';import {d}from'./chunk-Z5V7WUXE.mjs';import {a}from'./chunk-BO6XI5BE.mjs';import {useTransition}from'react';import {createToaster,Toaster,Toast}from'@ark-ui/react/toast';import {jsx,jsxs}from'react/jsx-runtime';var s=createToaster({placement:"top-end",overlap:false,gap:8,duration:8e3}),C=l=>{let[c$1,m]=useTransition();return jsx(Toaster,{toaster:s,...l,children:({closable:p=true,...t})=>jsxs(Toast.Root,{className:a("group z-(--z-index) flex w-86 translate-x-(--x) translate-y-(--y) rounded-lg bg-neutral-900 p-4 opacity-(--opacity) transition-all will-change-transform","flex items-center gap-2 data-[state=close]:animate-slide-up data-[state=open]:animate-slide-down"),children:[jsx(Toast.Title,{className:"line-clamp-3 flex-1 font-inter text-sm leading-[130%] text-neutral-50",children:t.title}),jsxs("div",{className:"flex items-center empty:hidden",children:[t.action&&jsx(c,{variant:"ghost",loading:c$1,size:"sm",onClick:()=>{m(async()=>{try{await t.action?.onClick();}catch{}finally{s.dismiss();}});},children:t.action.label}),p&&jsx(Toast.CloseTrigger,{children:jsx(d,{className:"h-6 w-6 text-neutral-50"})})]})]},t.id)})};export{s as a,C as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {c}from'./chunk-
|
|
1
|
+
import {c}from'./chunk-IVP3SQT6.mjs';import {i,h}from'./chunk-Z5V7WUXE.mjs';import {a}from'./chunk-BO6XI5BE.mjs';import*as r from'react';import {jsx,jsxs}from'react/jsx-runtime';var x=r.forwardRef(({className:e,...a$1},l)=>jsx("div",{ref:l,className:a("ring-primary-200 flex flex-col overflow-hidden rounded-2xl bg-neutral-50 ring-1",e),...a$1}));x.displayName="TableContainer";var N=r.forwardRef(({className:e,...a$1},l)=>jsx("div",{className:a("relative w-full overflow-x-auto",e),children:jsx("table",{ref:l,className:"w-full table-auto overflow-hidden text-neutral-900",...a$1})}));N.displayName="Table";var g=r.forwardRef(({className:e,...a},l)=>jsx("thead",{ref:l,className:e,...a}));g.displayName="TableHeader";var H=r.forwardRef(({className:e,...a},l)=>jsx("tbody",{ref:l,className:e,...a}));H.displayName="TableBody";var w=r.forwardRef(({className:e,...a$1},l)=>jsx("tr",{ref:l,className:a("text-sm leading-[130%] font-normal",e),...a$1}));w.displayName="TableBodyRow";var L=r.forwardRef(({Icon:e,icon:a$1,title:l,description:m,className:s,button:n,...d},b)=>jsxs("div",{ref:b,...d,className:a("flex flex-col items-center justify-center py-10 text-neutral-500",s),children:[a$1&&r.cloneElement(a$1,{className:"text-neutral-300 w-6 h-6"}),e&&jsx(e,{className:"h-6 w-6 text-neutral-300"}),jsx("span",{className:"mt-2 text-sm leading-[130%] font-semibold",children:l}),m&&jsx("span",{className:"mt-0.5 text-sm leading-[130%]",children:m}),n&&jsx(c,{size:"sm",...n,className:a("mt-3",n.className)})]}));L.displayName="TableNoResults";var y=r.forwardRef(({className:e,...a$1},l)=>jsx("tr",{ref:l,className:a("bg-primary-100",e),...a$1}));y.displayName="TableHeaderRow";var M=r.forwardRef(({className:e,...a$1},l)=>jsx("th",{ref:l,className:a("h-10 px-3 py-1 text-left text-sm leading-[130%] font-semibold uppercase",e),...a$1}));M.displayName="TableHead";var v=r.forwardRef(({className:e,...a$1},l)=>jsx("td",{ref:l,className:a("h-18 px-3 py-1",e),...a$1}));v.displayName="TableCell";var S=({disableNextPage:e,disablePreviousPage:a$1,onNextPageClick:l,onPreviousPageClick:m,pagination:s,rowsCount:n,rowsPerPageText:d="Rows per page",ofText:b="of",onRowsPerPageChange:u,rowsPerPageOptions:R=[10,20,50]})=>jsxs("div",{className:"border-t-primary-200 flex h-8 flex-1 items-center justify-end gap-6 border-t-1",children:[jsxs("div",{className:"flex items-center",children:[jsx("span",{className:"mr-2 text-sm leading-[130%] font-semibold text-neutral-700",children:`${d}:`}),jsx("select",{className:"text-sm leading-[130%]",value:s.pageSize,id:"rows_per_page",onChange:i=>{u?.(Number(i.target.value));},children:R.map(i=>jsx("option",{children:i},i))})]}),!!n&&jsx("span",{className:"text-sm leading-[130%] font-normal text-neutral-700",children:`${s?.pageIndex*s.pageSize+1}-${n>s?.pageIndex*s.pageSize+s.pageSize?s?.pageIndex*s.pageSize+s.pageSize:n} ${b} ${n}`}),!n&&jsx("span",{className:"text-sm leading-[120%] font-normal tracking-[0.28px] text-neutral-700",children:`${s.pageIndex>0?"... ":""}${s.pageIndex+1}${e?"":" ..."}`}),jsxs("div",{className:"flex items-center",children:[jsx("button",{type:"button",disabled:a$1,className:"flex h-8 cursor-pointer items-center px-3 disabled:cursor-not-allowed",onClick:m,children:jsx(i,{className:a("h-[1.125rem] w-[1.125rem] text-neutral-900",a$1&&"text-neutral-500")})}),jsx("button",{type:"button",disabled:e,className:"flex h-8 cursor-pointer items-center px-3 disabled:cursor-not-allowed",onClick:l,children:jsx(h,{className:a("h-[1.125rem] w-[1.125rem] text-neutral-900",e&&"text-neutral-500")})})]})]});export{x as a,N as b,g as c,H as d,w as e,L as f,y as g,M as h,v as i,S as j};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {r,m}from'./chunk-
|
|
1
|
+
import {r,m}from'./chunk-Z5V7WUXE.mjs';import {a}from'./chunk-BO6XI5BE.mjs';import {useCallback}from'react';import {RatingGroup}from'@ark-ui/react/rating-group';import {jsx,jsxs}from'react/jsx-runtime';var V=["md","sm"],b=({size:e="sm",count:c=5,onValueChange:r$1,...a$1})=>{let R=useCallback(n=>{r$1?.(n.value);},[r$1]);return jsx(RatingGroup.Root,{count:c,onValueChange:R,...a$1,children:jsxs(RatingGroup.Control,{className:"flex gap-1",children:[jsx(RatingGroup.Context,{children:({items:n})=>n.map(i=>jsx(RatingGroup.Item,{index:i,className:"outline-0",children:jsx(RatingGroup.ItemContext,{children:({half:g,highlighted:s})=>{let l=a("transition-colors",!a$1.readOnly&&!a$1.disabled&&"cursor-pointer",e==="md"&&"size-6",e==="sm"&&"h-4.5 w-4.5");return g?jsx(r,{fill:"#FFCB00",color:"#FFCB00",className:l}):jsx(m,{fill:s?"#FFCB00":"transparent",color:s?"#FFCB00":"#7E8A86",className:l})}})},i))}),jsx(RatingGroup.HiddenInput,{})]})})};export{V as a,b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a,b,c,d,e,f as f$1,g,h,i}from'./chunk-E5G7444M.mjs';import {a as a$2}from'./chunk-
|
|
1
|
+
import {a,b,c,d,e,f as f$1,g,h,i}from'./chunk-E5G7444M.mjs';import {a as a$2}from'./chunk-YO6PTC37.mjs';import {g as g$1}from'./chunk-Z5V7WUXE.mjs';import {a as a$1}from'./chunk-BO6XI5BE.mjs';import J,{useId,useRef,useState,useEffect}from'react';import*as H from'@radix-ui/react-portal';import {jsx,jsxs}from'react/jsx-runtime';var k=56,f=6,Q=[{id:0,code:"+56",name:"Chile",flag:a,country:"CL"},{id:1,code:"+54",name:"Argentina",flag:b,country:"AR"},{id:2,code:"+57",name:"Colombia",flag:c,country:"CO"},{id:3,code:"+502",name:"Guatemala",flag:d,country:"GT"},{id:4,code:"+52",name:"Mexico",flag:e,country:"MX"},{id:5,code:"+51",name:"Per\xFA",flag:f$1,country:"PE"},{id:6,code:"+55",name:"Brasil",flag:g,country:"BR"},{id:7,code:"+598",name:"Uruguay",flag:h,country:"UY"},{id:8,code:"+1",name:"Estados Unidos",flag:i,country:"US"}],fe=({options:o=Q,noResults:w,selectedOption:B,onSelect:U,onChange:x,onClick:W,className:G,defaultCountry:v="CL",initialValue:s,size:A="md",...i})=>{let $=useId(),c=useRef(null),r=useRef(null),[z,D]=useState("bottom"),[d,Y]=useState(),[_,V]=useState(-1),[a,y]=useState(B??null),[h,E]=useState(""),X=e=>{let t={target:{value:e.code+h}};x?.(t),c.current.style.display="none",r.current.value=e.code,y(e),U?.(e);};return useEffect(()=>{if(!r.current)return;let e=()=>{if(!r.current)return;let t=k*(o.length<f?o.length:f)+16,m=r.current.getBoundingClientRect();Y(m);let j=window.innerHeight-m.bottom>t,q=m.top>t;D(j?"bottom":q?"top":"bottom");};return e(),r.current.addEventListener("mousedown",e),window.addEventListener("scroll",e,true),window.addEventListener("resize",e),()=>{r.current?.removeEventListener("mousedown",e),window.removeEventListener("scroll",e,true),window.removeEventListener("resize",e);}},[r.current]),useEffect(()=>{function e(t){c.current&&!c.current.contains(t.target)&&(c.current.style.display="none",V(-1));}return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e);}},[c.current]),useEffect(()=>{if(v&&!s){let e=o.find(t=>t.country===v)??null;y(e);}},[v,s]),useEffect(()=>{if(s){let e=o.find(t=>s.includes(t.code))??null;y(e),E(s.replace(e?.code??"",""));}},[s]),jsx("div",{className:a$1("flex flex-col",G),children:jsxs("div",{className:a$1("relative flex flex-col"),children:[jsx(a$2,{ref:r,value:h,placeholder:i.placeholder??"",onChange:e=>{let t=e.target.value.replace(/\D/g,"");E(t);let m={target:{value:a?.code&&!t.includes(a.code)?a?.code+t:t}};x?.(m);},startComponent:jsxs("div",{className:"z-100000 ml-3 flex h-2 w-[7.5rem] cursor-pointer items-center",onClick:()=>{i.disabled||(c.current.style.display="flex");},children:[jsx("img",{src:a?.flag,alt:a?.country,className:a$1("h-6 w-6 cursor-pointer",i.disabled&&"cursor-not-allowed text-neutral-400")}),jsx("span",{className:a$1("ml-1",i.disabled&&"cursor-not-allowed text-neutral-400"),children:a?.code}),jsx(g$1,{className:a$1(A==="md"?"h-6 w-6":"h-4.5 w-4.5","cursor-pointer",i.disabled&&"cursor-not-allowed text-neutral-400")})]}),...i}),jsx(H.Root,{asChild:true,children:jsxs("ul",{ref:c,className:"elevation-8 pointer-events-auto absolute z-10000 my-2 hidden max-h-[336px] w-full flex-col overflow-y-auto rounded-lg bg-neutral-50",style:d?{width:`${d.width}px`,left:d.left,top:z==="bottom"?`${d.height+d.top+window.scrollY}px`:window.scrollY+d.top-(o.length<f?o.length:f)*k-16}:void 0,children:[o.length===0&&jsxs("div",{className:"elevation-8 max-h-88 flex flex-1 flex-col items-center justify-center rounded-lg bg-neutral-50 px-8 py-6",children:[J.cloneElement(w.icon,{className:"mb-2 h-8 w-8 text-neutral-300"}),jsx("p",{className:"text-center text-sm leading-[120%] text-neutral-500",children:w.message})]}),o.map((e,t)=>jsx("li",{onClick:()=>{X(e);},className:a$1("shrink-0 cursor-pointer py-4 pl-4 pr-6 text-left hover:bg-primary-100",a?.code===e.code&&"bg-primary-200",_===t&&"bg-primary-200"),value:e.code,children:jsxs("div",{className:a$1("flex items-center space-x-3"),children:[jsx("img",{src:e.flag,alt:e.country,className:"h-6 w-6"}),jsx("p",{children:e.name}),jsx("p",{className:"text-primary-500",children:`(${e.code})`})]})},`select-option-${$}-${e.id??e.code}`))]})})]})})};export{fe as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {c as c$1}from'./chunk-35JUETHD.mjs';import {c}from'./chunk-
|
|
1
|
+
import {c as c$1}from'./chunk-35JUETHD.mjs';import {c}from'./chunk-IVP3SQT6.mjs';import {d}from'./chunk-Z5V7WUXE.mjs';import {a}from'./chunk-BO6XI5BE.mjs';import {Dialog}from'@ark-ui/react/dialog';import {Portal}from'@ark-ui/react/portal';import {forwardRef,useCallback}from'react';import {jsxs,jsx}from'react/jsx-runtime';var I=({onOpenChange:a,...o})=>{let r=useCallback(t=>{a?.(t.open);},[a]);return jsx(Dialog.Root,{unmountOnExit:true,lazyMount:true,onOpenChange:r,...o})},R=Dialog.Trigger,j=["sm","md","lg","xl"],k=forwardRef(({children:a$1,className:o,size:r="sm",...t},s)=>jsxs(Portal,{children:[jsx(Dialog.Backdrop,{className:"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-40 bg-neutral-900/60"}),jsx(Dialog.Positioner,{className:"fixed top-0 left-0 z-40 flex h-dvh w-dvw items-center justify-end",children:jsx(Dialog.Content,{ref:s,className:a("elevation-10 data-[state=closed]:animate-swipe-out data-[state=open]:animate-slide-in h-full bg-neutral-50",r==="sm"&&"w-117.5",r==="md"&&"w-187",r==="lg"&&"w-235",r==="xl"&&"w-312",o),...t,children:jsx("div",{className:"flex h-full flex-1 flex-col",children:a$1})})})]}));k.displayName="DrawerStickyContent";var S=forwardRef(({children:a$1,className:o,title:r,buttons:t=[],description:s,...D},y)=>jsxs("div",{className:a("border-b border-neutral-200 pt-2 pb-3.75 pl-4.5",o),ref:y,...D,children:[jsx(Dialog.CloseTrigger,{asChild:true,children:jsx(d,{className:"mr-2 ml-auto size-6 cursor-pointer"})}),jsxs("div",{className:"mt-2 mr-4.5 flex items-center justify-between gap-4.5",children:[jsx(Dialog.Title,{className:"font-jakarta line-clamp-1 text-2xl leading-[130%] font-semibold break-all text-neutral-900",children:r}),!Array.isArray(t)&&t.visible!==false&&jsx(c,{size:"sm",variant:"ghost",...t}),Array.isArray(t)&&jsx("div",{className:"flex gap-1",children:t.map(({visible:g=true,...u},f)=>g?jsx(c$1,{variant:"ghost",size:"sm",...u},f):null)})]}),s&&jsx(Dialog.Description,{className:"font-inter mt-1 mr-4.5 line-clamp-2 text-sm leading-[130%] text-neutral-900",children:s})]}));S.displayName="DrawerStickyHeader";var C=forwardRef(({children:a$1,className:o,...r},t)=>jsx("div",{className:a("flex justify-end gap-3 border-t-1 border-neutral-200 px-4.5 pt-4.25 pb-4.5",o),ref:t,...r,children:a$1}));C.displayName="DrawerStickyFooter";var b=forwardRef(({children:a$1,className:o,...r},t)=>jsx("div",{className:a("h-full overflow-y-auto px-6 py-4",o),ref:t,...r,children:a$1}));b.displayName="DrawerStickyBody";var X=Dialog.CloseTrigger;export{I as a,R as b,j as c,k as d,S as e,C as f,b as g,X as h};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {i,h}from'./chunk-
|
|
1
|
+
import {i,h}from'./chunk-Z5V7WUXE.mjs';import {a}from'./chunk-BO6XI5BE.mjs';import {DayPicker,UI}from'react-day-picker';import {jsx}from'react/jsx-runtime';var p=({classNames:t,...l})=>jsx(DayPicker,{classNames:{[UI.Dropdowns]:a("flex",t?.dropdowns),[UI.Months]:a("flex flex-col relative",t?.months),[UI.Month]:a("overflow-hidden w-full rounded-[1.75rem] px-3 pb-7 bg-neutral-100",t?.month),[UI.MonthGrid]:a("w-full",t?.month_grid),[UI.MonthCaption]:a("flex ml-4 h-8 justify-between items-center my-1.5",t?.month_caption),[UI.Nav]:a("flex absolute right-0 top-1.5",t?.nav),[UI.PreviousMonthButton]:a("m-1.75",t?.button_previous),[UI.NextMonthButton]:a("m-1.75",t?.button_next),caption_label:a("capitalize text-sm font-semibold text-neutral-700",t?.caption_label),[UI.Weekdays]:a("flex",t?.weekdays),[UI.Weekday]:a("capitalize text-neutral-700 w-[14.3%] aspect-square font-normal flex justify-center items-center",t?.weekday),[UI.Week]:a("flex w-full text-neutral-700",t?.week),[UI.Day]:a(" w-[14.3%] aspect-square data-[outside=true]:text-neutral-500 hover:bg-neutral-200 h-full ring-inset rounded-full hover:cursor-pointer flex justify-center items-center text-small",t?.day),[UI.DayButton]:a("w-full h-full",t?.day_button),range_end:"day-range-end",today:a("ring-1 ring-primary-500 hover:bg-primary-100 hover:ring-0 text-primary-500",t?.today),selected:a("bg-primary-500 text-neutral-50! hover:text-primary-500! hover:bg-primary-200",t?.selected),disabled:a("text-neutral-500 hover:bg-opacity-0",t?.disabled),hidden:a("hidden",t?.hidden)},formatters:{formatWeekdayName:(o,d)=>d?.locale?.localize.day(o.getDay(),{width:"narrow"})??""},components:{Chevron:o=>o.orientation==="left"?jsx(i,{size:18,...o}):jsx(h,{size:18,...o})},showOutsideDays:true,mode:"single",...l});p.displayName="Calendar";export{p as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$4}from'./chunk-KTRSJBA4.mjs';import {a as a$3}from'./chunk-JCB42QTZ.mjs';import {c as c$3}from'./chunk-35JUETHD.mjs';import {c as c$2}from'./chunk-662BFQHD.mjs';import {d}from'./chunk-GK5RQ5PL.mjs';import {a}from'./chunk-T2IU5QUU.mjs';import {a as a$2}from'./chunk-SXEHG5TZ.mjs';import {c}from'./chunk-FU4U752N.mjs';import {c as c$1,h}from'./chunk-QWBSZY37.mjs';import {a as a$1}from'./chunk-BO6XI5BE.mjs';import be,{createContext,useMemo,useCallback,useContext,useRef,useEffect,useState,useId}from'react';import*as Oe from'@radix-ui/react-portal';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var qe=({title:e,titleLines:i=2,description:t,descriptionLines:o=1,Icon:p,iconAsColumn:l=true,className:n,...r})=>jsxs("div",{className:a$1("flex gap-2 py-4 pl-4 pr-6",l&&"flex-col items-center gap-1",!l&&!t&&"items-center"),...r,children:[p&&jsx(p,{className:a$1("shrink-0 text-neutral-300"),size:24}),jsxs("div",{className:a$1("flex flex-col gap-1",l&&"text-center"),children:[jsx("p",{className:a$1("leading-[130%] text-neutral-500",!!t&&"font-medium"),style:i?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:i}:void 0,children:e}),t&&jsx("p",{className:"text-sm leading-[130%] text-neutral-500",style:o?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:o}:void 0,children:t})]})]}),ne=qe;var Ke=be.memo(({handleSelect:e,NoResultsIcon:i,noResultsLabel:t,noResultsDescription:o,noResultsDescriptionLines:p,noResultsAsColumn:l,noResultsButtonOnClick:n,optionDescriptionLines:r,noResultsButtonLabel:s,filteredOptions:c$1,inputRect:u,inputRef:b,popoverPosition:x,optionsListRef:v,selectedOption:h,options:g,setFilteredOptions:C})=>jsx(Oe.Root,{asChild:true,children:jsxs("div",{ref:v,className:"elevation-8 pointer-events-auto fixed z-50 mb-2 hidden max-h-[336px] w-full flex-col overflow-y-auto rounded-lg bg-neutral-50",style:u?{width:`${u.width}px`,left:u.left,top:x==="bottom"?`${u.bottom}px`:void 0,bottom:x==="top"?`${window.innerHeight-u.top}px`:void 0}:void 0,children:[c$1.length===0&&jsxs("div",{className:"elevation-8 max-h-88 flex flex-1 flex-col justify-center rounded-lg bg-neutral-50",children:[jsx(ne,{title:t,description:o,Icon:i,iconAsColumn:l,descriptionLines:p}),n&&jsxs(Fragment,{children:[jsx(a,{}),jsx(c,{variant:"ghost",className:"my-3 w-fit self-center",onClick:a=>{v.current.style.display="none",b.current.value="",C(g),n();},children:s})]})]}),c$1.map(a=>jsx(Ie,{title:a.label,disabled:a.disabled,description:a.description,descriptionLines:r,onClick:()=>e(a),className:a$1(h?.value===a.value&&"bg-primary-200")},a.key??a.value))]})})),we=Ke;var Ye=336,oo=({options:e,defaultSelectedOption:i,onSelect:t,onClick:o,onInputChange:p,error:l,helperText:n,label:r,placeholder:s,value:c,size:u="md",optionDescriptionLines:b=1,noResultsLabel:x,noResultsIcon:v,noResultsDescription:h,noResultsDescriptionLines:g,noResultsAsColumn:C,noResultsButtonOnClick:a,noResultsButtonLabel:N,className:L,disabled:P})=>{let[m,A]=useState(i??null),O=useRef(null),d=useRef(null),[le,se]=useState(),[pe,B]=useState([]),[ue,z]=useState("bottom"),[X,j]=useState(),U=Ye,W=useCallback(R=>{O.current.style.display="none",d.current.value=R.label,A(R),t?.(R);},[t]),w=useCallback(()=>{if(!d?.current)return;let R=d.current.getBoundingClientRect();se(R);let E=X?X.height:U,I=window.innerHeight-R.bottom>E,ee=R.top>E;z(I?"bottom":ee?"top":"bottom");},[X?.height]),q=useCallback(()=>{let R=e.filter(E=>E.label.toLowerCase().includes(d?.current?.value.toLowerCase()??""));if(B(R),O?.current){let E=O.current.getBoundingClientRect();j(E);}},[e]);return useEffect(()=>{B(e);},[e]),useEffect(()=>{if(!c){A(null),d.current&&(d.current.value="");return}(!d.current?.value||m?.value!==c.value)&&(A(c),d.current.value=c.label);},[c]),a$4(O,()=>{O.current.style.display="none",m&&d.current&&(d.current.value=m.label);}),useEffect(()=>{if(d?.current)return w(),d.current.addEventListener("mousedown",w),d.current.addEventListener("input",q),window.addEventListener("scroll",w,true),window.addEventListener("resize",w),()=>{d.current?.removeEventListener("mousedown",w),d.current?.removeEventListener("input",q),window.removeEventListener("scroll",w,true),window.removeEventListener("resize",w);}},[w,q]),jsxs("div",{className:a$1("relative",L),children:[jsx(a$3,{ref:d,autoComplete:"off",list:"",selectMode:true,onChange:R=>{R.target.value||(A(null),t?.(null)),p?.(R);},onClean:()=>{A(null),B(e),t?.(null);},onClick:R=>{O.current.style.display="flex",o?.(R);},onBlur:()=>{m&&d.current&&(d.current.value=m.label);},label:r,helperText:n,placeholder:s,size:u,error:l,disabled:P}),jsx(we,{handleSelect:W,noResultsLabel:x,NoResultsIcon:v,optionDescriptionLines:b,noResultsAsColumn:C,noResultsButtonLabel:N,noResultsButtonOnClick:a,noResultsDescription:h,noResultsDescriptionLines:g,filteredOptions:pe,inputRect:le,inputRef:d,popoverPosition:ue,optionsListRef:O,selectedOption:m,options:e,setFilteredOptions:B})]})};var je=({children:e,title:i,titleLines:t,description:o="",descriptionLines:p,disabled:l=false,className:n,...r})=>jsxs("div",{className:"flex w-full flex-col gap-1",...r,children:[jsx("p",{className:a$1("break-all text-sm leading-[130%]",!!o&&"font-medium"),style:t?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:t}:void 0,children:i}),o&&jsx("p",{className:a$1("text-xs leading-[130%]",l?"text-neutral-400":"text-neutral-700"),style:p?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:p}:void 0,children:o})]}),T=je;var bo=({children:e,title:i,titleLines:t,description:o="",descriptionLines:p,startIcon:l,badgeContent:n,hasDivider:r=false,disabled:s=false,onSelect:c,className:u,...b})=>jsxs(H,{hasDescription:!!o,disabled:s,onClick:c,hasDivider:r,className:a$1(!s&&"cursor-pointer",u),...b,children:[l&&be.cloneElement(l,{className:"shrink-0 mr-2 h-4.5 w-4.5"}),jsx(T,{title:i,titleLines:t,description:o,descriptionLines:p,disabled:s}),jsxs("div",{className:"ml-4 flex gap-2",children:[n&&jsx(a$2,{content:n,size:"lg",variant:"alert",className:a$1("self-center",s&&"bg-neutral-400")}),jsx(h,{className:"h-4.5 w-4.5 self-center"})]})]});var De=({children:e,title:i,titleLines:t=1,description:o="",descriptionLines:p,startIcon:l,hasDivider:n=false,disabled:r=false,checked:s,onCheckedChange:c,className:u,...b})=>jsxs(H,{hasDescription:!!o,disabled:r,hasDivider:n,...b,className:a$1("pr-6",u),children:[l&&be.cloneElement(l,{className:"shrink-0 w-4.5 h-4.5 mr-2"}),jsx(T,{title:i,titleLines:t,description:o,descriptionLines:p,disabled:r}),jsx(c$2,{size:"sm",checked:s,onCheckedChange:c,className:"ml-4 self-center",disabled:r})]});var k=336,He=createContext({inputRef:null,optionsListRef:null,autocompleteId:"",inputRect:void 0,showChips:false,filteredOptions:[],currentFocus:-1,popoverPosition:"bottom",setFilteredOptions:()=>{},setCurrentFocus:()=>{},setShowChips:()=>{},setPopoverPosition:()=>{},setInputRect:()=>{},optionsListHeight:k,setOptionsListHeight:()=>{},optionsListRect:void 0,setOptionsListRect:()=>{}}),F=()=>{let e=useContext(He);if(e===null)throw new Error("useAutocompleteMultipleContext must be used within a AutocompleteMultipleProvider");return e},Ne=({children:e})=>{let i=useRef(null),t=useRef(null),o=useId(),[p,l]=useState(),[n,r]=useState(true),[s,c]=useState([]),[u,b]=useState(-1),[x,v]=useState("bottom"),[h,g]=useState(),[C,a]=useState(k);return jsx(He.Provider,{value:{optionsListRef:i,inputRef:t,autocompleteId:o,inputRect:p,showChips:n,filteredOptions:s,currentFocus:u,popoverPosition:x,setFilteredOptions:c,setCurrentFocus:b,setShowChips:r,setPopoverPosition:v,setInputRect:l,optionsListHeight:C,optionsListRect:h,setOptionsListRect:g,setOptionsListHeight:a},children:e})};var ct=({option:e,onMountWidth:i,size:t})=>{let o=useRef(null);return useEffect(()=>{o.current&&i?.(o.current.clientWidth);},[]),jsx(d,{type:"fill",variant:"standard",ref:o,className:"shrink-0",size:t==="md"?"xs":"sm",hasCloseIcon:false,children:e.label})},Se=ct;var ft=150,bt=be.memo(({selectedOptions:e,error:i,onCleanSelectedOptions:t,disabled:o,size:p})=>{let{autocompleteId:l,inputRect:n,inputRef:r,optionsListRef:s}=F(),c=be.useRef(null),[u,b]=be.useState(new Map),x=useMemo(()=>{if(!n?.width)return [];let h=0,g=n.width-ft,C=0;for(let a=0;a<e.length&&(C+=u.get(a)??0,!(C>g));a++)h++;return e.slice(0,h)},[n?.width,e,u]),v=useCallback(()=>{o||(r?.current?.focus(),s.current.style.display="flex");},[o]);return jsxs("div",{onClick:v,className:a$1("absolute top-0 z-30 flex w-full cursor-pointer flex-nowrap items-center gap-2 pl-3 pr-12",o&&"cursor-not-allowed"),style:{maxWidth:n?.width?n?.width:void 0,height:n?.height?n?.height:void 0},children:[jsx("div",{className:"flex flex-1 gap-1 overflow-hidden",ref:c,children:x.map((h,g)=>jsx(Se,{option:h,onMountWidth:C=>b(a=>new Map(a).set(g,C)),size:p},`chip-input-${l}-${h.value}`))}),e.length>x.length&&jsx("span",{className:"text-base",children:"..."}),e.length>0&&!i&&jsx(a$2,{content:String(e.length),size:p}),i&&e.length>0&&jsx(c$1,{className:"h-6 w-6 text-error-700",onClick:h=>{h.stopPropagation(),t();}})]})}),Be=bt;var vt=be.memo(({option:e,index:i,onPressOption:t,isSelected:o,optionDescriptionLines:p})=>{let{currentFocus:l,inputRef:n}=F();return jsx(De,{title:e.label,checked:o,disabled:e.disabled,className:l===i?"bg-primary-200":void 0,onMouseDown:r=>{e.disabled||(n?.current?.value&&r.preventDefault(),t?.(e,r));},description:e.description,descriptionLines:p})}),he=vt;var Mt=be.memo(({selectedOptions:e,handleSelect:i,NoResultsIcon:t,noResultsLabel:o,noResultsDescription:p,noResultsDescriptionLines:l,noResultsAsColumn:n,noResultsButtonOnClick:r,optionDescriptionLines:s,noResultsButtonLabel:c$1})=>{let{popoverPosition:u,optionsListRef:b,filteredOptions:x,inputRect:v,autocompleteId:h,inputRef:g,optionsListHeight:C}=F(),a$1=useCallback(L=>e.some(P=>P.value===L.value),[e]),N=useMemo(()=>e.filter(L=>L.label.toLowerCase().includes(g?.current?.value.toLowerCase()??"")),[e,g?.current?.value]);return jsx(Oe.Root,{asChild:true,children:jsxs("div",{ref:b,className:"elevation-8 pointer-events-auto fixed z-50 mb-2 hidden w-full flex-col overflow-y-auto rounded-lg bg-neutral-50",style:v?{width:`${v.width}px`,left:v.left,top:u==="bottom"?`${v.bottom}px`:void 0,bottom:u==="top"?`${window.innerHeight-v.top}px`:void 0,maxHeight:C+"px"}:void 0,children:[x.length===0&&jsxs("div",{className:"elevation-8 max-h-88 flex flex-1 flex-col justify-center rounded-lg bg-neutral-50",children:[jsx(ne,{title:o,description:p,Icon:t,iconAsColumn:n,descriptionLines:l}),r&&jsxs(Fragment,{children:[jsx(a,{}),jsx(c,{variant:"ghost",className:"my-3 w-fit self-center",onClick:L=>{b.current.style.display="none",g.current.value="",r();},children:c$1})]})]}),N.map((L,P)=>jsx(he,{option:L,index:P,onPressOption:m=>i(m),isSelected:a$1(L),optionDescriptionLines:s},`autocomplete-option-${h}-${L.key??L.value}`)),x.map((L,P)=>!e.some(m=>m.value===L.value)&&jsx(he,{option:L,index:P,onPressOption:m=>i(m),isSelected:a$1(L),optionDescriptionLines:s},`autocomplete-option-${h}-${L.key??L.value}`))]})})}),We=Mt;var wt=be.memo(({selectedOptions:e,onSelect:i,error:t,helperText:o,label:p,placeholder:l,options:n,onInputChange:r,size:s,disabled:c})=>{let{setCurrentFocus:u,setFilteredOptions:b,optionsListRef:x,inputRef:v}=F();return jsx(a$3,{ref:v,autoComplete:"off",list:"",disabled:c,selectMode:true,onChange:h=>{u(-1),r?.(h.target.value);},onClean:()=>{u(-1),b(n),i?.(null,e);},onClick:()=>{c||(x.current.style.display="flex");},error:t,helperText:o,label:p,placeholder:l,fixedTopLabel:e.length>0,size:s})}),Ve=wt;var Ge=({options:e,defaultSelectedOptions:i,onSelect:t,error:o,helperText:p,label:l,placeholder:n,noResultsLabel:r,noResultsIcon:s,noResultsDescription:c,noResultsDescriptionLines:u,noResultsAsColumn:b,noResultsButtonOnClick:x,noResultsButtonLabel:v,className:h,onInputChange:g,value:C,loading:a,size:N="md",optionDescriptionLines:L=1,disabled:P})=>{let{inputRef:m,optionsListRef:A,setFilteredOptions:O,setShowChips:d,setInputRect:le,setPopoverPosition:se,setCurrentFocus:pe,showChips:B,setOptionsListRect:ue,optionsListRect:z,setOptionsListHeight:X}=F(),j=useRef(false),[U,W]=useState(i??[]),w=useCallback(M=>{W(y=>{let D,J=y.findIndex(Ue=>Ue.value===M.value);return J===-1?(D=y.concat(M),t?.(M,D),D):(D=y.toSpliced(J,1),t?.(M,D),D)});},[t]),q=useCallback(()=>{W([]),O(e),t?.(null,[]);},[]),R=useCallback(()=>{d(false);},[]),E=useCallback(()=>{d(true);},[]),I=useCallback(()=>{if(!m?.current)return;let M=m.current.getBoundingClientRect();le(M);let y=z?z.height>k?k:z.height:k,D=window.innerHeight-M.bottom>y,J=M.top>y;se(D?"bottom":J?"top":"bottom"),X(J?k:window.innerHeight-M.bottom>k?k:window.innerHeight-M.bottom);},[z?.height]),ee=useCallback(()=>{let M=e.filter(y=>y.label.toLowerCase().includes(m?.current?.value.toLowerCase()??""));if(O(M),A?.current){let y=A.current.getBoundingClientRect();ue(y);}},[e,A?.current]);return useEffect(()=>{O(e);},[e]),a$4(A,()=>{A.current.style.display="none",pe(-1);}),useEffect(()=>{if(m?.current)return I(),m.current.addEventListener("mousedown",I),m.current.addEventListener("input",ee),m.current.addEventListener("focusin",R),m.current.addEventListener("focusout",E),window.addEventListener("scroll",I,true),window.addEventListener("resize",I),()=>{m.current?.removeEventListener("mousedown",I),m.current?.removeEventListener("input",I),m.current?.removeEventListener("focusout",E),m.current?.removeEventListener("focusin",R),window.removeEventListener("scroll",I,true),window.removeEventListener("resize",I);}},[I,E,R,ee]),useEffect(()=>{C&&(W(C),d(true));},[C]),useEffect(()=>{a||i&&i.length&&!j.current&&(W(i),j.current=true,d(true));},[i,a]),jsxs("div",{className:a$1("relative",h),children:[jsx(Ve,{selectedOptions:U,onSelect:t,error:o,helperText:p,label:l,placeholder:n,handleSelect:w,options:e,onInputChange:g,size:N,disabled:P}),B&&jsx(Be,{selectedOptions:U,disabled:P,error:o,onCleanSelectedOptions:q,size:N}),jsx(We,{handleSelect:w,selectedOptions:U,noResultsLabel:r,NoResultsIcon:s,optionDescriptionLines:L,noResultsAsColumn:b,noResultsButtonLabel:v,noResultsButtonOnClick:x,noResultsDescription:c,noResultsDescriptionLines:u})]})};var Ei=e=>jsx(Ne,{children:jsx(Ge,{...e})});var Bi=({children:e,title:i,titleLines:t=1,description:o,descriptionLines:p=1,StartIcon:l,hasDivider:n=false,disabled:r=false,actionButton:s,isSelected:c$1=false,className:u,...b})=>jsxs(H,{hasDescription:!!o,disabled:r,hasDivider:n,isSelected:c$1,...b,className:u,children:[l&&jsx(l,{className:"mr-2 h-4.5 w-4.5 shrink-0 grow-0"}),jsx(T,{title:i,titleLines:t,description:o,descriptionLines:p,disabled:r}),s&&jsx(Fragment,{children:s.isIcon?jsx(c$3,{...s,className:"ml-4 self-center",variant:"ghost",size:"sm",disabled:r??s.disabled}):jsx(c,{...s,className:"ml-4 self-center",size:"sm",variant:"ghost",disabled:r??s.disabled})})]});var Dt=({children:e,hasDescription:i=false,disabled:t=false,hasDivider:o=false,className:p,isSelected:l,onClick:n,...r})=>jsxs(Fragment,{children:[jsx("div",{className:a$1("flex flex-row px-3 py-4 text-neutral-900 transition-colors",i?"py-3":"py-3.5",t?"cursor-not-allowed text-neutral-400":"hover:bg-primary-100 focus:bg-primary-200",l&&"bg-primary-200",p),onClick:s=>{t||n?.(s);},...r,children:e}),o&&jsx(a,{})]}),H=Dt;var Ie=({children:e,title:i,titleLines:t,description:o="",descriptionLines:p,startIcon:l,endIcon:n,hasDivider:r=false,disabled:s=false,isSelected:c=false,className:u,...b})=>jsxs(H,{hasDescription:!!o,disabled:s,hasDivider:r,className:u,isSelected:c,...b,children:[l&&be.cloneElement(l,{className:"shrink-0 mr-2 h-4.5 w-4.5"}),jsx(T,{title:i,titleLines:t,description:o,descriptionLines:p,disabled:s}),n&&be.cloneElement(n,{className:"min-h-4.5 min-w-4.5 self-center ml-4"})]});export{oo as a,Ie as b,bo as c,De as d,Ei as e,Bi as f};
|
|
1
|
+
import {a as a$4}from'./chunk-KTRSJBA4.mjs';import {a as a$3}from'./chunk-YO6PTC37.mjs';import {c as c$3}from'./chunk-35JUETHD.mjs';import {c as c$2}from'./chunk-3SEVJXC3.mjs';import {d}from'./chunk-NDF7TEOD.mjs';import {a}from'./chunk-T2IU5QUU.mjs';import {a as a$2}from'./chunk-SXEHG5TZ.mjs';import {c}from'./chunk-IVP3SQT6.mjs';import {c as c$1,h}from'./chunk-Z5V7WUXE.mjs';import {a as a$1}from'./chunk-BO6XI5BE.mjs';import be,{createContext,useMemo,useCallback,useContext,useRef,useEffect,useState,useId}from'react';import*as Oe from'@radix-ui/react-portal';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var qe=({title:e,titleLines:i=2,description:t,descriptionLines:o=1,Icon:p,iconAsColumn:l=true,className:n,...r})=>jsxs("div",{className:a$1("flex gap-2 py-4 pl-4 pr-6",l&&"flex-col items-center gap-1",!l&&!t&&"items-center"),...r,children:[p&&jsx(p,{className:a$1("shrink-0 text-neutral-300"),size:24}),jsxs("div",{className:a$1("flex flex-col gap-1",l&&"text-center"),children:[jsx("p",{className:a$1("leading-[130%] text-neutral-500",!!t&&"font-medium"),style:i?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:i}:void 0,children:e}),t&&jsx("p",{className:"text-sm leading-[130%] text-neutral-500",style:o?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:o}:void 0,children:t})]})]}),ne=qe;var Ke=be.memo(({handleSelect:e,NoResultsIcon:i,noResultsLabel:t,noResultsDescription:o,noResultsDescriptionLines:p,noResultsAsColumn:l,noResultsButtonOnClick:n,optionDescriptionLines:r,noResultsButtonLabel:s,filteredOptions:c$1,inputRect:u,inputRef:b,popoverPosition:x,optionsListRef:v,selectedOption:h,options:g,setFilteredOptions:C})=>jsx(Oe.Root,{asChild:true,children:jsxs("div",{ref:v,className:"elevation-8 pointer-events-auto fixed z-50 mb-2 hidden max-h-[336px] w-full flex-col overflow-y-auto rounded-lg bg-neutral-50",style:u?{width:`${u.width}px`,left:u.left,top:x==="bottom"?`${u.bottom}px`:void 0,bottom:x==="top"?`${window.innerHeight-u.top}px`:void 0}:void 0,children:[c$1.length===0&&jsxs("div",{className:"elevation-8 max-h-88 flex flex-1 flex-col justify-center rounded-lg bg-neutral-50",children:[jsx(ne,{title:t,description:o,Icon:i,iconAsColumn:l,descriptionLines:p}),n&&jsxs(Fragment,{children:[jsx(a,{}),jsx(c,{variant:"ghost",className:"my-3 w-fit self-center",onClick:a=>{v.current.style.display="none",b.current.value="",C(g),n();},children:s})]})]}),c$1.map(a=>jsx(Ie,{title:a.label,disabled:a.disabled,description:a.description,descriptionLines:r,onClick:()=>e(a),className:a$1(h?.value===a.value&&"bg-primary-200")},a.key??a.value))]})})),we=Ke;var Ye=336,oo=({options:e,defaultSelectedOption:i,onSelect:t,onClick:o,onInputChange:p,error:l,helperText:n,label:r,placeholder:s,value:c,size:u="md",optionDescriptionLines:b=1,noResultsLabel:x,noResultsIcon:v,noResultsDescription:h,noResultsDescriptionLines:g,noResultsAsColumn:C,noResultsButtonOnClick:a,noResultsButtonLabel:N,className:L,disabled:P})=>{let[m,A]=useState(i??null),O=useRef(null),d=useRef(null),[le,se]=useState(),[pe,B]=useState([]),[ue,z]=useState("bottom"),[X,j]=useState(),U=Ye,W=useCallback(R=>{O.current.style.display="none",d.current.value=R.label,A(R),t?.(R);},[t]),w=useCallback(()=>{if(!d?.current)return;let R=d.current.getBoundingClientRect();se(R);let E=X?X.height:U,I=window.innerHeight-R.bottom>E,ee=R.top>E;z(I?"bottom":ee?"top":"bottom");},[X?.height]),q=useCallback(()=>{let R=e.filter(E=>E.label.toLowerCase().includes(d?.current?.value.toLowerCase()??""));if(B(R),O?.current){let E=O.current.getBoundingClientRect();j(E);}},[e]);return useEffect(()=>{B(e);},[e]),useEffect(()=>{if(!c){A(null),d.current&&(d.current.value="");return}(!d.current?.value||m?.value!==c.value)&&(A(c),d.current.value=c.label);},[c]),a$4(O,()=>{O.current.style.display="none",m&&d.current&&(d.current.value=m.label);}),useEffect(()=>{if(d?.current)return w(),d.current.addEventListener("mousedown",w),d.current.addEventListener("input",q),window.addEventListener("scroll",w,true),window.addEventListener("resize",w),()=>{d.current?.removeEventListener("mousedown",w),d.current?.removeEventListener("input",q),window.removeEventListener("scroll",w,true),window.removeEventListener("resize",w);}},[w,q]),jsxs("div",{className:a$1("relative",L),children:[jsx(a$3,{ref:d,autoComplete:"off",list:"",selectMode:true,onChange:R=>{R.target.value||(A(null),t?.(null)),p?.(R);},onClean:()=>{A(null),B(e),t?.(null);},onClick:R=>{O.current.style.display="flex",o?.(R);},onBlur:()=>{m&&d.current&&(d.current.value=m.label);},label:r,helperText:n,placeholder:s,size:u,error:l,disabled:P}),jsx(we,{handleSelect:W,noResultsLabel:x,NoResultsIcon:v,optionDescriptionLines:b,noResultsAsColumn:C,noResultsButtonLabel:N,noResultsButtonOnClick:a,noResultsDescription:h,noResultsDescriptionLines:g,filteredOptions:pe,inputRect:le,inputRef:d,popoverPosition:ue,optionsListRef:O,selectedOption:m,options:e,setFilteredOptions:B})]})};var je=({children:e,title:i,titleLines:t,description:o="",descriptionLines:p,disabled:l=false,className:n,...r})=>jsxs("div",{className:"flex w-full flex-col gap-1",...r,children:[jsx("p",{className:a$1("break-all text-sm leading-[130%]",!!o&&"font-medium"),style:t?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:t}:void 0,children:i}),o&&jsx("p",{className:a$1("text-xs leading-[130%]",l?"text-neutral-400":"text-neutral-700"),style:p?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:p}:void 0,children:o})]}),T=je;var bo=({children:e,title:i,titleLines:t,description:o="",descriptionLines:p,startIcon:l,badgeContent:n,hasDivider:r=false,disabled:s=false,onSelect:c,className:u,...b})=>jsxs(H,{hasDescription:!!o,disabled:s,onClick:c,hasDivider:r,className:a$1(!s&&"cursor-pointer",u),...b,children:[l&&be.cloneElement(l,{className:"shrink-0 mr-2 h-4.5 w-4.5"}),jsx(T,{title:i,titleLines:t,description:o,descriptionLines:p,disabled:s}),jsxs("div",{className:"ml-4 flex gap-2",children:[n&&jsx(a$2,{content:n,size:"lg",variant:"alert",className:a$1("self-center",s&&"bg-neutral-400")}),jsx(h,{className:"h-4.5 w-4.5 self-center"})]})]});var De=({children:e,title:i,titleLines:t=1,description:o="",descriptionLines:p,startIcon:l,hasDivider:n=false,disabled:r=false,checked:s,onCheckedChange:c,className:u,...b})=>jsxs(H,{hasDescription:!!o,disabled:r,hasDivider:n,...b,className:a$1("pr-6",u),children:[l&&be.cloneElement(l,{className:"shrink-0 w-4.5 h-4.5 mr-2"}),jsx(T,{title:i,titleLines:t,description:o,descriptionLines:p,disabled:r}),jsx(c$2,{size:"sm",checked:s,onCheckedChange:c,className:"ml-4 self-center",disabled:r})]});var k=336,He=createContext({inputRef:null,optionsListRef:null,autocompleteId:"",inputRect:void 0,showChips:false,filteredOptions:[],currentFocus:-1,popoverPosition:"bottom",setFilteredOptions:()=>{},setCurrentFocus:()=>{},setShowChips:()=>{},setPopoverPosition:()=>{},setInputRect:()=>{},optionsListHeight:k,setOptionsListHeight:()=>{},optionsListRect:void 0,setOptionsListRect:()=>{}}),F=()=>{let e=useContext(He);if(e===null)throw new Error("useAutocompleteMultipleContext must be used within a AutocompleteMultipleProvider");return e},Ne=({children:e})=>{let i=useRef(null),t=useRef(null),o=useId(),[p,l]=useState(),[n,r]=useState(true),[s,c]=useState([]),[u,b]=useState(-1),[x,v]=useState("bottom"),[h,g]=useState(),[C,a]=useState(k);return jsx(He.Provider,{value:{optionsListRef:i,inputRef:t,autocompleteId:o,inputRect:p,showChips:n,filteredOptions:s,currentFocus:u,popoverPosition:x,setFilteredOptions:c,setCurrentFocus:b,setShowChips:r,setPopoverPosition:v,setInputRect:l,optionsListHeight:C,optionsListRect:h,setOptionsListRect:g,setOptionsListHeight:a},children:e})};var ct=({option:e,onMountWidth:i,size:t})=>{let o=useRef(null);return useEffect(()=>{o.current&&i?.(o.current.clientWidth);},[]),jsx(d,{type:"fill",variant:"standard",ref:o,className:"shrink-0",size:t==="md"?"xs":"sm",hasCloseIcon:false,children:e.label})},Se=ct;var ft=150,bt=be.memo(({selectedOptions:e,error:i,onCleanSelectedOptions:t,disabled:o,size:p})=>{let{autocompleteId:l,inputRect:n,inputRef:r,optionsListRef:s}=F(),c=be.useRef(null),[u,b]=be.useState(new Map),x=useMemo(()=>{if(!n?.width)return [];let h=0,g=n.width-ft,C=0;for(let a=0;a<e.length&&(C+=u.get(a)??0,!(C>g));a++)h++;return e.slice(0,h)},[n?.width,e,u]),v=useCallback(()=>{o||(r?.current?.focus(),s.current.style.display="flex");},[o]);return jsxs("div",{onClick:v,className:a$1("absolute top-0 z-30 flex w-full cursor-pointer flex-nowrap items-center gap-2 pl-3 pr-12",o&&"cursor-not-allowed"),style:{maxWidth:n?.width?n?.width:void 0,height:n?.height?n?.height:void 0},children:[jsx("div",{className:"flex flex-1 gap-1 overflow-hidden",ref:c,children:x.map((h,g)=>jsx(Se,{option:h,onMountWidth:C=>b(a=>new Map(a).set(g,C)),size:p},`chip-input-${l}-${h.value}`))}),e.length>x.length&&jsx("span",{className:"text-base",children:"..."}),e.length>0&&!i&&jsx(a$2,{content:String(e.length),size:p}),i&&e.length>0&&jsx(c$1,{className:"h-6 w-6 text-error-700",onClick:h=>{h.stopPropagation(),t();}})]})}),Be=bt;var vt=be.memo(({option:e,index:i,onPressOption:t,isSelected:o,optionDescriptionLines:p})=>{let{currentFocus:l,inputRef:n}=F();return jsx(De,{title:e.label,checked:o,disabled:e.disabled,className:l===i?"bg-primary-200":void 0,onMouseDown:r=>{e.disabled||(n?.current?.value&&r.preventDefault(),t?.(e,r));},description:e.description,descriptionLines:p})}),he=vt;var Mt=be.memo(({selectedOptions:e,handleSelect:i,NoResultsIcon:t,noResultsLabel:o,noResultsDescription:p,noResultsDescriptionLines:l,noResultsAsColumn:n,noResultsButtonOnClick:r,optionDescriptionLines:s,noResultsButtonLabel:c$1})=>{let{popoverPosition:u,optionsListRef:b,filteredOptions:x,inputRect:v,autocompleteId:h,inputRef:g,optionsListHeight:C}=F(),a$1=useCallback(L=>e.some(P=>P.value===L.value),[e]),N=useMemo(()=>e.filter(L=>L.label.toLowerCase().includes(g?.current?.value.toLowerCase()??"")),[e,g?.current?.value]);return jsx(Oe.Root,{asChild:true,children:jsxs("div",{ref:b,className:"elevation-8 pointer-events-auto fixed z-50 mb-2 hidden w-full flex-col overflow-y-auto rounded-lg bg-neutral-50",style:v?{width:`${v.width}px`,left:v.left,top:u==="bottom"?`${v.bottom}px`:void 0,bottom:u==="top"?`${window.innerHeight-v.top}px`:void 0,maxHeight:C+"px"}:void 0,children:[x.length===0&&jsxs("div",{className:"elevation-8 max-h-88 flex flex-1 flex-col justify-center rounded-lg bg-neutral-50",children:[jsx(ne,{title:o,description:p,Icon:t,iconAsColumn:n,descriptionLines:l}),r&&jsxs(Fragment,{children:[jsx(a,{}),jsx(c,{variant:"ghost",className:"my-3 w-fit self-center",onClick:L=>{b.current.style.display="none",g.current.value="",r();},children:c$1})]})]}),N.map((L,P)=>jsx(he,{option:L,index:P,onPressOption:m=>i(m),isSelected:a$1(L),optionDescriptionLines:s},`autocomplete-option-${h}-${L.key??L.value}`)),x.map((L,P)=>!e.some(m=>m.value===L.value)&&jsx(he,{option:L,index:P,onPressOption:m=>i(m),isSelected:a$1(L),optionDescriptionLines:s},`autocomplete-option-${h}-${L.key??L.value}`))]})})}),We=Mt;var wt=be.memo(({selectedOptions:e,onSelect:i,error:t,helperText:o,label:p,placeholder:l,options:n,onInputChange:r,size:s,disabled:c})=>{let{setCurrentFocus:u,setFilteredOptions:b,optionsListRef:x,inputRef:v}=F();return jsx(a$3,{ref:v,autoComplete:"off",list:"",disabled:c,selectMode:true,onChange:h=>{u(-1),r?.(h.target.value);},onClean:()=>{u(-1),b(n),i?.(null,e);},onClick:()=>{c||(x.current.style.display="flex");},error:t,helperText:o,label:p,placeholder:l,fixedTopLabel:e.length>0,size:s})}),Ve=wt;var Ge=({options:e,defaultSelectedOptions:i,onSelect:t,error:o,helperText:p,label:l,placeholder:n,noResultsLabel:r,noResultsIcon:s,noResultsDescription:c,noResultsDescriptionLines:u,noResultsAsColumn:b,noResultsButtonOnClick:x,noResultsButtonLabel:v,className:h,onInputChange:g,value:C,loading:a,size:N="md",optionDescriptionLines:L=1,disabled:P})=>{let{inputRef:m,optionsListRef:A,setFilteredOptions:O,setShowChips:d,setInputRect:le,setPopoverPosition:se,setCurrentFocus:pe,showChips:B,setOptionsListRect:ue,optionsListRect:z,setOptionsListHeight:X}=F(),j=useRef(false),[U,W]=useState(i??[]),w=useCallback(M=>{W(y=>{let D,J=y.findIndex(Ue=>Ue.value===M.value);return J===-1?(D=y.concat(M),t?.(M,D),D):(D=y.toSpliced(J,1),t?.(M,D),D)});},[t]),q=useCallback(()=>{W([]),O(e),t?.(null,[]);},[]),R=useCallback(()=>{d(false);},[]),E=useCallback(()=>{d(true);},[]),I=useCallback(()=>{if(!m?.current)return;let M=m.current.getBoundingClientRect();le(M);let y=z?z.height>k?k:z.height:k,D=window.innerHeight-M.bottom>y,J=M.top>y;se(D?"bottom":J?"top":"bottom"),X(J?k:window.innerHeight-M.bottom>k?k:window.innerHeight-M.bottom);},[z?.height]),ee=useCallback(()=>{let M=e.filter(y=>y.label.toLowerCase().includes(m?.current?.value.toLowerCase()??""));if(O(M),A?.current){let y=A.current.getBoundingClientRect();ue(y);}},[e,A?.current]);return useEffect(()=>{O(e);},[e]),a$4(A,()=>{A.current.style.display="none",pe(-1);}),useEffect(()=>{if(m?.current)return I(),m.current.addEventListener("mousedown",I),m.current.addEventListener("input",ee),m.current.addEventListener("focusin",R),m.current.addEventListener("focusout",E),window.addEventListener("scroll",I,true),window.addEventListener("resize",I),()=>{m.current?.removeEventListener("mousedown",I),m.current?.removeEventListener("input",I),m.current?.removeEventListener("focusout",E),m.current?.removeEventListener("focusin",R),window.removeEventListener("scroll",I,true),window.removeEventListener("resize",I);}},[I,E,R,ee]),useEffect(()=>{C&&(W(C),d(true));},[C]),useEffect(()=>{a||i&&i.length&&!j.current&&(W(i),j.current=true,d(true));},[i,a]),jsxs("div",{className:a$1("relative",h),children:[jsx(Ve,{selectedOptions:U,onSelect:t,error:o,helperText:p,label:l,placeholder:n,handleSelect:w,options:e,onInputChange:g,size:N,disabled:P}),B&&jsx(Be,{selectedOptions:U,disabled:P,error:o,onCleanSelectedOptions:q,size:N}),jsx(We,{handleSelect:w,selectedOptions:U,noResultsLabel:r,NoResultsIcon:s,optionDescriptionLines:L,noResultsAsColumn:b,noResultsButtonLabel:v,noResultsButtonOnClick:x,noResultsDescription:c,noResultsDescriptionLines:u})]})};var Ei=e=>jsx(Ne,{children:jsx(Ge,{...e})});var Bi=({children:e,title:i,titleLines:t=1,description:o,descriptionLines:p=1,StartIcon:l,hasDivider:n=false,disabled:r=false,actionButton:s,isSelected:c$1=false,className:u,...b})=>jsxs(H,{hasDescription:!!o,disabled:r,hasDivider:n,isSelected:c$1,...b,className:u,children:[l&&jsx(l,{className:"mr-2 h-4.5 w-4.5 shrink-0 grow-0"}),jsx(T,{title:i,titleLines:t,description:o,descriptionLines:p,disabled:r}),s&&jsx(Fragment,{children:s.isIcon?jsx(c$3,{...s,className:"ml-4 self-center",variant:"ghost",size:"sm",disabled:r??s.disabled}):jsx(c,{...s,className:"ml-4 self-center",size:"sm",variant:"ghost",disabled:r??s.disabled})})]});var Dt=({children:e,hasDescription:i=false,disabled:t=false,hasDivider:o=false,className:p,isSelected:l,onClick:n,...r})=>jsxs(Fragment,{children:[jsx("div",{className:a$1("flex flex-row px-3 py-4 text-neutral-900 transition-colors",i?"py-3":"py-3.5",t?"cursor-not-allowed text-neutral-400":"hover:bg-primary-100 focus:bg-primary-200",l&&"bg-primary-200",p),onClick:s=>{t||n?.(s);},...r,children:e}),o&&jsx(a,{})]}),H=Dt;var Ie=({children:e,title:i,titleLines:t,description:o="",descriptionLines:p,startIcon:l,endIcon:n,hasDivider:r=false,disabled:s=false,isSelected:c=false,className:u,...b})=>jsxs(H,{hasDescription:!!o,disabled:s,hasDivider:r,className:u,isSelected:c,...b,children:[l&&be.cloneElement(l,{className:"shrink-0 mr-2 h-4.5 w-4.5"}),jsx(T,{title:i,titleLines:t,description:o,descriptionLines:p,disabled:s}),n&&be.cloneElement(n,{className:"min-h-4.5 min-w-4.5 self-center ml-4"})]});export{oo as a,Ie as b,bo as c,De as d,Ei as e,Bi as f};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {a,b,c,g,h,d,e as e$1,i,j,f}from'./chunk-5SL2VRZD.mjs';import {b as b$1}from'./chunk-FR52DUJW.mjs';import {e}from'./chunk-Z5V7WUXE.mjs';import {useMemo}from'react';import {useReactTable,getPaginationRowModel,getCoreRowModel,flexRender}from'@tanstack/react-table';import {jsxs,jsx}from'react/jsx-runtime';function oe({columns:h$1,data:m,rowsCount:l,pagination:i$1,onPaginationChange:p,noResults:N,rowsPerPageText:H="Rows per page",ofText:I="of",onNextPageClick:v,onPreviousPageClick:k,disableNextPage:d$1,disablePreviousPage:T,className:z,onRowsPerPageChange:M,columnOrder:O,columnVisibility:B,rowsPerPageOptions:V,...L}){let t=useReactTable({data:m,columns:h$1,rowCount:l,state:{pagination:i$1,columnOrder:O,columnVisibility:B},onPaginationChange:p,manualPagination:true,getCoreRowModel:getCoreRowModel(),getPaginationRowModel:getPaginationRowModel()}),A=useMemo(()=>T||!!l&&!t.getCanPreviousPage(),[T,l,i$1?.pageIndex]),F=useMemo(()=>d$1||!!l&&!t.getCanNextPage(),[d$1,l,i$1?.pageIndex]);return t.getRowModel().rows?.length?jsxs(a,{className:z,...L,children:[jsxs(b,{children:[jsx("colgroup",{children:t.getHeaderGroups()[0].headers.map(a=>{let o=a.column.getSize()/t.getHeaderGroups()[0].headers.reduce((n,G)=>n+G.getSize(),0)*100;return jsx("col",{span:1,style:{width:`${o}%`,minWidth:`${a.column.getSize()}px`}},a.id)})}),jsx(c,{children:t.getHeaderGroups().map(a=>jsx(g,{children:a.headers.map(o=>{let n=o.column.columnDef;return jsx(h,{children:jsxs("div",{className:"flex items-center",children:[o.isPlaceholder?null:jsx(b$1,{content:flexRender(n.header,o.getContext()),contentClassName:"font-normal normal-case",children:jsx("span",{className:"line-clamp-1 text-xs uppercase leading-[130%]",children:flexRender(n.header,o.getContext())})}),n.headerInfoTooltip&&jsx(b$1,{size:n.headerInfoTooltipSize,content:n.headerInfoTooltip,contentClassName:"font-normal normal-case",children:jsx(e,{className:"ml-1 w-[0.875rem] shrink-0"})})]})},o.id)})},a.id))}),jsx(d,{children:t.getRowModel().rows.map(a=>jsx(e$1,{"data-state":a.getIsSelected()&&"selected",children:a.getVisibleCells().map(o=>jsx(i,{children:flexRender(o.column.columnDef.cell,o.getContext())},o.id))},a.id))})]}),i$1&&p&&m.length>0&&jsx(j,{rowsPerPageOptions:V,rowsCount:l,pagination:i$1,onRowsPerPageChange:a=>{t.setPageSize(a),t.setPageIndex(0),M?.(a);},onPreviousPageClick:()=>{t.previousPage(),k?.();},onNextPageClick:()=>{t.nextPage(),v?.();},disableNextPage:F,disablePreviousPage:A,ofText:I,rowsPerPageText:H})]}):jsx(f,{...N})}export{oe as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-KTRSJBA4.mjs';import {a as a$1}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-KTRSJBA4.mjs';import {a as a$1}from'./chunk-YO6PTC37.mjs';import {a as a$3}from'./chunk-FM5VRV4O.mjs';import {n}from'./chunk-Z5V7WUXE.mjs';import {a as a$2}from'./chunk-BO6XI5BE.mjs';import {useState,useRef,useMemo,useCallback,useEffect}from'react';import*as w from'@radix-ui/react-portal';import {format}from'date-fns';import {jsxs,Fragment,jsx}from'react/jsx-runtime';var S=({value:c,onChange:m,locale:x,disabledDates:D,...E})=>{let[d,f]=useState(false),[a$4,u]=useState(c),[n$1,P]=useState(),[L,R]=useState("bottom"),[F,k]=useState(0),o=useRef(null),r=useRef(null);a(o,()=>{f(false);});let y=t=>{u(t),m?.(t);},H=useMemo(()=>a$4?format(a$4,"P"):"",[a$4]),z=()=>{u(void 0),m?.(void 0);},e=useCallback(()=>{if(!r.current)return;let t=r.current.getBoundingClientRect();if(!o.current)return;let i=o.current.getBoundingClientRect().height;k(i),P(t);let I=window.innerHeight-t.bottom>i,N=t.top+t.height>i;R(I?"bottom":N?"top":"bottom");},[r.current,o.current]);return useEffect(()=>{u(c);},[c]),useEffect(()=>{if(r?.current)return e(),r.current.addEventListener("mousedown",e),r.current.addEventListener("input",e),window.addEventListener("scroll",e,true),window.addEventListener("resize",e),()=>{r.current?.removeEventListener("mousedown",e),r.current?.removeEventListener("input",e),window.removeEventListener("scroll",e,true),window.removeEventListener("resize",e);}},[r.current,e]),useEffect(()=>{if(d&&o.current){let t=setTimeout(()=>{e();},0);return ()=>clearTimeout(t)}},[d,e]),jsxs(Fragment,{children:[jsx(a$1,{ref:r,startIcon:jsx(n,{}),onClean:z,readOnly:true,value:H,onClick:t=>{P(t.currentTarget.getBoundingClientRect()),f(i=>!i);},...E}),jsx(w.Root,{asChild:true,children:jsx("div",{ref:o,className:a$2("pointer-events-auto fixed z-50 hidden",d&&"block"),style:n$1?{top:L==="bottom"?`${n$1.height+n$1.y}px`:n$1.top-F,left:n$1?.left}:void 0,children:jsx(a$3,{className:"w-[20rem] max-w-full",mode:"single",selected:a$4,onSelect:y,locale:x,disabled:D})})})]})};S.displayName="DatePicker";export{S as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-
|
|
1
|
+
import {a as a$1}from'./chunk-Z5V7WUXE.mjs';import {a}from'./chunk-BO6XI5BE.mjs';import c,{forwardRef}from'react';import {tv}from'tailwind-variants';import {jsxs,jsx}from'react/jsx-runtime';var M=["xs","sm","md","lg"],T=["contained","outlined","ghost","standard","link","secondary","white"],I=tv({slots:{button:"flex shrink-0 items-center justify-center gap-2 rounded-lg font-inter text-base font-semibold leading-[130%] transition-all ease-linear disabled:cursor-not-allowed disabled:ring-0",icon:"",loadingIcon:"absolute animate-spin text-neutral-400"},variants:{size:{lg:{button:"h-12 px-4",icon:"h-4.5 w-4.5",loadingIcon:"h-4.5 w-4.5"},md:{button:"h-10 px-4 text-sm leading-[130%]",icon:"h-4.5 w-4.5",loadingIcon:"h-4.5 w-4.5"},sm:{button:"h-8 gap-1 px-3 text-sm leading-[130%]",icon:"h-3.5 w-3.5",loadingIcon:"h-3.5 w-3.5"},xs:{button:"h-6 gap-1 rounded-[6px] px-3 text-xs leading-[130%]",icon:"h-3.5 w-3.5",loadingIcon:"h-3.5 w-3.5"}},variant:{contained:{button:"bg-primary-500 text-neutral-50 hover:bg-primary-600 focus:bg-primary-500 focus:ring-[3px] focus:ring-inset focus:ring-primary-800 active:bg-primary-700 active:ring-0 disabled:bg-neutral-100 disabled:text-neutral-400"},secondary:{button:"text-primary-500 ring-[1.5px] ring-inset ring-primary-500 hover:bg-transparent-primary-20 hover:text-primary-600 hover:ring-primary-600 focus:ring-[3px] focus:ring-primary-800 active:bg-transparent-primary-40 active:text-primary-700 active:ring-primary-700 disabled:bg-neutral-50/0 disabled:text-neutral-400 disabled:ring-[1.5px] disabled:ring-neutral-400"},outlined:{button:"leading-[130%] text-neutral-900 ring-[1.5px] ring-inset ring-neutral-900 focus:bg-neutral-50 focus:bg-opacity-0 focus:ring-[3px] focus:ring-primary-900 active:ring-[1.5px] disabled:bg-neutral-50/0 disabled:text-neutral-400 disabled:ring-[1.5px] disabled:ring-neutral-400 [&:not([disabled])]:hover:bg-transparent-primary-20 [&:not([disabled])]:active:bg-transparent-primary-40"},ghost:{button:"text-primary-500 hover:bg-transparent-primary-20 hover:text-primary-600 focus:bg-neutral-50 focus:bg-opacity-0 focus:ring-[3px] focus:ring-inset focus:ring-primary-800 active:bg-transparent-primary-40 active:text-primary-700 active:ring-0 disabled:bg-neutral-50 disabled:bg-opacity-0 disabled:text-neutral-400"},standard:{button:"text-neutral-900 hover:bg-transparent-primary-20 focus:bg-neutral-50/0 focus:ring-[3px] focus:ring-inset focus:ring-primary-800 active:bg-transparent-primary-40 active:ring-0 disabled:bg-neutral-50 disabled:bg-opacity-0 disabled:text-neutral-400"},link:{button:"text-primary-500 underline underline-offset-2 hover:bg-transparent-primary-20 hover:text-primary-600 focus:bg-neutral-50/0 focus:text-primary-500 focus:ring-[3px] focus:ring-inset focus:ring-primary-800 active:bg-transparent-primary-40 active:text-primary-700 active:ring-0 disabled:bg-neutral-50 disabled:bg-opacity-0 disabled:text-neutral-400"},white:{button:"bg-neutral-50 text-neutral-900"}},loading:{true:{button:"disabled:text-neutral-50 disabled:text-opacity-0"}}},defaultVariants:{variant:"contained",size:"md",loading:false,disabled:false}}),V=forwardRef(({children:d,className:u,variant:p,size:g,startIcon:a$2,endIcon:n,loading:e,disabled:b,type:m="button",StartIcon:i,EndIcon:o,...x},y)=>{let{button:f,icon:t,loadingIcon:v}=I({variant:p,size:g,loading:e});return jsxs("button",{...x,ref:y,disabled:e||b,className:a(f(),u),type:m,children:[e&&jsx(a$1,{className:v()}),a$2&&c.cloneElement(a$2,{className:t()}),i&&jsx(i,{className:t()}),d,n&&c.cloneElement(n,{className:t()}),o&&jsx(o,{className:t()})]})});export{M as a,T as b,V as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {c}from'./chunk-7NJTMO4L.mjs';import {j}from'./chunk-
|
|
1
|
+
import {c}from'./chunk-7NJTMO4L.mjs';import {j}from'./chunk-K6GFJXYC.mjs';import {c as c$2}from'./chunk-35JUETHD.mjs';import {c as c$1}from'./chunk-IVP3SQT6.mjs';import {a}from'./chunk-BO6XI5BE.mjs';import*as s from'react';import*as e from'@radix-ui/react-dialog';import*as R from'@radix-ui/react-visually-hidden';import {jsx,jsxs}from'react/jsx-runtime';var I=["sm","md","lg","xl"],T=({...r})=>jsx(e.Root,{...r});T.displayName="Drawer";var S=e.Trigger,B=e.Portal,V=e.Close,v=s.forwardRef(({className:r,...a$1},o)=>jsx(e.Overlay,{ref:o,className:a("fixed inset-0 z-50 bg-neutral-900/60","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=open]:animate-in data-[state=closed]:animate-out","transition-all",r),...a$1}));v.displayName=e.Overlay.displayName;var h=s.forwardRef(({className:r,size:a$1="sm",title:o,description:i,children:f,isLoading:d=false,loadingText:n="",buttons:D,hideHeader:c$1=false,onPointerDownOutside:C,...P},H)=>jsx(B,{children:jsx(v,{children:jsxs(e.Content,{onPointerDownOutside:m=>{m.target instanceof Element&&m.target.closest(".pac-container")&&m.preventDefault(),C?.(m);},ref:H,...!i||c$1?{"aria-describedby":void 0}:{},className:a("fixed right-0 top-0 z-50 flex h-full flex-col overflow-y-auto bg-neutral-50 pl-6 pr-8 pt-10",a$1==="sm"&&"w-[29.375rem] max-w-[29.375rem]",a$1==="md"&&"w-[47.5rem] max-w-[47.5rem]",a$1==="lg"&&"w-[58.75rem] max-w-[58.75rem]",a$1==="xl"&&"w-[78.125rem] max-w-[78.125rem]","data-[state=open]:animate-slide-in","data-[state=closed]:animate-swipe-out",r),...P,children:[c$1?jsx(R.Root,{children:jsx(j,{children:"Drawer"})}):jsx(x,{title:o,description:i,buttons:D}),jsx("div",{className:a("flex flex-1 flex-col pb-6",r),children:d?jsxs("div",{className:"flex flex-1 flex-col items-center justify-center",children:[jsx(c,{size:"lg"}),n&&jsx("p",{children:n})]}):f})]})})}));h.displayName="DrawerContent";var x=({className:r,title:a$1,description:o,buttons:i=[],...f})=>jsxs("div",{className:a("mb-7",r),...f,children:[jsxs("div",{className:"flex justify-between gap-2",children:[a$1&&jsx(N,{children:a$1}),!Array.isArray(i)&&i.visible!==false&&jsx(c$1,{size:"sm",variant:"ghost",...i}),Array.isArray(i)&&jsx("div",{className:"flex gap-1",children:i.map(({visible:d=true,...n},D)=>d?jsx(c$2,{variant:"ghost",size:"sm",...n},D):null)})]}),o&&jsx(b,{className:"mt-1",children:o})]});x.displayName="DrawerHeader";var E=({className:r,...a$1})=>jsx("div",{className:a("mt-auto flex pt-6",r),...a$1});E.displayName="DrawerFooter";var N=s.forwardRef(({className:r,...a$1},o)=>jsx(e.Title,{ref:o,className:a("font-jakarta text-2xl font-semibold leading-[130%] text-neutral-900",r),...a$1}));N.displayName=e.Title.displayName;var b=s.forwardRef(({className:r,...a$1},o)=>jsx(e.Description,{ref:o,className:a("text-sm leading-[130%] text-neutral-900",r),...a$1}));b.displayName=e.Description.displayName;export{I as a,T as b,S as c,B as d,V as e,v as f,h as g,x as h,E as i,N as j,b as k};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-T2IU5QUU.mjs';import {c}from'./chunk-
|
|
1
|
+
import {a as a$1}from'./chunk-T2IU5QUU.mjs';import {c}from'./chunk-IVP3SQT6.mjs';import {d}from'./chunk-Z5V7WUXE.mjs';import {a}from'./chunk-BO6XI5BE.mjs';import*as r from'react';import*as t from'@radix-ui/react-dialog';export{t as a };import {jsx,jsxs}from'react/jsx-runtime';var b=t.Root,B=t.Trigger,D=t.Portal,v=t.Close,p=r.forwardRef(({className:e,...i},l)=>jsx(t.Overlay,{ref:l,className:a("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-neutral-900/50",e),...i}));p.displayName=t.Overlay.displayName;var P=r.forwardRef(({className:e,children:i,onPointerDownOutside:l,...g},d)=>jsx(D,{children:jsx(p,{children:jsx(t.Content,{onPointerDownOutside:n=>{n.target instanceof Element&&n.target.closest(".pac-container")&&n.preventDefault(),l?.(n);},ref:d,className:a("elevation-9 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-10000 grid max-h-[80vh] w-full max-w-2xl translate-x-[-50%] translate-y-[-50%] overflow-y-auto rounded-2xl bg-neutral-50 py-3 pr-0 duration-200",e),...g,children:i})})}));P.displayName=t.Content.displayName;var u=({className:e,...i})=>jsx("div",{className:a("mr-4 mb-4 ml-6 flex flex-col gap-4 text-left",e),...i});u.displayName="DialogHeader";var y=({className:e,...i})=>jsxs("div",{children:[jsx(a$1,{className:"w-full"}),jsx("div",{className:a("mx-6 mt-3 flex justify-end gap-2",e),...i})]});y.displayName="DialogFooter";var E=({className:e,...i})=>jsx("div",{className:a("mx-6 mb-4.5",e),...i}),R=r.forwardRef(({className:e,...i},l)=>jsxs("div",{className:"flex items-center justify-between",children:[jsx(t.Title,{ref:l,className:a("font-jakarta pr-2 text-lg leading-[160%] font-semibold",e),...i}),jsxs(t.Close,{className:"h-5.5 w-5.5",children:[jsx(d,{className:"h-5.5 w-5.5"}),jsx("span",{className:"sr-only",children:"Close"})]})]}));R.displayName=t.Title.displayName;var C=r.forwardRef(({className:e,...i},l)=>jsx(t.Description,{ref:l,className:a("font-inter text-sm leading-[130%] font-normal",e),...i}));C.displayName=t.Description.displayName;var H=e=>jsx(c,{variant:"contained",...e}),O=e=>jsx(v,{asChild:true,children:jsx(c,{variant:"secondary",...e})}),F=e=>jsx(c,{variant:"ghost",...e});export{b,B as c,D as d,p as e,P as f,u as g,y as h,E as i,R as j,C as k,H as l,O as m,F as n};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {d}from'./chunk-
|
|
1
|
+
import {d}from'./chunk-Z5V7WUXE.mjs';import {a}from'./chunk-BO6XI5BE.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:true,className:{container:"cursor-not-allowed",closeIcon:"cursor-not-allowed"}},{disabled:false,variant:"standard",type:"fill",className:{container:"bg-neutral-100 text-neutral-700 hover:bg-neutral-200"}},{disabled:true,variant:"standard",type:"fill",className:{container:"bg-neutral-100 text-neutral-400"}},{disabled:false,variant:"primary",type:"fill",className:{container:"bg-primary-200 text-primary-800 hover:bg-primary-300"}},{disabled:false,variant:"standard",type:"outlined",className:{container:"text-neutral-700 ring-1 ring-inset ring-neutral-700 hover:bg-primary-100"}},{disabled:true,variant:"standard",type:"outlined",className:{container:"text-neutral-400 ring-1 ring-inset ring-neutral-400"}},{disabled:false,variant:"primary",type:"outlined",className:{container:"text-primary-500 ring-1 ring-inset ring-primary-500 hover:bg-primary-100"}}],defaultVariants:{disabled:false,size:"md"}}),b=forwardRef(({children:i,onClose:s,StartIcon:t,className:o,hasCloseIcon:p=true,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-KTRSJBA4.mjs';import {a as a$2}from'./chunk-
|
|
1
|
+
import {a as a$1}from'./chunk-KTRSJBA4.mjs';import {a as a$2}from'./chunk-YO6PTC37.mjs';import {o}from'./chunk-Z5V7WUXE.mjs';import {a as a$3}from'./chunk-BO6XI5BE.mjs';import {useState,useRef,useMemo,useEffect}from'react';import*as k from'@radix-ui/react-portal';import {format}from'date-fns';import {jsxs,Fragment,jsx}from'react/jsx-runtime';var D=["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"],v=56,a=6,_=({value:c,onChange:h,locale:b,minTime:p,maxTime:u,...R})=>{let[F,m]=useState(false),[i,f]=useState(c),[o$1,P]=useState(),[O,M]=useState("bottom"),w=useRef(null),t=useRef(null),N=e=>{f(e),h?.(e),m(false);},z=useMemo(()=>i?format(new Date("2024-01-01T"+i),"p"):"",[i,b]),H=()=>{f(void 0),h?.(void 0);},n=useMemo(()=>D.map(e=>({value:e,label:format(new Date("2024-01-01T"+e),"p"),disabled:p&&e<p||u&&e>u})),[b,p,u]);return useEffect(()=>{f(c);},[c]),a$1(w,()=>{m(false);}),useEffect(()=>{if(!t.current)return;let e=()=>{if(!t.current)return;let l=v*(n.length<a?n.length:a)+16,s=t.current.getBoundingClientRect();P(s);let S=window.innerHeight-s.bottom>l,B=s.top+s.height>l;M(S?"bottom":B?"top":"bottom");};return e(),t.current.addEventListener("mousedown",e),window.addEventListener("scroll",e,true),window.addEventListener("resize",e),()=>{t.current?.removeEventListener("mousedown",e),window.removeEventListener("scroll",e,true),window.removeEventListener("resize",e);}},[t.current]),jsxs(Fragment,{children:[jsx(a$2,{ref:t,autoComplete:"off",startIcon:jsx(o,{}),onClean:H,readOnly:true,value:z,onClick:e=>{P(e.currentTarget.getBoundingClientRect()),m(l=>!l);},...R}),jsx(k.Root,{children:jsx("div",{ref:w,className:a$3("elevation-8 pointer-events-auto fixed z-50 my-2 hidden max-h-84 w-full flex-col overflow-y-auto rounded-lg bg-neutral-50",F&&"block"),style:o$1?{width:`${o$1.width}px`,top:O==="bottom"?`${o$1.height+o$1.top}px`:o$1.top-(n.length<a?n.length:a)*v-16,left:o$1?.left}:void 0,children:n.map(e=>jsx("div",{onClick:()=>!e.disabled&&N(e.value),className:a$3("flex w-full items-center px-2 hover:cursor-pointer",!e.disabled&&"hover:bg-primary-100",i===e.value&&"bg-primary-200",e.disabled&&"text-neutral-500 hover:cursor-not-allowed"),style:{height:v},children:e.label},e.value))})})]})};_.displayName="TimePicker";export{_ as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {b}from'./chunk-FR52DUJW.mjs';import {c as c$1}from'./chunk-35JUETHD.mjs';import {c}from'./chunk-IVP3SQT6.mjs';import {s,t}from'./chunk-Z5V7WUXE.mjs';import {useCallback}from'react';import {tv}from'tailwind-variants';import {useCollapsibleContext,Collapsible}from'@ark-ui/react/collapsible';import {jsxs,jsx}from'react/jsx-runtime';var r=tv({slots:{root:"bg-neutral-80 ring-expandable-card-border group flex flex-col rounded-lg ring transition-all duration-200 ease-in-out ring-inset",header:"flex items-center justify-between gap-3 pt-3 pr-1 pb-2 pl-3",headerLabel:"font-semibold empty:hidden",headerValue:"flex gap-3 text-base leading-[130%] text-neutral-900",content:"data-[state=open]:animate-accordion-down data-[state=closed]:animate-accordion-up border-expandable-card-border overflow-hidden group-data-[state=open]:border-t",contentInner:"px-3 pt-4 pb-6",fixedContent:"border-expandable-card-border border-t px-3 pt-6 pb-4"}}),y=({headerLabel:o,headerValue:t$1,className:n,action:a,...l})=>{let{header:s$1,headerLabel:p,headerValue:u}=r(),g=useCollapsibleContext();return jsxs("div",{...l,className:s$1({className:n}),children:[jsxs("p",{className:u(),children:[jsx("span",{className:p(),children:o}),t$1]}),jsxs("div",{className:"flex items-center gap-2",children:[a&&jsx(b,{size:"sm",content:a.tooltipContent,disabled:!a.tooltipContent,children:jsx(c,{...a,size:"xs",variant:"standard"})}),jsx(Collapsible.Trigger,{asChild:true,children:jsx(c$1,{Icon:g.open?s:t,variant:"standard",size:"xs"})})]})]})},z=({className:o,...t})=>{let{contentInner:n,content:a}=r();return jsx(Collapsible.Content,{className:a(),children:jsx("div",{...t,className:n({className:o})})})},A=({className:o,...t})=>{let{fixedContent:n}=r();return jsx("div",{...t,className:n({className:o})})},B=({className:o,onOpenChange:t,children:n,...a})=>{let{root:l}=r(),s=useCallback(p=>{t?.(p);},[t]);return jsx(Collapsible.Root,{onOpenChange:s,className:l({className:o}),...a,children:n})};export{y as a,z as b,A as c,B as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-T2IU5QUU.mjs';import {c}from'./chunk-
|
|
1
|
+
import {a as a$1}from'./chunk-T2IU5QUU.mjs';import {c}from'./chunk-IVP3SQT6.mjs';import {d}from'./chunk-Z5V7WUXE.mjs';import {a}from'./chunk-BO6XI5BE.mjs';import*as r from'react';import {useCallback}from'react';import {Dialog}from'@ark-ui/react/dialog';import {Portal}from'@ark-ui/react/portal';import {jsxs,jsx}from'react/jsx-runtime';var H=({onOpenChange:e,...o})=>{let n=useCallback(m=>{e?.(m.open);},[e]);return jsx(Dialog.Root,{unmountOnExit:true,lazyMount:true,onOpenChange:n,...o})},F=Dialog.Trigger,f=r.forwardRef(({className:e,children:o,...n},m)=>jsxs(Portal,{children:[jsx(Dialog.Backdrop,{className:"fixed inset-0 z-50 bg-neutral-900/50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"}),jsx(Dialog.Positioner,{className:"fixed inset-0 z-10000",children:jsx(Dialog.Content,{ref:m,className:a("elevation-9 fixed top-[50%] left-[50%] z-10000 grid max-h-[80vh] w-full max-w-2xl translate-x-[-50%] translate-y-[-50%] overflow-y-auto rounded-2xl bg-neutral-50 py-3 pr-0 duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",e),...n,children:o})})]}));f.displayName="DialogNewContent";var D=({className:e,...o})=>jsx("div",{className:a("mr-4 mb-4 ml-6 flex flex-col gap-4 text-left",e),...o});D.displayName="DialogNewHeader";var N=({className:e,...o})=>jsxs("div",{children:[jsx(a$1,{className:"w-full"}),jsx("div",{className:a("mx-6 mt-3 flex justify-end gap-2",e),...o})]});N.displayName="DialogNewFooter";var M=({className:e,...o})=>jsx("div",{className:a("mx-6 mb-4.5",e),...o}),u=r.forwardRef(({className:e,...o},n)=>jsxs("div",{className:"flex items-center justify-between",children:[jsx(Dialog.Title,{ref:n,className:a("font-jakarta pr-2 text-lg leading-[160%] font-semibold",e),...o}),jsxs(Dialog.CloseTrigger,{className:"h-5.5 w-5.5",children:[jsx(d,{className:"h-5.5 w-5.5"}),jsx("span",{className:"sr-only",children:"Close"})]})]}));u.displayName="DialogNewTitle";var w=r.forwardRef(({className:e,...o},n)=>jsx(Dialog.Description,{ref:n,className:a("font-inter text-sm leading-[130%] font-normal",e),...o}));w.displayName="DialogNewDescription";var O=e=>jsx(c,{variant:"contained",...e}),z=e=>jsx(Dialog.CloseTrigger,{asChild:true,children:jsx(c,{variant:"secondary",...e})}),L=e=>jsx(c,{variant:"ghost",...e});export{H as a,F as b,f as c,D as d,N as e,M as f,u as g,w as h,O as i,z as j,L as k};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a}from'./chunk-YO6PTC37.mjs';import {p}from'./chunk-Z5V7WUXE.mjs';import {jsx}from'react/jsx-runtime';var i=({size:t="md",...p$1})=>jsx(a,{endIcon:jsx(p,{}),type:"search",...p$1,size:t});export{i as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a,b,c,d,e,f,g,h,i as i$1}from'./chunk-E5G7444M.mjs';import {a as a$1}from'./chunk-KTRSJBA4.mjs';import {a as a$3}from'./chunk-
|
|
1
|
+
import {a,b,c,d,e,f,g,h,i as i$1}from'./chunk-E5G7444M.mjs';import {a as a$1}from'./chunk-KTRSJBA4.mjs';import {a as a$3}from'./chunk-YO6PTC37.mjs';import {g as g$1}from'./chunk-Z5V7WUXE.mjs';import {a as a$2}from'./chunk-BO6XI5BE.mjs';import _,{useId,useRef,useState,useEffect,useMemo}from'react';import*as I from'@radix-ui/react-portal';import {jsx,jsxs}from'react/jsx-runtime';var L=56,p=6,q=(t=>(t.CL="CL",t.AR="AR",t.CO="CO",t.GT="GT",t.MX="MX",t.PE="PE",t.BR="BR",t.UY="UY",t.US="US",t))(q||{}),M=new Map([["CL",{name:"Chile",flag:a}],["AR",{name:"Argentina",flag:b}],["CO",{name:"Colombia",flag:c}],["GT",{name:"Guatemala",flag:d}],["MX",{name:"Mexico",flag:e}],["PE",{name:"Per\xFA",flag:f}],["BR",{name:"Brasil",flag:g}],["UY",{name:"Uruguay",flag:h}],["US",{name:"Estados Unidos",flag:i$1}]]),i=Array.from(M.entries()),de=({noResults:g,selectedCountry:d,onSelect:S,className:U,size:B="md",...m})=>{let A=useId(),l=useRef(null),r=useRef(null),[t,G]=useState("bottom"),[s,H]=useState(),[Y,$]=useState(-1),k=e=>{l.current.style.display="none",S?.(e);};useEffect(()=>{if(!r.current)return;let e=()=>{if(!r.current)return;let a=L*(i.length<p?i.length:p)+16,c=r.current.getBoundingClientRect();H(c);let z=window.innerHeight-c.bottom>a,X=c.top>a;G(z?"bottom":X?"top":"bottom");};return e(),r.current.addEventListener("mousedown",e),window.addEventListener("scroll",e,true),window.addEventListener("resize",e),()=>{r.current?.removeEventListener("mousedown",e),window.removeEventListener("scroll",e,true),window.removeEventListener("resize",e);}},[r.current]),a$1(l,()=>{l.current&&(l.current.style.display="none",$(-1));});let x=useMemo(()=>M.get(d),[d]);return jsx("div",{className:a$2("flex flex-col",U),children:jsxs("div",{className:a$2("relative flex flex-col"),children:[jsx(a$3,{ref:r,startComponent:jsxs("div",{className:"z-100000 ml-3 flex h-2 w-[7.5rem] cursor-pointer items-center",onClick:()=>{m.disabled||(l.current.style.display="flex");},children:[jsx("img",{src:x?.flag,alt:x?.name,className:a$2("h-6 w-6 cursor-pointer",m.disabled&&"cursor-not-allowed text-neutral-400")}),jsx("span",{className:a$2("ml-1",m.disabled&&"cursor-not-allowed text-neutral-400"),children:d}),jsx(g$1,{className:a$2(B==="md"?"h-6 w-6":"h-4.5 w-4.5","cursor-pointer",m.disabled&&"cursor-not-allowed text-neutral-400")})]}),...m}),jsx(I.Root,{asChild:true,children:jsxs("ul",{ref:l,className:"elevation-8 pointer-events-auto absolute z-10000 my-2 hidden max-h-[336px] w-full flex-col overflow-y-auto rounded-lg bg-neutral-50",style:s?{width:`${s.width}px`,left:s.left,top:t==="bottom"?`${s.height+s.top+window.scrollY}px`:window.scrollY+s.top-(i.length<p?i.length:p)*L-16}:void 0,children:[i.length===0&&jsxs("div",{className:"elevation-8 max-h-88 flex flex-1 flex-col items-center justify-center rounded-lg bg-neutral-50 px-8 py-6",children:[_.cloneElement(g.icon,{className:"mb-2 h-8 w-8 text-neutral-300"}),jsx("p",{className:"text-center text-sm leading-[120%] text-neutral-500",children:g.message})]}),i.map(([e,a],c)=>jsx("li",{onClick:()=>{k(e);},className:a$2("shrink-0 cursor-pointer py-4 pl-4 pr-6 text-left hover:bg-primary-100",d===e&&"bg-primary-200",Y===c&&"bg-primary-200"),children:jsxs("div",{className:a$2("flex items-center space-x-3"),children:[jsx("img",{src:a.flag,alt:a.name,className:"h-6 w-6"}),jsx("p",{children:a.name}),jsx("p",{className:"text-primary-500",children:`(${e})`})]})},`select-option-${A}-${e}`))]})})]})})};export{q as a,de as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-CK3UXIJL.mjs';import {q,d,g as g$1}from'./chunk-
|
|
1
|
+
import {a as a$1}from'./chunk-CK3UXIJL.mjs';import {q,d,g as g$1}from'./chunk-Z5V7WUXE.mjs';import {a}from'./chunk-BO6XI5BE.mjs';import g,{forwardRef,useId,useRef,useState,useCallback,useEffect}from'react';import {Label}from'@radix-ui/react-label';import {jsxs,jsx}from'react/jsx-runtime';var U=forwardRef(({label:x,placeholder:y,error:t,selectMode:b=false,showClearButton:H=true,helperText:M,className:I,size:e="md",onClean:P,onChange:f,startIcon:u,endIcon:p,startComponent:c,fixedTopLabel:C,startText:i,disabled:o,required:v,...D},m)=>{let w=useId(),l=useRef(null),[s,h]=useState(false),T=!l.current?.value,F=useCallback(()=>{if(l.current&&!o){l.current.value="",h(false),P?.();let a={target:l.current,currentTarget:l.current,type:"change",bubbles:true,cancelable:false,defaultPrevented:false,eventPhase:0,isTrusted:true,preventDefault:()=>{},stopPropagation:()=>{},persist:()=>{},isDefaultPrevented:()=>false,isPropagationStopped:()=>false,timeStamp:Date.now(),nativeEvent:new Event("change")};f?.(a);}},[o,f,l.current]);return useEffect(()=>{l.current&&h(l.current.value.length>0);},[]),jsxs("div",{className:a("flex flex-col",I),children:[jsxs("div",{className:a("relative flex flex-col rounded-lg bg-neutral-50",e==="lg"&&"h-12",e==="md"&&"h-10",e==="sm"&&"h-8"),children:[jsx("input",{id:w,disabled:o,required:v,className:a("hover:caret-neutral-text-neutral-600 hover:ring-neutral-text-neutral-600 hover:text-neutral no-spinner peer absolute z-20 h-full w-full rounded-lg bg-neutral-50/0 text-left tracking-normal text-neutral-900 placeholder-neutral-500 caret-neutral-900 outline-0 ring-1 ring-inset ring-neutral-400 transition-all ease-linear focus:text-neutral-900 focus:placeholder-neutral-500 focus:placeholder-opacity-100 focus:caret-primary-800 focus:ring-2 focus:ring-primary-800 disabled:bg-neutral-80 disabled:text-neutral-400 disabled:ring-neutral-100 not-placeholder-shown:z-10",x&&"placeholder-neutral-500/0",t&&"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-sm",e==="sm"&&"text-sm",u?e==="lg"?"pl-[2.75rem]":"pl-[2.38rem]":c?"pl-[6.5rem]":"pl-4",i&&"pl-[1.94rem]",p?e==="lg"?"pr-[2.75rem]":"pr-[2.38rem]":"pr-4"),placeholder:y??"",ref:a=>{typeof m=="function"?m(a):m&&(m.current=a),l.current=a;},onChange:a=>{h(a.target.value.length>0),f?.(a);},...D}),c&&g.cloneElement(c,{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",t&&!s&&"text-error-700 peer-hover:text-error-700 peer-focus:text-error-700")}),u&&g.cloneElement(u,{size: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",t&&!s&&"text-error-700 peer-hover:text-error-700 peer-focus:text-error-700")}),i&&jsx("div",{className:"flex h-full items-center pl-3",children:jsx("p",{className:a("text-neutral-700",t&&"text-error-700"),children:i})}),x&&jsxs(Label,{htmlFor:w,className:a("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-focus:-top-[0.5625rem] peer-focus:z-20 peer-focus:ml-3 peer-focus:text-xs peer-focus:text-primary-800 peer-disabled:peer-not-focus:peer-placeholder-shown:bg-neutral-80",!t&&"peer-not-disabled:peer-not-focus:text-neutral-400 peer-not-disabled:peer-not-focus:peer-not-placeholder-shown:text-neutral-900",s&&"peer-disabled:bg-neutral-80",e==="lg"?"text-base placeholder-shown:text-xs peer-placeholder-shown:top-3":e==="md"?"text-sm placeholder-shown:text-xs peer-placeholder-shown:top-2.5":"text-sm placeholder-shown:text-xs peer-placeholder-shown:top-1.5",!T&&"text-xs",t&&"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]":c?"peer-placeholder-shown:ml-[6rem]":"ml-3",C&&"-top-[0.375rem]! z-20 ml-3 text-xs! transition-none!",i&&"peer-placeholder-shown:ml-[1.94rem]"),children:[v&&"*",x]}),(H&&(!T||s)||t)&&jsxs("div",{className:a("absolute z-10 hidden h-full items-center peer-focus:flex",t&&!o&&"flex",b||p?e==="lg"?"right-[2.81rem]":e==="md"?"right-[2.125rem]":"right-[1.875rem]":"right-4"),children:[t&&jsx(q,{size:e==="sm"?14:18,className:"text-error-700"}),!t&&jsx(d,{onMouseDown:F,size:e==="sm"?14:18,className:"cursor-pointer text-neutral-900"})]}),p&&g.cloneElement(p,{size:e==="sm"?14:18,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",t&&!s&&"text-error-700 peer-hover:text-error-700 peer-focus:text-error-700")}),b&&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$1,{className:e==="lg"?"h-6 w-6":"h-4.5 w-4.5"})})]}),jsx(a$1,{helperText:M,error:t,disabled:o})]})});export{U as a};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import {forwardRef,createElement}from'react';var R=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),G=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,o,u)=>u?u.toUpperCase():o.toLowerCase()),F=t=>{let e=G(t);return e.charAt(0).toUpperCase()+e.slice(1)},B=(...t)=>t.filter((e,o,u)=>!!e&&e.trim()!==""&&u.indexOf(e)===o).join(" ").trim(),q=t=>{for(let e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return true};var T={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 b=forwardRef(({color:t="currentColor",size:e=24,strokeWidth:o=2,absoluteStrokeWidth:u,className:D="",children:c,iconNode:U,...M},O)=>createElement("svg",{ref:O,...T,width:e,height:e,stroke:t,strokeWidth:u?Number(o)*24/Number(e):o,className:B("lucide",D),...!c&&!q(M)&&{"aria-hidden":"true"},...M},[...U.map(([H,v])=>createElement(H,v)),...Array.isArray(c)?c:[c]]));var a=(t,e)=>{let o=forwardRef(({className:u,...D},c)=>createElement(b,{ref:c,iconNode:e,className:B(`lucide-${R(F(t))}`,`lucide-${t}`,u),...D}));return o.displayName=F(t),o};var z=[["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"}]],i=a("calendar",z);var X=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],n=a("check",X);var N=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],p=a("chevron-down",N);var K=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],m=a("chevron-left",K);var Z=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],L=a("chevron-right",Z);var _=[["path",{d:"m7 20 5-5 5 5",key:"13a0gw"}],["path",{d:"m7 4 5 5 5-5",key:"1kwcof"}]],I=a("chevrons-down-up",_);var J=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],x=a("chevrons-up-down",J);var Q=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],d=a("circle-alert",Q);var Y=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],l=a("circle-check",Y);var j=[["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"}]],f=a("circle-x",j);var $=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]],C=a("clock",$);var aa=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],h=a("info",aa);var ea=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],r=a("loader-circle",ea);var ta=[["path",{d:"M5 12h14",key:"1ays0h"}]],S=a("minus",ta);var oa=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]],g=a("moon",oa);var ua=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],k=a("search",ua);var da=[["path",{d:"M12 18.338a2.1 2.1 0 0 0-.987.244L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.12 2.12 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.12 2.12 0 0 0 1.597-1.16l2.309-4.679A.53.53 0 0 1 12 2",key:"2ksp49"}]],w=a("star-half",da);var la=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],P=a("star",la);var fa=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],s=a("triangle-alert",fa);var ra=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],A=a("x",ra);var De=r,Fe=l,Me=f,Re=A,qe=h,Te=s,ye=p,be=L,Ue=m,Oe=n,He=S,ve=g,Ge=P,Ve=i,We=C,Ee=k,ze=d,Xe=w,Ne=I,Ke=x;/*! Bundled license information:
|
|
2
|
+
|
|
3
|
+
lucide-react/dist/esm/shared/src/utils.js:
|
|
4
|
+
lucide-react/dist/esm/defaultAttributes.js:
|
|
5
|
+
lucide-react/dist/esm/Icon.js:
|
|
6
|
+
lucide-react/dist/esm/createLucideIcon.js:
|
|
7
|
+
lucide-react/dist/esm/icons/calendar.js:
|
|
8
|
+
lucide-react/dist/esm/icons/check.js:
|
|
9
|
+
lucide-react/dist/esm/icons/chevron-down.js:
|
|
10
|
+
lucide-react/dist/esm/icons/chevron-left.js:
|
|
11
|
+
lucide-react/dist/esm/icons/chevron-right.js:
|
|
12
|
+
lucide-react/dist/esm/icons/chevrons-down-up.js:
|
|
13
|
+
lucide-react/dist/esm/icons/chevrons-up-down.js:
|
|
14
|
+
lucide-react/dist/esm/icons/circle-alert.js:
|
|
15
|
+
lucide-react/dist/esm/icons/circle-check.js:
|
|
16
|
+
lucide-react/dist/esm/icons/circle-x.js:
|
|
17
|
+
lucide-react/dist/esm/icons/clock.js:
|
|
18
|
+
lucide-react/dist/esm/icons/info.js:
|
|
19
|
+
lucide-react/dist/esm/icons/loader-circle.js:
|
|
20
|
+
lucide-react/dist/esm/icons/minus.js:
|
|
21
|
+
lucide-react/dist/esm/icons/moon.js:
|
|
22
|
+
lucide-react/dist/esm/icons/search.js:
|
|
23
|
+
lucide-react/dist/esm/icons/star-half.js:
|
|
24
|
+
lucide-react/dist/esm/icons/star.js:
|
|
25
|
+
lucide-react/dist/esm/icons/triangle-alert.js:
|
|
26
|
+
lucide-react/dist/esm/icons/x.js:
|
|
27
|
+
lucide-react/dist/esm/lucide-react.js:
|
|
28
|
+
(**
|
|
29
|
+
* @license lucide-react v0.511.0 - ISC
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the ISC license.
|
|
32
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
33
|
+
*)
|
|
34
|
+
*/export{De as a,Fe as b,Me as c,Re as d,qe as e,Te as f,ye as g,be as h,Ue as i,Oe as j,He as k,ve as l,Ge as m,Ve as n,We as o,Ee as p,ze as q,Xe as r,Ne as s,Ke as t};
|