sodtrack-web-ui 0.112.8 → 0.113.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-YUSQ73QO.js → chunk-26H6YVZC.js} +1 -1
- package/dist/chunk-3RNV3YTB.js +1 -0
- package/dist/{chunk-NYKOLIK5.js → chunk-3ZKC3JEV.js} +1 -1
- package/dist/{chunk-NLCRET6U.js → chunk-4UUTVKB5.js} +1 -1
- package/dist/{chunk-YHHMKRFI.js → chunk-5BWDWSAE.js} +1 -1
- package/dist/{chunk-OTRPBVPA.js → chunk-5QLRMS5H.js} +1 -1
- package/dist/{chunk-UADPCRRN.js → chunk-6JU7PZ2E.js} +1 -1
- package/dist/{chunk-BAFBHJ4N.js → chunk-6R4QD7UB.js} +1 -1
- package/dist/{chunk-3CZ2KAAO.js → chunk-7CJMO5NP.js} +1 -1
- package/dist/{chunk-5USZFHQ3.js → chunk-AAG6PKX4.js} +1 -1
- package/dist/{chunk-XX24NRCV.js → chunk-AX3IY4H5.js} +1 -1
- package/dist/{chunk-CVB6QECB.js → chunk-BGUGHVZE.js} +1 -1
- package/dist/{chunk-MIFLHS2U.js → chunk-BZSVUE6P.js} +1 -1
- package/dist/chunk-CY5DLXHV.js +1 -0
- package/dist/{chunk-JYWCOBZ4.js → chunk-D22S2MCI.js} +1 -1
- package/dist/{chunk-H5DYUB3D.js → chunk-HG4TNADH.js} +1 -1
- package/dist/{chunk-3IDC3JMI.js → chunk-JHZS24VR.js} +1 -1
- package/dist/{chunk-M6UOOC35.js → chunk-K2S6L5P6.js} +1 -1
- package/dist/{chunk-FCW3THVC.js → chunk-KFQ6HMV2.js} +1 -1
- package/dist/{chunk-HSE5TAZN.js → chunk-KXZ7WJDS.js} +1 -1
- package/dist/{chunk-JPBMOWZ6.js → chunk-NZ4NWU2A.js} +1 -1
- package/dist/{chunk-HJ4VLHOB.js → chunk-P6LEAWO4.js} +1 -1
- package/dist/{chunk-QYA5ZUUN.js → chunk-P7NW2XNB.js} +1 -1
- package/dist/{chunk-HHWKOYUR.js → chunk-PDTAPAIU.js} +1 -1
- package/dist/{chunk-R22252H7.js → chunk-Q2KEE7CU.js} +1 -1
- package/dist/{chunk-6M7NDF3Y.js → chunk-QR5CN2UH.js} +1 -1
- package/dist/{chunk-VJ53UZ4I.js → chunk-QUDRNTHO.js} +1 -1
- package/dist/{chunk-KZKB6YZV.js → chunk-RA7JT6A7.js} +1 -1
- package/dist/{chunk-R7432E5X.js → chunk-RZKRZ2RL.js} +1 -1
- package/dist/{chunk-RYRR246Y.js → chunk-S2MRTQV3.js} +1 -1
- package/dist/{chunk-O5YTKZRS.js → chunk-SOAQVANY.js} +1 -1
- package/dist/{chunk-MIJOFGIR.js → chunk-T5NU5E4O.js} +1 -1
- package/dist/{chunk-CN7PQ4FN.js → chunk-U5V4RBJ2.js} +1 -1
- package/dist/chunk-UU4Q7DM2.js +1 -0
- package/dist/{chunk-YICVRPFF.js → chunk-UX34GVYJ.js} +1 -1
- package/dist/{chunk-G7UXRXDL.js → chunk-VH2FEV7Y.js} +1 -1
- package/dist/{chunk-7BYNIHXM.js → chunk-WOG6TMFF.js} +1 -1
- package/dist/{chunk-5M57ML72.js → chunk-X7KMSQTD.js} +1 -1
- package/dist/{chunk-OZZ6TJPQ.js → chunk-ZK7M4IJV.js} +1 -1
- package/dist/{chunk-U6DML7W5.js → chunk-ZZSDE7IY.js} +1 -1
- package/dist/{chunk-BVGUYGLJ.js → chunk-ZZTZGH6L.js} +1 -1
- package/dist/components/alert-dialog.js +1 -1
- package/dist/components/alert-message.js +1 -1
- package/dist/components/attachment-card.js +1 -1
- package/dist/components/autocomplete-multiple.js +1 -1
- package/dist/components/autocomplete-skeleton.js +1 -1
- package/dist/components/autocomplete.js +1 -1
- package/dist/components/avatar.d.ts +7 -2
- package/dist/components/avatar.js +1 -1
- package/dist/components/badge-alert.d.ts +71 -0
- package/dist/components/badge-alert.js +1 -0
- package/dist/components/button-active.js +1 -1
- package/dist/components/button-menu.js +1 -1
- package/dist/components/button.js +1 -1
- package/dist/components/card-basic.js +1 -1
- package/dist/components/card-expandable.js +1 -1
- package/dist/components/card-form.js +1 -1
- package/dist/components/choice-chips.js +1 -1
- package/dist/components/data-table.js +1 -1
- package/dist/components/date-picker.js +1 -1
- package/dist/components/dialog.js +1 -1
- package/dist/components/drawer-bar.js +1 -1
- package/dist/components/drawer.js +1 -1
- package/dist/components/dropzone.js +1 -1
- package/dist/components/empty-state.js +1 -1
- package/dist/components/error-screen.js +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -1
- package/dist/components/list-item-arrow.js +1 -1
- package/dist/components/list-item-button.js +1 -1
- package/dist/components/list-item-checkbox-left.js +1 -1
- package/dist/components/list-item-checkbox.js +1 -1
- package/dist/components/list-item.js +1 -1
- package/dist/components/list-item_old.js +1 -1
- package/dist/components/menu.js +1 -1
- package/dist/components/note-card.js +1 -1
- package/dist/components/number-field.js +1 -1
- package/dist/components/radio.js +1 -1
- package/dist/components/select-skeleton.js +1 -1
- package/dist/components/select.js +1 -1
- package/dist/components/sidebar.js +1 -1
- package/dist/components/signature-pad.js +1 -1
- package/dist/components/snackbar.js +1 -1
- package/dist/components/table.js +1 -1
- package/dist/components/text-field.js +1 -1
- package/dist/components/textarea.js +1 -1
- package/dist/components/time-picker.js +1 -1
- package/dist/components/tooltip.js +1 -1
- package/dist/components/tracker-item.js +1 -1
- package/dist/preferences.js +1 -1
- package/dist/styles/index.css +1 -1
- package/package.json +1 -1
- package/dist/chunk-GB2SAYAL.js +0 -1
- package/dist/chunk-HIULYFIC.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import {b}from'./chunk-S5L3GKMK.js';import {a as a$2}from'./chunk-NGC5DGW6.js';import {c,d}from'./chunk-TW4CJXQY.js';import {a as a$3}from'./chunk-VIMWKUML.js';import {a}from'./chunk-
|
|
1
|
+
import {b}from'./chunk-S5L3GKMK.js';import {a as a$2}from'./chunk-NGC5DGW6.js';import {c,d}from'./chunk-TW4CJXQY.js';import {a as a$3}from'./chunk-VIMWKUML.js';import {a}from'./chunk-T5NU5E4O.js';import {v}from'./chunk-QMPBFFFC.js';import {a as a$1}from'./chunk-OBZIYJO7.js';import {DatePicker}from'@ark-ui/react/date-picker';import {Portal}from'@ark-ui/react/portal';import {forwardRef}from'react';import {jsxs,jsx}from'react/jsx-runtime';var y=forwardRef(({className:D,disabled:o,error:a$4,helperText:d$1,label:P,readOnly:t,required:f,tooltip:h,...b$1},C)=>{let n=c({error:a$4,disabled:o,readOnly:t});return jsxs(DatePicker.Root,{ref:C,...b$1,disabled:o,readOnly:t,positioning:{placement:"bottom-end"},"data-error":a$4||void 0,className:n.root({className:D}),children:[jsx(a,{as:DatePicker.Label,label:P,required:f,tooltip:h}),jsxs(DatePicker.Control,{className:a$1(n.control(),"items-center justify-between gap-2 overflow-hidden"),children:[jsx(DatePicker.Input,{className:a$1(n.input(),"peer cursor-inherit py-2.5 pl-2"),tabIndex:t?-1:void 0}),!t&&!o&&jsx(a$2,{as:DatePicker.ClearTrigger}),a$4&&jsx(d,{}),jsx(DatePicker.Trigger,{className:a$1("ring-input-ring rounded-r-input flex h-(--height-input) w-(--height-input) shrink-0 cursor-pointer items-center justify-center bg-neutral-100 text-neutral-700 ring transition-shadow focus:outline-none","peer-focus:ring-input-ring-focus focus:ring-input-ring-focus peer-focus:ring-2 focus:ring-2","group-data-[error=true]:ring-input-ring-error group-data-[error=true]:ring-2","group-data-readonly:ring-input-ring-disabled peer-read-only:text-neutral-400","disabled:ring-input-ring-disabled group-data-disabled:cursor-not-allowed"),tabIndex:t?-1:void 0,children:jsx(v,{className:"size-4.5"})})]}),jsx(a$3,{children:d$1}),jsx(Portal,{children:jsx(DatePicker.Positioner,{children:jsx(DatePicker.Content,{className:"elevation-9 z-layer rounded-xl bg-neutral-50 p-3",children:jsx(b,{})})})})]})});y.displayName="DatePicker";export{y as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a}from'./chunk-OBZIYJO7.js';import {TooltipPositioner,TooltipContent,TooltipArrow,TooltipArrowTip,TooltipRoot,TooltipTrigger}from'@ark-ui/react/tooltip';import {Portal}from'@ark-ui/react/portal';import {useState}from'react';import {jsx,jsxs}from'react/jsx-runtime';var X=({closeDelay:s=500,closeOnClick:d=true,closeOnEscape:c=true,closeOnPointerDown:m=true,closeOnScroll:g=true,interactive:u=true,lazyMount:T=false,openDelay:f=700,unmountOnExit:P=false,positioning:h,content:x,children:a$1,asChild:r=true,contentClassName:y,className:C,portalled:b=true,...N})=>{let[v,E]=useState(0),n=e=>{let l=Number.parseInt(getComputedStyle(e).getPropertyValue("--layer-index"),10);E(Number.isNaN(l)?0:l+1);},H=e=>{n(e.currentTarget);},O=e=>{n(e.currentTarget);},i=jsx(TooltipPositioner,{children:jsxs(TooltipContent,{style:{"--layer-index":v},className:a("font-inter bg-primary-900 z-layer rounded-lg px-3 py-2 text-center text-sm leading-[143%] font-normal whitespace-break-spaces text-neutral-50","data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95","data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95","data-[placement=left]:text-right data-[placement=left-end]:text-right data-[placement=left-start]:text-right","data-[placement=left]:origin-right data-[placement=left-end]:origin-bottom-right data-[placement=left-start]:origin-top-right","data-[placement=right]:text-left data-[placement=right-end]:text-left data-[placement=right-start]:text-left","data-[placement=right]:origin-left data-[placement=right-end]:origin-bottom-left data-[placement=right-start]:origin-top-left","data-[placement=top]:origin-bottom data-[placement=top-end]:origin-bottom-right data-[placement=top-start]:origin-bottom-left","data-[placement=bottom]:origin-top data-[placement=bottom-end]:origin-top-right data-[placement=bottom-start]:origin-top-left",y),children:[jsx(TooltipArrow,{children:jsx(TooltipArrowTip,{})}),x]})});return jsxs(TooltipRoot,{closeDelay:s,closeOnClick:d,closeOnEscape:c,closeOnPointerDown:m,closeOnScroll:g,interactive:u,lazyMount:T,openDelay:f,unmountOnExit:P,positioning:{arrowPadding:16,...h},...N,children:[jsx(TooltipTrigger,{asChild:r,className:a("cursor-inherit text-left",C),onFocusCapture:H,onPointerOverCapture:O,children:r?jsx("div",{children:a$1}):a$1}),b?jsx(Portal,{children:i}):i]})};export{X as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {c,b,a as a$3}from'./chunk-U6RH2BZO.js';import {d}from'./chunk-
|
|
1
|
+
import {c,b,a as a$3}from'./chunk-U6RH2BZO.js';import {d}from'./chunk-SOAQVANY.js';import {a}from'./chunk-RA7JT6A7.js';import {a as a$2}from'./chunk-UIZFLYFP.js';import {e as e$1}from'./chunk-PI7DECIN.js';import {J as J$1,t,u,h}from'./chunk-QMPBFFFC.js';import {e}from'./chunk-P7NW2XNB.js';import {a as a$1}from'./chunk-OBZIYJO7.js';import {createContext,forwardRef,useMemo,useCallback,useContext}from'react';import {Collapsible}from'@ark-ui/react/collapsible';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var j=(e,n,a,o)=>{if(n==="icon"){if(e==="success")return {state:"success",variant:"icon"};if(!a$3(a))throw new Error('TrackerItem: `content` (LucideIcon) is required when `variant` is "icon" and `state` is not "success".');return {state:e,variant:"icon",content:a}}if(n==="number"){if(typeof a!="number")throw new Error('TrackerItem: `content` (number) is required when `variant` is "number".');return {state:e,variant:"number",content:a}}if(o===void 0)throw new Error("TrackerItem: `stepNumber` is required when `variant` is omitted (legacy API).");return {state:e,stepNumber:o}},G=e=>e.variant==="icon"?e.state==="success"?{variant:"icon",content:b("success")}:{variant:"icon",content:b(e.state,e.content)}:e.variant==="number"?{variant:"number",content:e.content}:{variant:"number",content:e.stepNumber},R=createContext(null),J=()=>{let e=useContext(R);if(!e)throw new Error("TrackerItem components must be used within TrackerItem");return e},K=({state:e,children:n})=>jsxs("div",{className:"relative",children:[jsx("div",{className:a$1("absolute top-1/2 z-10 h-[70%] w-0.5 -translate-y-1/2 rounded-sm",e==="active"&&"bg-primary-400",e==="success"&&"bg-success-500",e==="wait"&&"bg-neutral-400",e==="current"&&"bg-primary-500",e==="complete"&&"bg-primary-600")}),n]}),O="flex min-h-10 w-full items-center gap-3 py-2 pr-1 pl-3",Q=forwardRef((e,n)=>{let{state:a$3,indicator:o,expandable:m,isClickable:c$1,headerMenu:d,onHeaderButtonClick:s}=J(),{label:f,badgeStatus:u$1,details:p,className:v,...b}=e,k=()=>jsxs(Fragment,{children:[jsxs("div",{className:a$1("flex flex-1 gap-2",!u$1&&(!p||p.length===0)&&"self-center"),children:[o.variant==="icon"?a$3==="success"?jsx(c,{state:"success",variant:"icon"}):jsx(c,{state:a$3,variant:"icon",content:o.content}):jsx(c,{state:a$3,variant:"number",content:o.content}),jsxs("div",{className:"mt-0.5 flex min-w-0 flex-1 flex-col gap-1",children:[jsx("span",{className:a$1("font-jakarta text-xs leading-snug font-medium",a$3==="wait"?"text-neutral-500":"text-neutral-900"),children:f}),u$1&&u$1.visible!==false&&(()=>{let{visible:r,...l}=u$1;return jsx(a$2,{...l})})(),p&&jsx("div",{className:"text-2xs flex flex-col gap-1.5 text-neutral-700",children:p.map(({Icon:r,text:l},C)=>jsxs("div",{className:"flex items-center gap-1.5",children:[jsx(r,{className:"size-3 shrink-0"}),jsx("span",{className:"font-inter",children:l})]},C))})]})]}),c$1&&d&&jsx(J$1,{className:"size-3.5 shrink-0 text-neutral-800"}),!c$1&&m&&jsx(Collapsible.Context,{children:({open:r})=>jsx(Collapsible.Trigger,{asChild:true,children:jsx(e$1,{Icon:r?t:u,size:"sm",variant:"ghost",tone:"neutral"})})}),!c$1&&!m&&s&&jsx(e$1,{Icon:h,size:"sm",variant:"ghost",tone:"neutral",onClick:s})]});return c$1&&d?jsxs(a.Root,{positioning:{placement:"bottom-end",flip:["bottom-start"]},children:[jsx(a.Trigger,{asChild:true,children:jsx("div",{ref:n,className:a$1(O,"group cursor-pointer outline-none hover:bg-neutral-100 focus-visible:ring-3 focus-visible:ring-neutral-800 focus-visible:ring-inset",v),...b,children:k()})}),jsx(a.Content,{children:d.options.map(r=>jsx(a.Option,{value:r.value,label:r.label,description:r.description,startIcon:r.startIcon,endIcon:r.endIcon,hasDivider:r.hasDivider,disabled:r.disabled,onSelect:r.onClick},r.value))})]}):jsx("div",{ref:n,className:a$1(O,v),...b,children:k()})});Q.displayName="TrackerItemHeader";var W=forwardRef(({children:e,className:n,...a},o)=>jsx(Collapsible.Content,{className:"data-[state=open]:animate-accordion-down data-[state=closed]:animate-accordion-up overflow-hidden",children:jsx("div",{ref:o,className:a$1("border-t border-neutral-300 px-3 py-2",n),...a,children:e})}));W.displayName="TrackerItemExpandableContent";var X=forwardRef(({buttons:e$1=[],className:n,...a},o)=>jsx("div",{ref:o,className:a$1("flex justify-end gap-2 border-t border-neutral-300 px-3 py-2",n),...a,children:e$1.map((m,c)=>{if(m.visible===false)return null;let{visible:d$1,...s}=m;return "options"in s?jsx(d,{...s,size:"sm"},c):jsx(e,{...s,size:"sm"},c)})}));X.displayName="TrackerItemFooter";var A="overflow-hidden rounded-sm border border-neutral-300 bg-neutral-50",Y=forwardRef(({state:e,variant:n,content:a,stepNumber:o,expandable:m,isClickable:c,headerMenu:d,defaultExpanded:s,onExpandedChange:f,onHeaderButtonClick:u,className:p,children:v,...b},k)=>{let r=m===true,l=c===true,C=useMemo(()=>G(j(e,n,a,o)),[e,n,a,o]),z=useMemo(()=>({state:e,indicator:C,expandable:r,isClickable:l,headerMenu:l?d:void 0,onHeaderButtonClick:l?void 0:u}),[e,C,r,l,d,u]),V=useCallback(F=>{f?.(F.open);},[f]);return jsx(R.Provider,{value:z,children:jsx(K,{state:e,children:r?jsx(Collapsible.Root,{ref:k,defaultOpen:s??false,onOpenChange:V,className:a$1(A,p),...b,children:v}):jsx("div",{ref:k,className:a$1(A,p),...b,children:v})})})});Y.displayName="TrackerItem";export{J as a,Q as b,W as c,X as d,Y as e};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {e}from'./chunk-QYA5ZUUN.js';import {getDefaultOptions}from'date-fns';import {tv}from'tailwind-variants';import {jsxs,jsx}from'react/jsx-runtime';var r='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="116" height="100" fill="none"><g clip-path="url(%23a)"><path fill="url(%23b)" d="M56.595 118.918c-28.848 0-52.234-23.533-52.234-52.564s23.386-52.563 52.234-52.563 52.234 23.533 52.234 52.563-23.386 52.564-52.234 52.564"/><path fill="%23e1e7e6" fill-rule="evenodd" d="M106.662 24.929q.031-.368.031-.745c0-4.758-3.838-8.62-8.566-8.62-4.068 0-7.478 2.86-8.35 6.688a6.8 6.8 0 0 0-2.112-.333c-3.783 0-6.854 3.09-6.854 6.897s3.071 6.897 6.854 6.897h18.649c2.96 0 5.364-2.418 5.364-5.398 0-2.861-2.218-5.206-5.016-5.386" clip-rule="evenodd"/><path fill="%23cfd9d7" fill-rule="evenodd" d="M115.385 99.846H10.792a.615.615 0 0 1-.613-.618c0-.34.275-.617.613-.617h104.593c.339 0 .614.276.614.617a.616.616 0 0 1-.614.618m-108.693 0H.614A.616.616 0 0 1 0 99.228c0-.34.275-.617.614-.617h6.078c.338 0 .613.276.613.617a.615.615 0 0 1-.613.618" clip-rule="evenodd"/><path fill="%23f3f6f5" fill-rule="evenodd" d="M12.48 12.2a6 6 0 0 1-.02-.475c0-3.035 2.448-5.499 5.464-5.499 2.595 0 4.77 1.824 5.326 4.266a4.4 4.4 0 0 1 1.347-.212c2.413 0 4.372 1.971 4.372 4.4 0 2.428-1.96 4.399-4.372 4.399H12.702c-1.889 0-3.422-1.543-3.422-3.444a3.436 3.436 0 0 1 3.2-3.435" clip-rule="evenodd"/><path fill="%23f3f6f5" d="m94.572 72.734-6.26 10.92-10.218 2.765-11.414 3.073-7.13 1.918-.045-.061a4.43 4.43 0 0 0 3.81-3.282l11.722-44.01-6.26-10.92-9.7-2.614 18.352-4.948c2.348-.638 4.798.787 5.418 3.152z"/><path fill="%23fff" d="m58.553 30.39 10.223 2.755 6.263 10.919-4.013 15.072-2.66 9.986-.59 2.217-1.198 4.5-3.258 12.234c-.631 2.372-3.071 3.787-5.425 3.153l-33.04-8.91c-2.353-.632-3.762-3.09-3.132-5.458l5.89-22.116 1.18-4.437 5.795-21.764c.631-2.367 3.073-3.785 5.426-3.152l18.54 5.001Z"/><path fill="%23cfd9d7" d="m88.31 83.66-2.294-8.612 8.557-2.307-6.264 10.92ZM68.776 33.139l-2.295 8.618 8.558 2.307z"/><path fill="%23bdcbc9" fill-rule="evenodd" d="m35.057 60.641 23.056 6.217a.808.808 0 0 0 .415-1.56l-23.056-6.216a.808.808 0 0 0-.415 1.56Zm2.197-8.253 23.056 6.215a.8.8 0 0 0 .982-.57.81.81 0 0 0-.567-.99L37.669 50.83a.8.8 0 0 0-.982.57.81.81 0 0 0 .567.99Zm5.349 19.13 1.666.45a.808.808 0 0 0 .415-1.56l-1.666-.45a.808.808 0 0 0-.415 1.56m-9.743-2.626 5.855 1.578a.808.808 0 0 0 .415-1.56l-5.855-1.577a.8.8 0 0 0-.982.57.81.81 0 0 0 .567.99Z" clip-rule="evenodd"/><path fill="%23bdcbc9" d="M57.652 39.047a1 1 0 0 1-.234-.031c-3.279-.886-5.232-4.292-4.354-7.591l1.588-5.963.02-.064c.674-2.32 3.063-3.69 5.375-3.07a4.38 4.38 0 0 1 2.672 2.069 4.42 4.42 0 0 1 .443 3.36l-1.588 5.963a2.65 2.65 0 0 1-1.236 1.62 2.62 2.62 0 0 1-2.014.267 2.64 2.64 0 0 1-1.61-1.244 2.66 2.66 0 0 1-.264-2.024l1.587-5.963a.897.897 0 0 1 1.102-.64c.48.129.765.626.636 1.109l-1.587 5.962a.86.86 0 0 0 .602 1.051.855.855 0 0 0 1.046-.607l1.587-5.962a2.62 2.62 0 0 0-.263-1.987 2.6 2.6 0 0 0-1.58-1.224c-1.362-.366-2.828.498-3.199 1.89l-.014.047-1.565 5.879c-.622 2.335.76 4.745 3.082 5.372a.906.906 0 0 1-.232 1.781"/><path fill="%23bdcbc9" fill-rule="evenodd" d="M93.71 72.62 82.07 28.934c-.506-1.936-2.512-3.1-4.432-2.579l-7.466 2.014a.8.8 0 0 1-.983-.571.81.81 0 0 1 .568-.989l7.463-2.012c2.774-.754 5.67.93 6.402 3.722l11.724 44.007a.8.8 0 0 1-.08.613l-6.26 10.92a.8.8 0 0 1-.487.375L78.302 87.2l-11.415 3.073-7.13 1.918a.8.8 0 0 1-.983-.571.81.81 0 0 1 .568-.989l7.13-1.918 11.413-3.072 9.897-2.68z" clip-rule="evenodd"/><path fill="%23bdcbc9" fill-rule="evenodd" d="m70.252 58.927-2.66 9.986-.59 2.217-1.198 4.5-3.258 12.234c-.517 1.943-2.515 3.102-4.443 2.582l-33.04-8.91c-1.927-.518-3.08-2.53-2.564-4.469a.802.802 0 1 0-1.55-.418c-.744 2.797.92 5.7 3.7 6.446l33.039 8.91c2.78.75 5.662-.922 6.408-3.723l3.257-12.233 1.199-4.501.59-2.217 2.66-9.986a.802.802 0 1 0-1.55-.418M28.389 54.95l1.18-4.437 5.795-21.764c.517-1.938 2.516-3.1 4.444-2.58l10.029 2.705a.807.807 0 0 0 .416-1.56l-10.03-2.705c-2.78-.749-5.663.926-6.408 3.722L28.02 50.095l-1.181 4.438c-.114.43.14.873.567.988a.803.803 0 0 0 .983-.57Z" clip-rule="evenodd"/></g><defs><linearGradient id="b" x1="56.595" x2="56.595" y1="115.67" y2="13.79" gradientUnits="userSpaceOnUse"><stop offset=".25" stop-color="%23fff" stop-opacity=".1"/><stop offset="1" stop-color="%23e1e7e6"/></linearGradient><clipPath id="a"><path fill="%23fff" d="M0 0h116v100H0z"/></clipPath></defs></svg>';var c='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="117" height="100" fill="none"><g clip-path="url(%23a)"><path fill="url(%23b)" d="M57.084 118.918c-29.097 0-52.685-23.533-52.685-52.564s23.588-52.563 52.685-52.563 52.685 23.533 52.685 52.564-23.588 52.563-52.685 52.563"/><path fill="%23cfd9d7" fill-rule="evenodd" d="M107.584 24.93q.031-.369.031-.745c0-4.758-3.871-8.62-8.64-8.62a8.644 8.644 0 0 0-8.421 6.688 7 7 0 0 0-2.13-.334c-3.816 0-6.913 3.09-6.913 6.898s3.097 6.897 6.913 6.897h18.809c2.986 0 5.411-2.419 5.411-5.398 0-2.862-2.237-5.207-5.06-5.387M116.38 99.846H10.886a.618.618 0 1 1 0-1.234H116.38c.342 0 .62.276.62.617a.62.62 0 0 1-.62.617M6.75 99.846H.62A.62.62 0 0 1 0 99.23c0-.34.278-.617.62-.617h6.13a.618.618 0 1 1 0 1.234" clip-rule="evenodd"/><path fill="%23e1e7e6" fill-rule="evenodd" d="M12.587 12.2a6 6 0 0 1-.02-.475c0-3.035 2.47-5.499 5.511-5.499a5.51 5.51 0 0 1 5.373 4.266 4.4 4.4 0 0 1 1.358-.212 4.407 4.407 0 0 1 4.41 4.4c0 2.428-1.976 4.399-4.41 4.399H12.811a3.45 3.45 0 0 1-3.451-3.444 3.45 3.45 0 0 1 3.227-3.435" clip-rule="evenodd"/><path fill="%23fff" d="M50.685 25.551c-14.513 0-26.286 11.745-26.286 26.226s11.773 26.211 26.286 26.211c5.137 0 9.913-1.467 13.953-4.004a26.1 26.1 0 0 0 8.32-8.3c2.527-4.031 4-8.808 4-13.907 0-14.481-11.759-26.226-26.273-26.226m-.003 46.986c-11.471 0-20.808-9.314-20.808-20.762 0-11.447 9.336-20.761 20.808-20.761 11.476 0 20.811 9.314 20.811 20.761 0 11.448-9.335 20.762-20.81 20.762"/><path fill="%23bdcbc9" fill-rule="evenodd" d="M50.682 71.627c-10.97 0-19.897-8.906-19.897-19.852s8.927-19.852 19.897-19.852c10.973 0 19.9 8.907 19.9 19.852a.911.911 0 0 0 1.823 0c0-11.949-9.745-21.671-21.723-21.671-11.975 0-21.72 9.722-21.72 21.67 0 11.95 9.746 21.672 21.72 21.672a.91.91 0 0 0 .912-.91.91.91 0 0 0-.912-.91" clip-rule="evenodd"/><path fill="%23bdcbc9" fill-rule="evenodd" d="M23.487 51.777c0 14.982 12.181 27.12 27.198 27.12a27.04 27.04 0 0 0 14.438-4.143 27.04 27.04 0 0 0 8.609-8.59 27.04 27.04 0 0 0 4.137-14.387c0-14.984-12.167-27.136-27.184-27.136a.91.91 0 0 0-.912.91c0 .502.408.91.911.91 14.011 0 25.362 11.337 25.362 25.316A25.23 25.23 0 0 1 72.185 65.2a25.2 25.2 0 0 1-8.031 8.012 25.23 25.23 0 0 1-13.47 3.865c-14.009 0-25.373-11.324-25.373-25.301a.911.911 0 0 0-1.824 0" clip-rule="evenodd"/><path fill="%23e1e7e6" d="M68.494 80.954 79.17 91.42c3.144 3.136 8.289 3.136 11.435 0 3.145-3.139 3.145-8.272 0-11.41L79.928 69.544z"/><path fill="%23bdcbc9" fill-rule="evenodd" d="m69.789 80.949 10.025 9.826c2.79 2.783 7.354 2.783 10.146 0a7.14 7.14 0 0 0 2.059-5.748.91.91 0 0 1 1.815-.172 8.96 8.96 0 0 1-2.585 7.207c-3.501 3.49-9.226 3.49-12.718.006L67.855 81.603a.906.906 0 0 1-.006-1.291L79.283 68.9a.914.914 0 0 1 1.285-.006l3.4 3.334c.359.352.364.928.01 1.286a.914.914 0 0 1-1.288.012l-2.756-2.701z" clip-rule="evenodd"/><path fill="%23bdcbc9" d="m78.495 70.969-8.574 8.567-5.417-5.418.134-.134a26.1 26.1 0 0 0 8.32-8.3l.12-.12z"/><path fill="%23bdcbc9" fill-rule="evenodd" d="M73.204 66.977a27.1 27.1 0 0 1-8.084 7.779.91.91 0 1 1-.966-1.543 25.2 25.2 0 0 0 8.03-8.01 1 1 0 0 1 .13-.163l.12-.12a.913.913 0 0 1 1.288.001l5.416 5.404a.91.91 0 0 1 0 1.286l-8.573 8.568a.913.913 0 0 1-1.289.001.91.91 0 0 1-.001-1.287l7.93-7.924z" clip-rule="evenodd"/></g><defs><linearGradient id="b" x1="57.084" x2="57.084" y1="115.671" y2="13.791" gradientUnits="userSpaceOnUse"><stop offset=".25" stop-color="%23fff" stop-opacity=".1"/><stop offset="1" stop-color="%23e1e7e6"/></linearGradient><clipPath id="a"><path fill="%23fff" d="M0 0h117v100H0z"/></clipPath></defs></svg>';var s='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="117" height="100" fill="none"><g clip-path="url(%23a)"><path fill="url(%23b)" d="M56.952 118.918c-29.03 0-52.564-23.534-52.564-52.564S27.922 13.79 56.952 13.79s52.564 23.534 52.564 52.564-23.534 52.564-52.564 52.564"/><path fill="%2396dcb4" fill-rule="evenodd" d="M107.337 24.928q.031-.368.031-.744c0-4.758-3.862-8.62-8.62-8.62-4.094 0-7.525 2.859-8.403 6.688a6.9 6.9 0 0 0-9.022 6.564 6.9 6.9 0 0 0 6.898 6.897h18.766a5.4 5.4 0 0 0 5.398-5.398 5.4 5.4 0 0 0-5.048-5.387" clip-rule="evenodd"/><path fill="%234fa271" fill-rule="evenodd" d="M116.113 99.846H10.86a.617.617 0 0 1 0-1.235h105.253a.618.618 0 0 1 0 1.235M6.735 99.846H.618a.618.618 0 0 1 0-1.235h6.117a.617.617 0 0 1 0 1.235" clip-rule="evenodd"/><path fill="%23bfe9d1" fill-rule="evenodd" d="M12.558 12.199a5.501 5.501 0 0 1 5.479-5.973c2.61 0 4.8 1.823 5.36 4.266a4.402 4.402 0 0 1 5.755 4.187c0 2.428-1.972 4.4-4.4 4.4h-11.97a3.445 3.445 0 0 1-3.444-3.444 3.445 3.445 0 0 1 3.22-3.436" clip-rule="evenodd"/><path fill="%236ecf96" d="M90.532 58.93c0 17.787-14.418 32.197-32.194 32.197-17.788 0-32.197-14.41-32.197-32.197 0-17.776 14.409-32.196 32.197-32.196 17.776 0 32.194 14.419 32.194 32.196"/><path fill="%234fa271" fill-rule="evenodd" d="M58.339 27.872c17.147 0 31.056 13.909 31.056 31.058 0 9.872-4.604 18.665-11.78 24.354a1.139 1.139 0 0 0 1.415 1.783c7.7-6.105 12.64-15.543 12.64-26.137 0-18.405-14.927-33.333-33.331-33.333a1.138 1.138 0 0 0 0 2.276M58.34 89.99c-17.16 0-31.06-13.901-31.06-31.06a1.138 1.138 0 0 0-2.276 0c0 18.415 14.919 33.335 33.335 33.335a1.138 1.138 0 0 0 0-2.275" clip-rule="evenodd"/><path fill="%23fff" fill-rule="evenodd" d="m55.436 65.185 14.64-17.738a2.472 2.472 0 0 1 3.812 3.147L57.518 70.429a2.474 2.474 0 0 1-3.655.174L42.948 59.687a2.47 2.47 0 1 1 3.495-3.495z" clip-rule="evenodd"/></g><defs><linearGradient id="b" x1="56.952" x2="56.952" y1="115.67" y2="13.79" gradientUnits="userSpaceOnUse"><stop offset=".25" stop-color="%23fff" stop-opacity=".1"/><stop offset="1" stop-color="%23abe3c2"/></linearGradient><clipPath id="a"><path fill="%23fff" d="M0 0h116.732v100H0z"/></clipPath></defs></svg>';var p='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="117" height="100" fill="none"><g clip-path="url(%23a)"><path fill="url(%23b)" d="M56.952 118.918c-29.03 0-52.564-23.534-52.564-52.564S27.922 13.79 56.952 13.79s52.564 23.534 52.564 52.564-23.534 52.564-52.564 52.564"/><path fill="%23f18585" fill-rule="evenodd" d="M107.337 24.928q.031-.368.031-.744c0-4.758-3.862-8.62-8.62-8.62-4.094 0-7.525 2.859-8.403 6.688a6.9 6.9 0 0 0-9.022 6.564 6.9 6.9 0 0 0 6.898 6.897h18.766a5.4 5.4 0 0 0 5.398-5.398 5.4 5.4 0 0 0-5.048-5.387" clip-rule="evenodd"/><path fill="%23d34747" fill-rule="evenodd" d="M116.113 99.846H10.86a.617.617 0 0 1 0-1.235h105.253a.618.618 0 0 1 0 1.235M6.735 99.846H.618a.618.618 0 0 1 0-1.235h6.117a.617.617 0 0 1 0 1.235" clip-rule="evenodd"/><path fill="%23f6b4b4" fill-rule="evenodd" d="M12.558 12.199a5.501 5.501 0 0 1 5.479-5.973c2.61 0 4.8 1.823 5.36 4.266a4.402 4.402 0 0 1 5.755 4.187c0 2.428-1.972 4.4-4.4 4.4h-11.97a3.445 3.445 0 0 1-3.444-3.444 3.445 3.445 0 0 1 3.22-3.436" clip-rule="evenodd"/><path fill="%23f18585" d="M90.532 58.93c0 17.787-14.418 32.197-32.194 32.197-17.788 0-32.197-14.41-32.197-32.197 0-17.776 14.409-32.196 32.197-32.196 17.776 0 32.194 14.419 32.194 32.196"/><path fill="%23d34747" fill-rule="evenodd" d="M58.339 27.872c17.147 0 31.056 13.909 31.056 31.058 0 9.872-4.604 18.665-11.78 24.354a1.139 1.139 0 0 0 1.415 1.783c7.7-6.105 12.64-15.543 12.64-26.137 0-18.405-14.927-33.333-33.331-33.333a1.138 1.138 0 0 0 0 2.276M58.34 89.99c-17.16 0-31.06-13.901-31.06-31.06a1.138 1.138 0 0 0-2.276 0c0 18.415 14.919 33.335 33.335 33.335a1.138 1.138 0 0 0 0-2.275" clip-rule="evenodd"/><path fill="%23fff" d="M57.512 45.853a3.5 3.5 0 0 1 1.623.077q1.816.465 2.473 2.203.155.58-.077 2.396l-.889 5.758q-1.081 7.034-1.353 7.266-.27.116-1.855.039-.31 0-.347-.04-.194-.115-.348-.888-.116-.696-1.005-6.377-1.12-7.343-1.044-7.845 0-.077.078-.309.502-1.623 2.357-2.164.194-.078.387-.116m.038 20.25q.657-.154 1.508.078 1.7.425 2.357 2.087.116.193.155.425a3.3 3.3 0 0 1 0 1.739q-.465 1.778-2.165 2.396-.192.078-.347.116a3.3 3.3 0 0 1-1.74 0q-1.777-.464-2.396-2.164a3.318 3.318 0 0 1-.116-2.087q.31-1.16 1.16-1.817.657-.54 1.584-.772"/></g><defs><linearGradient id="b" x1="56.952" x2="56.952" y1="115.67" y2="13.79" gradientUnits="userSpaceOnUse"><stop offset=".25" stop-color="%23fff" stop-opacity=".1"/><stop offset="1" stop-color="%23f39d9d"/></linearGradient><clipPath id="a"><path fill="%23fff" d="M0 0h116.732v100H0z"/></clipPath></defs></svg>';var H=t=>t?.startsWith("es")?{documentsTitle:"Nada por aqu\xED todav\xEDa",documentsDescription:"Agrega un nuevo elemento para comenzar",notFoundTitle:"No se encontraron resultados",notFoundDescription:"Ajusta los criterios e int\xE9ntalo nuevamente",doneTitle:"\xA1Est\xE1s al d\xEDa!",doneDescription:"No hay elementos que completar",contentEmptyAlt:"Contenido vac\xEDo"}:t?.startsWith("pt")?{documentsTitle:"Nada aqui ainda",documentsDescription:"Adicione um novo item para come\xE7ar",notFoundTitle:"N\xE3o foram encontrados resultados",notFoundDescription:"Ajuste os crit\xE9rios e tente novamente",doneTitle:"Voc\xEA est\xE1 em dia!",doneDescription:"N\xE3o h\xE1 itens para concluir",contentEmptyAlt:"Conte\xFAdo vazio"}:{documentsTitle:"Nothing here yet",documentsDescription:"Add a new item to get started",notFoundTitle:"No results were found",notFoundDescription:"Adjust the criteria and try again",doneTitle:"You're all caught up!",doneDescription:"Nothing left to complete",contentEmptyAlt:"Content empty"},D=t=>{switch(t){case "lg":return {width:233.46,height:200};case "md":return {width:175.09,height:150};case "sm":return {width:116,height:100}}},N=tv({slots:{root:"font-inter flex h-fit w-fit flex-col items-center p-6 pt-10 text-neutral-600",title:"mt-4.5 text-center font-semibold",description:"font-inter mt-0.5 text-center"},variants:{size:{lg:{title:"font-jakarta text-lg leading-[156%]",description:"text-base leading-[150%] font-medium"},md:{title:"text-base leading-[150%]",description:"text-sm leading-[143%]"},sm:{title:"text-sm leading-[143%]",description:"text-sm leading-[143%]"}},variant:{empty:{},"not-found":{},done:{title:"text-success-700",description:"text-success-700"},danger:{title:"text-danger-700",description:"text-danger-700"}}}}),P=(t,e)=>{switch(t.variant){case "danger":return {title:t.title,description:t.description,imgUrl:p};case "not-found":return {title:t.title??e.notFoundTitle,description:t.description??e.notFoundDescription,imgUrl:c};case "done":return {title:t.title??e.doneTitle,description:t.description??e.doneDescription,imgUrl:s};default:return {title:t.title??e.documentsTitle,description:t.description??e.documentsDescription,imgUrl:r}}},k=t=>{let{actions:e$1,areActionsHidden:m=false,size:l="sm",className:u}=t,h=t.variant??"empty",{locale:g}=getDefaultOptions(),{root:v,title:y,description:b}=N({size:l,variant:h}),o=H(g?.code),a=P(t,o),{width:M,height:S}=D(l),d=l==="sm"?"sm":"lg";return jsxs("div",{className:v({className:u}),children:[jsx("img",{alt:o.contentEmptyAlt,width:M,height:S,src:a.imgUrl}),jsx("p",{className:y(),children:a.title}),jsx("p",{className:b(),children:a.description}),e$1&&!m&&jsxs("div",{className:"mt-4.5 flex gap-3",children:[e$1.secondary&&jsx(e,{...e$1.secondary,variant:"light",tone:"primary",size:d}),jsx(e,{...e$1.primary,variant:"secondary",tone:"primary",size:d})]})]})};
|
|
1
|
+
import {e}from'./chunk-P7NW2XNB.js';import {getDefaultOptions}from'date-fns';import {tv}from'tailwind-variants';import {jsxs,jsx}from'react/jsx-runtime';var r='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="116" height="100" fill="none"><g clip-path="url(%23a)"><path fill="url(%23b)" d="M56.595 118.918c-28.848 0-52.234-23.533-52.234-52.564s23.386-52.563 52.234-52.563 52.234 23.533 52.234 52.563-23.386 52.564-52.234 52.564"/><path fill="%23e1e7e6" fill-rule="evenodd" d="M106.662 24.929q.031-.368.031-.745c0-4.758-3.838-8.62-8.566-8.62-4.068 0-7.478 2.86-8.35 6.688a6.8 6.8 0 0 0-2.112-.333c-3.783 0-6.854 3.09-6.854 6.897s3.071 6.897 6.854 6.897h18.649c2.96 0 5.364-2.418 5.364-5.398 0-2.861-2.218-5.206-5.016-5.386" clip-rule="evenodd"/><path fill="%23cfd9d7" fill-rule="evenodd" d="M115.385 99.846H10.792a.615.615 0 0 1-.613-.618c0-.34.275-.617.613-.617h104.593c.339 0 .614.276.614.617a.616.616 0 0 1-.614.618m-108.693 0H.614A.616.616 0 0 1 0 99.228c0-.34.275-.617.614-.617h6.078c.338 0 .613.276.613.617a.615.615 0 0 1-.613.618" clip-rule="evenodd"/><path fill="%23f3f6f5" fill-rule="evenodd" d="M12.48 12.2a6 6 0 0 1-.02-.475c0-3.035 2.448-5.499 5.464-5.499 2.595 0 4.77 1.824 5.326 4.266a4.4 4.4 0 0 1 1.347-.212c2.413 0 4.372 1.971 4.372 4.4 0 2.428-1.96 4.399-4.372 4.399H12.702c-1.889 0-3.422-1.543-3.422-3.444a3.436 3.436 0 0 1 3.2-3.435" clip-rule="evenodd"/><path fill="%23f3f6f5" d="m94.572 72.734-6.26 10.92-10.218 2.765-11.414 3.073-7.13 1.918-.045-.061a4.43 4.43 0 0 0 3.81-3.282l11.722-44.01-6.26-10.92-9.7-2.614 18.352-4.948c2.348-.638 4.798.787 5.418 3.152z"/><path fill="%23fff" d="m58.553 30.39 10.223 2.755 6.263 10.919-4.013 15.072-2.66 9.986-.59 2.217-1.198 4.5-3.258 12.234c-.631 2.372-3.071 3.787-5.425 3.153l-33.04-8.91c-2.353-.632-3.762-3.09-3.132-5.458l5.89-22.116 1.18-4.437 5.795-21.764c.631-2.367 3.073-3.785 5.426-3.152l18.54 5.001Z"/><path fill="%23cfd9d7" d="m88.31 83.66-2.294-8.612 8.557-2.307-6.264 10.92ZM68.776 33.139l-2.295 8.618 8.558 2.307z"/><path fill="%23bdcbc9" fill-rule="evenodd" d="m35.057 60.641 23.056 6.217a.808.808 0 0 0 .415-1.56l-23.056-6.216a.808.808 0 0 0-.415 1.56Zm2.197-8.253 23.056 6.215a.8.8 0 0 0 .982-.57.81.81 0 0 0-.567-.99L37.669 50.83a.8.8 0 0 0-.982.57.81.81 0 0 0 .567.99Zm5.349 19.13 1.666.45a.808.808 0 0 0 .415-1.56l-1.666-.45a.808.808 0 0 0-.415 1.56m-9.743-2.626 5.855 1.578a.808.808 0 0 0 .415-1.56l-5.855-1.577a.8.8 0 0 0-.982.57.81.81 0 0 0 .567.99Z" clip-rule="evenodd"/><path fill="%23bdcbc9" d="M57.652 39.047a1 1 0 0 1-.234-.031c-3.279-.886-5.232-4.292-4.354-7.591l1.588-5.963.02-.064c.674-2.32 3.063-3.69 5.375-3.07a4.38 4.38 0 0 1 2.672 2.069 4.42 4.42 0 0 1 .443 3.36l-1.588 5.963a2.65 2.65 0 0 1-1.236 1.62 2.62 2.62 0 0 1-2.014.267 2.64 2.64 0 0 1-1.61-1.244 2.66 2.66 0 0 1-.264-2.024l1.587-5.963a.897.897 0 0 1 1.102-.64c.48.129.765.626.636 1.109l-1.587 5.962a.86.86 0 0 0 .602 1.051.855.855 0 0 0 1.046-.607l1.587-5.962a2.62 2.62 0 0 0-.263-1.987 2.6 2.6 0 0 0-1.58-1.224c-1.362-.366-2.828.498-3.199 1.89l-.014.047-1.565 5.879c-.622 2.335.76 4.745 3.082 5.372a.906.906 0 0 1-.232 1.781"/><path fill="%23bdcbc9" fill-rule="evenodd" d="M93.71 72.62 82.07 28.934c-.506-1.936-2.512-3.1-4.432-2.579l-7.466 2.014a.8.8 0 0 1-.983-.571.81.81 0 0 1 .568-.989l7.463-2.012c2.774-.754 5.67.93 6.402 3.722l11.724 44.007a.8.8 0 0 1-.08.613l-6.26 10.92a.8.8 0 0 1-.487.375L78.302 87.2l-11.415 3.073-7.13 1.918a.8.8 0 0 1-.983-.571.81.81 0 0 1 .568-.989l7.13-1.918 11.413-3.072 9.897-2.68z" clip-rule="evenodd"/><path fill="%23bdcbc9" fill-rule="evenodd" d="m70.252 58.927-2.66 9.986-.59 2.217-1.198 4.5-3.258 12.234c-.517 1.943-2.515 3.102-4.443 2.582l-33.04-8.91c-1.927-.518-3.08-2.53-2.564-4.469a.802.802 0 1 0-1.55-.418c-.744 2.797.92 5.7 3.7 6.446l33.039 8.91c2.78.75 5.662-.922 6.408-3.723l3.257-12.233 1.199-4.501.59-2.217 2.66-9.986a.802.802 0 1 0-1.55-.418M28.389 54.95l1.18-4.437 5.795-21.764c.517-1.938 2.516-3.1 4.444-2.58l10.029 2.705a.807.807 0 0 0 .416-1.56l-10.03-2.705c-2.78-.749-5.663.926-6.408 3.722L28.02 50.095l-1.181 4.438c-.114.43.14.873.567.988a.803.803 0 0 0 .983-.57Z" clip-rule="evenodd"/></g><defs><linearGradient id="b" x1="56.595" x2="56.595" y1="115.67" y2="13.79" gradientUnits="userSpaceOnUse"><stop offset=".25" stop-color="%23fff" stop-opacity=".1"/><stop offset="1" stop-color="%23e1e7e6"/></linearGradient><clipPath id="a"><path fill="%23fff" d="M0 0h116v100H0z"/></clipPath></defs></svg>';var c='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="117" height="100" fill="none"><g clip-path="url(%23a)"><path fill="url(%23b)" d="M57.084 118.918c-29.097 0-52.685-23.533-52.685-52.564s23.588-52.563 52.685-52.563 52.685 23.533 52.685 52.564-23.588 52.563-52.685 52.563"/><path fill="%23cfd9d7" fill-rule="evenodd" d="M107.584 24.93q.031-.369.031-.745c0-4.758-3.871-8.62-8.64-8.62a8.644 8.644 0 0 0-8.421 6.688 7 7 0 0 0-2.13-.334c-3.816 0-6.913 3.09-6.913 6.898s3.097 6.897 6.913 6.897h18.809c2.986 0 5.411-2.419 5.411-5.398 0-2.862-2.237-5.207-5.06-5.387M116.38 99.846H10.886a.618.618 0 1 1 0-1.234H116.38c.342 0 .62.276.62.617a.62.62 0 0 1-.62.617M6.75 99.846H.62A.62.62 0 0 1 0 99.23c0-.34.278-.617.62-.617h6.13a.618.618 0 1 1 0 1.234" clip-rule="evenodd"/><path fill="%23e1e7e6" fill-rule="evenodd" d="M12.587 12.2a6 6 0 0 1-.02-.475c0-3.035 2.47-5.499 5.511-5.499a5.51 5.51 0 0 1 5.373 4.266 4.4 4.4 0 0 1 1.358-.212 4.407 4.407 0 0 1 4.41 4.4c0 2.428-1.976 4.399-4.41 4.399H12.811a3.45 3.45 0 0 1-3.451-3.444 3.45 3.45 0 0 1 3.227-3.435" clip-rule="evenodd"/><path fill="%23fff" d="M50.685 25.551c-14.513 0-26.286 11.745-26.286 26.226s11.773 26.211 26.286 26.211c5.137 0 9.913-1.467 13.953-4.004a26.1 26.1 0 0 0 8.32-8.3c2.527-4.031 4-8.808 4-13.907 0-14.481-11.759-26.226-26.273-26.226m-.003 46.986c-11.471 0-20.808-9.314-20.808-20.762 0-11.447 9.336-20.761 20.808-20.761 11.476 0 20.811 9.314 20.811 20.761 0 11.448-9.335 20.762-20.81 20.762"/><path fill="%23bdcbc9" fill-rule="evenodd" d="M50.682 71.627c-10.97 0-19.897-8.906-19.897-19.852s8.927-19.852 19.897-19.852c10.973 0 19.9 8.907 19.9 19.852a.911.911 0 0 0 1.823 0c0-11.949-9.745-21.671-21.723-21.671-11.975 0-21.72 9.722-21.72 21.67 0 11.95 9.746 21.672 21.72 21.672a.91.91 0 0 0 .912-.91.91.91 0 0 0-.912-.91" clip-rule="evenodd"/><path fill="%23bdcbc9" fill-rule="evenodd" d="M23.487 51.777c0 14.982 12.181 27.12 27.198 27.12a27.04 27.04 0 0 0 14.438-4.143 27.04 27.04 0 0 0 8.609-8.59 27.04 27.04 0 0 0 4.137-14.387c0-14.984-12.167-27.136-27.184-27.136a.91.91 0 0 0-.912.91c0 .502.408.91.911.91 14.011 0 25.362 11.337 25.362 25.316A25.23 25.23 0 0 1 72.185 65.2a25.2 25.2 0 0 1-8.031 8.012 25.23 25.23 0 0 1-13.47 3.865c-14.009 0-25.373-11.324-25.373-25.301a.911.911 0 0 0-1.824 0" clip-rule="evenodd"/><path fill="%23e1e7e6" d="M68.494 80.954 79.17 91.42c3.144 3.136 8.289 3.136 11.435 0 3.145-3.139 3.145-8.272 0-11.41L79.928 69.544z"/><path fill="%23bdcbc9" fill-rule="evenodd" d="m69.789 80.949 10.025 9.826c2.79 2.783 7.354 2.783 10.146 0a7.14 7.14 0 0 0 2.059-5.748.91.91 0 0 1 1.815-.172 8.96 8.96 0 0 1-2.585 7.207c-3.501 3.49-9.226 3.49-12.718.006L67.855 81.603a.906.906 0 0 1-.006-1.291L79.283 68.9a.914.914 0 0 1 1.285-.006l3.4 3.334c.359.352.364.928.01 1.286a.914.914 0 0 1-1.288.012l-2.756-2.701z" clip-rule="evenodd"/><path fill="%23bdcbc9" d="m78.495 70.969-8.574 8.567-5.417-5.418.134-.134a26.1 26.1 0 0 0 8.32-8.3l.12-.12z"/><path fill="%23bdcbc9" fill-rule="evenodd" d="M73.204 66.977a27.1 27.1 0 0 1-8.084 7.779.91.91 0 1 1-.966-1.543 25.2 25.2 0 0 0 8.03-8.01 1 1 0 0 1 .13-.163l.12-.12a.913.913 0 0 1 1.288.001l5.416 5.404a.91.91 0 0 1 0 1.286l-8.573 8.568a.913.913 0 0 1-1.289.001.91.91 0 0 1-.001-1.287l7.93-7.924z" clip-rule="evenodd"/></g><defs><linearGradient id="b" x1="57.084" x2="57.084" y1="115.671" y2="13.791" gradientUnits="userSpaceOnUse"><stop offset=".25" stop-color="%23fff" stop-opacity=".1"/><stop offset="1" stop-color="%23e1e7e6"/></linearGradient><clipPath id="a"><path fill="%23fff" d="M0 0h117v100H0z"/></clipPath></defs></svg>';var s='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="117" height="100" fill="none"><g clip-path="url(%23a)"><path fill="url(%23b)" d="M56.952 118.918c-29.03 0-52.564-23.534-52.564-52.564S27.922 13.79 56.952 13.79s52.564 23.534 52.564 52.564-23.534 52.564-52.564 52.564"/><path fill="%2396dcb4" fill-rule="evenodd" d="M107.337 24.928q.031-.368.031-.744c0-4.758-3.862-8.62-8.62-8.62-4.094 0-7.525 2.859-8.403 6.688a6.9 6.9 0 0 0-9.022 6.564 6.9 6.9 0 0 0 6.898 6.897h18.766a5.4 5.4 0 0 0 5.398-5.398 5.4 5.4 0 0 0-5.048-5.387" clip-rule="evenodd"/><path fill="%234fa271" fill-rule="evenodd" d="M116.113 99.846H10.86a.617.617 0 0 1 0-1.235h105.253a.618.618 0 0 1 0 1.235M6.735 99.846H.618a.618.618 0 0 1 0-1.235h6.117a.617.617 0 0 1 0 1.235" clip-rule="evenodd"/><path fill="%23bfe9d1" fill-rule="evenodd" d="M12.558 12.199a5.501 5.501 0 0 1 5.479-5.973c2.61 0 4.8 1.823 5.36 4.266a4.402 4.402 0 0 1 5.755 4.187c0 2.428-1.972 4.4-4.4 4.4h-11.97a3.445 3.445 0 0 1-3.444-3.444 3.445 3.445 0 0 1 3.22-3.436" clip-rule="evenodd"/><path fill="%236ecf96" d="M90.532 58.93c0 17.787-14.418 32.197-32.194 32.197-17.788 0-32.197-14.41-32.197-32.197 0-17.776 14.409-32.196 32.197-32.196 17.776 0 32.194 14.419 32.194 32.196"/><path fill="%234fa271" fill-rule="evenodd" d="M58.339 27.872c17.147 0 31.056 13.909 31.056 31.058 0 9.872-4.604 18.665-11.78 24.354a1.139 1.139 0 0 0 1.415 1.783c7.7-6.105 12.64-15.543 12.64-26.137 0-18.405-14.927-33.333-33.331-33.333a1.138 1.138 0 0 0 0 2.276M58.34 89.99c-17.16 0-31.06-13.901-31.06-31.06a1.138 1.138 0 0 0-2.276 0c0 18.415 14.919 33.335 33.335 33.335a1.138 1.138 0 0 0 0-2.275" clip-rule="evenodd"/><path fill="%23fff" fill-rule="evenodd" d="m55.436 65.185 14.64-17.738a2.472 2.472 0 0 1 3.812 3.147L57.518 70.429a2.474 2.474 0 0 1-3.655.174L42.948 59.687a2.47 2.47 0 1 1 3.495-3.495z" clip-rule="evenodd"/></g><defs><linearGradient id="b" x1="56.952" x2="56.952" y1="115.67" y2="13.79" gradientUnits="userSpaceOnUse"><stop offset=".25" stop-color="%23fff" stop-opacity=".1"/><stop offset="1" stop-color="%23abe3c2"/></linearGradient><clipPath id="a"><path fill="%23fff" d="M0 0h116.732v100H0z"/></clipPath></defs></svg>';var p='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="117" height="100" fill="none"><g clip-path="url(%23a)"><path fill="url(%23b)" d="M56.952 118.918c-29.03 0-52.564-23.534-52.564-52.564S27.922 13.79 56.952 13.79s52.564 23.534 52.564 52.564-23.534 52.564-52.564 52.564"/><path fill="%23f18585" fill-rule="evenodd" d="M107.337 24.928q.031-.368.031-.744c0-4.758-3.862-8.62-8.62-8.62-4.094 0-7.525 2.859-8.403 6.688a6.9 6.9 0 0 0-9.022 6.564 6.9 6.9 0 0 0 6.898 6.897h18.766a5.4 5.4 0 0 0 5.398-5.398 5.4 5.4 0 0 0-5.048-5.387" clip-rule="evenodd"/><path fill="%23d34747" fill-rule="evenodd" d="M116.113 99.846H10.86a.617.617 0 0 1 0-1.235h105.253a.618.618 0 0 1 0 1.235M6.735 99.846H.618a.618.618 0 0 1 0-1.235h6.117a.617.617 0 0 1 0 1.235" clip-rule="evenodd"/><path fill="%23f6b4b4" fill-rule="evenodd" d="M12.558 12.199a5.501 5.501 0 0 1 5.479-5.973c2.61 0 4.8 1.823 5.36 4.266a4.402 4.402 0 0 1 5.755 4.187c0 2.428-1.972 4.4-4.4 4.4h-11.97a3.445 3.445 0 0 1-3.444-3.444 3.445 3.445 0 0 1 3.22-3.436" clip-rule="evenodd"/><path fill="%23f18585" d="M90.532 58.93c0 17.787-14.418 32.197-32.194 32.197-17.788 0-32.197-14.41-32.197-32.197 0-17.776 14.409-32.196 32.197-32.196 17.776 0 32.194 14.419 32.194 32.196"/><path fill="%23d34747" fill-rule="evenodd" d="M58.339 27.872c17.147 0 31.056 13.909 31.056 31.058 0 9.872-4.604 18.665-11.78 24.354a1.139 1.139 0 0 0 1.415 1.783c7.7-6.105 12.64-15.543 12.64-26.137 0-18.405-14.927-33.333-33.331-33.333a1.138 1.138 0 0 0 0 2.276M58.34 89.99c-17.16 0-31.06-13.901-31.06-31.06a1.138 1.138 0 0 0-2.276 0c0 18.415 14.919 33.335 33.335 33.335a1.138 1.138 0 0 0 0-2.275" clip-rule="evenodd"/><path fill="%23fff" d="M57.512 45.853a3.5 3.5 0 0 1 1.623.077q1.816.465 2.473 2.203.155.58-.077 2.396l-.889 5.758q-1.081 7.034-1.353 7.266-.27.116-1.855.039-.31 0-.347-.04-.194-.115-.348-.888-.116-.696-1.005-6.377-1.12-7.343-1.044-7.845 0-.077.078-.309.502-1.623 2.357-2.164.194-.078.387-.116m.038 20.25q.657-.154 1.508.078 1.7.425 2.357 2.087.116.193.155.425a3.3 3.3 0 0 1 0 1.739q-.465 1.778-2.165 2.396-.192.078-.347.116a3.3 3.3 0 0 1-1.74 0q-1.777-.464-2.396-2.164a3.318 3.318 0 0 1-.116-2.087q.31-1.16 1.16-1.817.657-.54 1.584-.772"/></g><defs><linearGradient id="b" x1="56.952" x2="56.952" y1="115.67" y2="13.79" gradientUnits="userSpaceOnUse"><stop offset=".25" stop-color="%23fff" stop-opacity=".1"/><stop offset="1" stop-color="%23f39d9d"/></linearGradient><clipPath id="a"><path fill="%23fff" d="M0 0h116.732v100H0z"/></clipPath></defs></svg>';var H=t=>t?.startsWith("es")?{documentsTitle:"Nada por aqu\xED todav\xEDa",documentsDescription:"Agrega un nuevo elemento para comenzar",notFoundTitle:"No se encontraron resultados",notFoundDescription:"Ajusta los criterios e int\xE9ntalo nuevamente",doneTitle:"\xA1Est\xE1s al d\xEDa!",doneDescription:"No hay elementos que completar",contentEmptyAlt:"Contenido vac\xEDo"}:t?.startsWith("pt")?{documentsTitle:"Nada aqui ainda",documentsDescription:"Adicione um novo item para come\xE7ar",notFoundTitle:"N\xE3o foram encontrados resultados",notFoundDescription:"Ajuste os crit\xE9rios e tente novamente",doneTitle:"Voc\xEA est\xE1 em dia!",doneDescription:"N\xE3o h\xE1 itens para concluir",contentEmptyAlt:"Conte\xFAdo vazio"}:{documentsTitle:"Nothing here yet",documentsDescription:"Add a new item to get started",notFoundTitle:"No results were found",notFoundDescription:"Adjust the criteria and try again",doneTitle:"You're all caught up!",doneDescription:"Nothing left to complete",contentEmptyAlt:"Content empty"},D=t=>{switch(t){case "lg":return {width:233.46,height:200};case "md":return {width:175.09,height:150};case "sm":return {width:116,height:100}}},N=tv({slots:{root:"font-inter flex h-fit w-fit flex-col items-center p-6 pt-10 text-neutral-600",title:"mt-4.5 text-center font-semibold",description:"font-inter mt-0.5 text-center"},variants:{size:{lg:{title:"font-jakarta text-lg leading-[156%]",description:"text-base leading-[150%] font-medium"},md:{title:"text-base leading-[150%]",description:"text-sm leading-[143%]"},sm:{title:"text-sm leading-[143%]",description:"text-sm leading-[143%]"}},variant:{empty:{},"not-found":{},done:{title:"text-success-700",description:"text-success-700"},danger:{title:"text-danger-700",description:"text-danger-700"}}}}),P=(t,e)=>{switch(t.variant){case "danger":return {title:t.title,description:t.description,imgUrl:p};case "not-found":return {title:t.title??e.notFoundTitle,description:t.description??e.notFoundDescription,imgUrl:c};case "done":return {title:t.title??e.doneTitle,description:t.description??e.doneDescription,imgUrl:s};default:return {title:t.title??e.documentsTitle,description:t.description??e.documentsDescription,imgUrl:r}}},k=t=>{let{actions:e$1,areActionsHidden:m=false,size:l="sm",className:u}=t,h=t.variant??"empty",{locale:g}=getDefaultOptions(),{root:v,title:y,description:b}=N({size:l,variant:h}),o=H(g?.code),a=P(t,o),{width:M,height:S}=D(l),d=l==="sm"?"sm":"lg";return jsxs("div",{className:v({className:u}),children:[jsx("img",{alt:o.contentEmptyAlt,width:M,height:S,src:a.imgUrl}),jsx("p",{className:y(),children:a.title}),jsx("p",{className:b(),children:a.description}),e$1&&!m&&jsxs("div",{className:"mt-4.5 flex gap-3",children:[e$1.secondary&&jsx(e,{...e$1.secondary,variant:"light",tone:"primary",size:d}),jsx(e,{...e$1.primary,variant:"secondary",tone:"primary",size:d})]})]})};
|
|
2
2
|
export{k as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-T5NU5E4O.js';import {d}from'./chunk-QMPBFFFC.js';import {a as a$1}from'./chunk-OBZIYJO7.js';import {SignaturePad}from'@ark-ui/react/signature-pad';import {forwardRef,useState,useCallback}from'react';import {jsxs,jsx}from'react/jsx-runtime';var z=forwardRef((N,D)=>{let{rootClassName:v,className:V,label:m,required:k,tooltip:A,helperText:f,error:u,hasValue:b,onChange:h,readOnly:n,disabled:e,...E}=N,[F,T]=useState(false),d$1=b!==void 0,H=d$1?b:F,P=useCallback(async a=>{let[l,g]=a.split(","),w=l.match(/:(.*?);/),q=w?w[1]:"image/png",c=atob(g),S=new Uint8Array(c.length);for(let i=0;i<c.length;i++)S[i]=c.charCodeAt(i);return new File([S],"signature.png",{type:q})},[]),o=useCallback(a=>{d$1||T(!!a),h?.(a);},[d$1,h]),R=useCallback(async a=>{if(n||e)return;let l=await a.getDataUrl("image/png");if(!l){o(null);return}let g=await P(l);o(g);},[o,P,n,e]),U=H&&!n&&!e;return jsxs(SignaturePad.Root,{ref:D,"data-error":u,className:a$1("group flex flex-col",v),onDrawEnd:R,readOnly:n,disabled:e,...E,children:[m&&jsx(a,{as:SignaturePad.Label,label:m,required:k,tooltip:A}),jsxs(SignaturePad.Control,{className:a$1("group/control","relative h-40 w-full overflow-hidden","rounded-lg bg-white p-4","border border-dashed border-neutral-300",u&&"border-error-500",n&&"pointer-events-none border-neutral-300 bg-neutral-100",e&&"pointer-events-none opacity-60",V),children:[jsx(SignaturePad.Segment,{className:"h-full w-full"}),jsx(SignaturePad.Guide,{className:"absolute inset-0 opacity-20"}),U&&jsx(SignaturePad.ClearTrigger,{className:"absolute top-2 right-2 z-20 cursor-pointer rounded-lg bg-neutral-100 p-1 ring-1 ring-neutral-500",onClick:()=>o(null),children:jsx(d,{className:"size-4 text-neutral-700"})})]}),f&&jsx("p",{className:a$1("font-inter text-2xs mt-1 leading-[133.33%] font-normal",u?"text-error-500":"text-neutral-700",e&&"text-neutral-400"),children:f})]})});z.displayName="SignaturePad";export{z as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {c as c$2}from'./chunk-JYNJHAGL.js';import {c as c$1}from'./chunk-ZCMXCZC2.js';import {e as e$1}from'./chunk-PI7DECIN.js';import {a as a$2}from'./chunk-JW7HS6NX.js';import {a as a$1}from'./chunk-
|
|
1
|
+
import {c as c$2}from'./chunk-JYNJHAGL.js';import {c as c$1}from'./chunk-ZCMXCZC2.js';import {e as e$1}from'./chunk-PI7DECIN.js';import {a as a$2}from'./chunk-JW7HS6NX.js';import {a as a$1}from'./chunk-3RNV3YTB.js';import {d}from'./chunk-MP4CHZ2K.js';import {e,t,u}from'./chunk-QMPBFFFC.js';import {e as e$2}from'./chunk-P7NW2XNB.js';import {a as a$3}from'./chunk-P6B33GL6.js';import {a}from'./chunk-OBZIYJO7.js';import {useCallback}from'react';import {tv}from'tailwind-variants';import {useCollapsibleContext,Collapsible}from'@ark-ui/react/collapsible';import {getDefaultOptions}from'date-fns';import {jsxs,jsx}from'react/jsx-runtime';var c=tv({slots:{root:"ring-expandable-card-border group/expandable-card flex h-fit flex-col rounded-lg ring transition-all duration-200 ease-in-out ring-inset",header:"flex pt-3 pr-1 pb-2 pl-3",headerLabel:"text-sm leading-[130%] font-semibold empty:hidden",complementaryText:"line-clamp-1 text-xs leading-[130%] text-neutral-900",subtitle:"line-clamp-1 text-xs leading-[130%] text-neutral-700",content:"data-[state=open]:animate-accordion-down data-[state=closed]:animate-accordion-up border-expandable-card-border overflow-hidden group-data-[state=open]/expandable-card:border-t",contentInner:"px-3 pt-4 pb-6",fixedContent:"border-expandable-card-border border-t px-3 pt-6 pb-4"},variants:{background:{white:{root:"bg-neutral-50"},gray:{root:"bg-neutral-100"}}},defaultVariants:{background:"white"}}),G=(a,e)=>e?.startsWith("es")?a?"Contraer":"Expandir":e?.startsWith("pt")?a?"Recolher":"Expandir":a?"Collapse":"Expand",gt=({headerLabel:a$4,complementaryText:e$3,subtitle:o,headerTooltip:n,className:m,action:i,chipStatus:l,badgeExpandable:p,chipExpandable:h,badgeNumber:b,Icon:v,iconButtons:w,checkbox:x,...D})=>{let{header:M,headerLabel:O,complementaryText:F,subtitle:A}=c(),E=useCollapsibleContext(),{locale:R}=getDefaultOptions(),S=G(E.open,R?.code);return jsxs("div",{...D,className:a(M(),m),children:[x&&jsx(c$1,{...x,className:a("mt-0.25 mr-1",x.className)}),jsxs("div",{className:"flex flex-1 flex-col gap-1",children:[jsxs("div",{className:"flex items-center justify-between gap-3",children:[jsxs("div",{className:"flex items-center gap-2",children:[v&&jsx(v,{className:"h-3.5 w-3.5 shrink-0"}),jsxs("div",{className:"flex items-center gap-2",children:[jsx("b",{className:O(),children:a$4}),e$3&&jsx("span",{className:F(),children:e$3}),n&&jsx(a$1,{content:n,contentClassName:"font-normal normal-case",children:jsx(e,{className:"h-3.5 w-3.5 shrink-0"})})]})]}),jsxs("div",{className:"flex items-center gap-2",children:[l&&jsx(d,{...l,size:"xs",type:"light"}),h&&jsx(c$2,{...h,type:"light"}),p&&jsx(a$2,{...p,size:"md"}),b&&jsx(a$3,{text:b.text,affix:b.affix,size:"md",variant:"primary",type:"square"}),w?.map((d,C)=>{let{tooltipContent:N,...U}=d;return jsx(a$1,{content:N,disabled:!N,children:jsx(e$1,{...U,variant:"ghost",tone:"neutral",size:"sm"})},C)}),i&&(()=>{let{tooltipContent:d,...C}=i;return jsx(a$1,{content:d,disabled:!d,children:jsx(e$2,{...C,size:"sm",variant:"ghost",tone:"neutral"})})})(),jsx(a$1,{content:S,asChild:true,children:jsx(Collapsible.Trigger,{asChild:true,children:jsx(e$1,{Icon:E.open?t:u,variant:"ghost",size:"sm",tone:"neutral"})})})]})]}),o&&jsx("p",{className:A(),children:o})]})]})},ft=({className:a,...e})=>{let{contentInner:o,content:n}=c();return jsx(Collapsible.Content,{className:n(),children:jsx("div",{...e,className:o({className:a})})})},ht=({className:a,...e})=>{let{fixedContent:o}=c();return jsx("div",{...e,className:o({className:a})})},vt=({className:a,onOpenChange:e,children:o,background:n="white",...m})=>{let{root:i}=c({background:n}),l=useCallback(p=>{e?.(p);},[e]);return jsx(Collapsible.Root,{onOpenChange:l,className:i({className:a}),...m,children:o})};export{gt as a,ft as b,ht as c,vt as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {a}from'./chunk-KTD2GEB6.js';import {b}from'./chunk-7CJMO5NP.js';import {a as a$1}from'./chunk-OBZIYJO7.js';import {jsxs,jsx}from'react/jsx-runtime';var i={md:"h-(--height-input-md)",lg:"h-(--height-input)"},n=({size:m=b,className:p})=>jsxs("div",{className:a$1("flex w-full flex-col gap-2",p),children:[jsx(a,{className:"h-4 w-15 rounded-sm"}),jsx(a,{className:a$1(i[m],"w-full rounded-lg")})]});export{n as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-T5NU5E4O.js';import {RadioGroupRoot,RadioGroupLabel,RadioGroupItem,RadioGroupItemControl,RadioGroupItemText,RadioGroupItemHiddenInput}from'@ark-ui/react/radio-group';import {forwardRef,useCallback}from'react';import {tv}from'tailwind-variants';import {jsxs,jsx}from'react/jsx-runtime';var E=["horizontal","vertical"];var N=tv({slots:{item:["group/item flex w-fit items-center gap-1.5","data-disabled:cursor-not-allowed"],control:["relative size-4.5 rounded-full border ring-inset","before:absolute before:h-full before:w-full before:rounded-full before:border-3 before:border-transparent","border-neutral-700 bg-neutral-50","data-[state=unchecked]:group-hover/item:[&:not([data-disabled])]:border-primary-700","data-[state=unchecked]:group-hover/item:[&:not([data-disabled])]:bg-primary-200","data-[state=checked]:border-primary-600","data-[state=checked]:bg-primary-600","data-[state=checked]:before:border-neutral-50","data-[state=checked]:group-hover/item:[&:not([data-disabled])]:border-primary-700","data-[state=checked]:group-hover/item:[&:not([data-disabled])]:bg-primary-700","data-[state=checked]:group-hover/item:[&:not([data-disabled])]:before:ring-transparent-primary-400-40","data-[state=checked]:group-hover/item:[&:not([data-disabled])]:before:ring-3","data-[state=checked]:group-hover/item:[&:not([data-disabled])]:after:absolute","data-[state=checked]:group-hover/item:[&:not([data-disabled])]:after:h-full","data-[state=checked]:group-hover/item:[&:not([data-disabled])]:after:w-full","data-[state=checked]:group-hover/item:[&:not([data-disabled])]:after:rounded-full","data-[state=checked]:group-hover/item:[&:not([data-disabled])]:after:border-3","data-[state=checked]:group-hover/item:[&:not([data-disabled])]:after:border-transparent-primary-400-40","data-[state=checked]:group-hover/item:[&:not([data-disabled])]:after:bg-transparent","focus:border-2","focus:border-primary-800","data-[state=checked]:focus:before:bg-primary-800","data-disabled:border-neutral-300","data-disabled:bg-neutral-100","data-disabled:data-[state=checked]:border-neutral-300","data-disabled:data-[state=checked]:bg-neutral-100","data-disabled:data-[state=checked]:before:bg-neutral-300"],text:["font-inter text-sm leading-[143%]","text-neutral-900","group-data-[error=true]:text-error-500","data-disabled:text-neutral-400"]}}),C=tv({base:"group",variants:{labelOrientation:{horizontal:"flex gap-4",vertical:"flex flex-col gap-3"}}}),L=tv({base:"flex",variants:{orientation:{horizontal:"flex-wrap gap-8",vertical:"flex-col gap-4"}}}),w=forwardRef(({className:d,innerClassName:a$1,orientation:t="horizontal",labelOrientation:i="vertical",onValueChange:r,error:l,label:o,required:s,tooltip:c,children:b,...f},h)=>{let g=useCallback(R=>{r?.(R.value);},[r]);return jsxs(RadioGroupRoot,{"data-error":l,className:C({className:d,labelOrientation:i}),orientation:t,ref:h,onValueChange:g,...f,children:[o&&jsx(a,{as:RadioGroupLabel,label:o,required:s,tooltip:c,className:"mb-0"}),jsx("div",{className:L({orientation:t,className:a$1}),children:b})]})});w.displayName="RadioGroup";var z=forwardRef(({value:d,label:a,className:t,...i},r)=>{let{item:l,control:o,text:s}=N();return jsxs(RadioGroupItem,{value:d,className:l({className:t}),ref:r,...i,children:[jsx(RadioGroupItemControl,{className:o()}),a&&jsx(RadioGroupItemText,{className:s(),children:a}),jsx(RadioGroupItemHiddenInput,{})]})});z.displayName="RadioGroupItem";export{E as a,N as b,w as c,z as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$8}from'./chunk-
|
|
1
|
+
import {a as a$8}from'./chunk-4UUTVKB5.js';import {a as a$7}from'./chunk-FHABUQAH.js';import {a as a$6}from'./chunk-JW7HS6NX.js';import {a as a$4}from'./chunk-XYBXEU3T.js';import {a as a$3}from'./chunk-NGC5DGW6.js';import {a,b,c,d}from'./chunk-TW4CJXQY.js';import {a as a$5}from'./chunk-VIMWKUML.js';import {a as a$1}from'./chunk-T5NU5E4O.js';import {a as a$2}from'./chunk-OBZIYJO7.js';import {createListCollection,useCombobox,Combobox,useComboboxContext}from'@ark-ui/react/combobox';import {useFilter}from'@ark-ui/react/locale';import {Portal}from'@ark-ui/react/portal';import {useMemo,useRef,useState,useCallback,useEffect}from'react';import {jsxs,jsx}from'react/jsx-runtime';function me(){let n=useComboboxContext(),r=useRef(n);r.current=n;let i=n.value.join("|"),m=n.inputValue.length>0,d=n.collection.size;return useEffect(()=>{if(!i||m||!d)return;let s=r.current.collection.stringify(r.current.value[0]);s&&r.current.setInputValue(s);},[i,m,d]),null}var De=a,de=b,be=n=>{let{label:r,error:i,required:m,tooltip:d$1,disabled:s,readOnly:S,options:u,onInputValueChange:y,onSelect:b,defaultValue:A,helperText:K,noResultsTitle:O,noResultsDescription:U,noResultsIcon:_,noResultsTitleLines:J,noResultsDescriptionLines:Q,value:l,size:W=de,className:X,emptyState:Y,...Z}=n,$=Object.getOwnPropertyNames(n),R=typeof l=="object"&&l!==null?l.value:l,f=useMemo(()=>typeof l!="object"||l===null||u.some(e=>e.value===l.value)?u:[l,...u],[u,l]),g=useRef(null),ee=useMemo(()=>({sensitivity:"base"}),[]),{contains:I}=useFilter(ee),[x,te]=useState(""),V=useMemo(()=>createListCollection({items:f,itemToString:e=>e.label,itemToValue:e=>String(e.value)}),[f]),a=useMemo(()=>x?V.filter((e,w,v)=>I(e,x)||!!v.description&&I(v.description,x)):V,[V,x,I]),c$1=useCallback(e=>{te(e??"");},[]),oe=useCallback(e=>{let w=f.find(v=>String(v.value)===e.itemValue);w&&b?.(w);},[b,f]),ne=useCallback(e=>{if(e.reason==="input-change"){c$1(e.inputValue),y?.(e.inputValue??"");return}c$1(""),e.reason==="clear-trigger"&&y?.("");},[c$1,y]),le=useCombobox({collection:a,defaultValue:A!=null?[String(A)]:void 0,placeholder:n.placeholder,inputValue:n.inputValue,onInputValueChange:ne,value:$.includes("value")?R!=null?[String(R)]:[]:void 0,onSelect:oe,inputBehavior:"autocomplete",openOnClick:true,disabled:s,readOnly:S,...Z}),re=useCallback(()=>{b?.(null);},[b]);useEffect(()=>{g.current&&g.current.value===""&&c$1("");},[c$1,g.current?.value]);let N=c({error:i,disabled:s,readOnly:S,size:W});return jsxs(Combobox.RootProvider,{value:le,"data-error":i||void 0,className:N.root({className:X}),children:[jsx(a$1,{as:Combobox.Label,label:r,required:m,tooltip:d$1}),jsx(me,{}),jsxs(Combobox.Control,{className:a$2(N.control(),"group/control items-center justify-between gap-2 overflow-hidden px-3",s&&"cursor-not-allowed"),children:[jsx(Combobox.Input,{ref:g,className:a$2(N.input(),"data-placeholder-shown:text-input-placeholder px-0 text-left disabled:cursor-not-allowed")}),i&&jsx(d,{}),!S&&jsx(a$3,{as:Combobox.ClearTrigger,className:"group-data-disabled/control:hidden",onClick:re}),jsx(Combobox.Trigger,{className:"group/chevron-host cursor-pointer group-data-disabled/control:cursor-not-allowed",children:jsx(a$4,{})})]}),jsx(a$5,{children:K}),jsx(Portal,{children:jsx(Combobox.Positioner,{children:jsx(Combobox.Content,{className:"elevation-9 z-layer bg-input-bg max-h-67.5 min-w-27.5 overflow-auto rounded-lg",children:jsxs(Combobox.ItemGroup,{className:a$2({"flex flex-col items-center justify-center":a.items.length===0}),children:[a.items.length>0&&a.items.map(e=>jsx(Combobox.Item,{item:e,className:"font-inter data-highlighted:bg-primary-100 block w-full cursor-pointer p-3 data-disabled:cursor-not-allowed data-disabled:text-neutral-400",children:jsx(Combobox.ItemText,{className:"flex w-full min-w-0 flex-col gap-1",asChild:true,children:jsxs("div",{className:"w-full min-w-0",children:[jsxs("div",{className:"flex w-full items-center justify-between gap-2",children:[jsx("p",{className:"min-w-0 flex-1 truncate text-sm leading-[130%] font-medium",children:e.label}),e.badgeExpandable&&jsx("div",{className:"flex shrink-0 justify-end overflow-visible",children:jsx(a$6,{size:"sm",...e.badgeExpandable})})]}),e.description&&jsx("p",{className:"text-xs leading-[130%]",children:e.description})]})})},e.value)),a.items.length===0&&O&&jsx(a$7,{title:O,description:U,Icon:_,descriptionLines:Q,titleLines:J}),a.items.length===0&&jsx(a$8,{size:"sm",variant:"not-found",...Y})]})})})})]})};be.displayName="Autocomplete";export{De as a,de as b,be as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-NGC5DGW6.js';import {c,d}from'./chunk-TW4CJXQY.js';import {a as a$3}from'./chunk-VIMWKUML.js';import {a}from'./chunk-
|
|
1
|
+
import {a as a$1}from'./chunk-NGC5DGW6.js';import {c,d}from'./chunk-TW4CJXQY.js';import {a as a$3}from'./chunk-VIMWKUML.js';import {a}from'./chunk-T5NU5E4O.js';import {w}from'./chunk-QMPBFFFC.js';import {a as a$2}from'./chunk-OBZIYJO7.js';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 q=["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"],M="00:00",z=forwardRef((s,T)=>{let{className:y,label:S,required:w$1,tooltip:N,error:o,isItemDisabled:d$1,value:u,helperText:V,placeholder:k=M,onValueChange:c$1,defaultValue:p,disabled:m,readOnly:l,...I}=s,a$4=Object.getOwnPropertyNames(s),g=useMemo(()=>createListCollection({items:q,isItemDisabled:d$1}),[d$1]),D=useCallback(r=>{c$1?.(r.value.at(0)??null);},[c$1]);if(a$4.includes("defaultValue")&&a$4.includes("value"))throw new Error("Cannot set both defaultValue and value props on TimePicker. Use one or the other.");let f=c({error:o,disabled:m,readOnly:l});return jsxs(Select.Root,{ref:T,"data-error":o,disabled:m,readOnly:l,collection:g,className:f.root({className:y}),positioning:{placement:"bottom-end"},onValueChange:D,value:a$4.includes("value")?u?[u]:[]:void 0,defaultValue:p?[p]:void 0,...I,children:[jsx(a,{as:Select.Label,label:S,required:w$1,tooltip:N}),jsxs(Select.Control,{className:a$2(f.control(),"group/control relative overflow-hidden"),children:[jsx(Select.Trigger,{className:"text-input-text data-placeholder-shown:text-input-placeholder data-disabled:text-input-text-disabled flex w-full cursor-pointer items-center pr-16 disabled:cursor-not-allowed",children:jsx(Select.ValueText,{className:"font-inter min-w-0 flex-1 py-2.5 pl-3 text-left text-sm",placeholder:k})}),jsxs("div",{className:"pointer-events-none absolute top-0 right-0 flex h-full items-center gap-1",children:[o&&jsx(d,{}),!l&&jsx(a$1,{as:Select.ClearTrigger,className:"pointer-events-auto",onClick:r=>r.stopPropagation()}),jsx(Select.Indicator,{className:a$2("ring-input-ring rounded-r-input ml-1 flex h-full w-10 shrink-0 items-center justify-center bg-neutral-100 text-neutral-700 ring transition-shadow","group-data-focus/control:ring-input-ring-focus group-data-focus/control:ring-2","group-data-[error=true]:ring-input-ring-error group-data-[error=true]:ring-2","group-data-disabled/control:ring-input-ring-disabled group-data-disabled/control:text-neutral-400","group-data-readonly/control:ring-input-ring-disabled group-data-readonly/control:text-neutral-400"),children:jsx(w,{className:"size-4.5"})})]})]}),jsx(a$3,{children:V}),jsx(Portal,{children:jsx(Select.Positioner,{children:jsx(Select.Content,{className:"elevation-9 z-layer bg-input-bg max-h-67.5 min-w-27.5 overflow-auto rounded-lg outline-none",children:g.items.map(r=>jsx(Select.Item,{item:r,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:r})},r))})})}),jsx(Select.HiddenSelect,{})]})});z.displayName="TimePicker";export{z as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {e,i,f,a as a$1,b,c,g,h,d,j as j$1}from'./chunk-6M7NDF3Y.js';import {a as a$5,b as b$1,c as c$2}from'./chunk-GTVHYHF4.js';import {a as a$3}from'./chunk-KTD2GEB6.js';import {c as c$1}from'./chunk-ZCMXCZC2.js';import {a as a$2}from'./chunk-HIULYFIC.js';import {e as e$1,B,I,H,r,G,F,E,D,y,z,A,f as f$1,C}from'./chunk-QMPBFFFC.js';import {a as a$4}from'./chunk-ICF6RQIW.js';import {e as e$2}from'./chunk-QYA5ZUUN.js';import {a}from'./chunk-OBZIYJO7.js';import {memo,useMemo,useState,useCallback,useRef,useEffect}from'react';import {flexRender,useReactTable,getCoreRowModel}from'@tanstack/react-table';import {jsx,jsxs}from'react/jsx-runtime';var X={alert:{Icon:C,bgClassName:"bg-orange-50 hover:bg-orange-100",iconClassName:"text-orange-700"},incident:{Icon:f$1,bgClassName:"bg-warning-100 hover:bg-warning-200",iconClassName:"text-warning-900"},"no-address":{Icon:A,bgClassName:"bg-coral-50 hover:bg-coral-100",iconClassName:"text-coral-700"},"email-alert":{Icon:z,bgClassName:"bg-danger-100 hover:bg-danger-200",iconClassName:"text-danger-700"},superadmin:{Icon:y,bgClassName:"bg-orchid-100 hover:bg-orchid-200",iconClassName:"text-orchid-700"},bundle:{Icon:D,bgClassName:"bg-aqua-100 hover:bg-aqua-200",iconClassName:"text-aqua-800"},variants:{Icon:a$4,bgClassName:"bg-bubblegum-50 hover:bg-bubblegum-100",iconClassName:"text-bubblegum-700"},providers:{Icon:E,bgClassName:"bg-pink-50 hover:bg-pink-200",iconClassName:"text-pink-700"},"transaction-request":{Icon:F,bgClassName:"bg-green-100 hover:bg-green-200",iconClassName:"text-green-800"},design:{Icon:G,bgClassName:"bg-orange-50 hover:bg-orange-100",iconClassName:"text-orange-700"},error:{Icon:r,bgClassName:"bg-danger-100 hover:bg-danger-200",iconClassName:"text-danger-700"},draft:{Icon:H,bgClassName:"bg-new-50 hover:bg-new-200",iconClassName:"text-new-700 group-hover/preset:text-new-800"},products:{Icon:I,bgClassName:"bg-bubblegum-200 hover:bg-bubblegum-300",iconClassName:"text-bubblegum-700"},more:{Icon:B,bgClassName:"bg-primary-300 hover:bg-primary-400",iconClassName:"text-primary-700"},empty:{bgClassName:"bg-primary-50 border-b border-b-primary-200 hover:bg-primary-100 data-disabled:border-b-neutral-300"}},Qe=["alert","incident"],Cn=n=>{let a=Qe.map(r=>n.find(c=>c.name===r)).filter(r=>r!==void 0),l=n.filter(r=>!Qe.includes(r.name));return [...a,...l]},Tn=n=>({id:Z,size:54,enableResizing:false,header:({table:a})=>{let l=a.getRowModel().rows.some(c=>c.getCanSelect()),r=a.getIsAllPageRowsSelected()?true:a.getIsSomePageRowsSelected()?"indeterminate":false;return jsx(c$1,{checked:r,disabled:!l,className:"ml-1",onCheckedChange:c=>a.toggleAllPageRowsSelected(c===true)})},cell:({row:a})=>{let l=a.getCanSelect(),r=l?a.getIsSelected():typeof n.setDisabledRowState=="function"?n.setDisabledRowState(a.original):n.setDisabledRowState??false,c=jsx(c$1,{checked:r,onCheckedChange:f=>a.toggleSelected(f===true),disabled:!l}),u=n.rowSelectionTooltip?.content(a.original);return u?jsx(a$2,{className:"w-fit",content:u,positioning:n.rowSelectionTooltip?.positioning??{placement:"right"},children:c}):c},enableSorting:false}),ee=["w-3/4","w-1/2","w-2/3","w-5/6","w-3/5"],tn=({columns:n,rows:a$2,hasSelection:l,hasRowActions:r,hasPagination:c$1,className:u,...f})=>jsxs(a$1,{className:u,...f,children:[jsxs(b,{children:[jsx(c,{children:jsxs(g,{children:[r&&jsx(h,{className:a("p-0",j)}),l&&jsx(h,{className:"w-13.5",children:jsx(a$3,{className:"bg-primary-300 m-0.5 ml-1.5 size-4.5 rounded-sm"})}),Array.from({length:n},(x,S)=>jsx(h,{children:jsx(a$3,{className:"bg-primary-300 h-3 w-16"})},S))]})}),jsx(d,{className:"[&>tr:not(:last-child)>td]:shadow-[inset_0_-1px_0_0_var(--row-divider-color,var(--color-primary-200))]",children:Array.from({length:a$2},(x,S)=>jsxs(e,{children:[r&&jsx(i,{className:a("bg-primary-50 p-0 align-middle",j),children:jsxs("div",{className:"grid h-full w-full grid-rows-3",children:[jsx(a$3,{className:"h-full w-full rounded-none"}),jsx(a$3,{className:"h-full w-full rounded-none"}),jsx(a$3,{className:"h-full w-full rounded-none"})]})}),l&&jsx(i,{className:"align-middle",children:jsx(a$3,{className:"m-0.5 size-4.5 rounded-sm"})}),Array.from({length:n},(i$1,m)=>jsx(i,{children:jsx(a$3,{className:a("h-4",ee[(S+m)%ee.length])})},m))]},S))})]}),c$1&&jsxs("div",{className:"border-t-primary-200 grid min-h-12 grid-cols-3 items-center gap-6 border-t px-4.5",children:[jsx(a$3,{className:"h-3.5 w-20"}),jsxs("div",{className:"flex items-center justify-center gap-2",children:[jsx(a$3,{className:"size-8 rounded-lg"}),jsx(a$3,{className:"size-8 rounded-lg"})]}),jsx("div",{className:"flex justify-end",children:jsx(a$3,{className:"h-3.5 w-28"})})]})]});tn.displayName="DataTableFullSkeleton";var Sn={neutral:"bg-neutral-100",success:"bg-success-20",orange:"bg-orange-20",warning:"bg-warning-20",danger:"bg-danger-20",default:"bg-neutral-50"},O="__row_actions__",Z="__select__",j="w-7.5 min-w-7.5 max-w-7.5",en="grid grid-cols-1 h-full w-full cursor-pointer overflow-hidden border-0 p-0 focus:outline-2 focus:-outline-offset-2 focus:outline-primary-800 focus:rounded-xs disabled:cursor-not-allowed",Y=(n,a$1)=>{let l=n.Icon;return jsx(a$2,{content:a$1?.tooltip??"",disabled:!a$1?.tooltip,className:"h-full w-full",positioning:{placement:"right"},children:jsx("div",{"data-disabled":a$1?.disabled||void 0,className:a("group/preset flex h-full w-full items-center justify-center",n.bgClassName,"data-disabled:cursor-not-allowed data-disabled:bg-neutral-200"),children:l&&jsx(l,{className:a("size-3.5 shrink-0",n.iconClassName,"group-data-disabled/preset:text-neutral-600"),"aria-hidden":true})})},a$1?.key)},be=(n,a)=>typeof n=="function"?n(a):n??false,hn=({row:n,rowActions:a})=>{let[l,r]=useState(false),c=n.original,u=Cn(a(c));if(u.length===0)return Y(X.empty);let f=u.length>3,x=f?u.slice(0,2):u,S=f?3:x.length;if(u.length===1){let i=u[0],m=be(i.isDisabled,c);return jsx("button",{type:"button","aria-label":i.label,disabled:m,className:en,style:{gridTemplateRows:"repeat(1, minmax(0, 1fr))"},onClick:N=>{N.stopPropagation(),i.onClick(c);},children:Y(X[i.name],{disabled:m,tooltip:i.tooltip})})}return jsxs(a$5,{open:l,onOpenChange:r,modal:false,positioning:{placement:"right-start",gutter:0},children:[jsx(b$1,{asChild:true,children:jsxs("button",{type:"button","aria-label":"Row actions",className:en,style:{gridTemplateRows:`repeat(${S}, minmax(0, 1fr))`},onClick:i=>{i.stopPropagation();},children:[x.map((i,m)=>Y(X[i.name],{key:`${i.name}-${m}`,disabled:be(i.isDisabled,c),tooltip:i.tooltip})),f&&Y(X.more)]})}),jsx(c$2,{className:"min-w-48 overflow-hidden rounded-sm p-0",children:jsx("div",{className:"flex flex-col",children:u.map((i,m)=>{let N=X[i.name];if(!N.Icon)return null;let z=be(i.isDisabled,c);return jsx(e$2,{variant:"ghost",size:"md",disabled:z,StartIcon:N.Icon,className:"h-auto! min-h-0! w-full justify-start gap-2! px-3! py-4! text-neutral-900! hover:text-neutral-900! disabled:text-neutral-900!",onClick:v=>{v.stopPropagation(),i.onClick(c),r(false);},type:"button",children:i.label},`${i.name}-${m}`)})})})]})},wn=({rowActions:n})=>({id:O,header:()=>jsx("span",{className:"sr-only",children:"Actions"}),size:30,minSize:30,maxSize:30,enableResizing:false,cell:({row:a})=>n?jsx(hn,{row:a,rowActions:n}):null}),on=memo(({row:n,isSelected:a$1,type:l})=>jsx(e,{"data-state":a$1&&"selected",className:a(l&&l!=="default"&&Sn[l]),style:l&&l!=="default"?{"--row-divider-color":`var(--color-${l}-100)`}:void 0,children:n.getVisibleCells().map(r=>jsx(i,{className:r.column.id===O?a("p-0 align-middle",j):void 0,children:flexRender(r.column.columnDef.cell,r.getContext())},r.id))}),(n,a)=>n.isSelected===a.isSelected&&n.row.original===a.row.original&&n.type===a.type&&n.columns===a.columns);on.displayName="DataTableRow";var Nn=150,Dn=Number.POSITIVE_INFINITY,yn=140,Q=(n,a,l)=>Math.min(Math.max(n,a),l),Rn=20,xn=Number.MAX_SAFE_INTEGER,J=n=>{let a=n.size??Nn,l=n.minSize===void 0||n.minSize===Rn?void 0:n.minSize,r=n.maxSize===void 0||n.maxSize===xn?void 0:n.maxSize;return {size:a,minSize:l??Math.min(a,yn),maxSize:r??Dn}},an="dt-col-sizes-",zn="dt-col-ratios-",Pn=n=>{try{localStorage.removeItem(`${zn}${n}`);let a=localStorage.getItem(`${an}${n}`);if(!a)return {};let l=JSON.parse(a),r={};for(let[c,u]of Object.entries(l))typeof u=="number"&&Number.isFinite(u)&&u>0&&(r[c]=u);return r}catch{return {}}},vn=(n,a)=>{try{localStorage.setItem(`${an}${n}`,JSON.stringify(a));}catch{}},In=(n,a)=>{let l={},r=0,c=[];for(let i of n)if(i.isFixed)l[i.id]=i.weight,r+=i.weight;else if(i.isPinned){let m=Q(i.pinnedPx,i.minSize,i.maxSize);l[i.id]=m,r+=m;}else c.push(i);if(c.length===0)return l;let u=Math.max(a-r,0),f=c.map(i=>({column:i,px:i.minSize,frozen:false})),x=f.length+1;for(;x-- >0;){let i=f.filter(d=>!d.frozen);if(i.length===0)break;let m=f.filter(d=>d.frozen).reduce((d,h)=>d+h.px,0),N=u-m,z=i.reduce((d,h)=>d+h.column.weight,0);if(z<=0)break;let v=false;for(let d of i){let h=d.column.weight/z*N;h<d.column.minSize?(d.px=d.column.minSize,d.frozen=true,v=true):h>d.column.maxSize?(d.px=d.column.maxSize,d.frozen=true,v=true):d.px=h;}if(!v)break}for(let i of f)l[i.column.id]=i.px;let S=f.find(i=>i.column.isFill);if(S){let i=f.filter(m=>m.column.id!==S.column.id).reduce((m,N)=>m+N.px,0);l[S.column.id]=Math.max(u-i,S.column.minSize);}return l};function at({columns:n,data:a$4,rowsCount:l,pagination:r,onPaginationChange:c$1,noResults:u,onNextPageClick:f$1,onPreviousPageClick:x,disableNextPage:S,disablePreviousPage:i$1,className:m,onRowsPerPageChange:N,columnOrder:z,columnVisibility:v,rowsPerPageOptions:d$1,enableRowSelection:h$1=false,rowSelection:pe,onRowSelectionChange:ln,getRowId:fe,rowSelectionTooltip:Ce,setDisabledRowState:Te,tableId:D,isLoading:L,isInitialLoading:Se,skeletonRowCount:sn,skeletonColumns:rn=6,getRowType:he,rowActions:k,...we}){let F=typeof h$1=="function"||h$1,Ne=useMemo(()=>{if(!z)return;let t=[k?O:null,F?Z:null].filter(s=>s!=null),o=new Set(t);return [...t,...z.filter(s=>!o.has(s))]},[z,F,k]),H=useMemo(()=>{let t=[...n];if(F&&t.unshift(Tn({rowSelectionTooltip:Ce,setDisabledRowState:Te})),k){let o=wn({rowActions:k});t.unshift(o);}return t},[F,n,Ce,Te,k]),[I,cn]=useState(null),un=useCallback(t=>cn(t),[]),[ne,De]=useState(0),ye=useRef(false),[y,te]=useState({}),[Re,xe]=useState(null),oe=useRef(null),ae=useRef(null),C=useReactTable({data:a$4,columns:H,rowCount:l,state:{pagination:r,...Ne!==void 0&&{columnOrder:Ne},columnVisibility:v,...pe!==void 0&&{rowSelection:pe},...D&&{columnSizing:y}},onPaginationChange:c$1,onRowSelectionChange:ln,...D&&{onColumnSizingChange:te},manualPagination:true,getCoreRowModel:getCoreRowModel(),enableRowSelection:typeof h$1=="function"?t=>h$1(t.original):h$1,getRowId:fe?t=>fe(t):void 0}),ie=C.getVisibleLeafColumns().map(t=>t.id).join(","),ze=Re!==null,A=useMemo(()=>{let t=C.getVisibleLeafColumns().filter(s=>s.getCanResize());return t.length===0?void 0:(t.find(s=>s.columnDef.isFillColumn)??t[t.length-1]).id},[C,ie,H]),Pe=useMemo(()=>{if(!ne)return {};let t=C.getVisibleLeafColumns().map(o=>{let{size:s,minSize:g,maxSize:b}=J(o.columnDef),P=o.getCanResize(),R=o.id===A;return {id:o.id,isFixed:!P,isPinned:P&&!R&&o.id in y,pinnedPx:y[o.id]??s,weight:s,minSize:g,maxSize:b,isFill:R}});return In(t,ne)},[C,ie,H,ne,y,A]),mn=useMemo(()=>C.getVisibleLeafColumns().reduce((t,o)=>{let{size:s,minSize:g,maxSize:b}=J(o.columnDef);return o.getCanResize()?o.id!==A&&o.id in y?t+Q(y[o.id]??s,g,b):t+g:t+s},0),[C,ie,H,y,A]),ve=(t,o)=>{let s=t.column.id,{size:g,minSize:b,maxSize:P}=J(t.column.columnDef),R=Pe[s]??g,_="touches"in o?o.touches[0]?.clientX??0:o.clientX;o.preventDefault(),o.stopPropagation(),oe.current=s,xe(s),document.body.style.userSelect="none";let q=B=>{"touches"in B&&B.preventDefault();let dn="touches"in B?B.touches[0]?.clientX??_:B.clientX,ke=Q(R+(dn-_),b,P);te(le=>le[s]===ke?le:{...le,[s]:ke});},W=()=>{oe.current=null,xe(null),document.body.style.userSelect="",document.removeEventListener("mousemove",q),document.removeEventListener("mouseup",W),document.removeEventListener("touchmove",q),document.removeEventListener("touchend",W),ae.current=null,I&&De(I.clientWidth);};ae.current=W,document.addEventListener("mousemove",q),document.addEventListener("mouseup",W),document.addEventListener("touchmove",q,{passive:false}),document.addEventListener("touchend",W);};useEffect(()=>()=>ae.current?.(),[]),useEffect(()=>{D&&te(Pn(D));},[D]),useEffect(()=>{if(!I)return;let t=g=>{g>0&&De(g);};t(I.clientWidth);let o=0,s=new ResizeObserver(([g])=>{if(!g||oe.current!==null)return;cancelAnimationFrame(o);let b=I.clientWidth;o=requestAnimationFrame(()=>t(b));});return s.observe(I),()=>{cancelAnimationFrame(o),s.disconnect();}},[I]),useEffect(()=>{if(D){if(!ye.current){ye.current=true;return}ze||vn(D,y);}},[D,ze,y]);let Ie=sn??r?.pageSize??10;return Se?jsx(tn,{columns:rn,rows:Ie,hasSelection:F,hasRowActions:!!k,hasPagination:!!r,className:m,...we}):!L&&!Se&&!C.getRowModel().rows?.length?jsx(f,{...u}):jsxs(a$1,{ref:un,className:m,...we,children:[jsxs(b,{style:{width:"100%",minWidth:mn,tableLayout:"fixed"},children:[jsx("colgroup",{children:C.getHeaderGroups()[0].headers.map(t=>{let o=t.column,s=o.getCanResize(),{size:g,minSize:b,maxSize:P}=J(o.columnDef);if(o.id===A)return jsx("col",{span:1,style:{width:"auto",minWidth:b}},t.id);let R=Pe[o.id]??Q(y[o.id]??g,b,P);return jsx("col",{span:1,style:{width:R,minWidth:s?b:R}},t.id)})}),jsx(c,{children:C.getHeaderGroups().map(t=>jsx(g,{children:t.headers.map(o=>{if(o.isPlaceholder)return jsx(h,{},o.id);let s=o.column.columnDef,g=flexRender(s.header,o.getContext()),b=typeof s.headerTooltip=="string"?s.headerTooltip:typeof g=="string"?g:void 0,P=o.column.id!==Z&&s.headerTooltip!==false&&b!=null,R=jsx("span",{className:"line-clamp-1",children:g});return jsxs(h,{className:o.column.id===O?a("p-0",j):D?"group/resize relative overflow-clip":void 0,children:[jsxs("div",{className:"flex items-center",children:[P?jsx(a$2,{content:b,contentClassName:"font-normal normal-case",children:R}):R,s.headerInfoTooltip&&jsx(a$2,{content:s.headerInfoTooltip,contentClassName:"font-normal normal-case",children:jsx(e$1,{className:"ml-1 w-[0.875rem] shrink-0"})})]}),D&&o.column.getCanResize()&&o.column.id!==A&&jsx("div",{onMouseDown:_=>ve(o,_),onTouchStart:_=>ve(o,_),className:a("absolute top-0 right-0 h-full w-1 cursor-col-resize touch-none select-none","bg-primary-400 opacity-0 transition-opacity group-hover/resize:opacity-100",Re===o.column.id&&"bg-primary-600 opacity-100")})]},o.id)})},t.id))}),jsx(d,{className:"[&>tr:not(:last-child)>td]:shadow-[inset_0_-1px_0_0_var(--row-divider-color,var(--color-primary-200))]",children:L?Array.from({length:Ie},(t,o)=>jsx(e,{children:C.getVisibleLeafColumns().map((s,g)=>{let b=s.columnDef;return jsx(i,{className:s.id===Z?"align-middle":s.id===O?a("bg-primary-50 p-0 align-middle",j):void 0,children:s.id===Z?jsx(a$3,{className:"m-0.5 size-4.5 rounded-sm"}):s.id===O?jsxs("div",{className:"grid h-full w-full grid-rows-3",children:[jsx(a$3,{className:"h-full w-full rounded-none"}),jsx(a$3,{className:"h-full w-full rounded-none"}),jsx(a$3,{className:"h-full w-full rounded-none"})]}):b.skeleton!=null?b.skeleton:jsx(a$3,{className:a("h-4",ee[(o+g)%ee.length])})},s.id)})},o)):C.getRowModel().rows.map(t=>jsx(on,{row:t,isSelected:t.getIsSelected(),type:he?he(t.original):"default",columns:H},t.id))})]}),r&&c$1&&(a$4.length>0||L)&&jsx(j$1,{rowsPerPageOptions:d$1,rowsCount:l,pagination:r,onPageSizeChange:t=>{C.setPagination({pageIndex:0,pageSize:t}),N?.(t);},onPreviousPageClick:x,onNextPageClick:f$1,isDisableNextPageButton:L||S||!!l&&!C.getCanNextPage(),isDisablePreviousPageButton:L||i$1||!!l&&!C.getCanPreviousPage(),onPageChange:t=>{C.setPageIndex(t-1);}})]})}export{at as a};
|
|
1
|
+
import {e,i,f,a as a$1,b,c,g,h,d,j as j$1}from'./chunk-QR5CN2UH.js';import {a as a$5,b as b$1,c as c$2}from'./chunk-GTVHYHF4.js';import {a as a$3}from'./chunk-KTD2GEB6.js';import {c as c$1}from'./chunk-ZCMXCZC2.js';import {a as a$2}from'./chunk-3RNV3YTB.js';import {e as e$1,B,I,H,r,G,F,E,D,y,z,A,f as f$1,C}from'./chunk-QMPBFFFC.js';import {a as a$4}from'./chunk-ICF6RQIW.js';import {e as e$2}from'./chunk-P7NW2XNB.js';import {a}from'./chunk-OBZIYJO7.js';import {memo,useMemo,useState,useCallback,useRef,useEffect}from'react';import {flexRender,useReactTable,getCoreRowModel}from'@tanstack/react-table';import {jsx,jsxs}from'react/jsx-runtime';var X={alert:{Icon:C,bgClassName:"bg-orange-50 hover:bg-orange-100",iconClassName:"text-orange-700"},incident:{Icon:f$1,bgClassName:"bg-warning-100 hover:bg-warning-200",iconClassName:"text-warning-900"},"no-address":{Icon:A,bgClassName:"bg-coral-50 hover:bg-coral-100",iconClassName:"text-coral-700"},"email-alert":{Icon:z,bgClassName:"bg-danger-100 hover:bg-danger-200",iconClassName:"text-danger-700"},superadmin:{Icon:y,bgClassName:"bg-orchid-100 hover:bg-orchid-200",iconClassName:"text-orchid-700"},bundle:{Icon:D,bgClassName:"bg-aqua-100 hover:bg-aqua-200",iconClassName:"text-aqua-800"},variants:{Icon:a$4,bgClassName:"bg-bubblegum-50 hover:bg-bubblegum-100",iconClassName:"text-bubblegum-700"},providers:{Icon:E,bgClassName:"bg-pink-50 hover:bg-pink-200",iconClassName:"text-pink-700"},"transaction-request":{Icon:F,bgClassName:"bg-green-100 hover:bg-green-200",iconClassName:"text-green-800"},design:{Icon:G,bgClassName:"bg-orange-50 hover:bg-orange-100",iconClassName:"text-orange-700"},error:{Icon:r,bgClassName:"bg-danger-100 hover:bg-danger-200",iconClassName:"text-danger-700"},draft:{Icon:H,bgClassName:"bg-new-50 hover:bg-new-200",iconClassName:"text-new-700 group-hover/preset:text-new-800"},products:{Icon:I,bgClassName:"bg-bubblegum-200 hover:bg-bubblegum-300",iconClassName:"text-bubblegum-700"},more:{Icon:B,bgClassName:"bg-primary-300 hover:bg-primary-400",iconClassName:"text-primary-700"},empty:{bgClassName:"bg-primary-50 border-b border-b-primary-200 hover:bg-primary-100 data-disabled:border-b-neutral-300"}},Qe=["alert","incident"],Cn=n=>{let a=Qe.map(r=>n.find(c=>c.name===r)).filter(r=>r!==void 0),l=n.filter(r=>!Qe.includes(r.name));return [...a,...l]},Tn=n=>({id:Z,size:54,enableResizing:false,header:({table:a})=>{let l=a.getRowModel().rows.some(c=>c.getCanSelect()),r=a.getIsAllPageRowsSelected()?true:a.getIsSomePageRowsSelected()?"indeterminate":false;return jsx(c$1,{checked:r,disabled:!l,className:"ml-1",onCheckedChange:c=>a.toggleAllPageRowsSelected(c===true)})},cell:({row:a})=>{let l=a.getCanSelect(),r=l?a.getIsSelected():typeof n.setDisabledRowState=="function"?n.setDisabledRowState(a.original):n.setDisabledRowState??false,c=jsx(c$1,{checked:r,onCheckedChange:f=>a.toggleSelected(f===true),disabled:!l}),u=n.rowSelectionTooltip?.content(a.original);return u?jsx(a$2,{className:"w-fit",content:u,positioning:n.rowSelectionTooltip?.positioning??{placement:"right"},children:c}):c},enableSorting:false}),ee=["w-3/4","w-1/2","w-2/3","w-5/6","w-3/5"],tn=({columns:n,rows:a$2,hasSelection:l,hasRowActions:r,hasPagination:c$1,className:u,...f})=>jsxs(a$1,{className:u,...f,children:[jsxs(b,{children:[jsx(c,{children:jsxs(g,{children:[r&&jsx(h,{className:a("p-0",j)}),l&&jsx(h,{className:"w-13.5",children:jsx(a$3,{className:"bg-primary-300 m-0.5 ml-1.5 size-4.5 rounded-sm"})}),Array.from({length:n},(x,S)=>jsx(h,{children:jsx(a$3,{className:"bg-primary-300 h-3 w-16"})},S))]})}),jsx(d,{className:"[&>tr:not(:last-child)>td]:shadow-[inset_0_-1px_0_0_var(--row-divider-color,var(--color-primary-200))]",children:Array.from({length:a$2},(x,S)=>jsxs(e,{children:[r&&jsx(i,{className:a("bg-primary-50 p-0 align-middle",j),children:jsxs("div",{className:"grid h-full w-full grid-rows-3",children:[jsx(a$3,{className:"h-full w-full rounded-none"}),jsx(a$3,{className:"h-full w-full rounded-none"}),jsx(a$3,{className:"h-full w-full rounded-none"})]})}),l&&jsx(i,{className:"align-middle",children:jsx(a$3,{className:"m-0.5 size-4.5 rounded-sm"})}),Array.from({length:n},(i$1,m)=>jsx(i,{children:jsx(a$3,{className:a("h-4",ee[(S+m)%ee.length])})},m))]},S))})]}),c$1&&jsxs("div",{className:"border-t-primary-200 grid min-h-12 grid-cols-3 items-center gap-6 border-t px-4.5",children:[jsx(a$3,{className:"h-3.5 w-20"}),jsxs("div",{className:"flex items-center justify-center gap-2",children:[jsx(a$3,{className:"size-8 rounded-lg"}),jsx(a$3,{className:"size-8 rounded-lg"})]}),jsx("div",{className:"flex justify-end",children:jsx(a$3,{className:"h-3.5 w-28"})})]})]});tn.displayName="DataTableFullSkeleton";var Sn={neutral:"bg-neutral-100",success:"bg-success-20",orange:"bg-orange-20",warning:"bg-warning-20",danger:"bg-danger-20",default:"bg-neutral-50"},O="__row_actions__",Z="__select__",j="w-7.5 min-w-7.5 max-w-7.5",en="grid grid-cols-1 h-full w-full cursor-pointer overflow-hidden border-0 p-0 focus:outline-2 focus:-outline-offset-2 focus:outline-primary-800 focus:rounded-xs disabled:cursor-not-allowed",Y=(n,a$1)=>{let l=n.Icon;return jsx(a$2,{content:a$1?.tooltip??"",disabled:!a$1?.tooltip,className:"h-full w-full",positioning:{placement:"right"},children:jsx("div",{"data-disabled":a$1?.disabled||void 0,className:a("group/preset flex h-full w-full items-center justify-center",n.bgClassName,"data-disabled:cursor-not-allowed data-disabled:bg-neutral-200"),children:l&&jsx(l,{className:a("size-3.5 shrink-0",n.iconClassName,"group-data-disabled/preset:text-neutral-600"),"aria-hidden":true})})},a$1?.key)},be=(n,a)=>typeof n=="function"?n(a):n??false,hn=({row:n,rowActions:a})=>{let[l,r]=useState(false),c=n.original,u=Cn(a(c));if(u.length===0)return Y(X.empty);let f=u.length>3,x=f?u.slice(0,2):u,S=f?3:x.length;if(u.length===1){let i=u[0],m=be(i.isDisabled,c);return jsx("button",{type:"button","aria-label":i.label,disabled:m,className:en,style:{gridTemplateRows:"repeat(1, minmax(0, 1fr))"},onClick:N=>{N.stopPropagation(),i.onClick(c);},children:Y(X[i.name],{disabled:m,tooltip:i.tooltip})})}return jsxs(a$5,{open:l,onOpenChange:r,modal:false,positioning:{placement:"right-start",gutter:0},children:[jsx(b$1,{asChild:true,children:jsxs("button",{type:"button","aria-label":"Row actions",className:en,style:{gridTemplateRows:`repeat(${S}, minmax(0, 1fr))`},onClick:i=>{i.stopPropagation();},children:[x.map((i,m)=>Y(X[i.name],{key:`${i.name}-${m}`,disabled:be(i.isDisabled,c),tooltip:i.tooltip})),f&&Y(X.more)]})}),jsx(c$2,{className:"min-w-48 overflow-hidden rounded-sm p-0",children:jsx("div",{className:"flex flex-col",children:u.map((i,m)=>{let N=X[i.name];if(!N.Icon)return null;let z=be(i.isDisabled,c);return jsx(e$2,{variant:"ghost",size:"md",disabled:z,StartIcon:N.Icon,className:"h-auto! min-h-0! w-full justify-start gap-2! px-3! py-4! text-neutral-900! hover:text-neutral-900! disabled:text-neutral-900!",onClick:v=>{v.stopPropagation(),i.onClick(c),r(false);},type:"button",children:i.label},`${i.name}-${m}`)})})})]})},wn=({rowActions:n})=>({id:O,header:()=>jsx("span",{className:"sr-only",children:"Actions"}),size:30,minSize:30,maxSize:30,enableResizing:false,cell:({row:a})=>n?jsx(hn,{row:a,rowActions:n}):null}),on=memo(({row:n,isSelected:a$1,type:l})=>jsx(e,{"data-state":a$1&&"selected",className:a(l&&l!=="default"&&Sn[l]),style:l&&l!=="default"?{"--row-divider-color":`var(--color-${l}-100)`}:void 0,children:n.getVisibleCells().map(r=>jsx(i,{className:r.column.id===O?a("p-0 align-middle",j):void 0,children:flexRender(r.column.columnDef.cell,r.getContext())},r.id))}),(n,a)=>n.isSelected===a.isSelected&&n.row.original===a.row.original&&n.type===a.type&&n.columns===a.columns);on.displayName="DataTableRow";var Nn=150,Dn=Number.POSITIVE_INFINITY,yn=140,Q=(n,a,l)=>Math.min(Math.max(n,a),l),Rn=20,xn=Number.MAX_SAFE_INTEGER,J=n=>{let a=n.size??Nn,l=n.minSize===void 0||n.minSize===Rn?void 0:n.minSize,r=n.maxSize===void 0||n.maxSize===xn?void 0:n.maxSize;return {size:a,minSize:l??Math.min(a,yn),maxSize:r??Dn}},an="dt-col-sizes-",zn="dt-col-ratios-",Pn=n=>{try{localStorage.removeItem(`${zn}${n}`);let a=localStorage.getItem(`${an}${n}`);if(!a)return {};let l=JSON.parse(a),r={};for(let[c,u]of Object.entries(l))typeof u=="number"&&Number.isFinite(u)&&u>0&&(r[c]=u);return r}catch{return {}}},vn=(n,a)=>{try{localStorage.setItem(`${an}${n}`,JSON.stringify(a));}catch{}},In=(n,a)=>{let l={},r=0,c=[];for(let i of n)if(i.isFixed)l[i.id]=i.weight,r+=i.weight;else if(i.isPinned){let m=Q(i.pinnedPx,i.minSize,i.maxSize);l[i.id]=m,r+=m;}else c.push(i);if(c.length===0)return l;let u=Math.max(a-r,0),f=c.map(i=>({column:i,px:i.minSize,frozen:false})),x=f.length+1;for(;x-- >0;){let i=f.filter(d=>!d.frozen);if(i.length===0)break;let m=f.filter(d=>d.frozen).reduce((d,h)=>d+h.px,0),N=u-m,z=i.reduce((d,h)=>d+h.column.weight,0);if(z<=0)break;let v=false;for(let d of i){let h=d.column.weight/z*N;h<d.column.minSize?(d.px=d.column.minSize,d.frozen=true,v=true):h>d.column.maxSize?(d.px=d.column.maxSize,d.frozen=true,v=true):d.px=h;}if(!v)break}for(let i of f)l[i.column.id]=i.px;let S=f.find(i=>i.column.isFill);if(S){let i=f.filter(m=>m.column.id!==S.column.id).reduce((m,N)=>m+N.px,0);l[S.column.id]=Math.max(u-i,S.column.minSize);}return l};function at({columns:n,data:a$4,rowsCount:l,pagination:r,onPaginationChange:c$1,noResults:u,onNextPageClick:f$1,onPreviousPageClick:x,disableNextPage:S,disablePreviousPage:i$1,className:m,onRowsPerPageChange:N,columnOrder:z,columnVisibility:v,rowsPerPageOptions:d$1,enableRowSelection:h$1=false,rowSelection:pe,onRowSelectionChange:ln,getRowId:fe,rowSelectionTooltip:Ce,setDisabledRowState:Te,tableId:D,isLoading:L,isInitialLoading:Se,skeletonRowCount:sn,skeletonColumns:rn=6,getRowType:he,rowActions:k,...we}){let F=typeof h$1=="function"||h$1,Ne=useMemo(()=>{if(!z)return;let t=[k?O:null,F?Z:null].filter(s=>s!=null),o=new Set(t);return [...t,...z.filter(s=>!o.has(s))]},[z,F,k]),H=useMemo(()=>{let t=[...n];if(F&&t.unshift(Tn({rowSelectionTooltip:Ce,setDisabledRowState:Te})),k){let o=wn({rowActions:k});t.unshift(o);}return t},[F,n,Ce,Te,k]),[I,cn]=useState(null),un=useCallback(t=>cn(t),[]),[ne,De]=useState(0),ye=useRef(false),[y,te]=useState({}),[Re,xe]=useState(null),oe=useRef(null),ae=useRef(null),C=useReactTable({data:a$4,columns:H,rowCount:l,state:{pagination:r,...Ne!==void 0&&{columnOrder:Ne},columnVisibility:v,...pe!==void 0&&{rowSelection:pe},...D&&{columnSizing:y}},onPaginationChange:c$1,onRowSelectionChange:ln,...D&&{onColumnSizingChange:te},manualPagination:true,getCoreRowModel:getCoreRowModel(),enableRowSelection:typeof h$1=="function"?t=>h$1(t.original):h$1,getRowId:fe?t=>fe(t):void 0}),ie=C.getVisibleLeafColumns().map(t=>t.id).join(","),ze=Re!==null,A=useMemo(()=>{let t=C.getVisibleLeafColumns().filter(s=>s.getCanResize());return t.length===0?void 0:(t.find(s=>s.columnDef.isFillColumn)??t[t.length-1]).id},[C,ie,H]),Pe=useMemo(()=>{if(!ne)return {};let t=C.getVisibleLeafColumns().map(o=>{let{size:s,minSize:g,maxSize:b}=J(o.columnDef),P=o.getCanResize(),R=o.id===A;return {id:o.id,isFixed:!P,isPinned:P&&!R&&o.id in y,pinnedPx:y[o.id]??s,weight:s,minSize:g,maxSize:b,isFill:R}});return In(t,ne)},[C,ie,H,ne,y,A]),mn=useMemo(()=>C.getVisibleLeafColumns().reduce((t,o)=>{let{size:s,minSize:g,maxSize:b}=J(o.columnDef);return o.getCanResize()?o.id!==A&&o.id in y?t+Q(y[o.id]??s,g,b):t+g:t+s},0),[C,ie,H,y,A]),ve=(t,o)=>{let s=t.column.id,{size:g,minSize:b,maxSize:P}=J(t.column.columnDef),R=Pe[s]??g,_="touches"in o?o.touches[0]?.clientX??0:o.clientX;o.preventDefault(),o.stopPropagation(),oe.current=s,xe(s),document.body.style.userSelect="none";let q=B=>{"touches"in B&&B.preventDefault();let dn="touches"in B?B.touches[0]?.clientX??_:B.clientX,ke=Q(R+(dn-_),b,P);te(le=>le[s]===ke?le:{...le,[s]:ke});},W=()=>{oe.current=null,xe(null),document.body.style.userSelect="",document.removeEventListener("mousemove",q),document.removeEventListener("mouseup",W),document.removeEventListener("touchmove",q),document.removeEventListener("touchend",W),ae.current=null,I&&De(I.clientWidth);};ae.current=W,document.addEventListener("mousemove",q),document.addEventListener("mouseup",W),document.addEventListener("touchmove",q,{passive:false}),document.addEventListener("touchend",W);};useEffect(()=>()=>ae.current?.(),[]),useEffect(()=>{D&&te(Pn(D));},[D]),useEffect(()=>{if(!I)return;let t=g=>{g>0&&De(g);};t(I.clientWidth);let o=0,s=new ResizeObserver(([g])=>{if(!g||oe.current!==null)return;cancelAnimationFrame(o);let b=I.clientWidth;o=requestAnimationFrame(()=>t(b));});return s.observe(I),()=>{cancelAnimationFrame(o),s.disconnect();}},[I]),useEffect(()=>{if(D){if(!ye.current){ye.current=true;return}ze||vn(D,y);}},[D,ze,y]);let Ie=sn??r?.pageSize??10;return Se?jsx(tn,{columns:rn,rows:Ie,hasSelection:F,hasRowActions:!!k,hasPagination:!!r,className:m,...we}):!L&&!Se&&!C.getRowModel().rows?.length?jsx(f,{...u}):jsxs(a$1,{ref:un,className:m,...we,children:[jsxs(b,{style:{width:"100%",minWidth:mn,tableLayout:"fixed"},children:[jsx("colgroup",{children:C.getHeaderGroups()[0].headers.map(t=>{let o=t.column,s=o.getCanResize(),{size:g,minSize:b,maxSize:P}=J(o.columnDef);if(o.id===A)return jsx("col",{span:1,style:{width:"auto",minWidth:b}},t.id);let R=Pe[o.id]??Q(y[o.id]??g,b,P);return jsx("col",{span:1,style:{width:R,minWidth:s?b:R}},t.id)})}),jsx(c,{children:C.getHeaderGroups().map(t=>jsx(g,{children:t.headers.map(o=>{if(o.isPlaceholder)return jsx(h,{},o.id);let s=o.column.columnDef,g=flexRender(s.header,o.getContext()),b=typeof s.headerTooltip=="string"?s.headerTooltip:typeof g=="string"?g:void 0,P=o.column.id!==Z&&s.headerTooltip!==false&&b!=null,R=jsx("span",{className:"line-clamp-1",children:g});return jsxs(h,{className:o.column.id===O?a("p-0",j):D?"group/resize relative overflow-clip":void 0,children:[jsxs("div",{className:"flex items-center",children:[P?jsx(a$2,{content:b,contentClassName:"font-normal normal-case",children:R}):R,s.headerInfoTooltip&&jsx(a$2,{content:s.headerInfoTooltip,contentClassName:"font-normal normal-case",children:jsx(e$1,{className:"ml-1 w-[0.875rem] shrink-0"})})]}),D&&o.column.getCanResize()&&o.column.id!==A&&jsx("div",{onMouseDown:_=>ve(o,_),onTouchStart:_=>ve(o,_),className:a("absolute top-0 right-0 h-full w-1 cursor-col-resize touch-none select-none","bg-primary-400 opacity-0 transition-opacity group-hover/resize:opacity-100",Re===o.column.id&&"bg-primary-600 opacity-100")})]},o.id)})},t.id))}),jsx(d,{className:"[&>tr:not(:last-child)>td]:shadow-[inset_0_-1px_0_0_var(--row-divider-color,var(--color-primary-200))]",children:L?Array.from({length:Ie},(t,o)=>jsx(e,{children:C.getVisibleLeafColumns().map((s,g)=>{let b=s.columnDef;return jsx(i,{className:s.id===Z?"align-middle":s.id===O?a("bg-primary-50 p-0 align-middle",j):void 0,children:s.id===Z?jsx(a$3,{className:"m-0.5 size-4.5 rounded-sm"}):s.id===O?jsxs("div",{className:"grid h-full w-full grid-rows-3",children:[jsx(a$3,{className:"h-full w-full rounded-none"}),jsx(a$3,{className:"h-full w-full rounded-none"}),jsx(a$3,{className:"h-full w-full rounded-none"})]}):b.skeleton!=null?b.skeleton:jsx(a$3,{className:a("h-4",ee[(o+g)%ee.length])})},s.id)})},o)):C.getRowModel().rows.map(t=>jsx(on,{row:t,isSelected:t.getIsSelected(),type:he?he(t.original):"default",columns:H},t.id))})]}),r&&c$1&&(a$4.length>0||L)&&jsx(j$1,{rowsPerPageOptions:d$1,rowsCount:l,pagination:r,onPageSizeChange:t=>{C.setPagination({pageIndex:0,pageSize:t}),N?.(t);},onPreviousPageClick:x,onNextPageClick:f$1,isDisableNextPageButton:L||S||!!l&&!C.getCanNextPage(),isDisablePreviousPageButton:L||i$1||!!l&&!C.getCanPreviousPage(),onPageChange:t=>{C.setPageIndex(t-1);}})]})}export{at as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {d}from'./chunk-WAUY2MS6.js';import {a as a$5}from'./chunk-FHABUQAH.js';import {a as a$3}from'./chunk-XYBXEU3T.js';import {a as a$2}from'./chunk-NGC5DGW6.js';import {c,d as d$1}from'./chunk-TW4CJXQY.js';import {a as a$4}from'./chunk-VIMWKUML.js';import {a}from'./chunk-
|
|
1
|
+
import {d}from'./chunk-WAUY2MS6.js';import {a as a$5}from'./chunk-FHABUQAH.js';import {a as a$3}from'./chunk-XYBXEU3T.js';import {a as a$2}from'./chunk-NGC5DGW6.js';import {c,d as d$1}from'./chunk-TW4CJXQY.js';import {a as a$4}from'./chunk-VIMWKUML.js';import {a}from'./chunk-T5NU5E4O.js';import {k}from'./chunk-QMPBFFFC.js';import {a as a$6}from'./chunk-AWRP67K4.js';import {e}from'./chunk-P7NW2XNB.js';import {a as a$1}from'./chunk-OBZIYJO7.js';import {createListCollection,useCombobox,Combobox,useComboboxContext}from'@ark-ui/react/combobox';import {useFilter}from'@ark-ui/react/locale';import {Portal}from'@ark-ui/react/portal';import {useMemo,useState,useCallback,useRef,useEffect}from'react';import {jsxs,jsx,Fragment}from'react/jsx-runtime';function Ce(){let s=useComboboxContext(),d=useRef(false);return s.value.length&&s.collection.size&&!d.current&&(s.syncSelectedItems(),d.current=true),null}var he=s=>{let{label:d$2,error:T,required:X,tooltip:Y,disabled:b,readOnly:c$1,options:m,onInputChange:w,onSelect:L,defaultSelectedOptions:u,value:a$7,helperText:Z,noResultsLabel:$,noResultsIcon:ee,noResultsDescription:te,noResultsDescriptionLines:oe,noResultsAsColumn:ne,noResultsButtonOnClick:V,noResultsButtonLabel:le,optionDescriptionLines:k$1=1,loading:P,clearable:re=true,growable:g=true,className:ie,...se}=s,D=Object.getOwnPropertyNames(s),ae=useMemo(()=>({sensitivity:"base"}),[]),{contains:y}=useFilter(ae),[f,ue]=useState(""),B=useMemo(()=>{if(!a$7?.length)return m;let e=new Set(m.map(n=>n.value)),o=[];for(let n of a$7)e.has(n.value)||(e.add(n.value),o.push(n));return o.length?[...o,...m]:m},[m,a$7]),O=useMemo(()=>createListCollection({items:B,itemToString:e=>e.label,itemToValue:e=>String(e.value)}),[B]),I=useMemo(()=>f?O.filter((e,o,n)=>y(e,f)||!!n.description&&y(n.description,f)):O,[O,f,y]),x=useCallback(e=>{ue(e??"");},[]),v=useRef(u??[]),A=useRef(void 0),z=useRef(false),pe=useCallback(e=>{let o=e.items,n=v.current,me=o.length===0?null:o.find(N=>!n.some(S=>String(S.value)===String(N.value)))??n.find(N=>!o.some(S=>String(S.value)===String(N.value)))??null;v.current=[...o],L?.(me,o),A.current?.setInputValue(""),x("");},[L,x]),ce=useCallback(e=>{x(e.inputValue),e.reason!==void 0&&w?.(e.inputValue??"");},[x,w]),p=useCombobox({collection:I,multiple:true,inputBehavior:"none",openOnClick:true,onInputValueChange:ce,onValueChange:pe,defaultValue:u?.map(e=>String(e.value)),value:D.includes("value")?a$7?.map(e=>String(e.value))??[]:void 0,readOnly:c$1,disabled:b,...se});A.current=p,useEffect(()=>{D.includes("value")&&a$7!==void 0&&(v.current=[...a$7]);},[a$7]),useEffect(()=>{P||u?.length&&(z.current||(A.current?.setValue(u.map(e=>String(e.value))),v.current=[...u],z.current=true));},[u,P]);let M=c({error:T,disabled:b,readOnly:c$1,multiline:g});return jsxs(Combobox.RootProvider,{value:p,"data-error":T||void 0,className:M.root({className:ie}),children:[jsx(a,{as:Combobox.Label,label:d$2,required:X,tooltip:Y}),jsx(Ce,{}),jsxs(Combobox.Control,{className:a$1(M.control(),"group/control",!g&&"overflow-hidden",b&&"cursor-not-allowed"),children:[jsxs("div",{className:a$1("flex flex-1 items-center gap-1 px-3 py-2",g?"flex-wrap py-1.5":"overflow-hidden"),children:[p.selectedItems.map(e=>jsx(d,{color:"neutral",variant:"fill",size:"md",disabled:c$1||b,onClose:()=>{p.clearValue(String(e.value));},children:e.label},String(e.value))),jsx(Combobox.Input,{className:a$1(M.input(),"h-auto px-0 py-0 disabled:cursor-not-allowed"),placeholder:p.selectedItems.length===0?s.placeholder:""})]}),jsxs("div",{className:a$1("flex shrink-0 items-center gap-2 pr-3",g&&"self-start pt-2.5"),children:[!c$1&&re&&jsx(a$2,{as:Combobox.ClearTrigger,className:"group-data-disabled/control:hidden",onClick:e=>e.stopPropagation()}),T&&jsx(d$1,{}),jsx(Combobox.Trigger,{className:a$1("group/chevron-host cursor-pointer group-data-disabled/control:cursor-not-allowed",c$1&&"pointer-events-none"),children:jsx(a$3,{})})]})]}),jsx(a$4,{children:Z}),jsx(Portal,{children:jsx(Combobox.Positioner,{children:jsx(Combobox.Content,{className:"elevation-9 z-layer bg-input-bg max-h-67.5 w-(--reference-width) overflow-auto rounded-lg",children:jsx(Combobox.ItemGroup,{children:I.items.length>0?I.items.map(e=>jsx(Combobox.Item,{item:e,className:"data-highlighted:bg-primary-100 cursor-pointer data-disabled:cursor-not-allowed",children:jsx(Combobox.ItemContext,{children:({selected:o,disabled:n})=>jsxs("div",{className:a$1("font-inter flex flex-row items-center px-3 py-3.5 text-neutral-900 transition-colors","data-highlighted:bg-primary-100",e.description&&"py-3",n?"cursor-not-allowed text-neutral-400":"hover:bg-primary-100"),children:[jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[jsx(Combobox.ItemText,{className:"text-sm leading-[130%] font-medium",children:e.label}),e.description&&jsx("p",{className:"text-xs leading-[130%] text-neutral-700",style:k$1?{overflow:"hidden",display:"-webkit-box",WebkitLineClamp:k$1,WebkitBoxOrient:"vertical"}:void 0,children:e.description})]}),jsx("div",{className:a$1("ml-4 flex size-4.5 shrink-0 items-center justify-center rounded-sm transition-colors ring-inset",o?"bg-primary-600":"bg-neutral-50 ring-1 ring-neutral-600",n&&(o?"bg-neutral-400":"bg-neutral-100 ring-neutral-300")),children:o&&jsx(k,{className:"size-3.5 text-neutral-50"})})]})})},String(e.value))):jsxs("div",{className:"flex flex-col",children:[jsx(a$5,{title:$,description:te,Icon:ee,iconAsColumn:ne,descriptionLines:oe}),V&&jsxs(Fragment,{children:[jsx(a$6,{}),jsx(e,{variant:"ghost",className:"my-3 w-fit self-center",onClick:()=>{p.setOpen(false),V();},children:le})]})]})})})})})]})};he.displayName="AutocompleteMultiple";export{he as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-KTD2GEB6.js';import {b}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-KTD2GEB6.js';import {b}from'./chunk-Q2KEE7CU.js';import {a as a$1}from'./chunk-OBZIYJO7.js';import {jsxs,jsx}from'react/jsx-runtime';var s={md:"h-(--height-input-md)",lg:"h-(--height-input)"},p=({size:i=b,className:r})=>jsxs("div",{className:a$1("flex w-full flex-col gap-2",r),children:[jsx(a,{className:"h-4 w-15 rounded-sm"}),jsx(a,{className:a$1(s[i],"w-full rounded-lg")})]});export{p as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {tv}from'tailwind-variants';import {jsx}from'react/jsx-runtime';var g=["xs","sm","md","lg","xl","2xl"],m=["online","offline","warning","danger"],n=tv({base:"block shrink-0 rounded-full",variants:{size:{xs:"size-1",sm:"size-1",md:"size-1.5",lg:"size-2",xl:"size-3","2xl":"size-5"},status:{online:"bg-success-500",offline:"bg-neutral-600",warning:"bg-warning-500",danger:"bg-danger-500"},hasBorder:{true:"ring-neutral-50",false:""}},compoundVariants:[{hasBorder:true,size:"xs",className:"ring-1"},{hasBorder:true,size:["sm","md","lg"],className:"ring-2"},{hasBorder:true,size:"xl",className:"ring-3"},{hasBorder:true,size:"2xl",className:"ring-4"}],defaultVariants:{size:"md",hasBorder:false}}),p=({className:s,size:t,status:e="online",hasBorder:r,"aria-label":a,...l})=>jsx("span",{role:"img","aria-label":a??e,"data-status":e,className:n({size:t,status:e,hasBorder:r,className:s}),...l});export{g as a,m as b,p as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {c}from'./chunk-3J3A5ETC.js';import {c as c$1}from'./chunk-
|
|
1
|
+
import {c}from'./chunk-3J3A5ETC.js';import {c as c$1}from'./chunk-NZ4NWU2A.js';import {d}from'./chunk-WAUY2MS6.js';import {e as e$1}from'./chunk-PI7DECIN.js';import {L}from'./chunk-QMPBFFFC.js';import {a}from'./chunk-AWRP67K4.js';import {e}from'./chunk-P7NW2XNB.js';import {a as a$2}from'./chunk-P6B33GL6.js';import {a as a$1}from'./chunk-OBZIYJO7.js';import {getDefaultOptions}from'date-fns';import {tv}from'tailwind-variants';import {jsx,jsxs}from'react/jsx-runtime';var t=tv({slots:{root:"ring-drawer-bar-border @container flex w-full flex-col rounded-md bg-neutral-100 ring ring-inset",header:"border-drawer-bar-border py-3.125 flex flex-wrap items-center gap-3 border-b px-4 last:border-b-0 @md:gap-2",main:"border-drawer-bar-border py-1.875 flex flex-col items-stretch gap-2 border-b px-2 last:border-b-0 @md:flex-row @md:items-center",actions:"flex shrink-0 items-center gap-3 @max-md:flex-wrap",selection:"ml-auto flex items-center gap-3",selectionLabel:"text-sm leading-[143%] font-medium text-neutral-900",divider:"h-4 @max-md:h-px @max-md:w-full",filters:"flex flex-col gap-2 px-2 pt-3 pb-2 @md:flex-row @md:justify-between"}}),z=r=>r?.startsWith("es")?"Seleccionados":r?.startsWith("pt")?"Selecionados":"Selected",W=r=>r?.startsWith("es")?"Limpiar todo":r?.startsWith("pt")?"Limpar tudo":"Clear all",D=r=>{let{header:e}=t();return jsx("div",{...r,className:e()})};D.displayName="DrawerBarHeader";var f=({label:r,...e})=>{let{locale:o}=getDefaultOptions(),{selectionLabel:i,selection:s}=t();return jsxs("div",{className:s(),children:[jsx("span",{className:i(),children:r??z(o?.code)}),jsx(a$2,{...e,size:"md",variant:"primary",type:"square"})]})};f.displayName="DrawerBarSelection";var C=r=>jsx(c$1,{...r,variant:"outline",orientation:"horizontal",size:"sm"});C.displayName="DrawerBarChoiceChips";var v=r=>{let{main:e}=t();return jsx("div",{...r,className:e()})};v.displayName="DrawerBarMain";var P=r=>jsx(c,{size:"lg",...r});P.displayName="DrawerBarSearchBar";var N=({children:r})=>{let{actions:e}=t();return jsx("div",{className:e(),children:r})};N.displayName="DrawerBarActions";var b=({className:r,...e$1})=>jsx(e,{...e$1,className:a$1("@max-md:w-full",r),variant:"ghost",size:"md"});b.displayName="DrawerBarActionButton";var y=r=>jsx(e$1,{...r,variant:"ghost",size:"md"});y.displayName="DrawerBarActionIconButton";var g=()=>{let{divider:r}=t();return jsx(a,{orientation:"vertical",variant:"400",className:r()})};g.displayName="DrawerBarDivider";var x=({children:r,onClear:e$1,clearLabel:o})=>{let{locale:i}=getDefaultOptions(),{filters:s}=t();return jsxs("div",{className:s(),children:[jsx("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:r}),e$1&&jsx(e,{size:"sm",variant:"ghost",StartIcon:L,onClick:e$1,children:o??W(i?.code)})]})};x.displayName="DrawerBarFilters";var F=r=>jsx(d,{size:"md",variant:"fill",color:"neutral",...r});F.displayName="DrawerBarFilterChipInput";var S=({children:r,className:e,...o})=>{let{root:i}=t();return jsx("div",{className:i({className:e}),...o,children:r})};S.displayName="DrawerBar";var Y=Object.assign(S,{Header:D,Selection:f,ChoiceChips:C,Main:v,SearchBar:P,Actions:N,ActionButton:b,ActionIconButton:y,Divider:g,Filters:x,FilterChipInput:F});export{Y as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {d,c,b as b$1}from'./chunk-
|
|
1
|
+
import {d,c,b as b$1}from'./chunk-K2S6L5P6.js';import {d as d$1}from'./chunk-YFDUDY6Y.js';import {a as a$2}from'./chunk-3RNV3YTB.js';import {B,h}from'./chunk-QMPBFFFC.js';import {a as a$1}from'./chunk-HZYZAFW3.js';import {e}from'./chunk-P7NW2XNB.js';import {a}from'./chunk-OBZIYJO7.js';import {useLocaleContext}from'@ark-ui/react/locale';import {getDefaultOptions}from'date-fns';import {tv}from'tailwind-variants';import {jsx,jsxs}from'react/jsx-runtime';var n=tv({slots:{header:"flex w-full flex-col gap-3 px-3 py-2 font-normal",author:"min-w-0",authorLabel:"text-xs text-neutral-700 uppercase",authorRow:"mt-0.5 flex items-center justify-between gap-3",authorName:"min-w-0 text-sm font-semibold break-words",authorSecondary:"mt-0.5 text-xs break-words text-neutral-800",bodyFile:"flex min-w-0 items-center gap-3",fileIcon:"size-12 shrink-0",fileText:"flex min-w-0 flex-1 flex-col gap-0.5",fileName:"text-sm font-semibold break-words text-neutral-900",fileDescription:"line-clamp-1 text-xs text-neutral-800",meta:"flex min-w-0 flex-wrap items-center gap-2 empty:hidden",footer:"flex items-center gap-3",date:"min-w-0 text-sm text-neutral-700",footerActions:"ml-auto flex shrink-0 items-center gap-3"}}),u=()=>{let{locale:t}=useLocaleContext();return t??getDefaultOptions().locale?.code},C={en:{author:"Creator",externalReference:"Ext. ref.",addExternalReference:"Add ext. ref."},es:{author:"Creador/a",externalReference:"Ref. ext.",addExternalReference:"Agregar ref. ext."},pt:{author:"Criador",externalReference:"Ref. ext.",addExternalReference:"Adicionar ref. ext."}},A=t=>t?.startsWith("es")?C.es:t?.startsWith("pt")?C.pt:C.en,b=({children:t,className:e,...r})=>{let{header:o}=n();return jsx("div",{className:o({className:e}),...r,children:t})};b.displayName="AttachmentCardHeader";var L=()=>{let t=u(),{authorLabel:e}=n();return jsx("p",{className:e(),children:A(t).author})};L.displayName="AttachmentCardAuthorLocalizedLabel";var v=({label:t,name:e,secondary:r,actions:o,className:d})=>{let{author:i,authorLabel:l,authorRow:m,authorName:$,authorSecondary:K}=n();return jsxs("div",{className:i({className:d}),children:[t?jsx("p",{className:l(),children:t}):jsx(L,{}),jsxs("div",{className:m(),children:[jsx("p",{className:$(),children:e}),o]}),r&&jsx("p",{className:K(),children:r})]})};v.displayName="AttachmentCardAuthor";var w=({children:t,className:e,...r})=>jsx(b$1,{className:a("min-w-0",e),...r,children:t});w.displayName="AttachmentCardBody";var W=({name:t,description:e,className:r})=>{let{bodyFile:o,fileIcon:d,fileText:i,fileName:l,fileDescription:m}=n();return jsxs("div",{className:o({className:r}),children:[jsxs("div",{className:i(),children:[jsx("p",{className:l(),children:t}),e&&jsx("p",{className:m(),children:e})]}),jsx(a$1,{className:d(),"aria-hidden":true})]})};W.displayName="AttachmentCardBodyFile";var I=({children:t,className:e})=>{let{meta:r}=n();return jsx("div",{className:r({className:e}),children:t})};I.displayName="AttachmentCardMeta";var E=({children:t,className:e,...r})=>{let{footer:o}=n();return jsx(c,{className:o({className:e}),...r,children:t})};E.displayName="AttachmentCardFooter";var S=({children:t,className:e})=>{let{date:r}=n();return jsx("span",{className:r({className:e}),children:t})};S.displayName="AttachmentCardDate";var T=({children:t,className:e})=>{let{footerActions:r}=n();return jsx("div",{className:r({className:e}),children:t})};T.displayName="AttachmentCardFooterActions";var z=t=>jsx(e,{...t,variant:"ghost",tone:"neutral",size:"md",EndIcon:h});z.displayName="AttachmentCardActionButton";var f=({badgeText:t})=>jsx(a$2,{content:t,children:jsx(d$1,{variant:"light",size:"sm",color:"neutral",className:"max-w-full",text:t})});f.displayName="AttachmentCardReferenceBadgeContent";var D=({value:t})=>{let e=u(),r=`${A(e).externalReference}: ${t}`;return jsx(f,{badgeText:r})};D.displayName="AttachmentCardReferenceBadgeWithLocale";var y=({label:t,value:e})=>e==null||e===""?null:t?jsx(f,{badgeText:`${t}: ${e}`}):jsx(D,{value:e});y.displayName="AttachmentCardReferenceBadge";var k=t=>{let e$1=u();return jsx(e,{...t,variant:"secondary",size:"sm",StartIcon:B,children:A(e$1).addExternalReference})};k.displayName="AttachmentCardReferenceAddButtonWithLocale";var H=({children:t,...e$1})=>t?jsx(e,{...e$1,variant:"secondary",size:"sm",StartIcon:B,children:t}):jsx(k,{...e$1});H.displayName="AttachmentCardReferenceAddButton";var M=({label:t,value:e,addAction:r})=>e!=null&&e!==""?jsx(y,{label:t,value:e}):r??null;M.displayName="AttachmentCardReference";var O=({children:t,className:e,...r})=>jsx(d,{variant:"outline",tone:"neutral",className:a("elevation-8 w-full border-0",e),...r,children:t});O.displayName="AttachmentCard";var et=Object.assign(O,{Header:b,Author:v,Body:w,BodyFile:W,Meta:I,Footer:E,Date:S,FooterActions:T,ActionButton:z,Reference:M,ReferenceBadge:y,ReferenceAddButton:H});export{et as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {f,y,K,A as A$1}from'./chunk-QMPBFFFC.js';import {a}from'./chunk-ICF6RQIW.js';import {d,e}from'./chunk-
|
|
1
|
+
import {f,y,K,A as A$1}from'./chunk-QMPBFFFC.js';import {a}from'./chunk-ICF6RQIW.js';import {d,e}from'./chunk-P7NW2XNB.js';import {getDefaultOptions}from'date-fns';import {tv}from'tailwind-variants';import {jsxs,jsx}from'react/jsx-runtime';var z=["not-found","forbidden","unauthorized","server-error","service-unavailable"],N={"not-found":{code:"404",tone:"neutral",Icon:A$1,action:"home"},forbidden:{code:"403",tone:"warning",Icon:K,action:"home"},unauthorized:{code:"401",tone:"info",Icon:y,action:"sign-in"},"server-error":{code:"500",tone:"danger",Icon:f,action:"home"},"service-unavailable":{code:"503",tone:"warning",Icon:a,action:"retry"}},C={variants:{"not-found":{title:"Page not found",description:"The page you are looking for doesn't exist or may have been moved."},forbidden:{title:"Access denied",description:"You don't have permission to view this page. Contact your administrator if you think this is a mistake."},unauthorized:{title:"Your session expired",description:"Please sign in again to continue."},"server-error":{title:"Something went wrong",description:"An unexpected error occurred on our side. Please head back and try again later."},"service-unavailable":{title:"Service unavailable",description:"We can't connect to the server right now. Please try again in a few seconds. If the problem persists, contact your administrator."}},actions:{home:"Back to home","sign-in":"Sign in",retry:"Try again"},signOut:"Sign out",referenceLabel:"Reference code",errorEyebrow:"Error"},O={variants:{"not-found":{title:"P\xE1gina no encontrada",description:"La p\xE1gina que buscas no existe o pudo haber sido movida."},forbidden:{title:"Acceso denegado",description:"No tienes permiso para ver esta p\xE1gina. Contacta a tu administrador si crees que es un error."},unauthorized:{title:"Tu sesi\xF3n expir\xF3",description:"Inicia sesi\xF3n nuevamente para continuar."},"server-error":{title:"Algo sali\xF3 mal",description:"Ocurri\xF3 un error inesperado de nuestro lado. Vuelve al inicio e int\xE9ntalo m\xE1s tarde."},"service-unavailable":{title:"Servicio no disponible",description:"No podemos conectar con el servidor en este momento. Por favor vuelve a intentarlo en unos segundos. Si el problema persiste, contacta a tu administrador."}},actions:{home:"Volver al inicio","sign-in":"Iniciar sesi\xF3n",retry:"Reintentar"},signOut:"Cerrar sesi\xF3n",referenceLabel:"C\xF3digo de referencia",errorEyebrow:"Error"},R={variants:{"not-found":{title:"P\xE1gina n\xE3o encontrada",description:"A p\xE1gina que voc\xEA procura n\xE3o existe ou pode ter sido movida."},forbidden:{title:"Acesso negado",description:"Voc\xEA n\xE3o tem permiss\xE3o para ver esta p\xE1gina. Contate seu administrador se achar que \xE9 um engano."},unauthorized:{title:"Sua sess\xE3o expirou",description:"Fa\xE7a login novamente para continuar."},"server-error":{title:"Algo deu errado",description:"Ocorreu um erro inesperado do nosso lado. Volte ao in\xEDcio e tente novamente mais tarde."},"service-unavailable":{title:"Servi\xE7o indispon\xEDvel",description:"N\xE3o conseguimos nos conectar ao servidor neste momento. Por favor, tente novamente em alguns segundos. Se o problema persistir, entre em contato com o seu administrador."}},actions:{home:"Voltar ao in\xEDcio","sign-in":"Entrar",retry:"Tentar novamente"},signOut:"Sair",referenceLabel:"C\xF3digo de refer\xEAncia",errorEyebrow:"Erro"},A=()=>{let o=getDefaultOptions().locale?.code;return o?.startsWith("es")?O:o?.startsWith("pt")?R:C},T=tv({slots:{root:"font-inter flex min-h-[60vh] w-full flex-1 flex-col items-center justify-center px-6 py-12 text-center",haloOuter:"flex size-28 items-center justify-center rounded-full",haloInner:"flex size-16 items-center justify-center rounded-full",icon:"size-8",eyebrow:"font-jakarta mt-6 text-xs font-semibold tracking-[0.12em] uppercase",title:"font-jakarta mt-4 text-xl leading-[140%] font-semibold text-neutral-900",description:"mt-2 max-w-md text-sm leading-[150%] text-neutral-600",reference:"mt-4 inline-flex items-center gap-1.5 rounded-md bg-neutral-100 px-2.5 py-1",referenceLabel:"text-2xs font-medium tracking-wide text-neutral-500 uppercase",referenceValue:"font-mono text-xs text-neutral-700",actions:"mt-8 flex flex-wrap items-center justify-center gap-3"},variants:{tone:{neutral:{haloOuter:"bg-neutral-100",haloInner:"bg-neutral-200",icon:"text-neutral-600",eyebrow:"text-neutral-500"},info:{haloOuter:"bg-info-50",haloInner:"bg-info-100",icon:"text-info-600",eyebrow:"text-info-600"},warning:{haloOuter:"bg-warning-50",haloInner:"bg-warning-100",icon:"text-warning-600",eyebrow:"text-warning-600"},danger:{haloOuter:"bg-danger-50",haloInner:"bg-danger-100",icon:"text-danger-600",eyebrow:"text-danger-600"}}}}),h={variant:"primary",tone:"primary",size:"lg"},B=({variant:o,reference:d$1,onAction:s,actionHref:c,onSignOut:u,className:x})=>{let t=N[o],n=A(),p=n.variants[o],e$1=T({tone:t.tone}),{Icon:E}=t,i=!!(s||c),g=!!u;return jsxs("div",{className:e$1.root({className:x}),children:[jsx("div",{className:e$1.haloOuter(),children:jsx("div",{className:e$1.haloInner(),children:jsx(E,{className:e$1.icon()})})}),jsxs("p",{className:e$1.eyebrow(),children:[n.errorEyebrow," ",t.code]}),jsx("h1",{className:e$1.title(),children:p.title}),jsx("p",{className:e$1.description(),children:p.description}),d$1&&jsxs("div",{className:e$1.reference(),children:[jsx("span",{className:e$1.referenceLabel(),children:n.referenceLabel}),jsx("span",{className:e$1.referenceValue(),children:d$1})]}),(i||g)&&jsxs("div",{className:e$1.actions(),children:[i&&(c?jsx("a",{href:c,onClick:s,className:d(h).root(),children:n.actions[t.action]}):jsx(e,{...h,onClick:s,children:n.actions[t.action]})),g&&jsx(e,{variant:i?"ghost":"primary",tone:i?"neutral":"primary",size:"lg",onClick:u,children:n.signOut})]})]})};export{z as a,B as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {d}from'./chunk-7JM2X4UD.js';import {c}from'./chunk-ZCMXCZC2.js';import {e as e$1}from'./chunk-PI7DECIN.js';import {a as a$2}from'./chunk-JW7HS6NX.js';import {e}from'./chunk-QMPBFFFC.js';import {e as e$2}from'./chunk-
|
|
1
|
+
import {d}from'./chunk-7JM2X4UD.js';import {c}from'./chunk-ZCMXCZC2.js';import {e as e$1}from'./chunk-PI7DECIN.js';import {a as a$2}from'./chunk-JW7HS6NX.js';import {e}from'./chunk-QMPBFFFC.js';import {e as e$2}from'./chunk-P7NW2XNB.js';import {a as a$1}from'./chunk-P6B33GL6.js';import {a}from'./chunk-OBZIYJO7.js';import {createContext,useContext,useState}from'react';import {tv}from'tailwind-variants';import {ImageIcon}from'lucide-react';import {jsx,jsxs}from'react/jsx-runtime';var l={tone:"neutral",variant:"fill",disabled:false},p=tv({slots:{root:"flex flex-col rounded-lg border",headerIcon:"size-3.5 shrink-0",headerTitle:"min-w-0 truncate text-sm font-medium",infoIcon:"size-3.5 shrink-0",headerInfo:"flex min-w-0 shrink items-center gap-1 overflow-hidden",headerInfoText:"text-2xs min-w-0 truncate text-neutral-800",description:"text-xs text-neutral-700",separator:"border-t first:border-t-0"},variants:{tone:{neutral:{headerIcon:"text-neutral-900",headerTitle:"text-neutral-900",infoIcon:"text-neutral-900"},primary:{headerIcon:"text-primary-700",headerTitle:"text-primary-700",infoIcon:"text-primary-700"}},variant:{outline:{},fill:{}},disabled:{true:{headerIcon:"text-neutral-600",headerTitle:"text-neutral-600",infoIcon:"text-neutral-600",headerInfoText:"text-neutral-600",description:"text-neutral-600"},false:{}}},compoundVariants:[{tone:"neutral",variant:"outline",class:{root:"border-neutral-400 bg-neutral-50",separator:"border-neutral-400"}},{tone:"neutral",variant:"fill",class:{root:"border-neutral-300 bg-neutral-100",separator:"border-neutral-300"}},{tone:"primary",variant:"outline",class:{root:"border-primary-600 bg-neutral-50",separator:"border-primary-600"}},{tone:"primary",variant:"fill",class:{root:"bg-primary-50 border-primary-400",separator:"border-primary-400"}},{disabled:true,variant:"outline",class:{root:"border-neutral-400",separator:"border-neutral-400"}},{disabled:true,variant:"fill",class:{root:"border-neutral-300 bg-neutral-100",separator:"border-neutral-300"}}],defaultVariants:l}),k=createContext(l),C=()=>useContext(k),j=({src:e,alt:n})=>{let[r,a]=useState(false);return !e||r?jsx("div",{className:"flex size-4 shrink-0 items-center justify-center rounded-sm bg-neutral-200",children:jsx(ImageIcon,{className:"size-3 text-neutral-400","aria-hidden":true})}):jsx("img",{src:e,alt:n??"",onError:()=>a(true),className:"size-4 shrink-0 rounded-sm object-cover"})},W=(e,n,r)=>{switch(e.type){case "icon":{let a=e.Icon;return jsx(a,{className:n,"aria-hidden":true})}case "checkbox":return jsx(c,{checked:e.checked,defaultChecked:e.defaultChecked,onCheckedChange:e.onCheckedChange,disabled:r||e.disabled});case "switch":return jsx(d,{checked:e.checked,defaultChecked:e.defaultChecked,onCheckedChange:e.onCheckedChange,disabled:r||e.disabled,size:"sm",variant:"primary",type:"base"});case "image":return jsx(j,{src:e.src,alt:e.alt});default:return e}},I=({title:e$3,leading:n,description:r,info:a$3,badgeNumber:s,actions:o,className:i,...m})=>{let{tone:u,variant:E,disabled:x}=C(),{headerIcon:L,headerTitle:S,infoIcon:w,headerInfo:z,headerInfoText:H,description:F}=p({tone:u,variant:E,disabled:x});return jsxs("div",{className:a("flex flex-col gap-1 px-3 py-2",i),...m,children:[jsxs("div",{className:"flex items-center justify-between gap-2",children:[jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:[n&&W(n,L(),x),jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:[jsx("div",{className:S(),children:e$3}),s&&jsx(a$1,{className:a("shrink-0",x&&"opacity-50 grayscale"),text:s.text,affix:s.affix,size:"md",variant:"primary",type:"square"})]}),typeof a$3=="string"||typeof a$3=="number"?String(a$3).trim()!==""&&jsxs("div",{className:z(),children:[jsx(e,{className:w(),"aria-hidden":true}),jsx("span",{className:H(),children:a$3})]}):a$3]}),o&&jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[o.badgeExpandable&&jsx(a$2,{...o.badgeExpandable}),o.iconButtons?.map((A,R)=>jsx(e$1,{variant:"ghost",tone:"neutral",size:"sm",...A},R)),o.button&&jsx(e$2,{...o.button,size:"sm"})]})]}),r&&jsx("div",{className:F(),children:r})]})};I.displayName="CardBasicHeader";var N=({children:e,className:n,...r})=>{let{tone:a$1,variant:s,disabled:o}=C(),{separator:i}=p({tone:a$1,variant:s,disabled:o});return jsx("div",{className:a("flex flex-col gap-4 px-3 py-4.5",i(),n),...r,children:e})};N.displayName="CardBasicBody";var T=({children:e,className:n,...r})=>{let{tone:a$1,variant:s,disabled:o}=C(),{separator:i}=p({tone:a$1,variant:s,disabled:o});return jsx("div",{className:a("px-3 py-4.5",i(),n),...r,children:e})};T.displayName="CardBasicFooter";var P=({as:e,children:n,className:r,tone:a=l.tone,variant:s=l.variant,disabled:o=l.disabled,...i})=>{let m=e??"div",{root:u}=p({tone:a,variant:s,disabled:o});return jsx(k.Provider,{value:{tone:a,variant:s,disabled:o},children:jsx(m,{className:u({className:r}),...i,children:n})})};P.displayName="CardBasic";var me=Object.assign(P,{Header:I,Body:N,Footer:T});export{I as a,N as b,T as c,me as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-AWRP67K4.js';import {e}from'./chunk-
|
|
1
|
+
import {a as a$1}from'./chunk-AWRP67K4.js';import {e}from'./chunk-P7NW2XNB.js';import {a}from'./chunk-OBZIYJO7.js';import*as r from'react';import*as t from'@radix-ui/react-alert-dialog';import {jsx,jsxs}from'react/jsx-runtime';var N=t.Root,x=t.Trigger,p=t.Portal,f=t.Cancel,m=r.forwardRef(({className:e,...a$1},l)=>jsx(t.Overlay,{ref:l,className:a("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80",e),...a$1}));m.displayName=t.Overlay.displayName;var g=r.forwardRef(({className:e,children:a$1,...l},c)=>jsxs(p,{children:[jsx(m,{className:"bg-neutral-900/50"}),jsx(t.Content,{ref:c,className:a("elevation-9 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] fixed top-[50%] left-[50%] z-10000 grid w-full max-w-2xl translate-x-[-50%] translate-y-[-50%] rounded-2xl bg-neutral-50 py-3 duration-200",e),...l,children:a$1})]}));g.displayName=t.Content.displayName;var T=e$1=>jsx(e,{variant:"primary",...e$1}),b=e$1=>jsx(f,{asChild:true,children:jsx(e,{variant:"secondary",...e$1})}),B=e$1=>jsx(e,{variant:"ghost",...e$1}),D=({className:e,...a$1})=>jsx("div",{className:a("mx-6 mb-4 flex flex-col gap-4 text-left",e),...a$1});D.displayName="AlertDialogHeader";var A=({className:e,...a$2})=>jsxs("div",{children:[jsx(a$1,{className:"w-full"}),jsx("div",{className:a("mt-3 flex justify-end gap-2 px-6",e),...a$2})]});A.displayName="AlertDialogFooter";var v=r.forwardRef(({className:e,...a$1},l)=>jsx(t.Title,{ref:l,className:a("font-jakarta text-lg leading-[160%] font-semibold",e),...a$1}));v.displayName=t.Title.displayName;var P=r.forwardRef(({className:e,...a$1},l)=>jsx(t.Description,{ref:l,className:a("font-inter text-sm leading-[130%] font-normal",e),...a$1}));P.displayName=t.Description.displayName;var E=({className:e,...a$1})=>jsx("div",{className:a("mx-6 mb-4.5",e),...a$1});export{N as a,x as b,p as c,m as d,g as e,T as f,b as g,B as h,D as i,A as j,v as k,P as l,E as m};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {c,d}from'./chunk-TW4CJXQY.js';import {a as a$2}from'./chunk-VIMWKUML.js';import {a}from'./chunk-
|
|
1
|
+
import {c,d}from'./chunk-TW4CJXQY.js';import {a as a$2}from'./chunk-VIMWKUML.js';import {a}from'./chunk-T5NU5E4O.js';import {a as a$1}from'./chunk-OBZIYJO7.js';import {Field}from'@ark-ui/react/field';import {forwardRef,useEffect}from'react';import {jsxs,jsx}from'react/jsx-runtime';var n=0,f=t=>{let e=document.activeElement;if(!e||e.type!=="number")return;document.elementFromPoint(t.clientX,t.clientY)===e&&t.preventDefault();},x=()=>{useEffect(()=>(n===0&&document.addEventListener("wheel",f,{passive:false}),n+=1,()=>{n-=1,n===0&&document.removeEventListener("wheel",f);}),[]);};var L=forwardRef(({className:t,disabled:e,error:o,helperText:v,label:T,readOnly:m,required:s,tooltip:E,...h},b)=>{x();let l=c({error:o,disabled:e,readOnly:m});return jsxs(Field.Root,{"data-error":o,disabled:e,readOnly:m,className:l.root({className:t}),children:[jsx(a,{as:Field.Label,label:T,required:s,tooltip:E}),jsxs("div",{className:l.control(),children:[jsx(Field.Input,{ref:b,required:s,className:l.input(),...h}),o&&jsx("div",{className:a$1(l.trailing(),"cursor-text"),children:jsx(d,{})})]}),jsx(a$2,{as:Field.HelperText,children:v})]})});L.displayName="TextField";export{L as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {e}from'./chunk-SRCJQWFE.js';import {a as a$2}from'./chunk-VIMWKUML.js';import {a}from'./chunk-
|
|
1
|
+
import {e}from'./chunk-SRCJQWFE.js';import {a as a$2}from'./chunk-VIMWKUML.js';import {a}from'./chunk-T5NU5E4O.js';import {a as a$1}from'./chunk-OBZIYJO7.js';import {jsxs,jsx}from'react/jsx-runtime';var q=["vertical","horizontal"],w=(o,{selectedValue:t,isSelected:n})=>t!=null&&!n,V=({label:o,orientation:t="vertical",options:n,value:a$3,onChange:m,required:x,tooltip:v,disabled:p,isOptionDisabled:r,error:f,helperText:c,variant:T,tone:g,size:O,className:S})=>{let d=t==="horizontal";return jsxs("div",{className:a$1("group flex flex-col",S),"data-error":f||void 0,"data-disabled":p||void 0,children:[jsxs("div",{className:a$1("flex",d?"flex-row items-center":"flex-col"),children:[o&&jsx(a,{as:"p",label:o,required:x,tooltip:v,className:d?"mr-3 mb-0":"mb-3"}),jsx("div",{className:"flex flex-wrap gap-3",children:n.map((e$1,y)=>{let s=a$3===e$1.value,z=typeof r=="function"?r(e$1,{selectedValue:a$3,isSelected:s,index:y}):!!r,P=p||e$1.disabled||z;return jsx(e,{selected:s,disabled:P,variant:T,tone:g,size:O,StartIcon:e$1.StartIcon,onClick:()=>m(s?null:e$1.value),children:e$1.label},e$1.value)})})]}),c&&jsx(a$2,{children:c})]})};export{q as a,w as b,V as c};
|