sodtrack-web-ui 0.81.1 → 0.82.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-D4T5LV6D.mjs → chunk-3L3S3VVC.mjs} +1 -1
- package/dist/{chunk-F4CJC6K3.mjs → chunk-3WQ3SMKT.mjs} +1 -1
- package/dist/{chunk-463DMFCV.mjs → chunk-4MO4OFLX.mjs} +1 -1
- package/dist/chunk-5VHBHGBZ.mjs +1 -0
- package/dist/{chunk-G262XYV7.mjs → chunk-72DJZCVO.mjs} +1 -1
- package/dist/{chunk-VH6CSJQB.mjs → chunk-735K3O4A.mjs} +1 -1
- package/dist/{chunk-COYV5BB6.mjs → chunk-7SNMNOMU.mjs} +1 -1
- package/dist/{chunk-BPXFUVGR.mjs → chunk-ADQ6FYND.mjs} +1 -1
- package/dist/{chunk-PJ2IKRZS.mjs → chunk-AOXFPULT.mjs} +1 -1
- package/dist/{chunk-GCAC44ZI.mjs → chunk-BRUHNYT6.mjs} +1 -1
- package/dist/{chunk-EMZCLGIQ.mjs → chunk-BTCPBQZ6.mjs} +1 -1
- package/dist/{chunk-EJBCWOLG.mjs → chunk-DHWOGUID.mjs} +1 -1
- package/dist/chunk-E2H5KGFO.mjs +1 -0
- package/dist/{chunk-FJKEW54S.mjs → chunk-EAAYAECY.mjs} +1 -1
- package/dist/{chunk-ATQGUTXV.mjs → chunk-FTSJHU4A.mjs} +1 -1
- package/dist/{chunk-RFZ66SZR.mjs → chunk-G24D4VG2.mjs} +1 -1
- package/dist/{chunk-SFBGEDQM.mjs → chunk-GT562VMK.mjs} +1 -1
- package/dist/{chunk-5JYXZUPM.mjs → chunk-GTPSQXE3.mjs} +1 -1
- package/dist/{chunk-XZZKINUR.mjs → chunk-HP7QTZBD.mjs} +1 -1
- package/dist/{chunk-CK3UXIJL.mjs → chunk-HU2EH7B6.mjs} +1 -1
- package/dist/{chunk-BNWDSGUY.mjs → chunk-I22BCQSU.mjs} +1 -1
- package/dist/{chunk-5LNAXQBK.mjs → chunk-JAPAGNTE.mjs} +1 -1
- package/dist/{chunk-Q67Z7E4U.mjs → chunk-JE47B5I3.mjs} +1 -1
- package/dist/{chunk-SXEHG5TZ.mjs → chunk-JTO6FE4R.mjs} +1 -1
- package/dist/{chunk-KKWH3QUT.mjs → chunk-JWB3TN2C.mjs} +1 -1
- package/dist/{chunk-CQWMO3TO.mjs → chunk-JXZBYHGL.mjs} +1 -1
- package/dist/{chunk-GCZHRQYT.mjs → chunk-K42J25V2.mjs} +1 -1
- package/dist/{chunk-TWZIWGFV.mjs → chunk-KKLOSX5R.mjs} +1 -1
- package/dist/{chunk-7S5NATSM.mjs → chunk-MQWNWKJ7.mjs} +1 -1
- package/dist/{chunk-GI7JIFZN.mjs → chunk-MU3KLOUI.mjs} +1 -1
- package/dist/{chunk-T2IU5QUU.mjs → chunk-OG3OUJ6C.mjs} +1 -1
- package/dist/{chunk-LKCGHELN.mjs → chunk-OGCRBL76.mjs} +1 -1
- package/dist/{chunk-JSBZ2Q6W.mjs → chunk-OWTD6XNO.mjs} +1 -1
- package/dist/{chunk-WRCFKTIJ.mjs → chunk-PTRXL7BY.mjs} +1 -1
- package/dist/{chunk-Z2VUUD4S.mjs → chunk-PUBBA6CW.mjs} +1 -1
- package/dist/{chunk-ZSQI3LTY.mjs → chunk-Q6XRJGNW.mjs} +1 -1
- package/dist/{chunk-NSHFXSYP.mjs → chunk-QHSLO3HS.mjs} +1 -1
- package/dist/{chunk-MOY7IRJM.mjs → chunk-QKYPHVDR.mjs} +1 -1
- package/dist/{chunk-2UWUPQW7.mjs → chunk-RFYZVJY2.mjs} +1 -1
- package/dist/{chunk-UKPP4YKH.mjs → chunk-S6OIYNTQ.mjs} +1 -1
- package/dist/{chunk-FQ7YROEC.mjs → chunk-SLQ6ORLK.mjs} +1 -1
- package/dist/{chunk-WOQHGX7V.mjs → chunk-SVAYP3BB.mjs} +1 -1
- package/dist/{chunk-6VO3THJJ.mjs → chunk-TADIAQVG.mjs} +1 -1
- package/dist/{chunk-BRBVYZWO.mjs → chunk-TUJ6DT7V.mjs} +1 -1
- package/dist/{chunk-R6G332AM.mjs → chunk-U2XFINKD.mjs} +1 -1
- package/dist/{chunk-D67BYQKS.mjs → chunk-U3ADZ3OT.mjs} +1 -1
- package/dist/{chunk-7DZXTSLA.mjs → chunk-VUWZ7HQN.mjs} +1 -1
- package/dist/chunk-XJD5SYZJ.mjs +1 -0
- package/dist/{chunk-DLRA36N6.mjs → chunk-XKENLG5T.mjs} +1 -1
- package/dist/{chunk-7O7ESF7V.mjs → chunk-XNTVVRCT.mjs} +1 -1
- package/dist/{chunk-QJNF42N3.mjs → chunk-ZFD62XLD.mjs} +1 -1
- package/dist/{chunk-FJDFWKWK.mjs → chunk-ZORLWBTQ.mjs} +1 -1
- package/dist/components/accordion-form.js +1 -15
- package/dist/components/accordion-form.mjs +1 -1
- package/dist/components/accordion.js +1 -15
- package/dist/components/accordion.mjs +1 -1
- package/dist/components/alert-dialog.js +1 -15
- package/dist/components/alert-dialog.mjs +1 -1
- package/dist/components/alert-message.js +1 -20
- package/dist/components/alert-message.mjs +1 -1
- package/dist/components/autocomplete-new.d.mts +1 -1
- package/dist/components/autocomplete-new.d.ts +1 -1
- package/dist/components/autocomplete-new.js +1 -17
- package/dist/components/autocomplete-new.mjs +1 -1
- package/dist/components/avatar.js +1 -1
- package/dist/components/avatar.mjs +1 -1
- package/dist/components/badge.js +1 -1
- package/dist/components/badge.mjs +1 -1
- package/dist/components/button.js +1 -15
- package/dist/components/button.mjs +1 -1
- package/dist/components/calendar-new.js +1 -16
- package/dist/components/calendar-new.mjs +1 -1
- package/dist/components/calendar.js +1 -16
- package/dist/components/calendar.mjs +1 -1
- package/dist/components/card-expandable.js +1 -20
- package/dist/components/card-expandable.mjs +1 -1
- package/dist/components/card-form.js +1 -15
- package/dist/components/card-form.mjs +1 -1
- package/dist/components/carousel.js +1 -16
- package/dist/components/carousel.mjs +1 -1
- package/dist/components/checkbox.js +1 -16
- package/dist/components/checkbox.mjs +1 -1
- package/dist/components/chip-context.js +1 -1
- package/dist/components/chip-context.mjs +1 -1
- package/dist/components/chip-form-complementary.js +1 -1
- package/dist/components/chip-form-complementary.mjs +1 -1
- package/dist/components/chip-form.d.mts +3 -3
- package/dist/components/chip-form.d.ts +3 -3
- package/dist/components/chip-form.js +1 -1
- package/dist/components/chip-form.mjs +1 -1
- package/dist/components/chip-input.js +1 -15
- package/dist/components/chip-input.mjs +1 -1
- package/dist/components/chip-status-table.d.mts +1 -1
- package/dist/components/chip-status-table.d.ts +1 -1
- package/dist/components/chip-status-table.js +1 -1
- package/dist/components/chip-status-table.mjs +1 -1
- package/dist/components/country-text-field.js +2 -17
- package/dist/components/country-text-field.mjs +1 -1
- package/dist/components/data-table.js +1 -20
- package/dist/components/data-table.mjs +1 -1
- package/dist/components/date-picker-new.js +1 -19
- package/dist/components/date-picker-new.mjs +1 -1
- package/dist/components/date-picker.js +1 -20
- package/dist/components/date-picker.mjs +1 -1
- package/dist/components/dialog.js +1 -16
- package/dist/components/dialog.mjs +1 -1
- package/dist/components/drawer.js +1 -16
- package/dist/components/drawer.mjs +1 -1
- package/dist/components/icons.js +1 -36
- package/dist/components/icons.mjs +1 -1
- package/dist/components/index.d.mts +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.js +2 -35
- package/dist/components/index.mjs +1 -1
- package/dist/components/list-item-arrow.js +1 -15
- package/dist/components/list-item-arrow.mjs +1 -1
- package/dist/components/list-item-button.js +1 -15
- package/dist/components/list-item-button.mjs +1 -1
- package/dist/components/list-item-checkbox-left.js +1 -16
- package/dist/components/list-item-checkbox-left.mjs +1 -1
- package/dist/components/list-item-checkbox.js +1 -16
- package/dist/components/list-item-checkbox.mjs +1 -1
- package/dist/components/list-item.js +1 -1
- package/dist/components/list-item.mjs +1 -1
- package/dist/components/phone-input.js +2 -17
- package/dist/components/phone-input.mjs +1 -1
- package/dist/components/popover.js +1 -1
- package/dist/components/popover.mjs +1 -1
- package/dist/components/popover_old.js +1 -1
- package/dist/components/popover_old.mjs +1 -1
- package/dist/components/radio.js +1 -1
- package/dist/components/radio.mjs +1 -1
- package/dist/components/rating.js +1 -16
- package/dist/components/rating.mjs +1 -1
- package/dist/components/scrollarea.js +1 -1
- package/dist/components/scrollarea.mjs +1 -1
- package/dist/components/search-bar.js +1 -18
- package/dist/components/search-bar.mjs +1 -1
- package/dist/components/select-new.js +1 -17
- package/dist/components/select-new.mjs +1 -1
- package/dist/components/select.js +1 -17
- package/dist/components/select.mjs +1 -1
- package/dist/components/separator.js +1 -1
- package/dist/components/separator.mjs +1 -1
- package/dist/components/skeleton.js +1 -1
- package/dist/components/skeleton.mjs +1 -1
- package/dist/components/snackbar.js +1 -16
- package/dist/components/snackbar.mjs +1 -1
- package/dist/components/switch.js +1 -1
- package/dist/components/switch.mjs +1 -1
- package/dist/components/tab.d.mts +1 -1
- package/dist/components/tab.d.ts +1 -1
- package/dist/components/tab.js +1 -15
- package/dist/components/tab.mjs +1 -1
- package/dist/components/table.js +1 -17
- package/dist/components/table.mjs +1 -1
- package/dist/components/text-field-helper-text.js +1 -1
- package/dist/components/text-field-helper-text.mjs +1 -1
- package/dist/components/text-field-new.js +1 -15
- package/dist/components/text-field-new.mjs +1 -1
- package/dist/components/text-field.js +1 -17
- package/dist/components/text-field.mjs +1 -1
- package/dist/components/textarea-new.js +1 -15
- package/dist/components/textarea-new.mjs +1 -1
- package/dist/components/textarea.js +1 -1
- package/dist/components/textarea.mjs +1 -1
- package/dist/components/time-picker-new.js +1 -17
- package/dist/components/time-picker-new.mjs +1 -1
- package/dist/components/time-picker.js +1 -18
- package/dist/components/time-picker.mjs +1 -1
- package/dist/components/toast.js +2 -19
- package/dist/components/toast.mjs +1 -1
- package/dist/components/tooltip.js +1 -1
- package/dist/components/tooltip.mjs +1 -1
- package/dist/inter-cyrillic-ext-wght-normal-IYF56FF6.woff2 +0 -0
- package/dist/inter-cyrillic-wght-normal-JEOLYBOO.woff2 +0 -0
- package/dist/inter-greek-ext-wght-normal-EOVOK2B5.woff2 +0 -0
- package/dist/inter-greek-wght-normal-IRE366VL.woff2 +0 -0
- package/dist/inter-latin-ext-wght-normal-HA22NDSG.woff2 +0 -0
- package/dist/inter-latin-wght-normal-NRMW37G5.woff2 +0 -0
- package/dist/plus-jakarta-sans-cyrillic-ext-wght-normal-JQUONSEA.woff2 +0 -0
- package/dist/plus-jakarta-sans-latin-ext-wght-normal-UBEBQO7H.woff2 +0 -0
- package/dist/plus-jakarta-sans-latin-wght-normal-XZSBT77D.woff2 +0 -0
- package/dist/plus-jakarta-sans-vietnamese-wght-normal-TOS5SH3L.woff2 +0 -0
- package/dist/styles/fonts.css +2 -2
- package/dist/styles/index.css +2 -2
- package/package.json +29 -29
- package/dist/chunk-4HYLZVI5.mjs +0 -36
- package/dist/chunk-BO6XI5BE.mjs +0 -1
- package/dist/chunk-QFU625UX.mjs +0 -1
- package/dist/inter-cyrillic-ext-wght-normal-ASVAGXXE.woff2 +0 -0
- package/dist/inter-cyrillic-wght-normal-EWLSKVKN.woff2 +0 -0
- package/dist/inter-greek-ext-wght-normal-7GGTF7EK.woff2 +0 -0
- package/dist/inter-greek-wght-normal-N43DBLU2.woff2 +0 -0
- package/dist/inter-latin-ext-wght-normal-5SRY4DMZ.woff2 +0 -0
- package/dist/inter-latin-wght-normal-O25CN4JL.woff2 +0 -0
- package/dist/plus-jakarta-sans-cyrillic-ext-wght-normal-3FNWYSHQ.woff2 +0 -0
- package/dist/plus-jakarta-sans-latin-ext-wght-normal-WWG75Y4U.woff2 +0 -0
- package/dist/plus-jakarta-sans-latin-wght-normal-S6EFCQOU.woff2 +0 -0
- package/dist/plus-jakarta-sans-vietnamese-wght-normal-NNXUV3SN.woff2 +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import {d}from'./chunk-FAMLJ6AJ.mjs';import {a as a$1}from'./chunk-
|
|
1
|
+
import {d}from'./chunk-FAMLJ6AJ.mjs';import {a as a$1}from'./chunk-JTO6FE4R.mjs';import {g}from'./chunk-5VHBHGBZ.mjs';import {a}from'./chunk-XJD5SYZJ.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-
|
|
1
|
+
import {a as a$1}from'./chunk-OG3OUJ6C.mjs';import {c}from'./chunk-JWB3TN2C.mjs';import {d}from'./chunk-5VHBHGBZ.mjs';import {a}from'./chunk-XJD5SYZJ.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:t,...o})=>{let n=useCallback(m=>{t?.(m.open);},[t]);return jsx(Dialog.Root,{unmountOnExit:true,lazyMount:true,onOpenChange:n,...o})},F=Dialog.Trigger,f=r.forwardRef(({className:t,children:o,...n},m)=>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-50 bg-neutral-900/50"}),jsx(Dialog.Positioner,{className:"fixed inset-0 z-50",children:jsx(Dialog.Content,{ref:m,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-50 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",t),...n,children:o})})]}));f.displayName="DialogContent";var D=({className:t,...o})=>jsx("div",{className:a("mr-4 mb-4 ml-6 flex flex-col gap-4 text-left",t),...o});D.displayName="DialogHeader";var u=({className:t,...o})=>jsxs("div",{children:[jsx(a$1,{className:"w-full"}),jsx("div",{className:a("mx-6 mt-3 flex justify-end gap-2",t),...o})]});u.displayName="DialogFooter";var M=({className:t,...o})=>jsx("div",{className:a("mx-6 mb-4.5",t),...o}),C=r.forwardRef(({className:t,...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",t),...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"})]})]}));C.displayName="DialogTitle";var R=r.forwardRef(({className:t,...o},n)=>jsx(Dialog.Description,{ref:n,className:a("font-inter text-sm leading-[130%] font-normal",t),...o}));R.displayName="DialogDescription";var O=t=>jsx(c,{variant:"contained",...t}),z=t=>jsx(Dialog.CloseTrigger,{asChild:true,children:jsx(c,{variant:"secondary",...t})}),L=t=>jsx(c,{variant:"ghost",...t});export{H as a,F as b,f as c,D as d,u as e,M as f,C as g,R as h,O as i,z as j,L as k};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {d}from'./chunk-
|
|
1
|
+
import {d}from'./chunk-5VHBHGBZ.mjs';import {a}from'./chunk-XJD5SYZJ.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"],b=tv({slots:{container:"flex cursor-default items-center gap-2 rounded-3xl transition-all",startIcon:"",closeIcon:"cursor-pointer"},variants:{variant:{standard:{},primary:{}},type:{fill:{},outlined:{}},size:{md:{container:"min-h-8 px-3",startIcon:"h-4.5 w-4.5",closeIcon:"h-4.5 w-4.5"},sm:{container:"min-h-6 px-3 text-sm",startIcon:"h-3.5 w-3.5",closeIcon:"h-3.5 w-3.5"},xs:{container:"min-h-4 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:"hover:bg-primary-100 text-neutral-700 ring-1 ring-neutral-700 ring-inset"}},{disabled:true,variant:"standard",type:"outlined",className:{container:"text-neutral-400 ring-1 ring-neutral-400 ring-inset"}},{disabled:false,variant:"primary",type:"outlined",className:{container:"text-primary-500 ring-primary-500 hover:bg-primary-100 ring-1 ring-inset"}}],defaultVariants:{disabled:false,size:"md"}}),g=forwardRef(({children:i,onClose:s,StartIcon:t,className:o,hasCloseIcon:l=true,disabled:a$1,variant:p,type:c,size:d$1,...m},u)=>{let{container:y,startIcon:I,closeIcon:f}=b({variant:p,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,l&&jsx(d,{onClick:()=>!a$1&&s?.(),className:f()})]})});g.displayName="ChipInput";export{V as a,L as b,R as c,g as d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {LoaderCircle,CircleCheck,CircleX,X as X$1,Info,TriangleAlert,ChevronDown,ChevronRight,ChevronLeft,Check,Minus,Moon,Star,Calendar,Clock,Search,CircleAlert,StarHalf,ChevronsDownUp,ChevronsUpDown,Calendar1,Clock9}from'lucide-react';var A=LoaderCircle,L=CircleCheck,M=CircleX,U=X$1,X=Info,m=TriangleAlert,u=ChevronDown,H=ChevronRight,R=ChevronLeft,T=Check,b=Minus,j=Moon,q=Star,y=Calendar,z=Clock,B=Search,E=CircleAlert,F=StarHalf,G=ChevronsDownUp,J=ChevronsUpDown,K=Calendar1,N=Clock9;export{A as a,L as b,M as c,U as d,X as e,m as f,u as g,H as h,R as i,T as j,b as k,j as l,q as m,y as n,z as o,B as p,E as q,F as r,G as s,J as t,K as u,N as v};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {c as c$1}from'./chunk-
|
|
1
|
+
import {c as c$1}from'./chunk-JWB3TN2C.mjs';import {f,b,c,e,d}from'./chunk-5VHBHGBZ.mjs';import {a}from'./chunk-XJD5SYZJ.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 pr-3 pl-4",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:"font-inter my-auto text-sm leading-[130%] text-neutral-900",description:"font-inter mt-1 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:v,description:I}=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:v({className:s&&"font-semibold"}),children:N}),s&&jsx("p",{className:I(),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 {a}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-GTPSQXE3.mjs';import {a as a$1}from'./chunk-XJD5SYZJ.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$2}from'./chunk-AI4D6AOK.mjs';import {c}from'./chunk-
|
|
1
|
+
import {c as c$2}from'./chunk-AI4D6AOK.mjs';import {c}from'./chunk-PTRXL7BY.mjs';import {c as c$1}from'./chunk-GBBE3RHT.mjs';import {d as d$1}from'./chunk-FAMLJ6AJ.mjs';import {a as a$1}from'./chunk-DHWOGUID.mjs';import {c as c$3}from'./chunk-JWB3TN2C.mjs';import {e,s,t}from'./chunk-5VHBHGBZ.mjs';import {a}from'./chunk-XJD5SYZJ.mjs';import {createElement,useCallback}from'react';import {tv}from'tailwind-variants';import {useCollapsibleContext,Collapsible}from'@ark-ui/react/collapsible';import {jsxs,jsx}from'react/jsx-runtime';var d=tv({slots:{root:"ring-expandable-card-border group/expandable-card flex h-fit flex-col rounded-lg ring transition-all duration-200 ease-in-out ring-inset",header:"flex pt-3 pr-1 pb-2 pl-3",headerLabel:"text-sm leading-[130%] font-semibold empty:hidden",complementaryText:"line-clamp-1 text-xs leading-[130%] text-neutral-900",subtitle:"line-clamp-1 text-xs leading-[130%] text-neutral-700",content:"data-[state=open]:animate-accordion-down data-[state=closed]:animate-accordion-up border-expandable-card-border overflow-hidden group-data-[state=open]/expandable-card:border-t",contentInner:"px-3 pt-4 pb-6",fixedContent:"border-expandable-card-border border-t px-3 pt-6 pb-4"},variants:{background:{white:{root:"bg-neutral-50"},gray:{root:"bg-neutral-100"}}},defaultVariants:{background:"white"}}),te=({headerLabel:o,complementaryText:t$1,subtitle:a$2,headerTooltip:n,className:c$4,action:l,chipStatus:i,chipExpandable:p,Icon:f,iconButtons:L,checkbox:m,...H})=>{let{header:I,headerLabel:k,complementaryText:w,subtitle:z}=d(),M=useCollapsibleContext();return jsxs("div",{...H,className:a(I(),c$4),children:[m&&jsx(c,{...m,className:a("m-1",m.className),size:"sm"}),jsxs("div",{className:"flex flex-1 flex-col gap-1",children:[jsxs("div",{className:"flex items-center justify-between gap-3",children:[jsxs("div",{className:"flex items-center gap-2",children:[f&&jsx(f,{className:"h-3.5 w-3.5 shrink-0"}),jsxs("p",{className:"flex items-center gap-2",children:[jsx("b",{className:k(),children:o}),t$1&&jsx("span",{className:w(),children:t$1}),n&&jsx(a$1,{content:n,contentClassName:"font-normal normal-case",children:jsx(e,{className:"h-3.5 w-3.5 shrink-0"})})]})]}),jsxs("div",{className:"flex items-center gap-2",children:[i&&jsx(d$1,{...i,size:"xs",type:"light"}),p&&jsx(c$1,{...p,type:"light"}),L?.map((s,b)=>createElement(c$2,{...s,key:s["aria-label"]?.toString()??b,variant:"standard",size:"xs"})),l&&(()=>{let{tooltipContent:s,...b}=l;return jsx(a$1,{content:s,disabled:!s,children:jsx(c$3,{...b,size:"xs",variant:"standard"})})})(),jsx(Collapsible.Trigger,{asChild:true,children:jsx(c$2,{Icon:M.open?s:t,variant:"standard",size:"xs"})})]})]}),a$2&&jsx("p",{className:z(),children:a$2})]})]})},ae=({className:o,...t})=>{let{contentInner:a,content:n}=d();return jsx(Collapsible.Content,{className:n(),children:jsx("div",{...t,className:a({className:o})})})},oe=({className:o,...t})=>{let{fixedContent:a}=d();return jsx("div",{...t,className:a({className:o})})},ne=({className:o,onOpenChange:t,children:a,background:n="white",...c})=>{let{root:l}=d({background:n}),i=useCallback(p=>{t?.(p);},[t]);return jsx(Collapsible.Root,{onOpenChange:i,className:l({className:o}),...c,children:a})};export{te as a,ae as b,oe as c,ne as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-XJD5SYZJ.mjs';import {RadioGroupRoot,RadioGroupItem,RadioGroupItemControl,RadioGroupItemText,RadioGroupItemHiddenInput}from'@ark-ui/react/radio-group';import {forwardRef,useCallback}from'react';import {jsx,jsxs}from'react/jsx-runtime';var k=["sm","md"],N=["horizontal","vertical"],b=forwardRef(({className:d,orientation:r="horizontal",onValueChange:o,size:e="md",error:i,...u},s)=>{let l=useCallback(m=>{o?.(m.value);},[o]);return jsx(RadioGroupRoot,{"data-error":i,"data-size":e,className:a("group flex",r==="horizontal"&&"flex gap-8",r==="vertical"&&e==="sm"&&"flex-col gap-2",r==="vertical"&&e==="md"&&"flex-col gap-3",d),orientation:r,ref:s,onValueChange:l,...u})});b.displayName="RadioGroup";var P=forwardRef(({value:d,label:r,className:o,...e},i)=>jsxs(RadioGroupItem,{value:d,className:a("group/item flex items-center gap-1.5",o),ref:i,...e,children:[jsx(RadioGroupItemControl,{className:a("relative rounded-full border-neutral-900 bg-neutral-50 transition-all after:absolute after:h-full after:w-full after:rounded-full after:border-transparent","data-[state=checked]:border-primary-500 data-[state=checked]:bg-primary-500 data-[state=checked]:after:border-neutral-50","group-data-[size=sm]:h-4 group-data-[size=sm]:w-4 group-data-[size=sm]:border-[1.5px] group-data-[size=sm]:after:border-2","group-data-[size=md]:h-5 group-data-[size=md]:w-5 group-data-[size=md]:border-2 group-data-[size=md]:after:border-3","group-data-disabled/item:border-neutral-400 data-[state=checked]:group-data-disabled/item:bg-neutral-400","group-data-[error=true]:border-error-500 data-[state=checked]:group-data-[error=true]:bg-error-500")}),r&&jsx(RadioGroupItemText,{className:a("font-inter leading-[130%]! text-neutral-900","group-data-[size=sm]:text-xs","group-data-[size=md]:text-sm","group-data-disabled/item:text-neutral-400","group-data-[error=true]:text-error-500"),children:r}),jsx(RadioGroupItemHiddenInput,{})]}));P.displayName="RadioGroupItem";export{k as a,N as b,b as c,P as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-
|
|
1
|
+
import {a as a$1}from'./chunk-DHWOGUID.mjs';import {q}from'./chunk-5VHBHGBZ.mjs';import {a}from'./chunk-XJD5SYZJ.mjs';import {Field}from'@ark-ui/react/field';import {forwardRef}from'react';import {jsx,jsxs}from'react/jsx-runtime';var v=forwardRef(({className:p,label:d,required:i,tooltip:s,helperText:x,error:t,placeholder:g,...l},m)=>jsx("div",{className:"w-full",children:jsxs(Field.Root,{"data-error":t,"data-readonly":l.readOnly,"data-disabled":l.disabled,className:a("group flex w-full flex-col data-[readonly]:pointer-events-none",p),children:[jsxs(Field.Label,{className:"font-inter flex items-center text-xs leading-[133.33%] font-medium text-neutral-700",children:[i?jsxs("span",{className:"flex items-center gap-1",children:[jsx("span",{className:"text-red-500",children:"*"}),d]}):d,s&&jsx(a$1,{content:s,className:"ml-2",children:jsx(q,{className:"size-3.5 text-neutral-700"})})]}),jsxs("div",{className:"mt-1.125 relative flex flex-col rounded-lg bg-neutral-50",children:[jsx(Field.Textarea,{ref:m,required:i,className:"no-scrollbar focus:ring-primary-800 group-data-[error=true]:ring-error-500 font-inter group-dta-[readony]:bg-neutral-100 h-20 w-full rounded-lg bg-neutral-50 p-3 text-sm leading-[142.86%] font-normal text-neutral-900 ring ring-neutral-500 transition-all ring-inset group-data-[disabled]:text-neutral-400 group-data-[disabled]:ring-neutral-400 group-data-[error=true]:pr-10.5 group-data-[error=true]:ring-2 group-data-[readonly]:bg-neutral-100 group-data-[readonly]:ring-neutral-300 placeholder:text-neutral-500 group-data-[disabled]:placeholder:text-neutral-400 focus:ring-2 focus:outline-none",placeholder:g,"aria-invalid":t,...l}),t&&jsx(q,{className:"text-error-500 absolute top-1/2 right-3 size-4.5 -translate-y-1/2 cursor-text"})]}),jsx(Field.HelperText,{className:a("text-2xs font-inter group-data-[error=true]:text-error-500 mx-2 mt-1 text-start text-xs leading-[133.33%] font-normal text-neutral-700 group-data-[disabled]:text-neutral-400 empty:hidden",t&&"text-error-500"),children:x})]})}));export{v as a};
|
|
@@ -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-GTPSQXE3.mjs';import {o}from'./chunk-5VHBHGBZ.mjs';import {a as a$3}from'./chunk-XJD5SYZJ.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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-XJD5SYZJ.mjs';import*as e from'@radix-ui/react-scroll-area';import {forwardRef,useRef,useEffect,useImperativeHandle}from'react';import {jsxs,jsx}from'react/jsx-runtime';var b=forwardRef(({className:c,children:r,onScrollEnd:a$1,isInfiniteScroll:o=false,viewPortClassName:v,viewPortStyle:S,...A},p)=>{let l=useRef(null);return useEffect(()=>{if(!o)return;let s=()=>{if(l.current){let{scrollTop:u,scrollHeight:P,clientHeight:R}=l.current;u+R>=P-10&&a$1?.();}},m=l.current;return m?.addEventListener("scroll",s),()=>{m?.removeEventListener("scroll",s);}},[a$1,o]),useImperativeHandle(p,()=>l.current,[l]),jsxs(e.Root,{className:a("relative overflow-hidden",c),...A,children:[jsx(e.Viewport,{ref:l,className:a("h-full w-full rounded-[inherit] [&>div]:flex! [&>div]:h-full [&>div]:flex-col",v),style:S,children:r}),jsx(f,{forceMount:o},o?l.current?.scrollHeight:1),jsx(e.Corner,{})]})});b.displayName=e.Root.displayName;var f=forwardRef(({className:c,orientation:r="vertical",...a$1},o)=>jsx(e.ScrollAreaScrollbar,{ref:o,orientation:r,className:a("flex touch-none select-none bg-neutral-100 transition-colors",r==="vertical"&&"h-full w-4 py-2",r==="horizontal"&&"h-4 flex-col px-2",c),...a$1,children:jsx(e.ScrollAreaThumb,{className:a("relative flex-1 rounded-sm bg-primary-500",r==="vertical"&&"mx-1 w-2",r==="horizontal"&&"my-1 h-2")})}));f.displayName=e.ScrollAreaScrollbar.displayName;export{b as a,f as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-XJD5SYZJ.mjs';import {TooltipRoot,TooltipTrigger,TooltipPositioner,TooltipContent,TooltipArrow,TooltipArrowTip}from'@ark-ui/react/tooltip';import {jsxs,jsx}from'react/jsx-runtime';var A=({closeDelay:r=500,closeOnClick:l=true,closeOnEscape:n=true,closeOnPointerDown:p=true,closeOnScroll:s=true,interactive:d=true,lazyMount:g=false,openDelay:c=700,unmountOnExit:m=false,content:h,children:o,asChild:a$1=true,contentClassName:T,className:f,...x})=>jsxs(TooltipRoot,{closeDelay:r,closeOnClick:l,closeOnEscape:n,closeOnPointerDown:p,closeOnScroll:s,interactive:d,lazyMount:g,openDelay:c,unmountOnExit:m,...x,children:[jsx(TooltipTrigger,{asChild:a$1,className:a("cursor-inherit text-left",f),children:a$1?jsx("div",{children:o}):o}),jsx(TooltipPositioner,{children:jsxs(TooltipContent,{className:a("font-inter z-30 rounded-lg bg-neutral-900 px-3 py-2 text-center text-sm leading-[142.86%] whitespace-break-spaces text-neutral-50","data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95","data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95","data-[placement=left]:text-right data-[placement=left-end]:text-right data-[placement=left-start]:text-right","data-[placement=left]:origin-right data-[placement=left-end]:origin-bottom-right data-[placement=left-start]:origin-top-right","data-[placement=right-end]:right-right data-[placement=right]:text-right data-[placement=right-start]:text-right","data-[placement=right]:origin-left data-[placement=right-end]:origin-bottom-left data-[placement=right-start]:origin-top-left","data-[placement=top]:origin-bottom data-[placement=top-end]:origin-bottom-right data-[placement=top-start]:origin-bottom-left","data-[placement=bottom]:origin-top data-[placement=bottom-end]:origin-top-right data-[placement=bottom-start]:origin-top-left","data-[placement=left]:text-right data-[placement=left-end]:text-right data-[placement=left-start]:text-right","data-[placement=right]:text-left data-[placement=right-end]:text-left data-[placement=right-start]:text-left",T),children:[jsx(TooltipArrow,{children:jsx(TooltipArrowTip,{})}),h]})})]});export{A as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a}from'./chunk-GTPSQXE3.mjs';import {p}from'./chunk-5VHBHGBZ.mjs';import {forwardRef}from'react';import {jsx}from'react/jsx-runtime';var s=forwardRef(({size:t="md",...p$1},m)=>jsx(a,{endIcon:jsx(p,{}),type:"search",...p$1,size:t,ref:m}));export{s as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$1,b,c as c$1,g,h,d,e as e$1,i,j,f}from'./chunk-
|
|
1
|
+
import {a as a$1,b,c as c$1,g,h,d,e as e$1,i,j,f}from'./chunk-RFYZVJY2.mjs';import {c}from'./chunk-PTRXL7BY.mjs';import {a}from'./chunk-DHWOGUID.mjs';import {e}from'./chunk-5VHBHGBZ.mjs';import {useState,useRef,useEffect,useMemo,useCallback}from'react';import {useReactTable,getPaginationRowModel,getCoreRowModel,flexRender}from'@tanstack/react-table';import {jsx,jsxs}from'react/jsx-runtime';function Ge({columns:w,data:m,rowsCount:T,pagination:b$1,onPaginationChange:O,noResults:oe,rowsPerPageText:ie="Rows per page",ofText:re="of",onNextPageClick:se,onPreviousPageClick:le,disableNextPage:_,disablePreviousPage:E,className:ce,onRowsPerPageChange:de,columnOrder:ge,columnVisibility:ue,rowsPerPageOptions:pe,enableRowSelection:h$1=false,getRowId:V,selectedRowIds:r,onSelectedRowIdsChange:y,onSelectedRowDataByIdChange:u,isRowSelectable:p,rowSelectionTooltip:M,setDisabledRowState:C,...fe}){let[g$1,N]=useState(new Map),F=useRef(r),L=useRef(g$1);useEffect(()=>{F.current=r;},[r]),useEffect(()=>{L.current=g$1;},[g$1]),useEffect(()=>{let t=Array.isArray(r)?new Set(r.map(String)):new Set(Array.from(r??[]).map(String));if(!g$1.size)return;let e=new Map;g$1.forEach((n,i)=>{t.has(i)&&e.set(i,n);}),e.size!==g$1.size&&(N(e),u?.(e));},[r,g$1,u]);let P=(t,e)=>{if(V)return V(t);let n=t?.id;if(n!=null)return String(n);if(h$1)throw new Error("DataTable requires getRowId or rows with an 'id' field when row selection is enabled");return String(e??"")},R=useMemo(()=>r?Array.isArray(r)?new Set(r.map(String)):new Set(Array.from(r).map(String)):new Set,[r]),G=useMemo(()=>{let t={};return m.forEach((e,n)=>{let i=P(e,n);R.has(i)&&(t[i]=true);}),t},[m,R]),W=useCallback(t=>{let e=p?!p(t):false,n=e?typeof C=="function"?C(t):C:void 0;return {disabledBySelectable:e,disabledState:n}},[p,C]),me=useMemo(()=>h$1?[{id:"__select__",size:48,header:({table:e})=>{let n=e.getRowModel().rows,i=p?n.filter(s=>p(s.original)):n,c$1=i.length,o=0;for(let s of i)s.getIsSelected()&&o++;return jsx(c,{size:"sm",checked:c$1===0||o===0?false:o===c$1?true:"indeterminate",disabled:c$1===0,onCheckedChange:s=>{let v=F.current,z=new Set(Array.isArray(v)?v.map(String):Array.from(v??[]).map(String)),Se=s===true||s==="indeterminate";for(let A of i){let f=String(A.id);Se?z.add(f):z.delete(f);}if(y?.(z),u){let A=L.current,f=new Map(A),he=s===true||s==="indeterminate";for(let $ of i){let q=String($.id);he?f.set(q,$.original):f.delete(q);}N(f),u(f);}}})},cell:({row:e})=>{let{disabledBySelectable:n,disabledState:i}=W(e.original),c$1=n?i??false:e.getIsSelected(),o=jsx(c,{size:"sm",checked:c$1,onCheckedChange:x=>e.toggleSelected(x===true),disabled:n}),d=M?.content(e.original);return d?jsx(a,{className:"w-fit",content:d,positioning:M?.positioning??{placement:"right"},children:o}):o},enableSorting:false},...w]:w,[h$1,w,y,u,M,W]),l=useReactTable({data:m,columns:me,rowCount:T,state:{pagination:b$1,columnOrder:ge,columnVisibility:ue,rowSelection:G},onPaginationChange:O,manualPagination:true,getCoreRowModel:getCoreRowModel(),getPaginationRowModel:getPaginationRowModel(),enableRowSelection:p?t=>p(t.original):h$1,getRowId:(t,e)=>P(t,e),onRowSelectionChange:t=>{let n=typeof t=="function"?t(G):t,i=new Set(m.map((o,d)=>P(o,d))),c=new Set(R);for(let o of i)!!n[o]?c.add(String(o)):c.delete(String(o));if(y?.(c),u){let o=new Map(g$1);m.forEach((d,x)=>{let s=P(d,x);n[s]?o.set(String(s),d):o.delete(String(s));}),N(o),u(o);}}}),Te=useMemo(()=>E||!!T&&!l.getCanPreviousPage(),[E,T,b$1?.pageIndex]),be=useMemo(()=>_||!!T&&!l.getCanNextPage(),[_,T,b$1?.pageIndex]);return l.getRowModel().rows?.length?jsxs(a$1,{className:ce,...fe,children:[jsxs(b,{children:[jsx("colgroup",{children:l.getHeaderGroups()[0].headers.map(t=>{let e=t.column.getSize()/l.getHeaderGroups()[0].headers.reduce((n,i)=>n+i.getSize(),0)*100;return jsx("col",{span:1,style:{width:`${e}%`,minWidth:`${t.column.getSize()}px`}},t.id)})}),jsx(c$1,{children:l.getHeaderGroups().map(t=>jsx(g,{children:t.headers.map(e$1=>{let n=e$1.column.columnDef;return jsx(h,{children:jsxs("div",{className:"flex items-center",children:[e$1.isPlaceholder?null:e$1.column.id==="__select__"||n.headerTooltip===false?jsx("span",{className:"line-clamp-1 text-xs leading-[130%] uppercase",children:flexRender(n.header,e$1.getContext())}):jsx(a,{content:typeof n.headerTooltip=="boolean"||n.headerTooltip===void 0?flexRender(n.header,e$1.getContext()):n.headerTooltip,contentClassName:"font-normal normal-case",children:jsx("span",{className:"line-clamp-1 text-xs leading-[130%] uppercase",children:flexRender(n.header,e$1.getContext())})}),n.headerInfoTooltip&&jsx(a,{content:n.headerInfoTooltip,contentClassName:"font-normal normal-case",children:jsx(e,{className:"ml-1 w-[0.875rem] shrink-0"})})]})},e$1.id)})},t.id))}),jsx(d,{children:l.getRowModel().rows.map(t=>jsx(e$1,{"data-state":t.getIsSelected()&&"selected",children:t.getVisibleCells().map(e=>jsx(i,{children:flexRender(e.column.columnDef.cell,e.getContext())},e.id))},t.id))})]}),b$1&&O&&m.length>0&&jsx(j,{rowsPerPageOptions:pe,rowsCount:T,pagination:b$1,onRowsPerPageChange:t=>{l.setPageSize(t),l.setPageIndex(0),de?.(t);},onPreviousPageClick:()=>{l.previousPage(),le?.();},onNextPageClick:()=>{l.nextPage(),se?.();},disableNextPage:be,disablePreviousPage:Te,ofText:re,rowsPerPageText:ie})]}):jsx(f,{...oe})}export{Ge as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-XJD5SYZJ.mjs';import {forwardRef}from'react';import {cva}from'cva';import {jsxs,jsx}from'react/jsx-runtime';var j=["zoro","ussop","crocodile","silvers","buggy","nami","shanks","piiman","sanji","ace","hancock","chopper","bentham","ivankov","brook","luffy","frankie","jinbe","robin","law"],g={zoro:"bg-zoro-300 not-disabled:hover:bg-zoro-500 text-sunny-800",ussop:"bg-ussop-300 not-disabled:hover:bg-ussop-500 text-sunny-800",crocodile:"bg-crocodile-300 not-disabled:hover:bg-crocodile-500 text-sunny-800",silvers:"bg-silvers-300 not-disabled:hover:bg-silvers-500 text-sunny-800",buggy:"bg-buggy-300 not-disabled:hover:bg-buggy-500 text-sunny-800",nami:"bg-nami-300 not-disabled:hover:bg-nami-500 text-polartang-800",shanks:"bg-shanks-300 not-disabled:hover:bg-shanks-500 text-polartang-800",piiman:"bg-piiman-300 not-disabled:hover:bg-piiman-500 text-polartang-800",sanji:"bg-sanji-300 not-disabled:hover:bg-sanji-500 text-polartang-800",ace:"bg-ace-300 not-disabled:hover:bg-ace-500 text-polartang-800",hancock:"bg-hancock-300 not-disabled:hover:bg-hancock-500 text-merry-800",chopper:"bg-chopper-300 not-disabled:hover:bg-chopper-500 text-merry-800",bentham:"bg-bentham-300 not-disabled:hover:bg-bentham-500 text-merry-800",ivankov:"bg-ivankov-300 not-disabled:hover:bg-ivankov-500 text-merry-800",brook:"bg-brook-300 not-disabled:hover:bg-brook-500 text-merry-800",luffy:"bg-luffy-300 not-disabled:hover:bg-luffy-500 text-jackson-800",frankie:"bg-frankie-300 not-disabled:hover:bg-frankie-500 text-jackson-800",jinbe:"bg-jinbe-300 not-disabled:hover:bg-jinbe-500 text-jackson-800",robin:"bg-robin-300 not-disabled:hover:bg-robin-500 text-jackson-800",law:"bg-law-300 not-disabled:hover:bg-law-500 text-jackson-800"},c=cva({base:"flex w-fit items-center justify-center rounded-lg px-3 py-1 text-sm transition-all",variants:{variant:g,size:{sm:"h-8 text-sm leading-[130%]",md:"h-10 leading-[130%]"},selected:{true:"ring-2 ring-primary-800",false:"ring-0"},disabled:{true:"bg-neutral-100 text-neutral-400 ring-0"}},defaultVariants:{size:"md"}}),V=forwardRef(({children:a$1,variant:n,size:i,selected:e,onChangeSelected:s,className:b,disabled:t,StartIcon:o,...p},m)=>jsxs("button",{ref:m,type:"button",disabled:t,onClick:()=>s?.(!e),className:a(c({variant:n,size:i,selected:e,disabled:t}),b),...p,children:[o&&jsx(o,{size:18,className:"mr-2"}),a$1]}));export{j as a,g as b,V as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-
|
|
1
|
+
import {a as a$1}from'./chunk-OG3OUJ6C.mjs';import {c}from'./chunk-JWB3TN2C.mjs';import {a}from'./chunk-XJD5SYZJ.mjs';import*as r from'react';import*as t from'@radix-ui/react-alert-dialog';import {jsx,jsxs}from'react/jsx-runtime';var N=t.Root,x=t.Trigger,p=t.Portal,f=t.Cancel,m=r.forwardRef(({className:e,...a$1},l)=>jsx(t.Overlay,{ref:l,className:a("bg-black/80 fixed inset-0 z-50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...a$1}));m.displayName=t.Overlay.displayName;var g=r.forwardRef(({className:e,children:a$1,...l},c)=>jsxs(p,{children:[jsx(m,{className:"bg-neutral-900/50"}),jsx(t.Content,{ref:c,className:a("elevation-9 fixed left-[50%] top-[50%] z-10000 grid w-full max-w-2xl translate-x-[-50%] translate-y-[-50%] rounded-2xl bg-neutral-50 py-3 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 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]",e),...l,children:a$1})]}));g.displayName=t.Content.displayName;var T=e=>jsx(c,{variant:"contained",...e}),b=e=>jsx(f,{asChild:true,children:jsx(c,{variant:"secondary",...e})}),B=e=>jsx(c,{variant:"ghost",...e}),D=({className:e,...a$1})=>jsx("div",{className:a("mx-6 mb-4 flex flex-col gap-4 text-left",e),...a$1});D.displayName="AlertDialogHeader";var A=({className:e,...a$2})=>jsxs("div",{children:[jsx(a$1,{className:"w-full"}),jsx("div",{className:a("mt-3 flex justify-end gap-2 px-6",e),...a$2})]});A.displayName="AlertDialogFooter";var v=r.forwardRef(({className:e,...a$1},l)=>jsx(t.Title,{ref:l,className:a("font-jakarta text-lg font-semibold leading-[160%]",e),...a$1}));v.displayName=t.Title.displayName;var P=r.forwardRef(({className:e,...a$1},l)=>jsx(t.Description,{ref:l,className:a("font-inter text-sm font-normal leading-[130%]",e),...a$1}));P.displayName=t.Description.displayName;var E=({className:e,...a$1})=>jsx("div",{className:a("mb-4.5 mx-6",e),...a$1});export{N as a,x as b,p as c,m as d,g as e,T as f,b as g,B as h,D as i,A as j,v as k,P as l,E as m};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {i,h}from'./chunk-
|
|
1
|
+
import {i,h}from'./chunk-5VHBHGBZ.mjs';import {a}from'./chunk-XJD5SYZJ.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$1}from'./chunk-
|
|
1
|
+
import {a as a$1}from'./chunk-HU2EH7B6.mjs';import {q,d,g as g$1}from'./chunk-5VHBHGBZ.mjs';import {a}from'./chunk-XJD5SYZJ.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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-
|
|
1
|
+
import {a as a$1}from'./chunk-OG3OUJ6C.mjs';import {c}from'./chunk-JWB3TN2C.mjs';import {a}from'./chunk-XJD5SYZJ.mjs';import {jsx,jsxs}from'react/jsx-runtime';var v=({children:e,className:r,...o})=>jsx("div",{...o,className:a("bg-neutral-80 @container rounded-lg border border-neutral-200",r),children:e}),u=({title:e,buttons:r,...o})=>jsxs("div",{...o,children:[jsxs("div",{className:"flex items-center justify-between gap-2.5 px-3 py-2 empty:hidden",children:[!!e&&jsx("h2",{className:"text-lg font-medium",children:e}),!!r&&r?.length>0&&jsx("div",{className:"ml-auto flex gap-2",children:r?.map((i,p)=>jsx(c,{...i,size:"sm"},p))})]}),jsx(a$1,{})]}),P=({children:e,className:r,...o})=>jsx("div",{...o,className:a("px-3 py-4",r),children:e}),y=({children:e,ignorePadding:r=false,innerClassName:o,...i})=>jsxs("div",{...i,children:[jsx(a$1,{}),jsx("div",{className:a(o,!r&&"px-3 py-4"),children:e})]});export{v as a,u as b,P as c,y as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-XJD5SYZJ.mjs';import {jsx,Fragment}from'react/jsx-runtime';var x=({error:l,helperText:e,disabled:o})=>jsx(Fragment,{children:e&&jsx("span",{className:a("mx-4 mt-1 text-start text-xs leading-[130%] text-neutral-600",o&&"text-neutral-400",l&&"text-error-700"),children:e})}),n=x;export{n as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {d}from'./chunk-463DMFCV.mjs';import {a as a$5}from'./chunk-KTRSJBA4.mjs';import {a as a$4}from'./chunk-5JYXZUPM.mjs';import {c as c$3}from'./chunk-AI4D6AOK.mjs';import {c as c$2}from'./chunk-WRCFKTIJ.mjs';import {c as c$4}from'./chunk-GBBE3RHT.mjs';import {d as d$1}from'./chunk-FAMLJ6AJ.mjs';import {a as a$1}from'./chunk-T2IU5QUU.mjs';import {a}from'./chunk-WOQHGX7V.mjs';import {a as a$3}from'./chunk-SXEHG5TZ.mjs';import {c}from'./chunk-KKWH3QUT.mjs';import {c as c$1,h}from'./chunk-4HYLZVI5.mjs';import {a as a$2}from'./chunk-BO6XI5BE.mjs';import be,{createContext,useMemo,useCallback,useContext,useRef,useEffect,useState,useId}from'react';import*as Ie from'@radix-ui/react-portal';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var Qe=be.memo(({handleSelect:e,NoResultsIcon:i,noResultsLabel:t,noResultsDescription:o,noResultsDescriptionLines:s,noResultsAsColumn:p,noResultsButtonOnClick:n,optionDescriptionLines:r,noResultsButtonLabel:l,filteredOptions:u,inputRect:c$1,inputRef:f,popoverPosition:C,optionsListRef:v,selectedOption:b,options:g,setFilteredOptions:R})=>jsx(Ie.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:c$1?{width:`${c$1.width}px`,left:c$1.left,top:C==="bottom"?`${c$1.bottom}px`:void 0,bottom:C==="top"?`${window.innerHeight-c$1.top}px`:void 0}:void 0,children:[u.length===0&&jsxs("div",{className:"elevation-8 max-h-88 flex flex-1 flex-col justify-center rounded-lg bg-neutral-50",children:[jsx(a,{title:t,description:o,Icon:i,iconAsColumn:p,descriptionLines:s}),n&&jsxs(Fragment,{children:[jsx(a$1,{}),jsx(c,{variant:"ghost",className:"my-3 w-fit self-center",onClick:a=>{v.current.style.display="none",f.current.value="",R(g),n();},children:l})]})]}),u.map(a=>jsx(ke,{title:a.label,disabled:a.disabled,description:a.description,descriptionLines:r,onClick:()=>e(a),className:a$2(b?.value===a.value&&"bg-primary-200")},a.key??a.value))]})})),Pe=Qe;var Ze=336,eo=({options:e,defaultSelectedOption:i,onSelect:t,onClick:o,onInputChange:s,error:p,helperText:n,label:r,placeholder:l,value:u,size:c="md",optionDescriptionLines:f=1,noResultsLabel:C,noResultsIcon:v,noResultsDescription:b,noResultsDescriptionLines:g,noResultsAsColumn:R,noResultsButtonOnClick:a,noResultsButtonLabel:N,className:L,disabled:P})=>{let[m,M]=useState(i??null),O=useRef(null),d=useRef(null),[pe,ue]=useState(),[ce,z]=useState([]),[me,W]=useState("bottom"),[U,ee]=useState(),q=Ze,V=useCallback(x=>{O.current.style.display="none",d.current.value=x.label,M(x),t?.(x);},[t]),w=useCallback(()=>{if(!d?.current)return;let x=d.current.getBoundingClientRect();ue(x);let k=U?U.height:q,I=window.innerHeight-x.bottom>k,te=x.top>k;W(I?"bottom":te?"top":"bottom");},[U?.height]),J=useCallback(()=>{let x=e.filter(k=>k.label.toLowerCase().includes(d?.current?.value.toLowerCase()??""));if(z(x),O?.current){let k=O.current.getBoundingClientRect();ee(k);}},[e]);return useEffect(()=>{z(e);},[e]),useEffect(()=>{if(!u){M(null),d.current&&(d.current.value="");return}(!d.current?.value||m?.value!==u.value)&&(M(u),d.current.value=u.label);},[u]),a$5(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",J),window.addEventListener("scroll",w,true),window.addEventListener("resize",w),()=>{d.current?.removeEventListener("mousedown",w),d.current?.removeEventListener("input",J),window.removeEventListener("scroll",w,true),window.removeEventListener("resize",w);}},[w,J]),jsxs("div",{className:a$2("relative",L),children:[jsx(a$4,{ref:d,autoComplete:"off",list:"",selectMode:true,onChange:x=>{x.target.value||(M(null),t?.(null)),s?.(x);},onClean:()=>{M(null),z(e),t?.(null);},onClick:x=>{O.current.style.display="flex",o?.(x);},onBlur:()=>{m&&d.current&&(d.current.value=m.label);},label:r,helperText:n,placeholder:l,size:c,error:p,disabled:P}),jsx(Pe,{handleSelect:V,noResultsLabel:C,NoResultsIcon:v,optionDescriptionLines:f,noResultsAsColumn:R,noResultsButtonLabel:N,noResultsButtonOnClick:a,noResultsDescription:b,noResultsDescriptionLines:g,filteredOptions:ce,inputRect:pe,inputRef:d,popoverPosition:me,optionsListRef:O,selectedOption:m,options:e,setFilteredOptions:z})]})};var et=({children:e,title:i,titleLines:t,description:o="",descriptionLines:s,disabled:p=false,className:n,...r})=>jsxs("div",{className:"flex w-full flex-col gap-1",...r,children:[jsx("p",{className:a$2("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$2("text-xs leading-[130%]",p?"text-neutral-400":"text-neutral-700"),style:s?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:s}:void 0,children:o})]}),H=et;var ao=({children:e,title:i,titleLines:t,description:o="",descriptionLines:s,startIcon:p,badgeContent:n,hasDivider:r=false,disabled:l=false,onSelect:u,className:c,...f})=>jsxs(y,{hasDescription:!!o,disabled:l,onClick:u,hasDivider:r,className:a$2(!l&&"cursor-pointer",c),...f,children:[p&&be.cloneElement(p,{className:"shrink-0 mr-2 h-4.5 w-4.5"}),jsx(H,{title:i,titleLines:t,description:o,descriptionLines:s,disabled:l}),jsxs("div",{className:"ml-4 flex gap-2",children:[n&&jsx(a$3,{content:n,size:"lg",variant:"alert",className:a$2("self-center",l&&"bg-neutral-400")}),jsx(h,{className:"h-4.5 w-4.5 self-center"})]})]});var He=({children:e,title:i,titleLines:t=1,description:o="",descriptionLines:s,startIcon:p,hasDivider:n=false,disabled:r=false,checked:l,onCheckedChange:u,className:c,...f})=>jsxs(y,{hasDescription:!!o,disabled:r,hasDivider:n,...f,className:a$2("pr-6",c),children:[p&&be.cloneElement(p,{className:"shrink-0 w-4.5 h-4.5 mr-2"}),jsx(H,{title:i,titleLines:t,description:o,descriptionLines:s,disabled:r}),jsx(c$2,{size:"sm",checked:l,onCheckedChange:u,className:"ml-4 self-center",disabled:r})]});var F=336,Se=createContext({inputRef:null,optionsListRef:null,autocompleteId:"",inputRect:void 0,showChips:false,filteredOptions:[],currentFocus:-1,popoverPosition:"bottom",setFilteredOptions:()=>{},setCurrentFocus:()=>{},setShowChips:()=>{},setPopoverPosition:()=>{},setInputRect:()=>{},optionsListHeight:F,setOptionsListHeight:()=>{},optionsListRect:void 0,setOptionsListRect:()=>{}}),D=()=>{let e=useContext(Se);if(e===null)throw new Error("useAutocompleteMultipleContext must be used within a AutocompleteMultipleProvider");return e},Be=({children:e})=>{let i=useRef(null),t=useRef(null),o=useId(),[s,p]=useState(),[n,r]=useState(true),[l,u]=useState([]),[c,f]=useState(-1),[C,v]=useState("bottom"),[b,g]=useState(),[R,a]=useState(F);return jsx(Se.Provider,{value:{optionsListRef:i,inputRef:t,autocompleteId:o,inputRect:s,showChips:n,filteredOptions:l,currentFocus:c,popoverPosition:C,setFilteredOptions:u,setCurrentFocus:f,setShowChips:r,setPopoverPosition:v,setInputRect:p,optionsListHeight:R,optionsListRect:b,setOptionsListRect:g,setOptionsListHeight:a},children:e})};var mt=({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})},ze=mt;var ht=150,bt=be.memo(({selectedOptions:e,error:i,onCleanSelectedOptions:t,disabled:o,size:s})=>{let{autocompleteId:p,inputRect:n,inputRef:r,optionsListRef:l}=D(),u=be.useRef(null),[c,f]=be.useState(new Map),C=useMemo(()=>{if(!n?.width)return [];let b=0,g=n.width-ht,R=0;for(let a=0;a<e.length&&(R+=c.get(a)??0,!(R>g));a++)b++;return e.slice(0,b)},[n?.width,e,c]),v=useCallback(()=>{o||(r?.current?.focus(),l.current.style.display="flex");},[o]);return jsxs("div",{onClick:v,className:a$2("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:u,children:C.map((b,g)=>jsx(ze,{option:b,onMountWidth:R=>f(a=>new Map(a).set(g,R)),size:s},`chip-input-${p}-${b.value}`))}),e.length>C.length&&jsx("span",{className:"text-base",children:"..."}),e.length>0&&!i&&jsx(a$3,{content:String(e.length),size:s}),i&&e.length>0&&jsx(c$1,{className:"h-6 w-6 text-error-700",onClick:b=>{b.stopPropagation(),t();}})]})}),We=bt;var xt=be.memo(({option:e,index:i,onPressOption:t,isSelected:o,optionDescriptionLines:s})=>{let{currentFocus:p,inputRef:n}=D();return jsx(He,{title:e.label,checked:o,disabled:e.disabled,className:p===i?"bg-primary-200":void 0,onMouseDown:r=>{e.disabled||(n?.current?.value&&r.preventDefault(),t?.(e,r));},description:e.description,descriptionLines:s})}),Le=xt;var Mt=be.memo(({selectedOptions:e,handleSelect:i,NoResultsIcon:t,noResultsLabel:o,noResultsDescription:s,noResultsDescriptionLines:p,noResultsAsColumn:n,noResultsButtonOnClick:r,optionDescriptionLines:l,noResultsButtonLabel:u})=>{let{popoverPosition:c$1,optionsListRef:f,filteredOptions:C,inputRect:v,autocompleteId:b,inputRef:g,optionsListHeight:R}=D(),a$2=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(Ie.Root,{asChild:true,children:jsxs("div",{ref:f,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:c$1==="bottom"?`${v.bottom}px`:void 0,bottom:c$1==="top"?`${window.innerHeight-v.top}px`:void 0,maxHeight:R+"px"}:void 0,children:[C.length===0&&jsxs("div",{className:"elevation-8 max-h-88 flex flex-1 flex-col justify-center rounded-lg bg-neutral-50",children:[jsx(a,{title:o,description:s,Icon:t,iconAsColumn:n,descriptionLines:p}),r&&jsxs(Fragment,{children:[jsx(a$1,{}),jsx(c,{variant:"ghost",className:"my-3 w-fit self-center",onClick:L=>{f.current.style.display="none",g.current.value="",r();},children:u})]})]}),N.map((L,P)=>jsx(Le,{option:L,index:P,onPressOption:m=>i(m),isSelected:a$2(L),optionDescriptionLines:l},`autocomplete-option-${b}-${L.key??L.value}`)),C.map((L,P)=>!e.some(m=>m.value===L.value)&&jsx(Le,{option:L,index:P,onPressOption:m=>i(m),isSelected:a$2(L),optionDescriptionLines:l},`autocomplete-option-${b}-${L.key??L.value}`))]})})}),$e=Mt;var It=be.memo(({selectedOptions:e,onSelect:i,error:t,helperText:o,label:s,placeholder:p,options:n,onInputChange:r,size:l,disabled:u})=>{let{setCurrentFocus:c,setFilteredOptions:f,optionsListRef:C,inputRef:v}=D();return jsx(a$4,{ref:v,autoComplete:"off",list:"",disabled:u,selectMode:true,onChange:b=>{c(-1),r?.(b.target.value);},onClean:()=>{c(-1),f(n),i?.(null,e);},onClick:()=>{u||(C.current.style.display="flex");},error:t,helperText:o,label:s,placeholder:p,fixedTopLabel:e.length>0,size:l})}),Ge=It;var _e=({options:e,defaultSelectedOptions:i,onSelect:t,error:o,helperText:s,label:p,placeholder:n,noResultsLabel:r,noResultsIcon:l,noResultsDescription:u,noResultsDescriptionLines:c,noResultsAsColumn:f,noResultsButtonOnClick:C,noResultsButtonLabel:v,className:b,onInputChange:g,value:R,loading:a,size:N="md",optionDescriptionLines:L=1,disabled:P})=>{let{inputRef:m,optionsListRef:M,setFilteredOptions:O,setShowChips:d,setInputRect:pe,setPopoverPosition:ue,setCurrentFocus:ce,showChips:z,setOptionsListRect:me,optionsListRect:W,setOptionsListHeight:U}=D(),ee=useRef(false),[q,V]=useState(i??[]),w=useCallback(A=>{V(E=>{let T,K=E.findIndex(Je=>Je.value===A.value);return K===-1?(T=E.concat(A),t?.(A,T),T):(T=E.toSpliced(K,1),t?.(A,T),T)});},[t]),J=useCallback(()=>{V([]),O(e),t?.(null,[]);},[]),x=useCallback(()=>{d(false);},[]),k=useCallback(()=>{d(true);},[]),I=useCallback(()=>{if(!m?.current)return;let A=m.current.getBoundingClientRect();pe(A);let E=W?W.height>F?F:W.height:F,T=window.innerHeight-A.bottom>E,K=A.top>E;ue(T?"bottom":K?"top":"bottom"),U(K?F:window.innerHeight-A.bottom>F?F:window.innerHeight-A.bottom);},[W?.height]),te=useCallback(()=>{let A=e.filter(E=>E.label.toLowerCase().includes(m?.current?.value.toLowerCase()??""));if(O(A),M?.current){let E=M.current.getBoundingClientRect();me(E);}},[e,M?.current]);return useEffect(()=>{O(e);},[e]),a$5(M,()=>{M.current.style.display="none",ce(-1);}),useEffect(()=>{if(m?.current)return I(),m.current.addEventListener("mousedown",I),m.current.addEventListener("input",te),m.current.addEventListener("focusin",x),m.current.addEventListener("focusout",k),window.addEventListener("scroll",I,true),window.addEventListener("resize",I),()=>{m.current?.removeEventListener("mousedown",I),m.current?.removeEventListener("input",I),m.current?.removeEventListener("focusout",k),m.current?.removeEventListener("focusin",x),window.removeEventListener("scroll",I,true),window.removeEventListener("resize",I);}},[I,k,x,te]),useEffect(()=>{R&&(V(R),d(true));},[R]),useEffect(()=>{a||i&&i.length&&!ee.current&&(V(i),ee.current=true,d(true));},[i,a]),jsxs("div",{className:a$2("relative",b),children:[jsx(Ge,{selectedOptions:q,onSelect:t,error:o,helperText:s,label:p,placeholder:n,handleSelect:w,options:e,onInputChange:g,size:N,disabled:P}),z&&jsx(We,{selectedOptions:q,disabled:P,error:o,onCleanSelectedOptions:J,size:N}),jsx($e,{handleSelect:w,selectedOptions:q,noResultsLabel:r,NoResultsIcon:l,optionDescriptionLines:L,noResultsAsColumn:f,noResultsButtonLabel:v,noResultsButtonOnClick:C,noResultsDescription:u,noResultsDescriptionLines:c})]})};var Ii=e=>jsx(Be,{children:jsx(_e,{...e})});var Ni=({children:e,title:i,titleLines:t=1,description:o,descriptionLines:s=1,StartIcon:p,hasDivider:n=false,disabled:r=false,actionButton:l,isSelected:u=false,className:c$1,...f})=>jsxs(y,{hasDescription:!!o,disabled:r,hasDivider:n,isSelected:u,...f,className:c$1,children:[p&&jsx(p,{className:"mr-2 h-4.5 w-4.5 shrink-0 grow-0"}),jsx(H,{title:i,titleLines:t,description:o,descriptionLines:s,disabled:r}),l&&jsx(Fragment,{children:l.isIcon?jsx(c$3,{...l,className:"ml-4 self-center",variant:"ghost",size:"sm",disabled:r??l.disabled}):jsx(c,{...l,className:"ml-4 self-center",size:"sm",variant:"ghost",disabled:r??l.disabled})})]});var qi=({title:e,description:i="",descriptionLines:t,hasDivider:o=false,disabled:s=false,checked:p,onCheckedChange:n,className:r,chipStatus:l,chipExpandable:u,...c})=>jsxs(y,{hasDescription:!!i,disabled:s,hasDivider:o,...c,className:a$2("pr-6",r),children:[jsx(c$2,{size:"sm",checked:p,onCheckedChange:n,className:"mr-4 self-center",disabled:s}),jsxs("div",{className:"flex-1",children:[jsxs("div",{className:"flex items-center justify-between gap-2",children:[jsx("p",{className:a$2("line-clamp-1 text-sm leading-[130%] break-all",!!i&&"font-medium"),children:e}),u&&jsx("div",{className:"ml-auto flex min-w-0 flex-shrink-0 items-center justify-end",children:jsx(c$4,{...u})}),l&&jsx("div",{className:"ml-4 flex shrink-0 items-center gap-1",children:jsx(d$1,{...l,size:"xs",className:"shrink-0"})})]}),i&&jsx("p",{className:a$2("text-xs leading-[130%]",s?"text-neutral-400":"text-neutral-700",{"line-clamp-1":t===1,"line-clamp-2":t===2,"line-clamp-3":t===3,"line-clamp-4":t===4}),children:i})]})]});var Tt=({children:e,hasDescription:i=false,disabled:t=false,hasDivider:o=false,className:s,isSelected:p,onClick:n,...r})=>jsxs(Fragment,{children:[jsx("div",{className:a$2("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",p&&"bg-primary-200",s),onClick:l=>{t||n?.(l);},...r,children:e}),o&&jsx(a$1,{})]}),y=Tt;var ke=({children:e,title:i,titleLines:t,description:o="",descriptionLines:s,startIcon:p,endIcon:n,hasDivider:r=false,disabled:l=false,isSelected:u=false,className:c,...f})=>jsxs(y,{hasDescription:!!o,disabled:l,hasDivider:r,className:c,isSelected:u,...f,children:[p&&be.cloneElement(p,{className:"shrink-0 mr-2 h-4.5 w-4.5"}),jsx(H,{title:i,titleLines:t,description:o,descriptionLines:s,disabled:l}),n&&be.cloneElement(n,{className:"min-h-4.5 min-w-4.5 self-center ml-4"})]});export{eo as a,ke as b,ao as c,He as d,Ii as e,Ni as f,qi as g};
|
|
1
|
+
import {d}from'./chunk-4MO4OFLX.mjs';import {a as a$5}from'./chunk-KTRSJBA4.mjs';import {a as a$4}from'./chunk-GTPSQXE3.mjs';import {c as c$3}from'./chunk-AI4D6AOK.mjs';import {c as c$2}from'./chunk-PTRXL7BY.mjs';import {c as c$4}from'./chunk-GBBE3RHT.mjs';import {d as d$1}from'./chunk-FAMLJ6AJ.mjs';import {a as a$1}from'./chunk-OG3OUJ6C.mjs';import {a}from'./chunk-SVAYP3BB.mjs';import {a as a$3}from'./chunk-JTO6FE4R.mjs';import {c}from'./chunk-JWB3TN2C.mjs';import {c as c$1,h}from'./chunk-5VHBHGBZ.mjs';import {a as a$2}from'./chunk-XJD5SYZJ.mjs';import be,{createContext,useMemo,useCallback,useContext,useRef,useEffect,useState,useId}from'react';import*as Ie from'@radix-ui/react-portal';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var Qe=be.memo(({handleSelect:e,NoResultsIcon:i,noResultsLabel:t,noResultsDescription:o,noResultsDescriptionLines:s,noResultsAsColumn:p,noResultsButtonOnClick:n,optionDescriptionLines:r,noResultsButtonLabel:l,filteredOptions:u,inputRect:c$1,inputRef:f,popoverPosition:C,optionsListRef:v,selectedOption:b,options:g,setFilteredOptions:R})=>jsx(Ie.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:c$1?{width:`${c$1.width}px`,left:c$1.left,top:C==="bottom"?`${c$1.bottom}px`:void 0,bottom:C==="top"?`${window.innerHeight-c$1.top}px`:void 0}:void 0,children:[u.length===0&&jsxs("div",{className:"elevation-8 max-h-88 flex flex-1 flex-col justify-center rounded-lg bg-neutral-50",children:[jsx(a,{title:t,description:o,Icon:i,iconAsColumn:p,descriptionLines:s}),n&&jsxs(Fragment,{children:[jsx(a$1,{}),jsx(c,{variant:"ghost",className:"my-3 w-fit self-center",onClick:a=>{v.current.style.display="none",f.current.value="",R(g),n();},children:l})]})]}),u.map(a=>jsx(ke,{title:a.label,disabled:a.disabled,description:a.description,descriptionLines:r,onClick:()=>e(a),className:a$2(b?.value===a.value&&"bg-primary-200")},a.key??a.value))]})})),Pe=Qe;var Ze=336,eo=({options:e,defaultSelectedOption:i,onSelect:t,onClick:o,onInputChange:s,error:p,helperText:n,label:r,placeholder:l,value:u,size:c="md",optionDescriptionLines:f=1,noResultsLabel:C,noResultsIcon:v,noResultsDescription:b,noResultsDescriptionLines:g,noResultsAsColumn:R,noResultsButtonOnClick:a,noResultsButtonLabel:N,className:L,disabled:P})=>{let[m,M]=useState(i??null),O=useRef(null),d=useRef(null),[pe,ue]=useState(),[ce,z]=useState([]),[me,W]=useState("bottom"),[U,ee]=useState(),q=Ze,V=useCallback(x=>{O.current.style.display="none",d.current.value=x.label,M(x),t?.(x);},[t]),w=useCallback(()=>{if(!d?.current)return;let x=d.current.getBoundingClientRect();ue(x);let k=U?U.height:q,I=window.innerHeight-x.bottom>k,te=x.top>k;W(I?"bottom":te?"top":"bottom");},[U?.height]),J=useCallback(()=>{let x=e.filter(k=>k.label.toLowerCase().includes(d?.current?.value.toLowerCase()??""));if(z(x),O?.current){let k=O.current.getBoundingClientRect();ee(k);}},[e]);return useEffect(()=>{z(e);},[e]),useEffect(()=>{if(!u){M(null),d.current&&(d.current.value="");return}(!d.current?.value||m?.value!==u.value)&&(M(u),d.current.value=u.label);},[u]),a$5(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",J),window.addEventListener("scroll",w,true),window.addEventListener("resize",w),()=>{d.current?.removeEventListener("mousedown",w),d.current?.removeEventListener("input",J),window.removeEventListener("scroll",w,true),window.removeEventListener("resize",w);}},[w,J]),jsxs("div",{className:a$2("relative",L),children:[jsx(a$4,{ref:d,autoComplete:"off",list:"",selectMode:true,onChange:x=>{x.target.value||(M(null),t?.(null)),s?.(x);},onClean:()=>{M(null),z(e),t?.(null);},onClick:x=>{O.current.style.display="flex",o?.(x);},onBlur:()=>{m&&d.current&&(d.current.value=m.label);},label:r,helperText:n,placeholder:l,size:c,error:p,disabled:P}),jsx(Pe,{handleSelect:V,noResultsLabel:C,NoResultsIcon:v,optionDescriptionLines:f,noResultsAsColumn:R,noResultsButtonLabel:N,noResultsButtonOnClick:a,noResultsDescription:b,noResultsDescriptionLines:g,filteredOptions:ce,inputRect:pe,inputRef:d,popoverPosition:me,optionsListRef:O,selectedOption:m,options:e,setFilteredOptions:z})]})};var et=({children:e,title:i,titleLines:t,description:o="",descriptionLines:s,disabled:p=false,className:n,...r})=>jsxs("div",{className:"flex w-full flex-col gap-1",...r,children:[jsx("p",{className:a$2("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$2("text-xs leading-[130%]",p?"text-neutral-400":"text-neutral-700"),style:s?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:s}:void 0,children:o})]}),H=et;var ao=({children:e,title:i,titleLines:t,description:o="",descriptionLines:s,startIcon:p,badgeContent:n,hasDivider:r=false,disabled:l=false,onSelect:u,className:c,...f})=>jsxs(y,{hasDescription:!!o,disabled:l,onClick:u,hasDivider:r,className:a$2(!l&&"cursor-pointer",c),...f,children:[p&&be.cloneElement(p,{className:"shrink-0 mr-2 h-4.5 w-4.5"}),jsx(H,{title:i,titleLines:t,description:o,descriptionLines:s,disabled:l}),jsxs("div",{className:"ml-4 flex gap-2",children:[n&&jsx(a$3,{content:n,size:"lg",variant:"alert",className:a$2("self-center",l&&"bg-neutral-400")}),jsx(h,{className:"h-4.5 w-4.5 self-center"})]})]});var He=({children:e,title:i,titleLines:t=1,description:o="",descriptionLines:s,startIcon:p,hasDivider:n=false,disabled:r=false,checked:l,onCheckedChange:u,className:c,...f})=>jsxs(y,{hasDescription:!!o,disabled:r,hasDivider:n,...f,className:a$2("pr-6",c),children:[p&&be.cloneElement(p,{className:"shrink-0 w-4.5 h-4.5 mr-2"}),jsx(H,{title:i,titleLines:t,description:o,descriptionLines:s,disabled:r}),jsx(c$2,{size:"sm",checked:l,onCheckedChange:u,className:"ml-4 self-center",disabled:r})]});var F=336,Se=createContext({inputRef:null,optionsListRef:null,autocompleteId:"",inputRect:void 0,showChips:false,filteredOptions:[],currentFocus:-1,popoverPosition:"bottom",setFilteredOptions:()=>{},setCurrentFocus:()=>{},setShowChips:()=>{},setPopoverPosition:()=>{},setInputRect:()=>{},optionsListHeight:F,setOptionsListHeight:()=>{},optionsListRect:void 0,setOptionsListRect:()=>{}}),D=()=>{let e=useContext(Se);if(e===null)throw new Error("useAutocompleteMultipleContext must be used within a AutocompleteMultipleProvider");return e},Be=({children:e})=>{let i=useRef(null),t=useRef(null),o=useId(),[s,p]=useState(),[n,r]=useState(true),[l,u]=useState([]),[c,f]=useState(-1),[C,v]=useState("bottom"),[b,g]=useState(),[R,a]=useState(F);return jsx(Se.Provider,{value:{optionsListRef:i,inputRef:t,autocompleteId:o,inputRect:s,showChips:n,filteredOptions:l,currentFocus:c,popoverPosition:C,setFilteredOptions:u,setCurrentFocus:f,setShowChips:r,setPopoverPosition:v,setInputRect:p,optionsListHeight:R,optionsListRect:b,setOptionsListRect:g,setOptionsListHeight:a},children:e})};var mt=({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})},ze=mt;var ht=150,bt=be.memo(({selectedOptions:e,error:i,onCleanSelectedOptions:t,disabled:o,size:s})=>{let{autocompleteId:p,inputRect:n,inputRef:r,optionsListRef:l}=D(),u=be.useRef(null),[c,f]=be.useState(new Map),C=useMemo(()=>{if(!n?.width)return [];let b=0,g=n.width-ht,R=0;for(let a=0;a<e.length&&(R+=c.get(a)??0,!(R>g));a++)b++;return e.slice(0,b)},[n?.width,e,c]),v=useCallback(()=>{o||(r?.current?.focus(),l.current.style.display="flex");},[o]);return jsxs("div",{onClick:v,className:a$2("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:u,children:C.map((b,g)=>jsx(ze,{option:b,onMountWidth:R=>f(a=>new Map(a).set(g,R)),size:s},`chip-input-${p}-${b.value}`))}),e.length>C.length&&jsx("span",{className:"text-base",children:"..."}),e.length>0&&!i&&jsx(a$3,{content:String(e.length),size:s}),i&&e.length>0&&jsx(c$1,{className:"h-6 w-6 text-error-700",onClick:b=>{b.stopPropagation(),t();}})]})}),We=bt;var xt=be.memo(({option:e,index:i,onPressOption:t,isSelected:o,optionDescriptionLines:s})=>{let{currentFocus:p,inputRef:n}=D();return jsx(He,{title:e.label,checked:o,disabled:e.disabled,className:p===i?"bg-primary-200":void 0,onMouseDown:r=>{e.disabled||(n?.current?.value&&r.preventDefault(),t?.(e,r));},description:e.description,descriptionLines:s})}),Le=xt;var Mt=be.memo(({selectedOptions:e,handleSelect:i,NoResultsIcon:t,noResultsLabel:o,noResultsDescription:s,noResultsDescriptionLines:p,noResultsAsColumn:n,noResultsButtonOnClick:r,optionDescriptionLines:l,noResultsButtonLabel:u})=>{let{popoverPosition:c$1,optionsListRef:f,filteredOptions:C,inputRect:v,autocompleteId:b,inputRef:g,optionsListHeight:R}=D(),a$2=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(Ie.Root,{asChild:true,children:jsxs("div",{ref:f,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:c$1==="bottom"?`${v.bottom}px`:void 0,bottom:c$1==="top"?`${window.innerHeight-v.top}px`:void 0,maxHeight:R+"px"}:void 0,children:[C.length===0&&jsxs("div",{className:"elevation-8 max-h-88 flex flex-1 flex-col justify-center rounded-lg bg-neutral-50",children:[jsx(a,{title:o,description:s,Icon:t,iconAsColumn:n,descriptionLines:p}),r&&jsxs(Fragment,{children:[jsx(a$1,{}),jsx(c,{variant:"ghost",className:"my-3 w-fit self-center",onClick:L=>{f.current.style.display="none",g.current.value="",r();},children:u})]})]}),N.map((L,P)=>jsx(Le,{option:L,index:P,onPressOption:m=>i(m),isSelected:a$2(L),optionDescriptionLines:l},`autocomplete-option-${b}-${L.key??L.value}`)),C.map((L,P)=>!e.some(m=>m.value===L.value)&&jsx(Le,{option:L,index:P,onPressOption:m=>i(m),isSelected:a$2(L),optionDescriptionLines:l},`autocomplete-option-${b}-${L.key??L.value}`))]})})}),$e=Mt;var It=be.memo(({selectedOptions:e,onSelect:i,error:t,helperText:o,label:s,placeholder:p,options:n,onInputChange:r,size:l,disabled:u})=>{let{setCurrentFocus:c,setFilteredOptions:f,optionsListRef:C,inputRef:v}=D();return jsx(a$4,{ref:v,autoComplete:"off",list:"",disabled:u,selectMode:true,onChange:b=>{c(-1),r?.(b.target.value);},onClean:()=>{c(-1),f(n),i?.(null,e);},onClick:()=>{u||(C.current.style.display="flex");},error:t,helperText:o,label:s,placeholder:p,fixedTopLabel:e.length>0,size:l})}),Ge=It;var _e=({options:e,defaultSelectedOptions:i,onSelect:t,error:o,helperText:s,label:p,placeholder:n,noResultsLabel:r,noResultsIcon:l,noResultsDescription:u,noResultsDescriptionLines:c,noResultsAsColumn:f,noResultsButtonOnClick:C,noResultsButtonLabel:v,className:b,onInputChange:g,value:R,loading:a,size:N="md",optionDescriptionLines:L=1,disabled:P})=>{let{inputRef:m,optionsListRef:M,setFilteredOptions:O,setShowChips:d,setInputRect:pe,setPopoverPosition:ue,setCurrentFocus:ce,showChips:z,setOptionsListRect:me,optionsListRect:W,setOptionsListHeight:U}=D(),ee=useRef(false),[q,V]=useState(i??[]),w=useCallback(A=>{V(E=>{let T,K=E.findIndex(Je=>Je.value===A.value);return K===-1?(T=E.concat(A),t?.(A,T),T):(T=E.toSpliced(K,1),t?.(A,T),T)});},[t]),J=useCallback(()=>{V([]),O(e),t?.(null,[]);},[]),x=useCallback(()=>{d(false);},[]),k=useCallback(()=>{d(true);},[]),I=useCallback(()=>{if(!m?.current)return;let A=m.current.getBoundingClientRect();pe(A);let E=W?W.height>F?F:W.height:F,T=window.innerHeight-A.bottom>E,K=A.top>E;ue(T?"bottom":K?"top":"bottom"),U(K?F:window.innerHeight-A.bottom>F?F:window.innerHeight-A.bottom);},[W?.height]),te=useCallback(()=>{let A=e.filter(E=>E.label.toLowerCase().includes(m?.current?.value.toLowerCase()??""));if(O(A),M?.current){let E=M.current.getBoundingClientRect();me(E);}},[e,M?.current]);return useEffect(()=>{O(e);},[e]),a$5(M,()=>{M.current.style.display="none",ce(-1);}),useEffect(()=>{if(m?.current)return I(),m.current.addEventListener("mousedown",I),m.current.addEventListener("input",te),m.current.addEventListener("focusin",x),m.current.addEventListener("focusout",k),window.addEventListener("scroll",I,true),window.addEventListener("resize",I),()=>{m.current?.removeEventListener("mousedown",I),m.current?.removeEventListener("input",I),m.current?.removeEventListener("focusout",k),m.current?.removeEventListener("focusin",x),window.removeEventListener("scroll",I,true),window.removeEventListener("resize",I);}},[I,k,x,te]),useEffect(()=>{R&&(V(R),d(true));},[R]),useEffect(()=>{a||i&&i.length&&!ee.current&&(V(i),ee.current=true,d(true));},[i,a]),jsxs("div",{className:a$2("relative",b),children:[jsx(Ge,{selectedOptions:q,onSelect:t,error:o,helperText:s,label:p,placeholder:n,handleSelect:w,options:e,onInputChange:g,size:N,disabled:P}),z&&jsx(We,{selectedOptions:q,disabled:P,error:o,onCleanSelectedOptions:J,size:N}),jsx($e,{handleSelect:w,selectedOptions:q,noResultsLabel:r,NoResultsIcon:l,optionDescriptionLines:L,noResultsAsColumn:f,noResultsButtonLabel:v,noResultsButtonOnClick:C,noResultsDescription:u,noResultsDescriptionLines:c})]})};var Ii=e=>jsx(Be,{children:jsx(_e,{...e})});var Ni=({children:e,title:i,titleLines:t=1,description:o,descriptionLines:s=1,StartIcon:p,hasDivider:n=false,disabled:r=false,actionButton:l,isSelected:u=false,className:c$1,...f})=>jsxs(y,{hasDescription:!!o,disabled:r,hasDivider:n,isSelected:u,...f,className:c$1,children:[p&&jsx(p,{className:"mr-2 h-4.5 w-4.5 shrink-0 grow-0"}),jsx(H,{title:i,titleLines:t,description:o,descriptionLines:s,disabled:r}),l&&jsx(Fragment,{children:l.isIcon?jsx(c$3,{...l,className:"ml-4 self-center",variant:"ghost",size:"sm",disabled:r??l.disabled}):jsx(c,{...l,className:"ml-4 self-center",size:"sm",variant:"ghost",disabled:r??l.disabled})})]});var qi=({title:e,description:i="",descriptionLines:t,hasDivider:o=false,disabled:s=false,checked:p,onCheckedChange:n,className:r,chipStatus:l,chipExpandable:u,...c})=>jsxs(y,{hasDescription:!!i,disabled:s,hasDivider:o,...c,className:a$2("pr-6",r),children:[jsx(c$2,{size:"sm",checked:p,onCheckedChange:n,className:"mr-4 self-center",disabled:s}),jsxs("div",{className:"flex-1",children:[jsxs("div",{className:"flex items-center justify-between gap-2",children:[jsx("p",{className:a$2("line-clamp-1 text-sm leading-[130%] break-all",!!i&&"font-medium"),children:e}),u&&jsx("div",{className:"ml-auto flex min-w-0 flex-shrink-0 items-center justify-end",children:jsx(c$4,{...u})}),l&&jsx("div",{className:"ml-4 flex shrink-0 items-center gap-1",children:jsx(d$1,{...l,size:"xs",className:"shrink-0"})})]}),i&&jsx("p",{className:a$2("text-xs leading-[130%]",s?"text-neutral-400":"text-neutral-700",{"line-clamp-1":t===1,"line-clamp-2":t===2,"line-clamp-3":t===3,"line-clamp-4":t===4}),children:i})]})]});var Tt=({children:e,hasDescription:i=false,disabled:t=false,hasDivider:o=false,className:s,isSelected:p,onClick:n,...r})=>jsxs(Fragment,{children:[jsx("div",{className:a$2("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",p&&"bg-primary-200",s),onClick:l=>{t||n?.(l);},...r,children:e}),o&&jsx(a$1,{})]}),y=Tt;var ke=({children:e,title:i,titleLines:t,description:o="",descriptionLines:s,startIcon:p,endIcon:n,hasDivider:r=false,disabled:l=false,isSelected:u=false,className:c,...f})=>jsxs(y,{hasDescription:!!o,disabled:l,hasDivider:r,className:c,isSelected:u,...f,children:[p&&be.cloneElement(p,{className:"shrink-0 mr-2 h-4.5 w-4.5"}),jsx(H,{title:i,titleLines:t,description:o,descriptionLines:s,disabled:l}),n&&be.cloneElement(n,{className:"min-h-4.5 min-w-4.5 self-center ml-4"})]});export{eo as a,ke as b,ao as c,He as d,Ii as e,Ni as f,qi as g};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-XJD5SYZJ.mjs';import*as i from'react';import*as o from'@radix-ui/react-popover';import {jsx}from'react/jsx-runtime';var P=o.Root,v=o.Trigger,s=i.forwardRef(({className:a$1,align:r="end",sideOffset:d=4,...n},m)=>jsx(o.Portal,{children:jsx(o.Content,{ref:m,align:r,sideOffset:d,className:a("elevation-9 z-50 rounded-sm bg-neutral-50 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 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a$1),...n})}));s.displayName=o.Content.displayName;export{P as a,v as b,s as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-
|
|
1
|
+
import {a as a$1}from'./chunk-JTO6FE4R.mjs';import {a}from'./chunk-XJD5SYZJ.mjs';import {forwardRef}from'react';import {cva}from'cva';import {jsxs,jsx}from'react/jsx-runtime';var S=["standard","primary"],T=["outlined","ghost","fill"],k=["xs","sm","md"],g=cva({base:"flex w-fit items-center justify-center rounded-lg px-3 py-1 leading-[130%] text-neutral-700 transition-all",variants:{variant:{standard:"ring-neutral-700",primary:"text-primary-500 ring-primary-500"},type:{outlined:"bg-neutral-50 ring-1 ring-inset",ghost:"",fill:"text-primary-600"},selected:{true:"",false:""},disabled:{true:"text-neutral-400 ring-neutral-400"},duotone:{true:"",false:""},size:{xs:"h-6 rounded-md text-sm",sm:"h-8 text-sm",md:"h-10 text-base"}},compoundVariants:[{variant:"standard",selected:false,disabled:false,className:"hover:bg-primary-100"},{variant:"primary",selected:false,disabled:false,className:"hover:bg-primary-200"},{variant:"standard",selected:true,disabled:false,className:"bg-primary-200"},{variant:"primary",selected:true,disabled:false,className:"bg-primary-300"},{type:"fill",disabled:false,className:"bg-primary-100"}],defaultVariants:{size:"md",selected:false,disabled:false}}),w=forwardRef(({children:d,variant:r,size:a$2,selected:s,onClick:c,className:f,type:y,disabled:t,StartIcon:o,EndIcon:p,duotone:e,badgeNumber:m,...u},x)=>jsxs("button",{ref:x,type:"button",disabled:t,onClick:()=>c?.(!s),className:a(g({variant:r,size:a$2,type:y,selected:s,disabled:t,duotone:e}),f),...u,children:[o&&jsx(o,{size:a$2==="md"?18:14,className:a("mr-1",!t&&r==="standard"&&e&&"text-primary-500",!t&&r==="standard"&&e&&s&&"text-primary-600",!t&&r==="primary"&&e&&"text-neutral-800")}),d,p&&jsx(p,{size:a$2==="md"?18:14,className:a("ml-1",!t&&r==="standard"&&e&&"text-primary-500",!t&&r==="standard"&&e&&s&&"text-primary-600",!t&&r==="primary"&&e&&"text-primary-800")}),m&&jsx(a$1,{content:m?String(m):void 0,className:"ml-2",size:a$2==="md"?"md":"sm"})]}));export{S as a,T as b,k as c,w as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-XJD5SYZJ.mjs';import {jsx}from'react/jsx-runtime';var s=({content:m,variant:t="select",size:e="lg",className:l,...n})=>jsx("div",{className:a("content-center px-1 text-center text-neutral-50",e==="sm"&&"h-4 min-w-4 text-xs",e==="md"&&"h-4.5 min-w-4.5 text-xs",e==="lg"&&"h-6 min-w-6",t==="select"&&"rounded-xs bg-primary-700",t==="alert"&&"rounded-full bg-error-700",t==="alert"&&e==="sm"&&"h-[0.375rem] min-w-[0.375rem] p-0",t==="alert"&&e==="md"&&"h-4 min-w-4",l),...n,children:!(t==="alert"&&e==="sm")&&m});export{s as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-
|
|
1
|
+
import {a as a$1}from'./chunk-5VHBHGBZ.mjs';import {a}from'./chunk-XJD5SYZJ.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:"font-inter flex shrink-0 items-center justify-center gap-2 rounded-lg text-base leading-[130%] font-semibold 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 hover:bg-primary-600 focus:bg-primary-500 focus:ring-primary-800 active:bg-primary-700 text-neutral-50 focus:ring-[3px] focus:ring-inset active:ring-0 disabled:bg-neutral-100 disabled:text-neutral-400"},secondary:{button:"text-primary-500 ring-primary-500 hover:bg-transparent-primary-20 hover:text-primary-600 hover:ring-primary-600 focus:ring-primary-800 active:bg-transparent-primary-40 active:text-primary-700 active:ring-primary-700 ring-[1.5px] ring-inset focus:ring-[3px] disabled:bg-neutral-50/0 disabled:text-neutral-400 disabled:ring-[1.5px] disabled:ring-neutral-400"},outlined:{button:"focus:bg-opacity-0 focus:ring-primary-900 [&:not([disabled])]:hover:bg-transparent-primary-20 [&:not([disabled])]:active:bg-transparent-primary-40 leading-[130%] text-neutral-900 ring-[1.5px] ring-neutral-900 ring-inset focus:bg-neutral-50 focus:ring-[3px] active:ring-[1.5px] disabled:bg-neutral-50/0 disabled:text-neutral-400 disabled:ring-[1.5px] disabled:ring-neutral-400"},ghost:{button:"text-primary-500 hover:bg-transparent-primary-20 hover:text-primary-600 focus:bg-opacity-0 focus:ring-primary-800 active:bg-transparent-primary-40 active:text-primary-700 disabled:bg-opacity-0 focus:bg-neutral-50 focus:ring-[3px] focus:ring-inset active:ring-0 disabled:bg-neutral-50 disabled:text-neutral-400"},standard:{button:"hover:bg-transparent-primary-20 focus:ring-primary-800 active:bg-transparent-primary-40 disabled:bg-opacity-0 text-neutral-900 focus:bg-neutral-50/0 focus:ring-[3px] focus:ring-inset active:ring-0 disabled:bg-neutral-50 disabled:text-neutral-400"},link:{button:"text-primary-500 hover:bg-transparent-primary-20 hover:text-primary-600 focus:text-primary-500 focus:ring-primary-800 active:bg-transparent-primary-40 active:text-primary-700 disabled:bg-opacity-0 underline underline-offset-2 focus:bg-neutral-50/0 focus:ring-[3px] focus:ring-inset active:ring-0 disabled:bg-neutral-50 disabled:text-neutral-400"},white:{button:"bg-neutral-50 text-neutral-900"}},loading:{true:{button:"disabled:text-opacity-0 disabled:text-neutral-50"}}},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 {a}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-XJD5SYZJ.mjs';import {forwardRef}from'react';import {jsx}from'react/jsx-runtime';var n=forwardRef(({className:t,...o},r)=>jsx("div",{ref:r,className:a("animate-pulse rounded-lg bg-neutral-100",t),...o}));n.displayName="Skeleton";export{n as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-XJD5SYZJ.mjs';import {Switch}from'@ark-ui/react/switch';import {useCallback}from'react';import {jsxs,jsx}from'react/jsx-runtime';var w=["sm","md"],v=({size:d="md",className:s,disabled:a$1,onCheckedChange:r,...h})=>{let n=useCallback(o=>{r?.(o.checked);},[r]);return jsxs(Switch.Root,{className:a("relative flex",s),disabled:a$1,onCheckedChange:n,...h,children:[jsx(Switch.Control,{className:a("group data-[state=checked]:bg-primary-500 data-[state=unchecked]:ring-primary-500 data-[state=checked]:focus:bg-primary-800 data-[state=unchecked]:focus:ring-primary-800 inline-flex shrink-0 cursor-pointer items-center rounded-full transition-all disabled:cursor-not-allowed data-[state=checked]:data-disabled:bg-neutral-200 data-[state=unchecked]:ring-2 data-[state=unchecked]:ring-inset data-[state=unchecked]:focus:ring-3 data-[state=unchecked]:data-disabled:ring-neutral-300",a$1&&"cursor-not-allowed",!a$1&&"data-[state=unchecked]:hover:ring-primary-600 data-[state=checked]:active:bg-primary-700 data-[state=unchecked]:active:ring-primary-400 data-[state=unchecked]:active:ring-2",d==="md"&&"h-8 w-13",d==="sm"&&"h-6 w-10"),children:jsx(Switch.Thumb,{className:a("data-[state=checked]:bg-primary-200 data-[state=unchecked]:bg-primary-500 group-focus:data-[state=checked]:bg-primary-100 group-focus:data-[state=unchecked]:bg-primary-500 group-focus:data-[state=unchecked]:ring-transparent-primary-10 block h-6 w-6 rounded-full transition-all data-[state=checked]:translate-x-6 group-data-disabled:data-[state=checked]:h-6 group-data-disabled:data-[state=checked]:w-6 group-data-disabled:data-[state=checked]:translate-x-6 group-data-disabled:data-[state=checked]:bg-neutral-100 group-data-disabled:data-[state=checked]:ring-0 data-[state=unchecked]:h-4 data-[state=unchecked]:w-4 data-[state=unchecked]:translate-x-2 group-focus:data-[state=unchecked]:h-4 group-focus:data-[state=unchecked]:w-4 group-data-disabled:data-[state=unchecked]:h-4 group-data-disabled:data-[state=unchecked]:w-4 group-data-disabled:data-[state=unchecked]:translate-x-2 group-data-disabled:data-[state=unchecked]:bg-neutral-500 group-data-disabled:data-[state=unchecked]:ring-0",!a$1&&"group-hover:ring-transparent-primary-20 group-hover:data-[state=unchecked]:bg-primary-600 group-hover:data-[state=checked]:ring-8 group-active:data-[state=checked]:h-7 group-active:data-[state=checked]:w-7 data-[state=checked]:group-active:translate-x-5.5 group-hover:data-[state=unchecked]:ring-12 group-active:data-[state=unchecked]:h-7 group-active:data-[state=unchecked]:w-7 group-active:data-[state=unchecked]:translate-x-0.5 group-active:data-[state=unchecked]:ring-0",d==="sm"&&"h-4 w-4 data-[state=checked]:translate-x-5 group-active:data-[state=checked]:h-5 group-active:data-[state=checked]:w-5 data-[state=checked]:group-active:translate-x-4.5 group-data-disabled:data-[state=checked]:h-4 group-data-disabled:data-[state=checked]:w-4 group-data-disabled:data-[state=checked]:translate-x-5 data-[state=unchecked]:h-3 data-[state=unchecked]:w-3 data-[state=unchecked]:translate-x-1.5 group-focus:data-[state=unchecked]:h-3 group-focus:data-[state=unchecked]:w-3 group-active:data-[state=unchecked]:h-5 group-active:data-[state=unchecked]:w-5 group-active:data-[state=unchecked]:translate-x-0.5 group-data-disabled:data-[state=unchecked]:h-3 group-data-disabled:data-[state=unchecked]:w-3 group-data-disabled:data-[state=unchecked]:translate-x-1.5")})}),jsx(Switch.HiddenInput,{})]})};export{w as a,v as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {r,m}from'./chunk-
|
|
1
|
+
import {r,m}from'./chunk-5VHBHGBZ.mjs';import {a}from'./chunk-XJD5SYZJ.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 as d$1,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 as d$1,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-GTPSQXE3.mjs';import {g as g$1}from'./chunk-5VHBHGBZ.mjs';import {a as a$2}from'./chunk-XJD5SYZJ.mjs';import X,{useId,useRef,useState,useEffect,useMemo}from'react';import*as L from'@radix-ui/react-portal';import {jsx,jsxs}from'react/jsx-runtime';var T=56,d=6,q=(t=>(t.CL="+56",t.AR="+54",t.CO="+57",t.GT="+502",t.MX="+52",t.PE="+51",t.BR="+55",t.UY="+598",t.US="+1",t))(q||{}),M=new Map([["+56",{name:"Chile",flag:a}],["+54",{name:"Argentina",flag:b}],["+57",{name:"Colombia",flag:c}],["+502",{name:"Guatemala",flag:d$1}],["+52",{name:"Mexico",flag:e}],["+51",{name:"Per\xFA",flag:f}],["+55",{name:"Brasil",flag:g}],["+598",{name:"Uruguay",flag:h}],["+1",{name:"Estados Unidos",flag:i$1}]]),i=Array.from(M.entries()),pe=({noResults:g,selectedCountry:p,onSelect:S,className:U,size:B="md",...m})=>{let A=useId(),l=useRef(null),r=useRef(null),[t,H]=useState("bottom"),[s,G]=useState(),[$,k]=useState(-1),z=e=>{l.current.style.display="none",S?.(e);};useEffect(()=>{if(!r.current)return;let e=()=>{if(!r.current)return;let a=T*(i.length<d?i.length:d)+16,c=r.current.getBoundingClientRect();G(c);let Y=window.innerHeight-c.bottom>a,_=c.top>a;H(Y?"bottom":_?"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",k(-1));});let w=useMemo(()=>M.get(p),[p]);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:w?.flag,alt:w?.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:p}),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(L.Root,{asChild:true,children:jsxs("ul",{ref:l,className:"elevation-8 z-10000 pointer-events-auto absolute 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<d?i.length:d)*T-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:[X.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:()=>{z(e);},className:a$2("hover:bg-primary-100 shrink-0 cursor-pointer py-4 pl-4 pr-6 text-left",p===e&&"bg-primary-200",$===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,pe as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-
|
|
1
|
+
import {a as a$1}from'./chunk-DHWOGUID.mjs';import {q,d,v}from'./chunk-5VHBHGBZ.mjs';import {a}from'./chunk-XJD5SYZJ.mjs';import {Portal}from'@ark-ui/react/portal';import {createListCollection,Select}from'@ark-ui/react/select';import {forwardRef,useMemo,useCallback}from'react';import {jsxs,jsx}from'react/jsx-runtime';var z=["00:00","00:30","01:00","01:30","02:00","02:30","03:00","03:30","04:00","04:30","05:00","05:30","06:00","06:30","07:00","07:30","08:00","08:30","09:00","09:30","10:00","10:30","11:00","11:30","12:00","12:30","13:00","13:30","14:00","14:30","15:00","15:30","16:00","16:30","17:00","17:30","18:00","18:30","19:00","19:30","20:00","20:30","21:00","21:30","22:00","22:30","23:00","23:30"],D="00:00",K=forwardRef((r,N)=>{let{className:y,label:s,required:w,tooltip:d$1,error:u,isItemDisabled:c,value:g,helperText:C,placeholder:v$1=D,onValueChange:m,defaultValue:p,...S}=r,o=Object.getOwnPropertyNames(r),f=useMemo(()=>createListCollection({items:z,isItemDisabled:c}),[c]),T=useCallback(l=>{m?.(l.value.at(0)??null);},[m]);if(o.includes("defaultValue")&&o.includes("value"))throw new Error("Cannot set both defaultValue and value props on TimePickerNew. Use one or the other.");return jsxs(Select.Root,{ref:N,"data-error":u,collection:f,className:a("group flex flex-col",y),positioning:{placement:"bottom-end"},onValueChange:T,value:o.includes("value")?g?[g]:[]:void 0,defaultValue:p?[p]:void 0,...S,children:[jsxs(Select.Label,{className:"font-inter flex items-center text-xs leading-[133.33%] font-medium text-neutral-700 data-[disabled]:text-neutral-400",children:[w?jsxs("span",{className:"flex items-center gap-1",children:[jsx("span",{className:"text-red-500",children:"*"}),s]}):s,d$1&&jsx(a$1,{content:d$1,className:"ml-2",children:jsx(q,{className:"size-3.5"})})]}),jsx(Select.Control,{className:a("group/control mt-1.125 data-[focus]:ring-primary-800 group-data-[error=true]:ring-error-500 relative flex h-10 w-full justify-between overflow-hidden rounded-lg bg-neutral-50 ring ring-neutral-500 transition-shadow group-data-[error=true]:ring-2 group-data-[readonly]:bg-neutral-100 group-data-[readonly]:ring-neutral-300 has-focus:ring-2 data-[disabled]:ring-neutral-400",r.readOnly&&"pointer-events-none"),children:jsxs(Select.Trigger,{className:"flex w-full cursor-pointer items-center gap-1 text-neutral-900 group-data-[disabled]/control:text-neutral-400 disabled:cursor-not-allowed data-[placeholder-shown]:text-neutral-500",children:[jsx(Select.ValueText,{className:a("font-inter min-w-0 flex-1 py-2.5 pl-3 text-left text-sm",r.readOnly&&"pointer-events-none"),placeholder:v$1}),!r.readOnly&&jsx(Select.ClearTrigger,{asChild:true,className:a("z-10 cursor-pointer",r.readOnly&&"pointer-events-none"),tabIndex:r.readOnly?-1:void 0,children:jsx(d,{className:"size-4.5 text-neutral-700"})}),u&&jsx(q,{className:"text-error-500 z-10 size-4.5 cursor-pointer"}),jsx(Select.Indicator,{className:a("group-data-[focus]/control:ring-primary-800 group-data-[error=true]:ring-error-500 ml-2 flex h-full w-10 shrink-0 items-center justify-center bg-neutral-100 text-neutral-700 ring ring-neutral-500 transition-shadow group-data-[disabled]/control:text-neutral-400 group-data-[disabled]/control:ring-neutral-400 group-data-[error=true]:ring-2 group-data-[focus]/control:ring-2 group-data-[readonly]:text-neutral-400 group-data-[readonly]:ring-neutral-300",r.readOnly&&"pointer-events-none"),tabIndex:r.readOnly?-1:void 0,children:jsx(v,{className:"size-4.5"})})]})}),jsx("p",{className:"font-inter text-2xs group-data-[error=true]:text-error-500 mt-1 leading-[133.33%] font-normal text-neutral-700 peer-data-[disabled]:text-neutral-400 empty:hidden",children:C}),jsx(Portal,{children:jsx(Select.Positioner,{className:"!z-10000",children:jsx(Select.Content,{className:"elevation-9 max-h-67.5 min-w-27.5 overflow-auto rounded-lg bg-neutral-50",children:f.items.map(l=>jsx(Select.Item,{item:l,className:"font-inter data-[highlighted]:bg-primary-100 cursor-pointer py-3 pr-2.5 pl-3 text-sm font-medium data-[disabled]:cursor-not-allowed data-[disabled]:text-neutral-400",children:jsx(Select.ItemText,{children:l})},l))})})}),jsx(Select.HiddenSelect,{})]})});export{K as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-XJD5SYZJ.mjs';import*as e from'react';import*as o from'@radix-ui/react-separator';import {jsx}from'react/jsx-runtime';var f=e.forwardRef(({className:a$1,orientation:t="horizontal",decorative:i=true,...p},m)=>jsx(o.Root,{ref:m,decorative:i,orientation:t,className:a("shrink-0 bg-neutral-200",t==="horizontal"?"h-px w-full":"h-full w-px",a$1),...p}));f.displayName=o.Root.displayName;export{f as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-
|
|
1
|
+
import {a as a$1}from'./chunk-DHWOGUID.mjs';import {q}from'./chunk-5VHBHGBZ.mjs';import {a}from'./chunk-XJD5SYZJ.mjs';import {Field}from'@ark-ui/react/field';import {forwardRef,useEffect}from'react';import {jsxs,jsx}from'react/jsx-runtime';var I=forwardRef(({className:c,label:o,required:i,tooltip:s,helperText:g,error:d,...x},f)=>(useEffect(()=>{let u=n=>{let a=document.activeElement;a&&a.type==="number"&&document.elementFromPoint(n.clientX,n.clientY)===a&&n.preventDefault();};return document.addEventListener("wheel",u,{passive:false}),()=>{document.removeEventListener("wheel",u);}},[]),jsxs(Field.Root,{"data-error":d,className:a("group flex flex-col data-[readonly]:pointer-events-none",c),children:[jsxs(Field.Label,{className:"font-inter flex items-center text-xs leading-[133.33%] font-medium text-neutral-700 group-data-[disabled]:text-neutral-400",children:[i?jsxs("span",{className:"flex items-center gap-1",children:[jsx("span",{className:"text-red-500",children:"*"}),o]}):o,s&&jsx(a$1,{content:s,className:"ml-2",children:jsx(q,{className:"size-3.5 text-neutral-700"})})]}),jsxs("div",{className:"mt-1.125 relative",children:[jsx(Field.Input,{ref:f,required:i,className:"focus:ring-primary-800 group-data-[error=true]:ring-error-500 font-inter h-10 w-full rounded-lg bg-neutral-50 px-3 text-sm leading-[142.86%] font-normal text-neutral-900 ring ring-neutral-500 transition-all ring-inset group-data-[disabled]:text-neutral-400 group-data-[disabled]:ring-neutral-400 group-data-[error=true]:pr-10.5 group-data-[error=true]:ring-2 group-data-[readonly]:bg-neutral-100 group-data-[readonly]:ring-neutral-300 placeholder:text-neutral-500 group-data-[disabled]:placeholder:text-neutral-400 focus:ring-2 focus:outline-none",...x}),d&&jsx(q,{className:"text-error-500 absolute top-1/2 right-3 size-4.5 -translate-y-1/2 cursor-text"})]}),jsx(Field.HelperText,{className:"text-2xs group-data-[error=true]:text-error-500 font-inter mt-1 leading-[133.33%] font-normal text-neutral-700 group-data-[disabled]:text-neutral-400 empty:hidden",children:g})]})));export{I as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {c}from'./chunk-
|
|
1
|
+
import {c}from'./chunk-JWB3TN2C.mjs';import {d}from'./chunk-5VHBHGBZ.mjs';import {a}from'./chunk-XJD5SYZJ.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};
|