sodtrack-web-ui 0.81.1 → 0.82.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-5JYXZUPM.mjs → chunk-36IWPOTT.mjs} +1 -1
- package/dist/{chunk-Q67Z7E4U.mjs → chunk-3SP2TYK7.mjs} +1 -1
- package/dist/{chunk-ATQGUTXV.mjs → chunk-3Y3WLH7U.mjs} +1 -1
- package/dist/{chunk-D4T5LV6D.mjs → chunk-4RQOZ4CR.mjs} +1 -1
- package/dist/{chunk-6VO3THJJ.mjs → chunk-6Q5LLVIJ.mjs} +1 -1
- package/dist/{chunk-GCAC44ZI.mjs → chunk-7NYYZJEA.mjs} +1 -1
- package/dist/{chunk-WRCFKTIJ.mjs → chunk-ALIUXOM2.mjs} +1 -1
- package/dist/chunk-BXXLHGZI.mjs +1 -0
- package/dist/{chunk-RFZ66SZR.mjs → chunk-C2MGPJ7Q.mjs} +1 -1
- package/dist/{chunk-G262XYV7.mjs → chunk-CGHXUUSS.mjs} +1 -1
- package/dist/{chunk-2UWUPQW7.mjs → chunk-CIPINJVB.mjs} +1 -1
- package/dist/{chunk-EJBCWOLG.mjs → chunk-D3UIF77V.mjs} +1 -1
- package/dist/{chunk-SFBGEDQM.mjs → chunk-DJOYA4O5.mjs} +1 -1
- package/dist/{chunk-GCZHRQYT.mjs → chunk-E65YZX4K.mjs} +1 -1
- package/dist/{chunk-CQWMO3TO.mjs → chunk-E6CTHUJU.mjs} +1 -1
- package/dist/{chunk-TWZIWGFV.mjs → chunk-HFVINCOT.mjs} +1 -1
- package/dist/chunk-HPGC2NJ7.mjs +36 -0
- package/dist/{chunk-NSHFXSYP.mjs → chunk-HYH5H4Q4.mjs} +1 -1
- package/dist/{chunk-UKPP4YKH.mjs → chunk-IOKEOPLW.mjs} +1 -1
- package/dist/{chunk-F4CJC6K3.mjs → chunk-IUH2QX7T.mjs} +1 -1
- package/dist/{chunk-BPXFUVGR.mjs → chunk-JE7PTJMY.mjs} +1 -1
- package/dist/{chunk-JSBZ2Q6W.mjs → chunk-JJS6RUJL.mjs} +1 -1
- package/dist/{chunk-COYV5BB6.mjs → chunk-KR2DEP5T.mjs} +1 -1
- package/dist/{chunk-ZSQI3LTY.mjs → chunk-LJMELYRL.mjs} +1 -1
- package/dist/{chunk-SXEHG5TZ.mjs → chunk-LMTR2WE2.mjs} +1 -1
- package/dist/{chunk-7O7ESF7V.mjs → chunk-NH6BUB6I.mjs} +1 -1
- package/dist/{chunk-QJNF42N3.mjs → chunk-NUTBHDRX.mjs} +1 -1
- package/dist/{chunk-FQ7YROEC.mjs → chunk-OMYHCTBZ.mjs} +1 -1
- package/dist/{chunk-GI7JIFZN.mjs → chunk-OWBVOMCV.mjs} +1 -1
- package/dist/{chunk-DLRA36N6.mjs → chunk-PEE626ZH.mjs} +1 -1
- package/dist/{chunk-R6G332AM.mjs → chunk-PN5WHNOR.mjs} +1 -1
- package/dist/{chunk-7DZXTSLA.mjs → chunk-Q24N2WE3.mjs} +1 -1
- package/dist/{chunk-FJKEW54S.mjs → chunk-QZBV6QEJ.mjs} +1 -1
- package/dist/{chunk-FJDFWKWK.mjs → chunk-S4PS5K2G.mjs} +1 -1
- package/dist/{chunk-VH6CSJQB.mjs → chunk-SA6T5Z6O.mjs} +1 -1
- package/dist/{chunk-7S5NATSM.mjs → chunk-SG6G4QOG.mjs} +1 -1
- package/dist/{chunk-Z2VUUD4S.mjs → chunk-SLTEV2E7.mjs} +1 -1
- package/dist/{chunk-LKCGHELN.mjs → chunk-SVUWQMAN.mjs} +1 -1
- package/dist/{chunk-XZZKINUR.mjs → chunk-SXBCTRG4.mjs} +1 -1
- package/dist/{chunk-MOY7IRJM.mjs → chunk-TKPVRBGR.mjs} +1 -1
- package/dist/chunk-TOHUA2NN.mjs +1 -0
- package/dist/{chunk-KKWH3QUT.mjs → chunk-U7VHIEIU.mjs} +1 -1
- package/dist/{chunk-5LNAXQBK.mjs → chunk-UPVQZ2A6.mjs} +1 -1
- package/dist/{chunk-D67BYQKS.mjs → chunk-URTMHNDA.mjs} +1 -1
- package/dist/{chunk-BNWDSGUY.mjs → chunk-UUAG3MUG.mjs} +1 -1
- package/dist/{chunk-PJ2IKRZS.mjs → chunk-UWCF5YTA.mjs} +1 -1
- package/dist/{chunk-CK3UXIJL.mjs → chunk-VL55ZQCX.mjs} +1 -1
- package/dist/{chunk-T2IU5QUU.mjs → chunk-WSG6DGOM.mjs} +1 -1
- package/dist/{chunk-BRBVYZWO.mjs → chunk-XNSFSSMU.mjs} +1 -1
- package/dist/{chunk-EMZCLGIQ.mjs → chunk-YDFLXLFV.mjs} +1 -1
- package/dist/{chunk-463DMFCV.mjs → chunk-ZMOECORK.mjs} +1 -1
- package/dist/{chunk-WOQHGX7V.mjs → chunk-ZVH4QTK4.mjs} +1 -1
- package/dist/components/accordion-form.js +3 -3
- package/dist/components/accordion-form.mjs +1 -1
- package/dist/components/accordion.js +3 -3
- package/dist/components/accordion.mjs +1 -1
- package/dist/components/alert-dialog.js +3 -3
- package/dist/components/alert-dialog.mjs +1 -1
- package/dist/components/alert-message.js +3 -3
- 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 +3 -3
- 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 +3 -3
- package/dist/components/button.mjs +1 -1
- package/dist/components/calendar-new.js +3 -3
- package/dist/components/calendar-new.mjs +1 -1
- package/dist/components/calendar.js +3 -3
- package/dist/components/calendar.mjs +1 -1
- package/dist/components/card-expandable.js +3 -3
- package/dist/components/card-expandable.mjs +1 -1
- package/dist/components/card-form.js +3 -3
- package/dist/components/card-form.mjs +1 -1
- package/dist/components/carousel.js +3 -3
- package/dist/components/carousel.mjs +1 -1
- package/dist/components/checkbox.js +3 -3
- 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.d.mts +3 -3
- package/dist/components/chip-form-complementary.d.ts +3 -3
- 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 +3 -3
- package/dist/components/chip-input.mjs +1 -1
- package/dist/components/chip-status-complementary.d.mts +1 -1
- package/dist/components/chip-status-complementary.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 +3 -3
- package/dist/components/country-text-field.mjs +1 -1
- package/dist/components/data-table.js +3 -3
- package/dist/components/data-table.mjs +1 -1
- package/dist/components/date-picker-new.js +3 -3
- package/dist/components/date-picker-new.mjs +1 -1
- package/dist/components/date-picker.js +3 -3
- package/dist/components/date-picker.mjs +1 -1
- package/dist/components/dialog.js +3 -3
- package/dist/components/dialog.mjs +1 -1
- package/dist/components/drawer.js +3 -3
- package/dist/components/drawer.mjs +1 -1
- package/dist/components/icons.js +4 -4
- 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 +4 -4
- package/dist/components/index.mjs +1 -1
- package/dist/components/list-item-arrow.js +3 -3
- package/dist/components/list-item-arrow.mjs +1 -1
- package/dist/components/list-item-button.js +3 -3
- package/dist/components/list-item-button.mjs +1 -1
- package/dist/components/list-item-checkbox-left.js +3 -3
- package/dist/components/list-item-checkbox-left.mjs +1 -1
- package/dist/components/list-item-checkbox.js +3 -3
- 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 +3 -3
- 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 +4 -4
- 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 +3 -3
- package/dist/components/search-bar.mjs +1 -1
- package/dist/components/select-new.js +3 -3
- package/dist/components/select-new.mjs +1 -1
- package/dist/components/select.js +3 -3
- 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 +3 -3
- 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 +3 -3
- package/dist/components/tab.mjs +1 -1
- package/dist/components/table.js +3 -3
- 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 +3 -3
- package/dist/components/text-field-new.mjs +1 -1
- package/dist/components/text-field.js +3 -3
- package/dist/components/text-field.mjs +1 -1
- package/dist/components/textarea-new.js +3 -3
- 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 +3 -3
- package/dist/components/time-picker-new.mjs +1 -1
- package/dist/components/time-picker.js +3 -3
- package/dist/components/time-picker.mjs +1 -1
- package/dist/components/toast.js +3 -3
- 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/animations.css +2 -1
- package/dist/styles/colors.css +1 -1
- package/dist/styles/fonts.css +2 -2
- package/dist/styles/index.css +2 -2
- package/dist/styles/spacing.css +1 -1
- package/dist/styles/typography.css +1 -1
- package/dist/styles/variables.css +1 -1
- package/package.json +22 -22
- 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 {a as a$1}from'./chunk-
|
|
1
|
+
import {a as a$1}from'./chunk-D3UIF77V.mjs';import {q,d,v}from'./chunk-HPGC2NJ7.mjs';import {a}from'./chunk-BXXLHGZI.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 as a$1}from'./chunk-
|
|
1
|
+
import {a as a$1}from'./chunk-LMTR2WE2.mjs';import {d}from'./chunk-HPGC2NJ7.mjs';import {a}from'./chunk-BXXLHGZI.mjs';import*as e from'@radix-ui/react-tabs';import o from'react';import {cva}from'cva';import {jsx,jsxs}from'react/jsx-runtime';var k=["ghost","fill","fillWithCloseButton"],D=["sm","md"],y=cva({base:"group relative shrink-0 px-4 leading-[130%] text-neutral-900 transition-all disabled:text-neutral-500",variants:{variant:{ghost:"not-disabled:hover:bg-primary-100 rounded-sm font-semibold",fill:"[&:not(:disabled)]:aria-selected:elevation-10 not-disabled:hover:border-primary-300 not-disabled:hover:text-primary-700 not-disabled:aria-selected:text-primary-500 rounded-lg rounded-b-none! border-1 border-b-0! border-transparent aria-selected:bg-neutral-50 aria-selected:font-semibold",fillWithCloseButton:"[&:not(:disabled)]:aria-selected:elevation-10 bg-primary-100 not-disabled:hover:border-primary-300 not-disabled:hover:bg-primary-100 not-disabled:hover:text-primary-700 not-disabled:aria-selected:text-primary-500 rounded-lg rounded-b-none! border-1 border-b-0! border-transparent aria-selected:font-semibold not-disabled:not-[&:hover]:aria-selected:bg-neutral-50 not-disabled:hover:aria-selected:border-transparent not-disabled:hover:aria-selected:bg-neutral-50"},size:{sm:"h-10 text-sm",md:"h-12 text-base"}}}),P=cva({base:"mr-2 flex shrink-0 transition-all ease-linear group-aria-selected:not-disabled:text-neutral-900",variants:{size:{sm:"",md:""}}}),C=cva({base:"group-aria-selected:bg-primary-500 absolute bottom-0 h-0 w-full rounded-sm transition-all group-disabled:bg-neutral-500 group-aria-selected:h-1 group-disabled:group-aria-selected:h-0",variants:{variant:{ghost:"flex",fill:"hidden",fillWithCloseButton:"hidden"}}}),R=cva({variants:{variant:{ghost:"",fill:"elevation-10 rounded-lg bg-neutral-50 pt-6 before:absolute before:right-0 before:left-0 before:h-5 before:rounded-lg before:rounded-b-none before:bg-neutral-50 before:content-['']",fillWithCloseButton:"elevation-10 rounded-lg bg-neutral-50 pt-6 before:absolute before:right-0 before:left-0 before:h-5 before:rounded-lg before:rounded-b-none before:bg-neutral-50 before:content-['']"},size:{sm:"",md:""}},compoundVariants:[{variant:"fill",size:"sm",className:"before:top-10"},{variant:"fill",size:"md",className:"before:top-12"},{variant:"fillWithCloseButton",size:"sm",className:"before:top-10"},{variant:"fillWithCloseButton",size:"md",className:"before:top-12"}]}),f=o.createContext({}),I=o.forwardRef(({className:i,size:a$1="sm",variant:t="ghost",...s},l)=>jsx(f.Provider,{value:{size:a$1,variant:t},children:jsx(e.Root,{"data-tab-variant":t,ref:l,...s,className:a(i,"relative")})})),N=o.forwardRef(({className:i,...a$1},t)=>{let{variant:s}=o.useContext(f);return jsx(e.List,{ref:t,...a$1,className:a("no-scrollbar flex max-w-full space-x-2 overflow-x-scroll",s!=="ghost"&&"px-6",i)})});N.displayName=e.List.displayName;var z=o.forwardRef(({className:i,badgeNumber:a$2,disabled:t,variant:s,StartIcon:l,onClose:T,...v},h)=>{let{size:d$1,variant:x}=o.useContext(f),n=s??x;return jsx(e.Trigger,{"data-tab-variant":n,ref:h,disabled:t,className:y({size:d$1,variant:n,className:i}),...v,children:jsxs("div",{className:"flex flex-col items-center justify-center",children:[jsxs("div",{className:"flex items-center justify-center",children:[l&&jsx(l,{className:P({size:d$1}),size:d$1==="sm"?12:14}),v.children,jsxs("div",{className:a("flex items-center gap-1 empty:hidden",n==="ghost"&&"ml-1",n==="fill"&&"ml-3",n==="fillWithCloseButton"&&"ml-3"),children:[!t&&a$2&&jsx(a$1,{variant:"alert",size:d$1==="sm"?"sm":"md",content:String(a$2)}),n==="fillWithCloseButton"&&jsx(d,{onPointerDown:p=>{p.preventDefault(),p.stopPropagation(),T?.(p);},className:"transition-colors group-aria-selected:not-disabled:text-neutral-900",size:14})]})]}),jsx("div",{className:C({variant:n})})]})})});z.displayName=e.Trigger.displayName;var W=o.forwardRef(({className:i,...a},t)=>{let{variant:s,size:l}=o.useContext(f);return jsx(e.Content,{ref:t,className:R({variant:s,size:l,className:i}),...a})});W.displayName=e.Content.displayName;export{k as a,D as b,I as c,N as d,z as e,W as f};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {i,h as h$1}from'./chunk-
|
|
1
|
+
import {i,h as h$1}from'./chunk-HPGC2NJ7.mjs';import {a}from'./chunk-BXXLHGZI.mjs';import {DatePickerRootProvider,useDatePicker,parseDate,DatePicker}from'@ark-ui/react/date-picker';import {LocaleProvider}from'@ark-ui/react/locale';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var C=DatePickerRootProvider,N=useDatePicker,k=parseDate,R=LocaleProvider,h=({className:o,context:r,...t})=>r?jsx(DatePicker.RootProvider,{value:r,children:jsx(m,{className:o})}):jsx(DatePicker.Root,{...t,open:true,selectionMode:"single",numOfMonths:1,value:t.value?[k(t.value)]:void 0,asChild:true,children:jsx(m,{className:o})}),m=({className:o})=>jsx("div",{className:a("w-full max-w-150 min-w-70 rounded-xl bg-neutral-50 p-3 ring ring-neutral-200 ring-inset",o),children:jsx(DatePicker.View,{view:"day",children:jsx(DatePicker.Context,{children:r=>jsxs(Fragment,{children:[jsxs(DatePicker.ViewControl,{className:"flex items-center justify-between p-2",children:[jsx(DatePicker.PrevTrigger,{className:"cursor-pointer p-1.75",children:jsx(i,{className:"size-4.5"})}),jsx(DatePicker.ViewTrigger,{disabled:true,children:jsx(DatePicker.RangeText,{className:"font-inter text-base leading-[140%] font-semibold text-neutral-900"})}),jsx(DatePicker.NextTrigger,{className:"cursor-pointer p-1.75",children:jsx(h$1,{className:"size-4.5"})})]}),jsxs(DatePicker.Table,{className:"mt-3 w-full",children:[jsx(DatePicker.TableHead,{children:jsx(DatePicker.TableRow,{children:r.weekDays.map((t,l)=>jsx(DatePicker.TableHeader,{className:"font-inter h-10 w-[9.34579439%] text-sm font-semibold text-neutral-900",children:t.narrow},l))})}),jsx(DatePicker.TableBody,{children:r.weeks.map((t,l)=>jsx(DatePicker.TableRow,{children:t.map((s,u)=>jsx(DatePicker.TableCell,{value:s,className:"relative before:block before:pb-[87.7%] before:content-['']",children:jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:jsx(DatePicker.TableCellTrigger,{className:a("font-base font-inter flex size-8 cursor-pointer items-center justify-center rounded-full text-sm leading-[142.86%] text-neutral-900 transition-colors","[&:not([data-today])]:[&:not([data-disabled])]:[&:not([data-selected])]:hover:bg-primary-50","data-[outside-range]:cursor-not-allowed data-[outside-range]:text-neutral-400","data-[disabled]:cursor-not-allowed data-[disabled]:text-neutral-400","data-[selected]:bg-primary-500 data-[selected]:text-neutral-50","data-[selected]:hover:bg-primary-300 data-[selected]:hover:text-neutral-900","data-[today]:ring-primary-500 [&:not([data-selected])]:[&:not([data-disabled])]:data-[today]:text-primary-500 [&:not([data-selected])]:data-[today]:ring","[&:not([data-selected])]:[&:not([data-disabled])]:data-[today]:hover:ring-primary-600 [&:not([data-selected])]:[&:not([data-disabled])]:data-[today]:hover:text-primary-600","data-[disabled]:data-[today]:text-neutral-400 data-[disabled]:data-[today]:ring-neutral-400"),children:s.day})})},u))},l))})]})]})})})});export{C as a,N as b,k as c,R as d,h as e};
|
|
@@ -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-LMTR2WE2.mjs';import {g}from'./chunk-HPGC2NJ7.mjs';import {a}from'./chunk-BXXLHGZI.mjs';import*as c from'react';import*as e from'@radix-ui/react-accordion';export{e as a };import {jsx,jsxs}from'react/jsx-runtime';var S=["sm","md"],k=c.forwardRef(({className:i,children:r,size:o="md",hasBorder:a$1=false,...s},m)=>jsx(e.Root,{"data-border":a$1,"data-size":o,className:a("group/root space-y-2",i),...s,ref:m,children:r})),y=c.forwardRef(({className:i,...r},o)=>jsx(e.Item,{ref:o,className:a("rounded-lg bg-neutral-50","group-data-[border=true]/root:ring-1 group-data-[border=true]/root:ring-neutral-200 group-data-[border=true]/root:ring-inset",i),...r}));y.displayName="AccordionItem";var P=c.forwardRef(({className:i,children:r,...o},a$1)=>jsx(e.Header,{className:"flex",children:jsxs(e.Trigger,{ref:a$1,className:a("group flex flex-1 items-center justify-between p-4 transition-all [&[data-state=open]>svg]:rotate-180",i),...o,children:[r,jsx(g,{className:"h-6 w-6 shrink-0 transition-transform duration-200 group-disabled:text-neutral-500"})]})}));P.displayName=e.Trigger.displayName;var x=c.forwardRef(({className:i,title:r,description:o,onEndButtonClick:a$2,StartIcon:s,EndIcon:m,children:N,badgeNumber:g$1,chipStatus:p,...v},A)=>jsx(e.Header,{className:"flex",children:jsxs(e.Trigger,{title:r,ref:A,className:a("group hover:not-disabled:bg-primary-100 flex flex-1 items-center justify-between gap-3 rounded-lg p-2 pl-3 transition-all [&[data-state=open]>div>.chevron-icon]:rotate-180",a(!o&&"min-h-12",o&&"group-data-[size=md]/root:min-h-15.75 group-data-[size=sm]/root:min-h-12"),i),...v,children:[jsxs("div",{className:"flex",children:[s&&jsx(s,{className:"mr-2 h-4.5 w-4.5 text-neutral-900 group-disabled:text-neutral-500 group-data-[size=md]/root:h-4.5 group-data-[size=md]/root:w-4.5 group-data-[size=sm]:h-3.5 group-data-[size=sm]/root:w-3.5"}),jsxs("div",{children:[jsx("p",{className:"text-left text-base leading-[125%]! font-semibold text-neutral-900 group-disabled:text-neutral-500 group-data-[size=sm]/root:text-sm",children:r}),jsx("p",{className:"text-left text-sm leading-[130%] font-normal tracking-[0.28px] text-neutral-700 group-disabled:text-neutral-500 group-data-[size=sm]/root:text-xs",children:o})]})]}),jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[p&&jsx(d,{variant:p.variant,type:p.type,size:"xs",className:"shrink-0",children:p.text}),g$1?.toString()&&jsx(a$1,{variant:"alert",size:"md",content:g$1.toString()}),m&&jsx(m,{className:"m-1.75 text-neutral-900 group-disabled:text-neutral-500",size:18,onClick:R=>{R.stopPropagation(),a$2?.();}}),jsx(g,{className:"chevron-icon h-4.5 w-4.5 shrink-0 transition-transform duration-200 group-disabled:text-neutral-500"})]})]})}));x.displayName=e.Trigger.displayName;var h=c.forwardRef(({className:i,children:r,...o},a$1)=>jsx(e.Content,{ref:a$1,className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden",...o,children:jsx("div",{className:a("pr-2 pl-3 group-data-[size=md]/root:py-4 group-data-[size=sm]/root:py-2",i),children:r})}));h.displayName=e.Content.displayName;export{S as b,k as c,y as d,P as e,x as f,h as g};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {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-CIPINJVB.mjs';import {c}from'./chunk-ALIUXOM2.mjs';import {a}from'./chunk-D3UIF77V.mjs';import {e}from'./chunk-HPGC2NJ7.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 {c as c$1}from'./chunk-AI4D6AOK.mjs';import {c}from'./chunk-
|
|
1
|
+
import {c as c$1}from'./chunk-AI4D6AOK.mjs';import {c}from'./chunk-U7VHIEIU.mjs';import {d}from'./chunk-HPGC2NJ7.mjs';import {a}from'./chunk-BXXLHGZI.mjs';import {Dialog}from'@ark-ui/react/dialog';import {Portal}from'@ark-ui/react/portal';import {forwardRef,useCallback}from'react';import {jsxs,jsx}from'react/jsx-runtime';var j=({onOpenChange:a,...o})=>{let r=useCallback(t=>{a?.(t.open);},[a]);return jsx(Dialog.Root,{unmountOnExit:true,lazyMount:true,onOpenChange:r,...o})},S=Dialog.Trigger,X=["sm","md","lg","xl"],C=forwardRef(({children:a$1,className:o,size:r="sm",...t},s)=>jsxs(Portal,{children:[jsx(Dialog.Backdrop,{className:"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-40 bg-neutral-900/60"}),jsx(Dialog.Positioner,{className:"fixed top-0 left-0 z-40 flex h-dvh w-dvw items-center justify-end",children:jsx(Dialog.Content,{ref:s,className:a("elevation-10 data-[state=closed]:animate-swipe-out data-[state=open]:animate-slide-in h-full bg-neutral-50",r==="sm"&&"w-117.5",r==="md"&&"w-187",r==="lg"&&"w-235",r==="xl"&&"w-312",o),...t,children:jsx("div",{className:"flex h-full flex-1 flex-col",children:a$1})})})]}));C.displayName="DrawerContent";var x=forwardRef(({children:a$1,className:o,title:r,buttons:t=[],Icon:s,description:d$1,...f},w)=>jsxs("div",{className:a("border-b border-neutral-200 pt-2 pb-3.75 pl-4.5",o),ref:w,...f,children:[jsx(Dialog.CloseTrigger,{asChild:true,children:jsx(d,{className:"mr-2 ml-auto size-6 cursor-pointer"})}),jsxs("div",{className:"mt-2 mr-4.5 flex items-center justify-between gap-2",children:[s&&jsx(s,{className:"size-6 text-neutral-900"}),jsx(Dialog.Title,{className:"font-jakarta line-clamp-1 flex-1 text-2xl leading-[130%] font-semibold break-all text-neutral-900",children:r}),!Array.isArray(t)&&t.visible!==false&&jsx(c,{size:"sm",variant:"ghost",...(({visible:c,...m})=>m)(t)}),Array.isArray(t)&&jsx("div",{className:"flex gap-1",children:t.map(({visible:c=true,...m},v)=>c?jsx(c$1,{variant:"ghost",size:"sm",...m},v):null)})]}),d$1&&jsx(Dialog.Description,{className:"font-inter mt-1 mr-4.5 line-clamp-2 text-sm leading-[130%] text-neutral-900",children:d$1})]}));x.displayName="DrawerHeader";var P=forwardRef(({children:a$1,className:o,...r},t)=>jsx("div",{className:a("flex justify-end gap-3 border-t-1 border-neutral-200 px-4.5 pt-4.25 pb-4.5",o),ref:t,...r,children:a$1}));P.displayName="DrawerFooter";var T=forwardRef(({children:a$1,className:o,...r},t)=>jsx("div",{className:a("h-full overflow-y-auto px-6 py-4",o),ref:t,...r,children:a$1}));T.displayName="DrawerBody";var q=Dialog.CloseTrigger;export{j as a,S as b,X as c,C as d,x as e,P as f,T as g,q as h};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-36IWPOTT.mjs';import {a as a$1}from'./chunk-BXXLHGZI.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 {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-36IWPOTT.mjs';import {g as g$1}from'./chunk-HPGC2NJ7.mjs';import {a as a$2}from'./chunk-BXXLHGZI.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 {c}from'./chunk-7NJTMO4L.mjs';import {b,e,f,c as c$1,d}from'./chunk-
|
|
1
|
+
import {c}from'./chunk-7NJTMO4L.mjs';import {b,e,f,c as c$1,d}from'./chunk-HPGC2NJ7.mjs';import {a as a$1}from'./chunk-BXXLHGZI.mjs';import {createToaster,Toaster,Toast}from'@ark-ui/react/toast';import {jsx,jsxs}from'react/jsx-runtime';var w=["success","warning","error","info","loading"],T=createToaster({placement:"top",overlap:false,gap:8,duration:5e3}),a="hidden h-6 w-6 animate-in fade-in-0 zoom-in duration-300",h=l=>jsx(Toaster,{toaster:T,...l,children:o=>jsxs(Toast.Root,{className:a$1("group z-(--z-index) flex h-(--height) min-w-70 max-w-100 translate-x-(--x) translate-y-(--y) items-center rounded-lg opacity-(--opacity) transition-all will-change-transform","p-3 pr-2 ring-1 ring-inset data-[state=close]:animate-slide-up data-[state=open]:animate-slide-down","data-[type=success]:bg-success-100 data-[type=success]:ring-success-300","data-[type=info]:bg-info-100 data-[type=info]:ring-info-300","data-[type=warning]:bg-warning-100 data-[type=warning]:ring-warning-300","data-[type=error]:bg-error-100 data-[type=error]:ring-error-300","data-[type=loading]:bg-primary-200 data-[type=loading]:ring-primary-500"),children:[jsx(c,{size:"md",className:"hidden group-data-[type=loading]:block"}),jsx(b,{className:a$1(a,"text-success-500 group-data-[type=success]:block")}),jsx(e,{className:a$1(a,"text-info-500 group-data-[type=info]:block")}),jsx(f,{className:a$1(a,"text-warning-700 group-data-[type=warning]:block")}),jsx(c$1,{className:a$1(a,"text-error-500 group-data-[type=error]:block")}),jsx(Toast.Title,{className:"ml-3 mr-4.5 line-clamp-1 flex-1 font-inter text-sm font-medium leading-[140%] text-neutral-900",children:o.title}),jsx(Toast.CloseTrigger,{className:"m-1.75",children:jsx(d,{className:"h-4.5 w-4.5"})})]},o.id)});export{w as a,T as b,h as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-
|
|
1
|
+
import {a as a$1}from'./chunk-D3UIF77V.mjs';import {q}from'./chunk-HPGC2NJ7.mjs';import {a}from'./chunk-BXXLHGZI.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 {a as a$1}from'./chunk-
|
|
1
|
+
import {a as a$1}from'./chunk-WSG6DGOM.mjs';import {c}from'./chunk-U7VHIEIU.mjs';import {a}from'./chunk-BXXLHGZI.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 {i,h}from'./chunk-
|
|
1
|
+
import {i,h}from'./chunk-HPGC2NJ7.mjs';import {a}from'./chunk-BXXLHGZI.mjs';import {Carousel}from'@ark-ui/react/carousel';import {forwardRef}from'react';import {jsx}from'react/jsx-runtime';var p=forwardRef(({className:e,...r},o)=>jsx(Carousel.Root,{ref:o,className:a("relative w-full",e),...r})),c=forwardRef(({className:e,...r},o)=>jsx(Carousel.Control,{ref:o,className:a("pointer-events-none absolute inset-0 z-10 flex items-center justify-between px-4",e),...r})),m=forwardRef(({className:e,children:r,...o},n)=>jsx(Carousel.PrevTrigger,{ref:n,className:a("pointer-events-auto flex h-8 w-8 items-center justify-center rounded-full bg-white/80 text-gray-600 shadow-lg backdrop-blur-sm transition-all hover:bg-white hover:text-gray-800 focus:ring-2 focus:ring-white/50 focus:outline-none disabled:cursor-not-allowed disabled:opacity-30",e),...o,children:r||jsx(i,{className:"h-4 w-4"})})),g=forwardRef(({className:e,children:r,...o},n)=>jsx(Carousel.NextTrigger,{ref:n,className:a("pointer-events-auto flex h-8 w-8 items-center justify-center rounded-full bg-white/80 text-gray-600 shadow-lg backdrop-blur-sm transition-all hover:bg-white hover:text-gray-800 focus:ring-2 focus:ring-white/50 focus:outline-none disabled:cursor-not-allowed disabled:opacity-30",e),...o,children:r||jsx(h,{className:"h-4 w-4"})})),C=forwardRef(({className:e,...r},o)=>jsx(Carousel.IndicatorGroup,{ref:o,className:a("flex items-center justify-center gap-2",e),...r})),d=forwardRef(({className:e,...r},o)=>jsx(Carousel.Indicator,{ref:o,className:a("bg-primary-100 hover:bg-primary-400 data-[current]:bg-primary-500 h-2 w-2 rounded-full shadow transition-all duration-300 data-[current]:scale-125",e),...r})),f=forwardRef(({className:e,...r},o)=>jsx(Carousel.ItemGroup,{ref:o,className:a("flex overflow-hidden",e),...r})),P=forwardRef(({className:e,...r},o)=>jsx(Carousel.Item,{ref:o,className:a("w-full flex-none",e),...r})),v=forwardRef(({className:e,...r},o)=>jsx("div",{ref:o,className:a("overflow-hidden rounded-lg",e),...r})),R=Object.assign(p,{Root:p,Control:c,PrevTrigger:m,NextTrigger:g,IndicatorGroup:C,Indicator:d,ItemGroup:f,Item:P,Viewport:v});export{p as a,c as b,m as c,g as d,C as e,d as f,f as g,P as h,v as i,R as j};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a}from'./chunk-36IWPOTT.mjs';import {p}from'./chunk-HPGC2NJ7.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}from'./chunk-
|
|
1
|
+
import {a as a$1}from'./chunk-HPGC2NJ7.mjs';import {a}from'./chunk-BXXLHGZI.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-BXXLHGZI.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-D3UIF77V.mjs';import {q,d,u as u$1,i,h}from'./chunk-HPGC2NJ7.mjs';import {a}from'./chunk-BXXLHGZI.mjs';import {DatePicker}from'@ark-ui/react/date-picker';import {Portal}from'@ark-ui/react/portal';import {forwardRef}from'react';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var v=forwardRef(({helperText:f,error:m,label:b,required:T,className:w,tooltip:p,...r},C)=>jsxs(DatePicker.Root,{ref:C,className:a("group flex flex-col",w),...r,positioning:{placement:"bottom-end"},"data-error":m,children:[jsxs(DatePicker.Label,{className:"font-inter flex items-center text-xs leading-[133.33%] font-medium text-neutral-700 data-[disabled]:text-neutral-400",children:[T?jsxs("span",{className:"flex items-center gap-1",children:[jsx("span",{className:"text-red-500",children:"*"}),b]}):b,p&&jsx(a$1,{content:p,className:"ml-2",children:jsx(q,{className:"size-3.5"})})]}),jsxs(DatePicker.Control,{className:"mt-1.125 has-focus:ring-primary-800 group-data-[error=true]:ring-error-500 relative flex w-full items-center justify-between gap-2 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]:cursor-not-allowed data-[disabled]:ring-neutral-400",children:[jsx(DatePicker.Input,{className:a("font-inter peer cursor-inherit w-full py-2.5 pl-2 text-sm focus:outline-none disabled:text-neutral-400",r.readOnly&&"pointer-events-none"),tabIndex:r.readOnly?-1:void 0}),!r.readOnly&&!r.disabled&&jsx(DatePicker.ClearTrigger,{className:a("cursor-pointer",r.readOnly&&"pointer-events-none"),tabIndex:r.readOnly?-1:void 0,children:jsx(d,{className:"size-4.5 text-neutral-700"})}),m&&jsx(q,{className:"text-error-500 size-4.5 shrink-0"}),jsx(DatePicker.Trigger,{className:a("peer-focus:ring-primary-800 focus:ring-primary-800 group-data-[error=true]:ring-error-500 flex h-10 w-10 shrink-0 cursor-pointer items-center justify-center bg-neutral-100 text-neutral-700 ring ring-neutral-500 transition-shadow group-data-[disabled]:cursor-not-allowed group-data-[error=true]:ring-2 group-data-[readonly]:ring-neutral-300 peer-read-only:text-neutral-400 peer-focus:ring-2 focus:ring-2 focus:outline-none disabled:ring-neutral-400",r.readOnly&&"pointer-events-none"),tabIndex:r.readOnly?-1:void 0,children:jsx(u$1,{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 group-data-[disabled]:text-neutral-400 empty:hidden",children:f}),jsx(Portal,{children:jsx(DatePicker.Positioner,{className:"!z-51",children:jsxs(DatePicker.Content,{className:"elevation-9 rounded-xl bg-neutral-50 p-3",children:[jsx(DatePicker.View,{view:"day",children:jsx(DatePicker.Context,{children:o=>jsxs(Fragment,{children:[jsx(u,{}),jsxs(DatePicker.Table,{children:[jsx(DatePicker.TableHead,{children:jsx(DatePicker.TableRow,{children:o.weekDays.map((n,i)=>jsx(DatePicker.TableHeader,{className:"font-inter h-10 text-sm font-semibold text-neutral-900",children:n.narrow},i))})}),jsx(DatePicker.TableBody,{children:o.weeks.map((n,i)=>jsx(DatePicker.TableRow,{children:n.map((l,d)=>jsx(DatePicker.TableCell,{value:l,children:jsx(DatePicker.TableCellTrigger,{className:a("font-inter mx-0.75 my-1 flex h-8 w-8 cursor-pointer items-center justify-center rounded-full text-center text-sm leading-[142.86%] font-normal text-neutral-900","[&:not([data-today])]:[&:not([data-disabled])]:[&:not([data-selected])]:hover:bg-primary-50","data-[outside-range]:cursor-not-allowed data-[outside-range]:text-neutral-400","data-[disabled]:cursor-not-allowed data-[disabled]:text-neutral-400","data-[selected]:bg-primary-500 data-[selected]:text-neutral-50","data-[selected]:hover:bg-primary-300 data-[selected]:hover:text-neutral-900","data-[today]:ring-primary-500 [&:not([data-selected])]:[&:not([data-disabled])]:data-[today]:text-primary-500 [&:not([data-selected])]:data-[today]:ring","[&:not([data-selected])]:[&:not([data-disabled])]:data-[today]:hover:ring-primary-600 [&:not([data-selected])]:[&:not([data-disabled])]:data-[today]:hover:text-primary-600","data-[disabled]:data-[today]:text-neutral-400 data-[disabled]:data-[today]:ring-neutral-400"),children:l.day})},d))},i))})]})]})})}),jsx(DatePicker.View,{view:"month",children:jsx(DatePicker.Context,{children:o=>jsxs(Fragment,{children:[jsx(u,{}),jsx(DatePicker.Table,{children:jsx(DatePicker.TableBody,{children:o.getMonthsGrid({columns:4,format:"short"}).map((n,i)=>jsx(DatePicker.TableRow,{children:n.map((l,d)=>jsx(DatePicker.TableCell,{value:l.value,children:jsx(DatePicker.TableCellTrigger,{className:"font-inter hover:bg-primary-100 data-[selected]:bg-primary-200 data-[selected]:text-primary-600 flex h-12 w-16.5 cursor-pointer items-center justify-center rounded-lg text-center text-sm font-normal transition-colors",children:l.label})},d))},i))})})]})})}),jsx(DatePicker.View,{view:"year",children:jsx(DatePicker.Context,{children:o=>jsxs(Fragment,{children:[jsx(u,{}),jsx(DatePicker.Table,{children:jsx(DatePicker.TableBody,{children:o.getYearsGrid({columns:4}).map((n,i)=>jsx(DatePicker.TableRow,{children:n.map((l,d)=>jsx(DatePicker.TableCell,{value:l.value,children:jsx(DatePicker.TableCellTrigger,{className:"font-inter hover:bg-primary-100 data-[selected]:bg-primary-200 data-[selected]:text-primary-600 flex h-12 w-16.5 cursor-pointer items-center justify-center rounded-lg text-center text-sm font-normal transition-colors",children:l.label})},d))},i))})})]})})})]})})})]}));v.displayName="DatePickerNew";var u=()=>jsxs(DatePicker.ViewControl,{className:"my-1 flex items-center justify-between",children:[jsx(DatePicker.PrevTrigger,{className:"cursor-pointer p-1.75",children:jsx(i,{className:"size-4.5"})}),jsx(DatePicker.ViewTrigger,{children:jsx(DatePicker.RangeText,{className:"font-inter cursor-pointer rounded-sm px-2 text-base leading-[150%] font-semibold text-neutral-900 transition-colors"})}),jsx(DatePicker.NextTrigger,{className:"cursor-pointer p-1.75",children:jsx(h,{className:"size-4.5"})})]});export{v 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-ZMOECORK.mjs';import {a as a$5}from'./chunk-KTRSJBA4.mjs';import {a as a$4}from'./chunk-36IWPOTT.mjs';import {c as c$3}from'./chunk-AI4D6AOK.mjs';import {c as c$2}from'./chunk-ALIUXOM2.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-WSG6DGOM.mjs';import {a}from'./chunk-ZVH4QTK4.mjs';import {a as a$3}from'./chunk-LMTR2WE2.mjs';import {c}from'./chunk-U7VHIEIU.mjs';import {c as c$1,h}from'./chunk-HPGC2NJ7.mjs';import {a as a$2}from'./chunk-BXXLHGZI.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 as a$1}from'./chunk-
|
|
1
|
+
import {a as a$1}from'./chunk-D3UIF77V.mjs';import {q}from'./chunk-HPGC2NJ7.mjs';import {a}from'./chunk-BXXLHGZI.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}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-BXXLHGZI.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 {a}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-BXXLHGZI.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}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-BXXLHGZI.mjs';import {forwardRef,useCallback}from'react';import {Popover}from'@ark-ui/react/popover';import {Portal}from'@ark-ui/react/portal';import {jsx}from'react/jsx-runtime';var F=({portalled:e,lazyMount:a=true,autoFocus:n=false,onOpenChange:r,unmountOnExit:v=true,modal:p=true,positioning:d={placement:"bottom-end"},...l})=>{let m=useCallback(s=>{r?.(s.open);},[r]);return jsx(Popover.Root,{portalled:e,positioning:d,lazyMount:a,autoFocus:n,modal:p,onOpenChange:m,...l})},N=Popover.Trigger,c=forwardRef(({className:e,...a$1},n)=>jsx(Portal,{children:jsx(Popover.Positioner,{children:jsx(Popover.Content,{ref:n,className:a("elevation-9 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 z-50 overflow-hidden rounded-sm bg-neutral-50","data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95","data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95","data-[placement=bottom]:origin-top data-[placement=bottom-end]:origin-top-right data-[placement=bottom-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=right]:origin-left data-[placement=right-end]:origin-bottom-left data-[placement=right-start]:origin-top-left","data-[placement=left]:origin-right data-[placement=left-end]:origin-bottom-right data-[placement=left-start]:origin-top-right",e),...a$1})})}));c.displayName=Popover.Content.displayName;export{F as a,N as b,c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-BXXLHGZI.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 {d}from'./chunk-
|
|
1
|
+
import {d}from'./chunk-HPGC2NJ7.mjs';import {a}from'./chunk-BXXLHGZI.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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-
|
|
1
|
+
import {a as a$1}from'./chunk-D3UIF77V.mjs';import {q,d,g}from'./chunk-HPGC2NJ7.mjs';import {a}from'./chunk-BXXLHGZI.mjs';import {useListCollection,useCombobox,Combobox,useComboboxContext}from'@ark-ui/react/combobox';import {useFilter}from'@ark-ui/react/locale';import {Portal}from'@ark-ui/react/portal';import {useRef,useCallback,useEffect}from'react';import {jsxs,jsx}from'react/jsx-runtime';var K=({title:n,titleLines:l=2,description:a$1,descriptionLines:p=1,Icon:u,iconAsColumn:s=true,className:c,...m})=>jsxs("div",{className:a("flex gap-2 py-4 pl-4 pr-6",s&&"flex-col items-center gap-1",!s&&!a$1&&"items-center"),...m,children:[u&&jsx(u,{className:a("shrink-0 text-neutral-300"),size:24}),jsxs("div",{className:a("flex flex-col gap-1",s&&"text-center"),children:[jsx("p",{className:a("leading-[130%] text-neutral-500",!!a$1&&"font-medium"),style:l?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:l}:void 0,children:n}),a$1&&jsx("p",{className:"text-sm leading-[130%] text-neutral-500",style:p?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:p}:void 0,children:a$1})]})]}),V=K;function _(){let n=useComboboxContext(),l=useRef(false);return n.value.length&&n.collection.size&&!l.current&&(n.syncSelectedItems(),l.current=true),null}var de=n=>{let{label:l,error:a$2,required:p,tooltip:u,readOnly:s,options:c,onInputValueChange:m,onSelect:d$1,defaultValue:v,helperText:O,noResultsTitle:k,noResultsDescription:A,noResultsIcon:D,noResultsTitleLines:M,noResultsDescriptionLines:z,value:h,className:E,...H}=n,F=Object.getOwnPropertyNames(n),b=useRef(null),{contains:G}=useFilter({sensitivity:"base"}),{collection:g$1,filter:x,set:W}=useListCollection({initialItems:[],itemToString:t=>t.label,itemToValue:t=>String(t.value),filter:G}),B=useCallback(t=>{let w=c.find(j=>String(j.value)===t.itemValue);w&&d$1?.(w);},[d$1,c]),T=useCallback(t=>{x(t.inputValue),t.reason!==void 0&&m?.(t.inputValue??"");},[x,m]),q$1=useCombobox({collection:g$1,defaultValue:v?[String(v)]:void 0,placeholder:n.placeholder,inputValue:n.inputValue,onInputValueChange:T,value:F.includes("value")?h?[String(h)]:[]:void 0,onSelect:B,inputBehavior:"autocomplete",openOnClick:true,...H}),U=useCallback(()=>{d$1?.(null),T?.({inputValue:"",reason:"clear-trigger"});},[d$1,m]);return useEffect(()=>{W(c);},[c]),useEffect(()=>{b.current&&b.current.value===""&&x("");},[x,b.current?.value]),jsxs(Combobox.RootProvider,{value:q$1,"data-error":a$2,className:a("group flex flex-col",E),children:[jsxs(Combobox.Label,{className:"font-inter flex items-center text-xs leading-[133.33%] font-medium text-neutral-700 data-[disabled]:text-neutral-400",children:[p?jsxs("span",{className:"flex items-center gap-1",children:[jsx("span",{className:"text-red-500",children:"*"}),l]}):l,u&&jsx(a$1,{content:u,className:"ml-2",children:jsx(q,{className:"size-3.5"})})]}),jsx(_,{}),jsxs(Combobox.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 items-center justify-between gap-2 overflow-hidden rounded-lg bg-neutral-50 px-3 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",s&&"pointer-events-none"),children:[jsx(Combobox.Input,{className:a("font-inter flex w-full justify-between text-left text-sm text-neutral-900 outline-0 group-data-[disabled]/control:text-neutral-400 disabled:cursor-not-allowed data-[placeholder-shown]:text-neutral-500",s&&"pointer-events-none",a$2&&"pr-16"),ref:b}),a$2&&jsx(q,{className:"text-error-500 size-4.5 shrink-0"}),!s&&jsx(Combobox.ClearTrigger,{className:"cursor-pointer",onClick:U,children:jsx(d,{className:"size-4.5"})}),jsx(Combobox.Trigger,{className:"cursor-pointer group-data-[disabled]/control:cursor-not-allowed group-data-[disabled]/control:text-neutral-400",children:jsx(g,{className:"size-4.5 transition-transform will-change-transform group-data-[state=open]/control:rotate-180"})})]}),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:O}),jsx(Portal,{children:jsx(Combobox.Positioner,{className:"!z-10000",children:jsx(Combobox.Content,{className:"elevation-9 max-h-67.5 min-w-27.5 overflow-auto rounded-lg bg-neutral-50",children:jsxs(Combobox.ItemGroup,{children:[g$1.items.length>0&&g$1.items.map(t=>jsx(Combobox.Item,{item:t,className:"font-inter data-[highlighted]:bg-primary-100 cursor-pointer p-3 data-[disabled]:cursor-not-allowed data-[disabled]:text-neutral-400",children:jsx(Combobox.ItemText,{className:"flex flex-col gap-1",asChild:true,children:jsxs("div",{children:[jsx("p",{className:"text-sm leading-[130%] font-medium",children:t.label}),t.description&&jsx("p",{className:"text-xs leading-[130%]",children:t.description})]})})},t.value)),g$1.items.length===0&&jsx(V,{title:k,description:A,Icon:D,descriptionLines:z,titleLines:M})]})})})})]})};export{V as a,de as b};
|