@xjur-ui/react 3.0.7 → 3.0.8

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.
Files changed (83) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/components/accordion/accordion-content.js +1 -1
  3. package/dist/components/accordion/accordion-item.js +1 -1
  4. package/dist/components/accordion/accordion-root.js +1 -1
  5. package/dist/components/accordion/accordion-styles.js +1 -1
  6. package/dist/components/accordion/accordion-tab-header.js +1 -1
  7. package/dist/components/accordion/accordion-trigger.js +1 -1
  8. package/dist/components/accordion/index.js +1 -1
  9. package/dist/components/carousel/index.js +1 -1
  10. package/dist/components/chip/chip-icon.js +1 -1
  11. package/dist/components/chip/index.js +1 -1
  12. package/dist/components/controls/checkbox.js +1 -1
  13. package/dist/components/controls/date-picker/index.js +1 -1
  14. package/dist/components/controls/input/input-icon.js +1 -1
  15. package/dist/components/controls/search-selector.js +1 -1
  16. package/dist/components/custom/andamento-timeline/andamento-timeline.d.ts +34 -0
  17. package/dist/components/custom/andamento-timeline/andamento-timeline.js +1 -0
  18. package/dist/components/custom/andamento-timeline/index.d.ts +2 -0
  19. package/dist/components/custom/andamento-timeline/index.js +1 -0
  20. package/dist/components/custom/centro-custo/centro-custo-add-button.js +1 -1
  21. package/dist/components/custom/centro-custo/centro-custo-body.js +1 -1
  22. package/dist/components/custom/centro-custo/centro-custo-close-button.js +1 -1
  23. package/dist/components/custom/centro-custo/centro-custo-header.js +1 -1
  24. package/dist/components/custom/centro-custo/centro-custo-trigger.js +1 -1
  25. package/dist/components/custom/centro-custo/centro-custo.js +1 -1
  26. package/dist/components/custom/centro-custo/index.js +1 -1
  27. package/dist/components/custom/empresa/empresa-add-button.js +1 -1
  28. package/dist/components/custom/empresa/empresa-body.js +1 -1
  29. package/dist/components/custom/empresa/empresa-close-button.js +1 -1
  30. package/dist/components/custom/empresa/empresa-content.js +1 -1
  31. package/dist/components/custom/empresa/empresa-trigger.js +1 -1
  32. package/dist/components/custom/empresa/empresa.js +1 -1
  33. package/dist/components/custom/empresa/index.js +1 -1
  34. package/dist/components/custom/lista-nivelada/hierarchical-navigation.d.ts +19 -0
  35. package/dist/components/custom/lista-nivelada/hierarchical-navigation.js +1 -0
  36. package/dist/components/custom/lista-nivelada/index.d.ts +12 -0
  37. package/dist/components/custom/lista-nivelada/index.js +1 -0
  38. package/dist/components/custom/lista-nivelada/lista-nivelada-body.d.ts +3 -0
  39. package/dist/components/custom/lista-nivelada/lista-nivelada-body.js +1 -0
  40. package/dist/components/custom/lista-nivelada/lista-nivelada-close-button.d.ts +3 -0
  41. package/dist/components/custom/lista-nivelada/lista-nivelada-close-button.js +1 -0
  42. package/dist/components/custom/lista-nivelada/lista-nivelada-content.d.ts +3 -0
  43. package/dist/components/custom/lista-nivelada/lista-nivelada-content.js +1 -0
  44. package/dist/components/custom/lista-nivelada/lista-nivelada-footer.d.ts +3 -0
  45. package/dist/components/custom/lista-nivelada/lista-nivelada-footer.js +1 -0
  46. package/dist/components/custom/lista-nivelada/lista-nivelada-header.d.ts +7 -0
  47. package/dist/components/custom/lista-nivelada/lista-nivelada-header.js +1 -0
  48. package/dist/components/custom/lista-nivelada/lista-nivelada-trigger.d.ts +3 -0
  49. package/dist/components/custom/lista-nivelada/lista-nivelada-trigger.js +1 -0
  50. package/dist/components/custom/lista-nivelada/lista-nivelada.context.d.ts +17 -0
  51. package/dist/components/custom/lista-nivelada/lista-nivelada.context.js +1 -0
  52. package/dist/components/custom/lista-nivelada/lista-nivelada.d.ts +6 -0
  53. package/dist/components/custom/lista-nivelada/lista-nivelada.js +1 -0
  54. package/dist/components/custom/lista-nivelada/navigation-button.d.ts +7 -0
  55. package/dist/components/custom/lista-nivelada/navigation-button.js +1 -0
  56. package/dist/components/custom/lista-nivelada/navigation-grid.d.ts +13 -0
  57. package/dist/components/custom/lista-nivelada/navigation-grid.js +1 -0
  58. package/dist/components/custom/lista-nivelada/radio-selection.d.ts +17 -0
  59. package/dist/components/custom/lista-nivelada/radio-selection.js +1 -0
  60. package/dist/components/custom/pessoa/index.js +1 -1
  61. package/dist/components/custom/pessoa/pessoa-add-button.js +1 -1
  62. package/dist/components/custom/pessoa/pessoa-body.js +1 -1
  63. package/dist/components/custom/pessoa/pessoa-close-button.js +1 -1
  64. package/dist/components/custom/pessoa/pessoa-trigger.js +1 -1
  65. package/dist/components/custom/pessoa/pessoa.js +1 -1
  66. package/dist/components/dialog/delete-dialog.js +1 -1
  67. package/dist/components/dialog/index.js +1 -1
  68. package/dist/components/full-calendar/calendar-toggle-view.js +1 -1
  69. package/dist/components/full-calendar/calendar-view-renderer.js +1 -1
  70. package/dist/components/icon/index.js +1 -1
  71. package/dist/components/table/index.js +1 -1
  72. package/dist/components/table/table-row.js +1 -1
  73. package/dist/components/table/table-sort.js +1 -1
  74. package/dist/components/timeline-card/index.d.ts +4 -0
  75. package/dist/components/timeline-card/index.js +1 -0
  76. package/dist/components/timeline-card/timeline-card.d.ts +27 -0
  77. package/dist/components/timeline-card/timeline-card.js +1 -0
  78. package/dist/components/timeline-card/timeline.d.ts +12 -0
  79. package/dist/components/timeline-card/timeline.js +1 -0
  80. package/dist/index.css +1 -1
  81. package/dist/resources/icons.d.ts +1 -1
  82. package/dist/resources/icons.js +1 -1
  83. package/package.json +8 -4
@@ -1 +1 @@
1
- import{Dialog as Bt}from"@radix-ui/react-dialog";import{DialogTrigger as Et}from"@radix-ui/react-dialog";import{DialogPortal as St}from"@radix-ui/react-dialog";import{DialogClose as Lt}from"@radix-ui/react-dialog";import*as k from"@radix-ui/react-dialog";import{cva as E,cx as M}from"@xjur-ui/util";import{jsx as q}from"react/jsx-runtime";var S=E(["fixed inset-0 z-50 bg-black/50 backdrop-blur-sm","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"]);function f({className:e,...t}){return q(k.Overlay,{className:M(S(),e),...t})}import{Dialog as _e}from"@radix-ui/react-dialog";import{Slot as G}from"@radix-ui/react-slot";import{cva as $}from"@xjur-ui/util";import{memo as F,useState as J}from"react";import*as d from"@radix-ui/react-tooltip";import{jsx as y}from"react/jsx-runtime";function L({delayDuration:e=0,...t}){return y(d.Provider,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function v({...e}){return y(L,{children:y(d.Root,{"data-slot":"tooltip",...e})})}import*as N from"@radix-ui/react-tooltip";import{jsx as W}from"react/jsx-runtime";function x({...e}){return W(N.Trigger,{"data-slot":"tooltip-trigger",...e})}import*as m from"@radix-ui/react-tooltip";import{cx as A}from"@xjur-ui/util";import{jsx as O}from"react/jsx-runtime";function u({className:e,sideOffset:t=1,variant:a="simple",children:o,...i}){return O(m.Portal,{children:O(m.Content,{className:A("text-size-body-sm z-99999 text-balance","data-[variant=simple]:bg-alt-2 data-[variant=simple]:text-neutral-label data-[variant=simple]:rounded-small-1x data-[variant=simple]:px-small data-[variant=simple]:py-small-1x","data-[variant=rich]:bg-layer-2-idle data-[variant=rich]:text-neutral-dark data-[variant=rich]:rounded-small data-[variant=rich]:border-border-layer-2 data-[variant=rich]:p-large data-[variant=rich]:border","animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin)",e),"data-slot":"tooltip-content","data-variant":a,sideOffset:t,...i,children:o})})}import{jsx as c,jsxs as U}from"react/jsx-runtime";var K=$("",{variants:{variant:{body:"",label:"",title:"",headline:""},size:{"sm-2x":"","sm-1x":"",sm:"",md:"",lg:""},weight:{thin:"font-thin",extraLight:"font-extralight",light:"font-light",normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold",extraBold:"font-extrabold",black:"font-black"}},compoundVariants:[{variant:"body",size:"sm-1x",class:"text-size-body-sm-1x"},{variant:"body",size:"sm",class:"text-size-body-sm"},{variant:"body",size:"md",class:"text-size-body-md"},{variant:"body",size:"lg",class:"text-size-body-lg"},{variant:"label",size:"sm-2x",class:"text-size-label-sm-2x"},{variant:"label",size:"sm-1x",class:"text-size-label-sm-1x"},{variant:"label",size:"sm",class:"text-size-label-sm"},{variant:"label",size:"md",class:"text-size-label-md"},{variant:"label",size:"lg",class:"text-size-label-lg"},{variant:"title",size:"sm",class:"text-size-title-sm"},{variant:"title",size:"md",class:"text-size-title-md"},{variant:"title",size:"lg",class:"text-size-title-lg"},{variant:"headline",size:"sm",class:"text-size-headline-sm"},{variant:"headline",size:"md",class:"text-size-headline-md"},{variant:"headline",size:"lg",class:"text-size-headline-lg"}],defaultVariants:{variant:"body",size:"md",weight:"normal"}}),p=F(({variant:e,size:t,weight:a,asChild:o,className:i,children:r,...n})=>c(o?G:"span",{className:K({variant:e,size:t,weight:a,className:i}),...n,children:r}));p.displayName="Typography";var Q=F(({children:e,...t})=>{let[a,o]=J(!1);return U(v,{children:[c(x,{asChild:!0,children:c(p,{onMouseEnter:({currentTarget:r})=>{let n=r.scrollWidth>r.clientWidth;o(n),n?r.style.cursor="pointer":r.style.cursor="text"},...t,children:e})}),a&&c(u,{children:e})]})});Q.displayName="TruncatedTypography";import{Slot as X}from"@radix-ui/react-slot";import{cva as Y,cx as Z}from"@xjur-ui/util";import{jsx as ee}from"react/jsx-runtime";var j=Y(["outline-none inline-flex items-center justify-center rounded-circle gap-small cursor-pointer disabled:opacity-38 disabled:pointer-events-none transition-colors"],{variants:{size:{md:"py-small_1x-alt px-medium text-size-body-md",sm:"py-small-1x px-small text-size-label-sm",icon_md:"p-small text-size-body-md h-large-4x w-large-4x",icon_sm:"p-small-1x text-size-label-sm h-large-2x w-large-2x"},variant:{primary:"",secondary:"",tertiary:"",destructive:"",outlined:"bg-layer-2-idle border border-border-layer-2 hover:bg-layer-2-hover active:bg-layer-2-pressed"},appearance:{solid:"",ghost:"bg-transparent"}},compoundVariants:[{variant:"primary",appearance:"solid",class:"bg-primary-idle text-neutral-label hover:bg-primary-hover active:bg-primary-pressed"},{variant:"primary",appearance:"ghost",class:"text-primary-idle hover:bg-primary-alt-idle active:bg-primary-alt-pressed"},{variant:"secondary",appearance:"solid",class:"bg-layer-1-hover text-neutral-dark hover:bg-layer-1-pressed active:bg-layer-1-active"},{variant:"secondary",appearance:"ghost",class:"hover:bg-layer-1-hover active:bg-layer-1-pressed"},{variant:"tertiary",appearance:"solid",class:"bg-layer-2-hover text-neutral-dark hover:bg-layer-2-pressed active:bg-layer-2-active"},{variant:"tertiary",appearance:"ghost",class:"hover:bg-layer-2-hover active:bg-layer-2-pressed"},{variant:"destructive",appearance:"solid",class:"bg-danger-idle text-neutral-label hover:bg-danger-hover active:bg-danger-pressed"},{variant:"destructive",appearance:"ghost",class:"text-danger-label-idle hover:bg-danger-alt-idle active:bg-danger-alt-pressed"}],defaultVariants:{size:"md",variant:"primary",appearance:"solid"}});function b({asChild:e,className:t,variant:a="primary",size:o="md",appearance:i="solid",...r}){return ee(e?X:"button",{className:Z(j({variant:a,appearance:i,size:o}),t),...r})}import{cva as ae}from"@xjur-ui/util";import*as s from"@radix-ui/react-dialog";import{cx as re}from"@xjur-ui/util";import{cx as te}from"@xjur-ui/util";import{jsx as oe}from"react/jsx-runtime";function H({className:e,filled:t=!1,name:a,...o}){return oe("span",{...o,className:te("material-symbols-outlined","text-size-body-lg select-none",e),style:{fontVariationSettings:`'FILL' ${t?1:0}, 'wght' 600, 'GRAD' 0, 'opsz' 20`,...o.style},children:a})}import{jsx as h,jsxs as P}from"react/jsx-runtime";var ie=ae(["fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-layer-1-idle p-6 shadow-lg duration-200","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%]","data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]","sm:rounded-lg"],{variants:{size:{sm:"max-w-sm",md:"max-w-lg",lg:"max-w-2xl",xl:"max-w-4xl"}},defaultVariants:{size:"md"}});function _({className:e,children:t,size:a,...o}){return P(s.DialogPortal,{children:[h(f,{}),P(s.Content,{className:re(ie({size:a}),e),...o,children:[t,P(s.Close,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none",children:[h(H,{className:"h-4 w-4",name:"close"}),h("span",{className:"sr-only",children:"Fechar"})]})]})]})}import{cva as ne,cx as le}from"@xjur-ui/util";import*as I from"@radix-ui/react-dialog";import{jsx as pe}from"react/jsx-runtime";var se=ne(["text-lg font-semibold leading-none tracking-tight"]);function D({className:e,...t}){return pe(I.Title,{className:le(se(),e),...t})}import{cva as de,cx as me}from"@xjur-ui/util";import*as B from"@radix-ui/react-dialog";import{jsx as ge}from"react/jsx-runtime";var ce=de(["text-sm text-neutral-dark"]);function C({className:e,...t}){return ge(B.Description,{className:me(ce(),e),...t})}import{cva as fe}from"@xjur-ui/util";import{cx as ye}from"@xjur-ui/util";import{jsx as xe}from"react/jsx-runtime";var ve=fe(["flex flex-col space-y-1.5 text-center sm:text-left"]);function T({className:e,...t}){return xe("div",{className:ye(ve(),e),...t})}import{cva as ue,cx as be}from"@xjur-ui/util";import"react";import{jsx as Pe}from"react/jsx-runtime";var he=ue(["flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2"]);function z({className:e,...t}){return Pe("div",{className:be(he(),e),...t})}import{jsx as l,jsxs as w}from"react/jsx-runtime";function De({open:e,onOpenChange:t,title:a="Excluir documento",description:o="Voc\xEA tem certeza que deseja excluir este documento permanentemente?",onConfirm:i,onCancel:r,confirmText:n="Excluir permanentemente",cancelText:V="Cancelar",isLoading:g=!1}){return l(_e,{open:e,onOpenChange:R=>{t?.(R)},children:w(_,{size:"sm",children:[w(T,{children:[l(D,{children:l(p,{size:"md",variant:"title",weight:"semibold",children:a})}),l(C,{children:l(p,{size:"md",variant:"body",children:o})})]}),w(z,{children:[l(b,{appearance:"ghost",disabled:g,variant:"tertiary",onClick:()=>{r?.(),t?.(!1)},children:V}),l(b,{appearance:"solid",disabled:g,variant:"destructive",onClick:()=>{i?.()},children:g?"Excluindo...":n})]})]})})}export{De as DeleteDialog,Bt as Dialog,Lt as DialogClose,_ as DialogContent,C as DialogDescription,z as DialogFooter,T as DialogHeader,f as DialogOverlay,St as DialogPortal,D as DialogTitle,Et as DialogTrigger};
1
+ import{Dialog as Bt}from"@radix-ui/react-dialog";import{DialogTrigger as Et}from"@radix-ui/react-dialog";import{DialogPortal as St}from"@radix-ui/react-dialog";import{DialogClose as Lt}from"@radix-ui/react-dialog";import*as V from"@radix-ui/react-dialog";import{cva as E,cx as M}from"@xjur-ui/util";import{jsx as q}from"react/jsx-runtime";var S=E(["fixed inset-0 z-50 bg-black/50 backdrop-blur-sm","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"]);function f({className:e,...t}){return q(V.Overlay,{className:M(S(),e),...t})}import{Dialog as _e}from"@radix-ui/react-dialog";import{Slot as G}from"@radix-ui/react-slot";import{cva as $}from"@xjur-ui/util";import{memo as F,useState as J}from"react";import*as d from"@radix-ui/react-tooltip";import{jsx as y}from"react/jsx-runtime";function L({delayDuration:e=0,...t}){return y(d.Provider,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function v({...e}){return y(L,{children:y(d.Root,{"data-slot":"tooltip",...e})})}import*as N from"@radix-ui/react-tooltip";import{jsx as W}from"react/jsx-runtime";function x({...e}){return W(N.Trigger,{"data-slot":"tooltip-trigger",...e})}import*as m from"@radix-ui/react-tooltip";import{cx as A}from"@xjur-ui/util";import{jsx as O}from"react/jsx-runtime";function u({className:e,sideOffset:t=1,variant:a="simple",children:o,...i}){return O(m.Portal,{children:O(m.Content,{className:A("text-size-body-sm z-99999 text-balance","data-[variant=simple]:bg-alt-2 data-[variant=simple]:text-neutral-label data-[variant=simple]:rounded-small-1x data-[variant=simple]:px-small data-[variant=simple]:py-small-1x","data-[variant=rich]:bg-layer-2-idle data-[variant=rich]:text-neutral-dark data-[variant=rich]:rounded-small data-[variant=rich]:border-border-layer-2 data-[variant=rich]:p-large data-[variant=rich]:border","animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin)",e),"data-slot":"tooltip-content","data-variant":a,sideOffset:t,...i,children:o})})}import{jsx as c,jsxs as U}from"react/jsx-runtime";var K=$("",{variants:{variant:{body:"",label:"",title:"",headline:""},size:{"sm-2x":"","sm-1x":"",sm:"",md:"",lg:""},weight:{thin:"font-thin",extraLight:"font-extralight",light:"font-light",normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold",extraBold:"font-extrabold",black:"font-black"}},compoundVariants:[{variant:"body",size:"sm-1x",class:"text-size-body-sm-1x"},{variant:"body",size:"sm",class:"text-size-body-sm"},{variant:"body",size:"md",class:"text-size-body-md"},{variant:"body",size:"lg",class:"text-size-body-lg"},{variant:"label",size:"sm-2x",class:"text-size-label-sm-2x"},{variant:"label",size:"sm-1x",class:"text-size-label-sm-1x"},{variant:"label",size:"sm",class:"text-size-label-sm"},{variant:"label",size:"md",class:"text-size-label-md"},{variant:"label",size:"lg",class:"text-size-label-lg"},{variant:"title",size:"sm",class:"text-size-title-sm"},{variant:"title",size:"md",class:"text-size-title-md"},{variant:"title",size:"lg",class:"text-size-title-lg"},{variant:"headline",size:"sm",class:"text-size-headline-sm"},{variant:"headline",size:"md",class:"text-size-headline-md"},{variant:"headline",size:"lg",class:"text-size-headline-lg"}],defaultVariants:{variant:"body",size:"md",weight:"normal"}}),p=F(({variant:e,size:t,weight:a,asChild:o,className:i,children:r,...n})=>c(o?G:"span",{className:K({variant:e,size:t,weight:a,className:i}),...n,children:r}));p.displayName="Typography";var Q=F(({children:e,...t})=>{let[a,o]=J(!1);return U(v,{children:[c(x,{asChild:!0,children:c(p,{onMouseEnter:({currentTarget:r})=>{let n=r.scrollWidth>r.clientWidth;o(n),n?r.style.cursor="pointer":r.style.cursor="text"},...t,children:e})}),a&&c(u,{children:e})]})});Q.displayName="TruncatedTypography";import{Slot as X}from"@radix-ui/react-slot";import{cva as Y,cx as Z}from"@xjur-ui/util";import{jsx as ee}from"react/jsx-runtime";var j=Y(["outline-none inline-flex items-center justify-center rounded-circle gap-small cursor-pointer disabled:opacity-38 disabled:pointer-events-none transition-colors"],{variants:{size:{md:"py-small_1x-alt px-medium text-size-body-md",sm:"py-small-1x px-small text-size-label-sm",icon_md:"p-small text-size-body-md h-large-4x w-large-4x",icon_sm:"p-small-1x text-size-label-sm h-large-2x w-large-2x"},variant:{primary:"",secondary:"",tertiary:"",destructive:"",outlined:"bg-layer-2-idle border border-border-layer-2 hover:bg-layer-2-hover active:bg-layer-2-pressed"},appearance:{solid:"",ghost:"bg-transparent"}},compoundVariants:[{variant:"primary",appearance:"solid",class:"bg-primary-idle text-neutral-label hover:bg-primary-hover active:bg-primary-pressed"},{variant:"primary",appearance:"ghost",class:"text-primary-idle hover:bg-primary-alt-idle active:bg-primary-alt-pressed"},{variant:"secondary",appearance:"solid",class:"bg-layer-1-hover text-neutral-dark hover:bg-layer-1-pressed active:bg-layer-1-active"},{variant:"secondary",appearance:"ghost",class:"hover:bg-layer-1-hover active:bg-layer-1-pressed"},{variant:"tertiary",appearance:"solid",class:"bg-layer-2-hover text-neutral-dark hover:bg-layer-2-pressed active:bg-layer-2-active"},{variant:"tertiary",appearance:"ghost",class:"hover:bg-layer-2-hover active:bg-layer-2-pressed"},{variant:"destructive",appearance:"solid",class:"bg-danger-idle text-neutral-label hover:bg-danger-hover active:bg-danger-pressed"},{variant:"destructive",appearance:"ghost",class:"text-danger-label-idle hover:bg-danger-alt-idle active:bg-danger-alt-pressed"}],defaultVariants:{size:"md",variant:"primary",appearance:"solid"}});function b({asChild:e,className:t,variant:a="primary",size:o="md",appearance:i="solid",...r}){return ee(e?X:"button",{className:Z(j({variant:a,appearance:i,size:o}),t),...r})}import{cva as ae}from"@xjur-ui/util";import*as s from"@radix-ui/react-dialog";import{cx as re}from"@xjur-ui/util";import{cx as te}from"@xjur-ui/util";import{jsx as oe}from"react/jsx-runtime";function H({className:e,filled:t=!1,name:a,...o}){return oe("span",{...o,className:te("material-symbols-outlined","text-size-body-lg select-none",e),style:{fontVariationSettings:`'FILL' ${t?1:0}, 'wght' 600, 'GRAD' 0, 'opsz' 20`,...o.style},children:a})}import{jsx as h,jsxs as P}from"react/jsx-runtime";var ie=ae(["fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-layer-1-idle p-6 shadow-lg duration-200","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%]","data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]","sm:rounded-lg"],{variants:{size:{sm:"max-w-sm",md:"max-w-lg",lg:"max-w-2xl",xl:"max-w-4xl"}},defaultVariants:{size:"md"}});function _({className:e,children:t,size:a,...o}){return P(s.DialogPortal,{children:[h(f,{}),P(s.Content,{className:re(ie({size:a}),e),...o,children:[t,P(s.Close,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none",children:[h(H,{className:"h-4 w-4",name:"close"}),h("span",{className:"sr-only",children:"Fechar"})]})]})]})}import{cva as ne,cx as le}from"@xjur-ui/util";import*as I from"@radix-ui/react-dialog";import{jsx as pe}from"react/jsx-runtime";var se=ne(["text-lg font-semibold leading-none tracking-tight"]);function D({className:e,...t}){return pe(I.Title,{className:le(se(),e),...t})}import{cva as de,cx as me}from"@xjur-ui/util";import*as B from"@radix-ui/react-dialog";import{jsx as ge}from"react/jsx-runtime";var ce=de(["text-sm text-neutral-dark"]);function C({className:e,...t}){return ge(B.Description,{className:me(ce(),e),...t})}import{cva as fe}from"@xjur-ui/util";import{cx as ye}from"@xjur-ui/util";import{jsx as xe}from"react/jsx-runtime";var ve=fe(["flex flex-col space-y-1.5 text-center sm:text-left"]);function T({className:e,...t}){return xe("div",{className:ye(ve(),e),...t})}import{cva as ue,cx as be}from"@xjur-ui/util";import"react";import{jsx as Pe}from"react/jsx-runtime";var he=ue(["flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2"]);function z({className:e,...t}){return Pe("div",{className:be(he(),e),...t})}import{jsx as l,jsxs as w}from"react/jsx-runtime";function De({open:e,onOpenChange:t,title:a="Excluir documento",description:o="Voc\xEA tem certeza que deseja excluir este documento permanentemente?",onConfirm:i,onCancel:r,confirmText:n="Excluir permanentemente",cancelText:k="Cancelar",isLoading:g=!1}){return l(_e,{open:e,onOpenChange:R=>{t?.(R)},children:w(_,{size:"sm",children:[w(T,{children:[l(D,{children:l(p,{size:"md",variant:"title",weight:"semibold",children:a})}),l(C,{children:l(p,{size:"md",variant:"body",children:o})})]}),w(z,{children:[l(b,{appearance:"ghost",disabled:g,variant:"tertiary",onClick:()=>{r?.(),t?.(!1)},children:k}),l(b,{appearance:"solid",disabled:g,variant:"destructive",onClick:()=>{i?.()},children:g?"Excluindo...":n})]})]})})}export{De as DeleteDialog,Bt as Dialog,Lt as DialogClose,_ as DialogContent,C as DialogDescription,z as DialogFooter,T as DialogHeader,f as DialogOverlay,St as DialogPortal,D as DialogTitle,Et as DialogTrigger};
@@ -1 +1 @@
1
- import*as $ from"@radix-ui/react-popover";import{createContext as te,useContext as oe}from"react";var h=te({state:"normal",variant:"normal",customMask:void 0,mask:void 0});function l(){let e=oe(h);if(!e)throw new Error("useFieldContext must be used within a InputRoot, SelectRoot, DatePickerRoot, etc.");return e}import{tv as re}from"@xjur-ui/util";var s=re({slots:{wrapper:"group flex flex-col gap-small-2x",trigger:["h-large-4x w-auto inline-flex cursor-pointer relative","items-center gap-small rounded-small-1x","py-small_1x-alt px-small","bg-layer-2-idle border border-border-layer-2","group-has-[div[data-slot=input-action-slot]]:rounded-r-none","transition-all duration-200"],content:["group z-1000 max-h-[var(--radix-popover-content-available-height)] max-w-[240px] min-w-[var(--radix-popover-trigger-width)] group-data-[state=open]:rotate-180 transition-transform duration-200"],icon:"size-large text-icon-neutral-3 flex items-center justify-center",slotText:"size-large flex items-center justify-center !text-size-label-md text-neutral-placeholder",caption:"!text-size-body-sm font-normal"},variants:{state:{normal:{trigger:"hover:border-border-layer-3 data-[state=open]:border-primary-idle data-[state=open]:hover:border-primary-idle"},error:{trigger:"border-danger-idle hover:border-danger-idle data-[state=open]:border-danger-idle data-[state=open]:hover:border-danger-idle",caption:"text-danger-label-idle"},disabled:{trigger:"pointer-events-none border-transparent bg-layer-2-idle"}}}});import{jsx as C}from"react/jsx-runtime";var{wrapper:ae}=s();function w({className:e,state:t="normal",defaultOpen:o,variant:r="normal",modal:n,open:a,onOpenChange:i,...p}){return C($.Root,{defaultOpen:o,modal:n,open:a,onOpenChange:i,children:C(h.Provider,{value:{state:t,variant:r},children:C("div",{className:ae({className:e,state:t}),...p})})})}import{tv as ne,twMerge as ie}from"@xjur-ui/util";import*as q from"@radix-ui/react-popover";import{jsx as se}from"react/jsx-runtime";var{trigger:le}=s();function P({className:e,...t}){let{state:o,variant:r}=l(),n=ne({base:["group bg-layer-2-idle"],variants:{state:{normal:["border-border-layer-2 hover:border-border-layer-3 has-[input:not(:placeholder-shown)]:border-primary-idle"],error:["border-danger-idle hover:border-danger-idle"],disabled:["border border-border-layer-2 opacity-60"]}}}),a=ie(le({state:o,className:e}),r==="filter"&&n({state:o,className:e}));return se(q.Trigger,{className:a,disabled:o==="disabled",...t})}import{cx as pe}from"@xjur-ui/util";import{jsx as me}from"react/jsx-runtime";function B({className:e,filled:t=!1,name:o,...r}){return me("span",{...r,className:pe("material-symbols-outlined","text-size-body-lg select-none",e),style:{fontVariationSettings:`'FILL' ${t?1:0}, 'wght' 600, 'GRAD' 0, 'opsz' 20`,...r.style},children:o})}import{jsx as G}from"react/jsx-runtime";var{icon:de}=s();function T({className:e,name:t,orientation:o="left",...r}){let{state:n}=l();return G("div",{className:de({className:e,state:n}),"data-slot":`control-${o}-slot`,...r,children:G(B,{name:t})})}import{twJoin as Ce}from"@xjur-ui/util";import{useMemo as we}from"react";import{Slot as ve}from"@radix-ui/react-slot";import{cva as ge}from"@xjur-ui/util";import{memo as J,useState as xe}from"react";import*as v from"@radix-ui/react-tooltip";import{jsx as _}from"react/jsx-runtime";function ce({delayDuration:e=0,...t}){return _(v.Provider,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function S({...e}){return _(ce,{children:_(v.Root,{"data-slot":"tooltip",...e})})}import*as K from"@radix-ui/react-tooltip";import{jsx as ue}from"react/jsx-runtime";function z({...e}){return ue(K.Trigger,{"data-slot":"tooltip-trigger",...e})}import*as g from"@radix-ui/react-tooltip";import{cx as fe}from"@xjur-ui/util";import{jsx as W}from"react/jsx-runtime";function V({className:e,sideOffset:t=1,variant:o="simple",children:r,...n}){return W(g.Portal,{children:W(g.Content,{className:fe("text-size-body-sm z-99999 text-balance","data-[variant=simple]:bg-alt-2 data-[variant=simple]:text-neutral-label data-[variant=simple]:rounded-small-1x data-[variant=simple]:px-small data-[variant=simple]:py-small-1x","data-[variant=rich]:bg-layer-2-idle data-[variant=rich]:text-neutral-dark data-[variant=rich]:rounded-small data-[variant=rich]:border-border-layer-2 data-[variant=rich]:p-large data-[variant=rich]:border","animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin)",e),"data-slot":"tooltip-content","data-variant":o,sideOffset:t,...n,children:r})})}import{jsx as x,jsxs as be}from"react/jsx-runtime";var ye=ge("",{variants:{variant:{body:"",label:"",title:"",headline:""},size:{"sm-2x":"","sm-1x":"",sm:"",md:"",lg:""},weight:{thin:"font-thin",extraLight:"font-extralight",light:"font-light",normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold",extraBold:"font-extrabold",black:"font-black"}},compoundVariants:[{variant:"body",size:"sm-1x",class:"text-size-body-sm-1x"},{variant:"body",size:"sm",class:"text-size-body-sm"},{variant:"body",size:"md",class:"text-size-body-md"},{variant:"body",size:"lg",class:"text-size-body-lg"},{variant:"label",size:"sm-2x",class:"text-size-label-sm-2x"},{variant:"label",size:"sm-1x",class:"text-size-label-sm-1x"},{variant:"label",size:"sm",class:"text-size-label-sm"},{variant:"label",size:"md",class:"text-size-label-md"},{variant:"label",size:"lg",class:"text-size-label-lg"},{variant:"title",size:"sm",class:"text-size-title-sm"},{variant:"title",size:"md",class:"text-size-title-md"},{variant:"title",size:"lg",class:"text-size-title-lg"},{variant:"headline",size:"sm",class:"text-size-headline-sm"},{variant:"headline",size:"md",class:"text-size-headline-md"},{variant:"headline",size:"lg",class:"text-size-headline-lg"}],defaultVariants:{variant:"body",size:"md",weight:"normal"}}),d=J(({variant:e,size:t,weight:o,asChild:r,className:n,children:a,...i})=>x(r?ve:"span",{className:ye({variant:e,size:t,weight:o,className:n}),...i,children:a}));d.displayName="Typography";var R=J(({children:e,...t})=>{let[o,r]=xe(!1);return be(S,{children:[x(z,{asChild:!0,children:x(d,{onMouseEnter:({currentTarget:a})=>{let i=a.scrollWidth>a.clientWidth;r(i),i?a.style.cursor="pointer":a.style.cursor="text"},...t,children:e})}),o&&x(V,{children:e})]})});R.displayName="TruncatedTypography";import{tv as he}from"@xjur-ui/util";import{jsx as Y}from"react/jsx-runtime";function k({className:e,htmlFor:t,children:o,...r}){let{state:n}=l(),a=he({base:["group inline-block max-w-full truncate text-left","ease animate-in left-small right-small pointer-events-none absolute top-1/2 -translate-y-1/2 transition-all duration-250","text-size-body-md","group-focus-within:-top-[3px]","group-data-[state=open]:-top-[3px]","group-focus-within:text-size-label-sm-1x group-focus-within:font-medium","group-data-[state=open]:text-size-label-sm-1x group-data-[state=open]:font-medium","group-has-[input:not(:placeholder-shown)]:-top-[3px]","group-has-[input:not(:placeholder-shown)]:text-size-label-sm-1x","group-has-[input:not(:placeholder-shown)]:font-medium","group-has-[div[data-slot=control-left-slot]]:left-large-4x","group-has-[div[data-slot=control-left-slot]]:group-focus-within:left-small","group-has-[div[data-slot=control-left-slot]]:group-has-[input:not(:placeholder-shown)]:left-small","group-has-[div[data-slot=control-left-slot]]:group-data-[state=open]:left-small","group-focus-within:animate-in","group-has-[input:not(:placeholder-shown)]:animate-out","data-[disabled=true]:hidden"],variants:{state:{normal:["group-focus-within:!text-primary-idle group-data-[state=open]:!text-primary-idle","group-has-[input:not(:placeholder-shown)]:!text-primary-idle"],error:["group-focus-within:!text-danger-label-active group-data-[state=open]:!text-danger-label-active","group-has-[input:not(:placeholder-shown)]:!text-danger-label-active"],disabled:[]}}});return Y("label",{className:a({className:e,state:n}),htmlFor:t,...r,children:Y("span",{className:"rounded-small-1x bg-layer-2-idle max-w-full",children:o})})}import{jsx as y,jsxs as Pe}from"react/jsx-runtime";function D({className:e,value:t,placeholder:o,renderValue:r,...n}){let{variant:a}=l(),i=we(()=>{let p=r?r(t??""):typeof t=="object"?t?.label:t;return a==="filter"?p:p||o},[t,o,a,r]);return Pe("div",{className:"grid w-full items-center",children:[o&&a==="filter"&&y(k,{children:o}),o&&a==="filter"&&y(d,{className:"invisible col-start-1 row-start-1 self-center",children:o}),y(d,{className:"text-neutral-dark z-10 col-start-1 row-start-1 self-center text-left",children:i}),y("input",{...n,"aria-readonly":!0,className:Ce("pointer-events-none",e),hidden:!0,placeholder:" ",readOnly:!0,value:typeof t=="object"?t?.value??"":t??""})]})}import{twMerge as Wt}from"@xjur-ui/util";import{Fragment as Yt,useMemo as Qt}from"react";import{jsx as eo,jsxs as to}from"react/jsx-runtime";import*as b from"@radix-ui/react-popover";import{Slot as _e}from"@radix-ui/react-slot";import{cx as Se}from"@xjur-ui/util";import{useVirtualizer as ze}from"@tanstack/react-virtual";import{useRef as Ve}from"react";import{createContext as Te}from"react";var f=Te({virtualizer:null,enabled:!1});import{jsx as Q}from"react/jsx-runtime";function N({className:e,asChild:t,children:o,virtualized:r=!1,itemCount:n=0,estimateSize:a=()=>48,overscan:i=5,...p}){let u=t?_e:"div",m=Ve(null),ee=ze({count:n,getScrollElement:()=>m.current,estimateSize:a,overscan:i,enabled:r});return Q(f.Provider,{value:{virtualizer:ee,enabled:r},children:Q(u,{...p,className:Se(e,"rounded-small scrollbar-thin bg-layer-2-idle border-border-layer-2 shadow-elevation-3 z-1000 max-h-[400px] list-none overflow-x-hidden overflow-y-auto border"),ref:m,children:o})})}import{Slot as fo}from"@radix-ui/react-slot";import{cx as go}from"@xjur-ui/util";import{jsx as yo}from"react/jsx-runtime";import{cx as Co}from"@xjur-ui/util";import{jsx as To}from"react/jsx-runtime";import{Slot as Re}from"@radix-ui/react-slot";import{cx as U}from"@xjur-ui/util";import{useContext as ke}from"react";import{jsx as I}from"react/jsx-runtime";function E({className:e,asChild:t,children:o,renderItem:r,...n}){let a=t?Re:"ul",{virtualizer:i,enabled:p}=ke(f);if(p&&i&&r){let u=i.getVirtualItems();return I(a,{...n,className:U("p-small relative flex flex-col",e),style:{height:`${i.getTotalSize()}px`},children:u.map(m=>I("div",{className:"absolute top-0 left-0 w-full","data-index":m.index,ref:i.measureElement,style:{transform:`translateY(${m.start}px)`},children:r(m.index)},m.key))})}return I(a,{...n,className:U("gap-small-1x p-small flex flex-col",e),children:o})}import{Slot as De}from"@radix-ui/react-slot";import{cx as Ne,cva as Ie}from"@xjur-ui/util";import{jsx as Le}from"react/jsx-runtime";var Ee=Ie(["py-medium px-small flex items-center gap-small rounded-small-1x","bg-layer-2-idle text-neutral-dark","hover:bg-layer-2-hover transition-colors duration-100 ease-out","active:bg-layer-2-pressed"],{variants:{size:{md:"h-large-4x",lg:"h-large-7x"},isActive:{true:"bg-primary-alt-active text-primary-label-active hover:bg-primary-alt-hover active:bg-primary-alt-pressed"}},defaultVariants:{size:"md",isActive:!1}});function L({className:e,size:t,isActive:o,asChild:r,...n}){return Le(r?De:"li",{...n,className:Ne(Ee({size:t,isActive:o}),e)})}import{jsx as F}from"react/jsx-runtime";var{content:Me}=s();function O({className:e,sideOffset:t=5,side:o="bottom",align:r="start",children:n,virtualized:a=!1,overscan:i=5,estimateSize:p=()=>32,...u}){let{state:m}=l();return F(b.Portal,{children:F(b.Content,{align:r,className:Me({className:e,state:m}),side:o,sideOffset:t,...u,children:F(N,{estimateSize:p,overscan:i,virtualized:a,children:n})})})}import{jsx as Zo}from"react/jsx-runtime";var{caption:Uo}=s();import{jsx as ar}from"react/jsx-runtime";var{slotText:or}=s();import{jsx as He}from"react/jsx-runtime";function M(e){return He(E,{...e})}import{twMerge as Ae}from"@xjur-ui/util";import{jsx as $e}from"react/jsx-runtime";function H({className:e,value:t,...o}){return $e(L,{className:Ae(e,"cursor-pointer"),value:typeof t=="object"?t?.value:t,...o})}import{twMerge as qe}from"@xjur-ui/util";import{jsx as Be}from"react/jsx-runtime";function A({className:e,...t}){return Be(R,{className:qe(e,"truncate"),...t})}import{jsx as br}from"react/jsx-runtime";import{jsx as Pr}from"react/jsx-runtime";import{createContext as Ge,use as Ke,useCallback as Wr,useMemo as Jr,useState as Yr}from"react";import{DndContext as Ur,closestCenter as Xr,useSensor as Zr,useSensors as jr,PointerSensor as ea,KeyboardSensor as ta,MouseSensor as oa}from"@dnd-kit/core";import{sortableKeyboardCoordinates as aa}from"@dnd-kit/sortable";import{jsx as ia}from"react/jsx-runtime";var We=Ge({events:[],calendarView:"month",selectedDate:new Date,activeEventId:null,disableEventCreationInPast:!0,renderEvent:()=>null,setSelectedDate:()=>{},handleChangeView:()=>{},onEventMove:()=>{},onAddEvent:()=>{}});function X(){let e=Ke(We);if(!e)throw new Error("useFullCalendar must be used within a CalendarRoot");return e}import{jsx as c,jsxs as j}from"react/jsx-runtime";var Z=[{name:"M\xEAs",value:"month"},{name:"Semana",value:"week"},{name:"Dia",value:"day"}];function ma(){let{calendarView:e,handleChangeView:t}=X();return c("div",{className:"w-[94px]",children:j(w,{children:[j(P,{children:[c(D,{name:"calendar-toggle-view",renderValue:o=>Z.find(r=>r.value===o)?.name??"",value:e}),c(T,{className:"text-icon-neutral-3",name:"keyboard_arrow_down"})]}),c(O,{children:c(M,{children:Z.map(o=>c(H,{isActive:e===o.value,value:o.value,onClick:()=>t(o.value),children:c(A,{children:o.name})},o.value))})})]})})}export{ma as CalendarToggleView};
1
+ import*as $ from"@radix-ui/react-popover";import{createContext as te,useContext as oe}from"react";var h=te({state:"normal",variant:"normal",customMask:void 0,mask:void 0});function l(){let e=oe(h);if(!e)throw new Error("useFieldContext must be used within a InputRoot, SelectRoot, DatePickerRoot, etc.");return e}import{tv as re}from"@xjur-ui/util";var s=re({slots:{wrapper:"group flex flex-col gap-small-2x",trigger:["h-large-4x w-auto inline-flex cursor-pointer relative","items-center gap-small rounded-small-1x","py-small_1x-alt px-small","bg-layer-2-idle border border-border-layer-2","group-has-[div[data-slot=input-action-slot]]:rounded-r-none","transition-all duration-200"],content:["group z-1000 max-h-[var(--radix-popover-content-available-height)] max-w-[240px] min-w-[var(--radix-popover-trigger-width)] group-data-[state=open]:rotate-180 transition-transform duration-200"],icon:"size-large text-icon-neutral-3 flex items-center justify-center",slotText:"size-large flex items-center justify-center !text-size-label-md text-neutral-placeholder",caption:"!text-size-body-sm font-normal"},variants:{state:{normal:{trigger:"hover:border-border-layer-3 data-[state=open]:border-primary-idle data-[state=open]:hover:border-primary-idle"},error:{trigger:"border-danger-idle hover:border-danger-idle data-[state=open]:border-danger-idle data-[state=open]:hover:border-danger-idle",caption:"text-danger-label-idle"},disabled:{trigger:"pointer-events-none border-transparent bg-layer-2-idle"}}}});import{jsx as C}from"react/jsx-runtime";var{wrapper:ae}=s();function w({className:e,state:t="normal",defaultOpen:o,variant:r="normal",modal:n,open:a,onOpenChange:i,...p}){return C($.Root,{defaultOpen:o,modal:n,open:a,onOpenChange:i,children:C(h.Provider,{value:{state:t,variant:r},children:C("div",{className:ae({className:e,state:t}),...p})})})}import{tv as ne,twMerge as ie}from"@xjur-ui/util";import*as q from"@radix-ui/react-popover";import{jsx as se}from"react/jsx-runtime";var{trigger:le}=s();function P({className:e,...t}){let{state:o,variant:r}=l(),n=ne({base:["group bg-layer-2-idle"],variants:{state:{normal:["border-border-layer-2 hover:border-border-layer-3 has-[input:not(:placeholder-shown)]:border-primary-idle"],error:["border-danger-idle hover:border-danger-idle"],disabled:["border border-border-layer-2 opacity-60"]}}}),a=ie(le({state:o,className:e}),r==="filter"&&n({state:o,className:e}));return se(q.Trigger,{className:a,disabled:o==="disabled",...t})}import{cx as pe}from"@xjur-ui/util";import{jsx as me}from"react/jsx-runtime";function B({className:e,filled:t=!1,name:o,...r}){return me("span",{...r,className:pe("material-symbols-outlined","text-size-body-lg select-none",e),style:{fontVariationSettings:`'FILL' ${t?1:0}, 'wght' 600, 'GRAD' 0, 'opsz' 20`,...r.style},children:o})}import{jsx as G}from"react/jsx-runtime";var{icon:de}=s();function _({className:e,name:t,orientation:o="left",...r}){let{state:n}=l();return G("div",{className:de({className:e,state:n}),"data-slot":`control-${o}-slot`,...r,children:G(B,{name:t})})}import{twJoin as Ce}from"@xjur-ui/util";import{useMemo as we}from"react";import{Slot as ve}from"@radix-ui/react-slot";import{cva as ge}from"@xjur-ui/util";import{memo as J,useState as xe}from"react";import*as v from"@radix-ui/react-tooltip";import{jsx as T}from"react/jsx-runtime";function ce({delayDuration:e=0,...t}){return T(v.Provider,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function S({...e}){return T(ce,{children:T(v.Root,{"data-slot":"tooltip",...e})})}import*as K from"@radix-ui/react-tooltip";import{jsx as ue}from"react/jsx-runtime";function z({...e}){return ue(K.Trigger,{"data-slot":"tooltip-trigger",...e})}import*as g from"@radix-ui/react-tooltip";import{cx as fe}from"@xjur-ui/util";import{jsx as W}from"react/jsx-runtime";function V({className:e,sideOffset:t=1,variant:o="simple",children:r,...n}){return W(g.Portal,{children:W(g.Content,{className:fe("text-size-body-sm z-99999 text-balance","data-[variant=simple]:bg-alt-2 data-[variant=simple]:text-neutral-label data-[variant=simple]:rounded-small-1x data-[variant=simple]:px-small data-[variant=simple]:py-small-1x","data-[variant=rich]:bg-layer-2-idle data-[variant=rich]:text-neutral-dark data-[variant=rich]:rounded-small data-[variant=rich]:border-border-layer-2 data-[variant=rich]:p-large data-[variant=rich]:border","animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin)",e),"data-slot":"tooltip-content","data-variant":o,sideOffset:t,...n,children:r})})}import{jsx as x,jsxs as be}from"react/jsx-runtime";var ye=ge("",{variants:{variant:{body:"",label:"",title:"",headline:""},size:{"sm-2x":"","sm-1x":"",sm:"",md:"",lg:""},weight:{thin:"font-thin",extraLight:"font-extralight",light:"font-light",normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold",extraBold:"font-extrabold",black:"font-black"}},compoundVariants:[{variant:"body",size:"sm-1x",class:"text-size-body-sm-1x"},{variant:"body",size:"sm",class:"text-size-body-sm"},{variant:"body",size:"md",class:"text-size-body-md"},{variant:"body",size:"lg",class:"text-size-body-lg"},{variant:"label",size:"sm-2x",class:"text-size-label-sm-2x"},{variant:"label",size:"sm-1x",class:"text-size-label-sm-1x"},{variant:"label",size:"sm",class:"text-size-label-sm"},{variant:"label",size:"md",class:"text-size-label-md"},{variant:"label",size:"lg",class:"text-size-label-lg"},{variant:"title",size:"sm",class:"text-size-title-sm"},{variant:"title",size:"md",class:"text-size-title-md"},{variant:"title",size:"lg",class:"text-size-title-lg"},{variant:"headline",size:"sm",class:"text-size-headline-sm"},{variant:"headline",size:"md",class:"text-size-headline-md"},{variant:"headline",size:"lg",class:"text-size-headline-lg"}],defaultVariants:{variant:"body",size:"md",weight:"normal"}}),d=J(({variant:e,size:t,weight:o,asChild:r,className:n,children:a,...i})=>x(r?ve:"span",{className:ye({variant:e,size:t,weight:o,className:n}),...i,children:a}));d.displayName="Typography";var R=J(({children:e,...t})=>{let[o,r]=xe(!1);return be(S,{children:[x(z,{asChild:!0,children:x(d,{onMouseEnter:({currentTarget:a})=>{let i=a.scrollWidth>a.clientWidth;r(i),i?a.style.cursor="pointer":a.style.cursor="text"},...t,children:e})}),o&&x(V,{children:e})]})});R.displayName="TruncatedTypography";import{tv as he}from"@xjur-ui/util";import{jsx as Y}from"react/jsx-runtime";function k({className:e,htmlFor:t,children:o,...r}){let{state:n}=l(),a=he({base:["group inline-block max-w-full truncate text-left","ease animate-in left-small right-small pointer-events-none absolute top-1/2 -translate-y-1/2 transition-all duration-250","text-size-body-md","group-focus-within:-top-[3px]","group-data-[state=open]:-top-[3px]","group-focus-within:text-size-label-sm-1x group-focus-within:font-medium","group-data-[state=open]:text-size-label-sm-1x group-data-[state=open]:font-medium","group-has-[input:not(:placeholder-shown)]:-top-[3px]","group-has-[input:not(:placeholder-shown)]:text-size-label-sm-1x","group-has-[input:not(:placeholder-shown)]:font-medium","group-has-[div[data-slot=control-left-slot]]:left-large-4x","group-has-[div[data-slot=control-left-slot]]:group-focus-within:left-small","group-has-[div[data-slot=control-left-slot]]:group-has-[input:not(:placeholder-shown)]:left-small","group-has-[div[data-slot=control-left-slot]]:group-data-[state=open]:left-small","group-focus-within:animate-in","group-has-[input:not(:placeholder-shown)]:animate-out","data-[disabled=true]:hidden"],variants:{state:{normal:["group-focus-within:!text-primary-idle group-data-[state=open]:!text-primary-idle","group-has-[input:not(:placeholder-shown)]:!text-primary-idle"],error:["group-focus-within:!text-danger-label-active group-data-[state=open]:!text-danger-label-active","group-has-[input:not(:placeholder-shown)]:!text-danger-label-active"],disabled:[]}}});return Y("label",{className:a({className:e,state:n}),htmlFor:t,...r,children:Y("span",{className:"rounded-small-1x bg-layer-2-idle max-w-full",children:o})})}import{jsx as y,jsxs as Pe}from"react/jsx-runtime";function D({className:e,value:t,placeholder:o,renderValue:r,...n}){let{variant:a}=l(),i=we(()=>{let p=r?r(t??""):typeof t=="object"?t?.label:t;return a==="filter"?p:p||o},[t,o,a,r]);return Pe("div",{className:"grid w-full items-center",children:[o&&a==="filter"&&y(k,{children:o}),o&&a==="filter"&&y(d,{className:"invisible col-start-1 row-start-1 self-center",children:o}),y(d,{className:"text-neutral-dark z-10 col-start-1 row-start-1 self-center text-left",children:i}),y("input",{...n,"aria-readonly":!0,className:Ce("pointer-events-none",e),hidden:!0,placeholder:" ",readOnly:!0,value:typeof t=="object"?t?.value??"":t??""})]})}import{twMerge as Wt}from"@xjur-ui/util";import{Fragment as Yt,useMemo as Qt}from"react";import{jsx as eo,jsxs as to}from"react/jsx-runtime";import*as b from"@radix-ui/react-popover";import{Slot as Te}from"@radix-ui/react-slot";import{cx as Se}from"@xjur-ui/util";import{useVirtualizer as ze}from"@tanstack/react-virtual";import{useRef as Ve}from"react";import{createContext as _e}from"react";var f=_e({virtualizer:null,enabled:!1});import{jsx as Q}from"react/jsx-runtime";function N({className:e,asChild:t,children:o,virtualized:r=!1,itemCount:n=0,estimateSize:a=()=>48,overscan:i=5,...p}){let u=t?Te:"div",m=Ve(null),ee=ze({count:n,getScrollElement:()=>m.current,estimateSize:a,overscan:i,enabled:r});return Q(f.Provider,{value:{virtualizer:ee,enabled:r},children:Q(u,{...p,className:Se(e,"rounded-small scrollbar-thin bg-layer-2-idle border-border-layer-2 shadow-elevation-3 z-1000 max-h-[400px] list-none overflow-x-hidden overflow-y-auto border"),ref:m,children:o})})}import{Slot as fo}from"@radix-ui/react-slot";import{cx as go}from"@xjur-ui/util";import{jsx as yo}from"react/jsx-runtime";import{cx as Co}from"@xjur-ui/util";import{jsx as _o}from"react/jsx-runtime";import{Slot as Re}from"@radix-ui/react-slot";import{cx as U}from"@xjur-ui/util";import{useContext as ke}from"react";import{jsx as I}from"react/jsx-runtime";function E({className:e,asChild:t,children:o,renderItem:r,...n}){let a=t?Re:"ul",{virtualizer:i,enabled:p}=ke(f);if(p&&i&&r){let u=i.getVirtualItems();return I(a,{...n,className:U("p-small relative flex flex-col",e),style:{height:`${i.getTotalSize()}px`},children:u.map(m=>I("div",{className:"absolute top-0 left-0 w-full","data-index":m.index,ref:i.measureElement,style:{transform:`translateY(${m.start}px)`},children:r(m.index)},m.key))})}return I(a,{...n,className:U("gap-small-1x p-small flex flex-col",e),children:o})}import{Slot as De}from"@radix-ui/react-slot";import{cx as Ne,cva as Ie}from"@xjur-ui/util";import{jsx as Le}from"react/jsx-runtime";var Ee=Ie(["py-medium px-small flex items-center gap-small rounded-small-1x","bg-layer-2-idle text-neutral-dark","hover:bg-layer-2-hover transition-colors duration-100 ease-out","active:bg-layer-2-pressed"],{variants:{size:{md:"h-large-4x",lg:"h-large-7x"},isActive:{true:"bg-primary-alt-active text-primary-label-active hover:bg-primary-alt-hover active:bg-primary-alt-pressed"}},defaultVariants:{size:"md",isActive:!1}});function L({className:e,size:t,isActive:o,asChild:r,...n}){return Le(r?De:"li",{...n,className:Ne(Ee({size:t,isActive:o}),e)})}import{jsx as F}from"react/jsx-runtime";var{content:Me}=s();function O({className:e,sideOffset:t=5,side:o="bottom",align:r="start",children:n,virtualized:a=!1,overscan:i=5,estimateSize:p=()=>32,...u}){let{state:m}=l();return F(b.Portal,{children:F(b.Content,{align:r,className:Me({className:e,state:m}),side:o,sideOffset:t,...u,children:F(N,{estimateSize:p,overscan:i,virtualized:a,children:n})})})}import{jsx as Zo}from"react/jsx-runtime";var{caption:Uo}=s();import{jsx as ar}from"react/jsx-runtime";var{slotText:or}=s();import{jsx as He}from"react/jsx-runtime";function M(e){return He(E,{...e})}import{twMerge as Ae}from"@xjur-ui/util";import{jsx as $e}from"react/jsx-runtime";function H({className:e,value:t,...o}){return $e(L,{className:Ae(e,"cursor-pointer"),value:typeof t=="object"?t?.value:t,...o})}import{twMerge as qe}from"@xjur-ui/util";import{jsx as Be}from"react/jsx-runtime";function A({className:e,...t}){return Be(R,{className:qe(e,"truncate"),...t})}import{jsx as br}from"react/jsx-runtime";import{jsx as Pr}from"react/jsx-runtime";import{createContext as Ge,use as Ke,useCallback as Wr,useMemo as Jr,useState as Yr}from"react";import{DndContext as Ur,closestCenter as Xr,useSensor as Zr,useSensors as jr,PointerSensor as ea,KeyboardSensor as ta,MouseSensor as oa}from"@dnd-kit/core";import{sortableKeyboardCoordinates as aa}from"@dnd-kit/sortable";import{jsx as ia}from"react/jsx-runtime";var We=Ge({events:[],calendarView:"month",selectedDate:new Date,activeEventId:null,disableEventCreationInPast:!0,renderEvent:()=>null,setSelectedDate:()=>{},handleChangeView:()=>{},onEventMove:()=>{},onAddEvent:()=>{}});function X(){let e=Ke(We);if(!e)throw new Error("useFullCalendar must be used within a CalendarRoot");return e}import{jsx as c,jsxs as j}from"react/jsx-runtime";var Z=[{name:"M\xEAs",value:"month"},{name:"Semana",value:"week"},{name:"Dia",value:"day"}];function ma(){let{calendarView:e,handleChangeView:t}=X();return c("div",{className:"w-[94px]",children:j(w,{children:[j(P,{children:[c(D,{name:"calendar-toggle-view",renderValue:o=>Z.find(r=>r.value===o)?.name??"",value:e}),c(_,{className:"text-icon-neutral-3",name:"keyboard_arrow_down"})]}),c(O,{children:c(M,{children:Z.map(o=>c(H,{isActive:e===o.value,value:o.value,onClick:()=>t(o.value),children:c(A,{children:o.name})},o.value))})})]})})}export{ma as CalendarToggleView};
@@ -1 +1 @@
1
- import{createContext as $e,use as Qe,useCallback as $t,useMemo as Qt,useState as qt}from"react";import{DndContext as Gt,closestCenter as Jt,useSensor as Xt,useSensors as Zt,PointerSensor as jt,KeyboardSensor as er,MouseSensor as tr}from"@dnd-kit/core";import{sortableKeyboardCoordinates as or}from"@dnd-kit/sortable";import{jsx as nr}from"react/jsx-runtime";var qe=$e({events:[],calendarView:"month",selectedDate:new Date,activeEventId:null,disableEventCreationInPast:!0,renderEvent:()=>null,setSelectedDate:()=>{},handleChangeView:()=>{},onEventMove:()=>{},onAddEvent:()=>{}});function c(){let e=Qe(qe);if(!e)throw new Error("useFullCalendar must be used within a CalendarRoot");return e}import{useCallback as Ht,useMemo as Ft}from"react";import{cx as Re}from"@xjur-ui/util";import{Slot as Xe}from"@radix-ui/react-slot";import{cva as Ze}from"@xjur-ui/util";import{memo as fe,useState as je}from"react";import*as M from"@radix-ui/react-tooltip";import{jsx as K}from"react/jsx-runtime";function Ue({delayDuration:e=0,...t}){return K(M.Provider,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function $({...e}){return K(Ue,{children:K(M.Root,{"data-slot":"tooltip",...e})})}import*as ce from"@radix-ui/react-tooltip";import{jsx as Ge}from"react/jsx-runtime";function Q({...e}){return Ge(ce.Trigger,{"data-slot":"tooltip-trigger",...e})}import*as z from"@radix-ui/react-tooltip";import{cx as Je}from"@xjur-ui/util";import{jsx as ue}from"react/jsx-runtime";function q({className:e,sideOffset:t=1,variant:r="simple",children:o,...a}){return ue(z.Portal,{children:ue(z.Content,{className:Je("text-size-body-sm z-99999 text-balance","data-[variant=simple]:bg-alt-2 data-[variant=simple]:text-neutral-label data-[variant=simple]:rounded-small-1x data-[variant=simple]:px-small data-[variant=simple]:py-small-1x","data-[variant=rich]:bg-layer-2-idle data-[variant=rich]:text-neutral-dark data-[variant=rich]:rounded-small data-[variant=rich]:border-border-layer-2 data-[variant=rich]:p-large data-[variant=rich]:border","animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin)",e),"data-slot":"tooltip-content","data-variant":r,sideOffset:t,...a,children:o})})}import{jsx as S,jsxs as rt}from"react/jsx-runtime";var et=Ze("",{variants:{variant:{body:"",label:"",title:"",headline:""},size:{"sm-2x":"","sm-1x":"",sm:"",md:"",lg:""},weight:{thin:"font-thin",extraLight:"font-extralight",light:"font-light",normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold",extraBold:"font-extrabold",black:"font-black"}},compoundVariants:[{variant:"body",size:"sm-1x",class:"text-size-body-sm-1x"},{variant:"body",size:"sm",class:"text-size-body-sm"},{variant:"body",size:"md",class:"text-size-body-md"},{variant:"body",size:"lg",class:"text-size-body-lg"},{variant:"label",size:"sm-2x",class:"text-size-label-sm-2x"},{variant:"label",size:"sm-1x",class:"text-size-label-sm-1x"},{variant:"label",size:"sm",class:"text-size-label-sm"},{variant:"label",size:"md",class:"text-size-label-md"},{variant:"label",size:"lg",class:"text-size-label-lg"},{variant:"title",size:"sm",class:"text-size-title-sm"},{variant:"title",size:"md",class:"text-size-title-md"},{variant:"title",size:"lg",class:"text-size-title-lg"},{variant:"headline",size:"sm",class:"text-size-headline-sm"},{variant:"headline",size:"md",class:"text-size-headline-md"},{variant:"headline",size:"lg",class:"text-size-headline-lg"}],defaultVariants:{variant:"body",size:"md",weight:"normal"}}),d=fe(({variant:e,size:t,weight:r,asChild:o,className:a,children:n,...i})=>S(o?Xe:"span",{className:et({variant:e,size:t,weight:r,className:a}),...i,children:n}));d.displayName="Typography";var tt=fe(({children:e,...t})=>{let[r,o]=je(!1);return rt($,{children:[S(Q,{asChild:!0,children:S(d,{onMouseEnter:({currentTarget:n})=>{let i=n.scrollWidth>n.clientWidth;o(i),i?n.style.cursor="pointer":n.style.cursor="text"},...t,children:e})}),r&&S(q,{children:e})]})});tt.displayName="TruncatedTypography";var ot=Math.pow(10,8)*24*60*60*1e3,_r=-ot;var at=3600;var ye=at*24,Pr=ye*7,nt=ye*365.2425,it=nt/12,Ir=it*3,U=Symbol.for("constructDateFrom");function m(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&U in e?e[U](t):e instanceof Date?new e.constructor(t):new Date(t)}function l(e,t){return m(t||e,e)}function ve(e,t,r){let o=l(e,r?.in);if(isNaN(t))return m(r?.in||e,NaN);if(!t)return o;let a=o.getDate(),n=m(r?.in||e,o.getTime());n.setMonth(o.getMonth()+t+1,0);let i=n.getDate();return a>=i?n:(o.setFullYear(n.getFullYear(),n.getMonth(),a),o)}var st={};function E(){return st}function xe(e,t){let r=E(),o=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=l(e,t?.in),n=a.getDay(),i=(n<o?7:0)+n-o;return a.setDate(a.getDate()-i),a.setHours(0,0,0,0),a}function N(e,...t){let r=m.bind(null,e||t.find(o=>typeof o=="object"));return t.map(r)}function G(e,t){let r=l(e,t?.in);return r.setHours(0,0,0,0),r}function ge(e){return m(e,Date.now())}function P(e,t,r){let[o,a]=N(r?.in,e,t);return+G(o)==+G(a)}function J(e,t){let r=l(e,t?.in),o=r.getMonth();return r.setFullYear(r.getFullYear(),o+1,0),r.setHours(23,59,59,999),r}function he(e,t){let[r,o]=N(e,t.start,t.end);return{start:r,end:o}}function be(e,t){let{start:r,end:o}=he(t?.in,e),a=+r>+o,n=a?+r:+o,i=a?o:r;i.setHours(0,0,0,0);let s=t?.step??1;if(!s)return[];s<0&&(s=-s,a=!a);let p=[];for(;+i<=n;)p.push(m(r,i)),i.setDate(i.getDate()+s),i.setHours(0,0,0,0);return a?p.reverse():p}function Ce(e,t){let r=l(e,t?.in);return r.setDate(1),r.setHours(0,0,0,0),r}function De(e,t){let r=E(),o=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=l(e,t?.in),n=a.getDay(),i=(n<o?-7:0)+6-(n-o);return a.setDate(a.getDate()+i),a.setHours(23,59,59,999),a}function we(e){return+l(e)<Date.now()}function _e(e,t){return P(m(t?.in||e,e),ge(t?.in||e))}function O(e,t,r){let o=l(e,r?.in);return o.setHours(t),o}function Pe(e,t,r){return ve(e,-t,r)}function X(e){return Array.from({length:e},(t,r)=>r)}var I=["Domingo","Segunda","Ter\xE7a","Quarta","Quinta","Sexta","S\xE1bado"],V=Array.from({length:16},(e,t)=>{let r=t+8;return{hour:r,label:`${r.toString().padStart(2,"0")}:00`}});function Ie(e){let t=e.getFullYear(),r=e.getMonth(),o=Ce(e).getDay(),a=J(Pe(e,1)).getDate(),n=J(e).getDate(),i=X(o).map(y=>{y+=1;let h=r-1,b=a-o+y,_=new Date(t,h,b);return{dayOfWeekNumber:_.getDay(),date:_,type:"month"}}),s=X(n).map(y=>{let h=y+1,v=new Date(t,r,h);return{dayOfWeekNumber:v.getDay(),date:v,type:"month"}}),p=7,u=o+n,w=p-u%p%p,Y=X(w).map(y=>{let h=y+1,v=new Date(t,r+1,h);return{dayOfWeekNumber:v.getDay(),date:v,type:"month"}});return[...i,...s,...Y]}function ke(e,t){return e.filter(r=>P(r.eventDate,t))}function k(e){return _e(e)}function Te(e){let t=xe(e,{weekStartsOn:0}),r=De(e,{weekStartsOn:0}),o=be({start:t,end:r}),a=t.getDay(),n=I[a];return o.map(i=>({date:i,dayOfWeekNumber:a,dayOfWeekName:n,fullDate:i,type:"week"}))}function R(e,t,r){return e.filter(o=>P(o.eventDate,t)&&o.eventDate.getHours()===r)}import{Fragment as Et,useMemo as ie}from"react";import{useDroppable as Nt}from"@dnd-kit/core";import{cx as Ot,tv as Vt}from"@xjur-ui/util";import{Slot as lt}from"@radix-ui/react-slot";import{cva as dt,cx as pt}from"@xjur-ui/util";import{jsx as ct}from"react/jsx-runtime";var mt=dt(["outline-none inline-flex items-center justify-center rounded-circle gap-small cursor-pointer disabled:opacity-38 disabled:pointer-events-none transition-colors"],{variants:{size:{md:"py-small_1x-alt px-medium text-size-body-md",sm:"py-small-1x px-small text-size-label-sm",icon_md:"p-small text-size-body-md h-large-4x w-large-4x",icon_sm:"p-small-1x text-size-label-sm h-large-2x w-large-2x"},variant:{primary:"",secondary:"",tertiary:"",destructive:"",outlined:"bg-layer-2-idle border border-border-layer-2 hover:bg-layer-2-hover active:bg-layer-2-pressed"},appearance:{solid:"",ghost:"bg-transparent"}},compoundVariants:[{variant:"primary",appearance:"solid",class:"bg-primary-idle text-neutral-label hover:bg-primary-hover active:bg-primary-pressed"},{variant:"primary",appearance:"ghost",class:"text-primary-idle hover:bg-primary-alt-idle active:bg-primary-alt-pressed"},{variant:"secondary",appearance:"solid",class:"bg-layer-1-hover text-neutral-dark hover:bg-layer-1-pressed active:bg-layer-1-active"},{variant:"secondary",appearance:"ghost",class:"hover:bg-layer-1-hover active:bg-layer-1-pressed"},{variant:"tertiary",appearance:"solid",class:"bg-layer-2-hover text-neutral-dark hover:bg-layer-2-pressed active:bg-layer-2-active"},{variant:"tertiary",appearance:"ghost",class:"hover:bg-layer-2-hover active:bg-layer-2-pressed"},{variant:"destructive",appearance:"solid",class:"bg-danger-idle text-neutral-label hover:bg-danger-hover active:bg-danger-pressed"},{variant:"destructive",appearance:"ghost",class:"text-danger-label-idle hover:bg-danger-alt-idle active:bg-danger-alt-pressed"}],defaultVariants:{size:"md",variant:"primary",appearance:"solid"}});function H({asChild:e,className:t,variant:r="primary",size:o="md",appearance:a="solid",...n}){return ct(e?lt:"button",{className:pt(mt({variant:r,appearance:a,size:o}),t),...n})}import{cx as ut}from"@xjur-ui/util";import{jsx as ft}from"react/jsx-runtime";function Me({className:e,filled:t=!1,name:r,...o}){return ft("span",{...o,className:ut("material-symbols-outlined","text-size-body-lg select-none",e),style:{fontVariationSettings:`'FILL' ${t?1:0}, 'wght' 600, 'GRAD' 0, 'opsz' 20`,...o.style},children:r})}import{Fragment as St}from"react/jsx-runtime";import"react";import*as ze from"@radix-ui/react-dropdown-menu";import{jsx as yt}from"react/jsx-runtime";function Z({...e}){return yt(ze.Root,{"data-slot":"dropdown-menu",...e})}import*as Se from"@radix-ui/react-dropdown-menu";import{jsx as vt}from"react/jsx-runtime";function j({...e}){return vt(Se.Trigger,{"data-slot":"dropdown-menu-trigger",...e})}import*as F from"@radix-ui/react-dropdown-menu";import{cx as Tt}from"@xjur-ui/util";import{Slot as gt}from"@radix-ui/react-slot";import{cx as ht}from"@xjur-ui/util";import{useVirtualizer as bt}from"@tanstack/react-virtual";import{useRef as Ct}from"react";import{createContext as xt}from"react";var T=xt({virtualizer:null,enabled:!1});import{jsx as Ee}from"react/jsx-runtime";function ee({className:e,asChild:t,children:r,virtualized:o=!1,itemCount:a=0,estimateSize:n=()=>48,overscan:i=5,...s}){let p=t?gt:"div",u=Ct(null),w=bt({count:a,getScrollElement:()=>u.current,estimateSize:n,overscan:i,enabled:o});return Ee(T.Provider,{value:{virtualizer:w,enabled:o},children:Ee(p,{...s,className:ht(e,"rounded-small scrollbar-thin bg-layer-2-idle border-border-layer-2 shadow-elevation-3 z-1000 max-h-[400px] list-none overflow-x-hidden overflow-y-auto border"),ref:u,children:r})})}import{Slot as Ko}from"@radix-ui/react-slot";import{cx as Qo}from"@xjur-ui/util";import{jsx as Uo}from"react/jsx-runtime";import{cx as Xo}from"@xjur-ui/util";import{jsx as ea}from"react/jsx-runtime";import{Slot as Dt}from"@radix-ui/react-slot";import{cx as Ne}from"@xjur-ui/util";import{useContext as wt}from"react";import{jsx as te}from"react/jsx-runtime";function re({className:e,asChild:t,children:r,renderItem:o,...a}){let n=t?Dt:"ul",{virtualizer:i,enabled:s}=wt(T);if(s&&i&&o){let p=i.getVirtualItems();return te(n,{...a,className:Ne("p-small relative flex flex-col",e),style:{height:`${i.getTotalSize()}px`},children:p.map(u=>te("div",{className:"absolute top-0 left-0 w-full","data-index":u.index,ref:i.measureElement,style:{transform:`translateY(${u.start}px)`},children:o(u.index)},u.key))})}return te(n,{...a,className:Ne("gap-small-1x p-small flex flex-col",e),children:r})}import{Slot as da}from"@radix-ui/react-slot";import{cx as ma,cva as _t}from"@xjur-ui/util";import{jsx as fa}from"react/jsx-runtime";var ca=_t(["py-medium px-small flex items-center gap-small rounded-small-1x","bg-layer-2-idle text-neutral-dark","hover:bg-layer-2-hover transition-colors duration-100 ease-out","active:bg-layer-2-pressed"],{variants:{size:{md:"h-large-4x",lg:"h-large-7x"},isActive:{true:"bg-primary-alt-active text-primary-label-active hover:bg-primary-alt-hover active:bg-primary-alt-pressed"}},defaultVariants:{size:"md",isActive:!1}});import{jsx as oe}from"react/jsx-runtime";function ae({className:e,sideOffset:t=4,align:r="start",side:o="bottom",children:a,...n}){return oe(F.Portal,{children:oe(F.Content,{align:r,className:Tt("group z-1000 max-h-[var(--radix-popover-content-available-height)] max-w-[240px] min-w-[var(--radix-popover-trigger-width)]",e),"data-slot":"dropdown-menu-content",side:o,sideOffset:t,...n,children:oe(ee,{children:a})})})}import{jsx as Mt}from"react/jsx-runtime";function ne({...e}){return Mt(re,{...e})}import{jsx as Ea}from"react/jsx-runtime";import{cx as Ya}from"@xjur-ui/util";import"react";import*as zt from"@radix-ui/react-separator";import{cx as Ra}from"@xjur-ui/util";import{jsx as Fa}from"react/jsx-runtime";import{jsx as qa}from"react/jsx-runtime";import{jsx as W,jsxs as Oe}from"react/jsx-runtime";function Ve({events:e}){let{renderEvent:t}=c();return Oe(Z,{children:[W(j,{asChild:!0,children:Oe(H,{size:"sm",variant:"outlined",children:["Mais ",e.length]})}),W(ae,{className:"w-[240px]",children:W(ne,{children:e.map(r=>W(St,{children:t?.(r)},r.eventDate.toISOString()))})})]})}import{jsx as f,jsxs as se}from"react/jsx-runtime";var Rt=Vt({base:"group/calendar-cell p-small flex flex-col gap-small-1x w-full bg-layer-2-idle ",variants:{type:{month:"h-[212px]",week:"min-h-[64px] max-h-[212px]",day:"min-h-[64px] max-h-[212px]"}}});function C({cell:e,events:t}){let{date:r,type:o}=e,{renderEvent:a,activeEventId:n,onAddEvent:i,disableEventCreationInPast:s}=c(),p=ie(()=>t.slice(0,2),[t]),u=t.length>=3,{isOver:w,setNodeRef:Y}=Nt({id:`calendar-cell-${o}-${r.toISOString()}`,data:{date:r,type:o}}),y=ie(()=>{let b=t.find(B=>B.id===n);if(!b)return!1;let _=B=>B.toLocaleDateString("pt-BR",{year:"numeric",month:"2-digit",day:"2-digit"}),Be=_(r),Ke=_(b.eventDate);return Be===Ke},[n,r,t]),h=Rt({type:o}),v=ie(()=>s&&we(r)&&!k(r),[s,r]);return se("div",{className:h,"data-slot":"calendar-cell",ref:Y,children:[o==="month"&&f("div",{className:"flex items-center justify-center",children:f("div",{className:Ot("size-large-2x rounded-circle bg-layer-2-idle flex items-center justify-center",k(r)&&"bg-primary-idle text-neutral-label"),children:f(d,{size:"sm",variant:"label",weight:"medium",children:e.date.getDate()})})}),se("div",{className:"gap-small-1x flex flex-col",children:[p.map(b=>f(Et,{children:a(b)},b.id)),w&&p.length<2&&!y&&f("div",{className:"border-border-layer-4 rounded-small-2x h-[68px] w-full border border-dashed"})]}),se("div",{className:"mt-auto flex items-center justify-between",children:[u&&f(Ve,{events:t.slice(2)}),i&&!v&&f("div",{className:"invisible ml-auto transition-opacity duration-100 ease-in-out group-hover/calendar-cell:visible",children:f(H,{size:"icon_sm",variant:"outlined",onClick:()=>i(r),children:f(Me,{className:"text-icon-neutral-3",name:"add"})})})]})]})}import{jsx as D,jsxs as Wt}from"react/jsx-runtime";function le(){let{selectedDate:e,events:t}=c(),r=Ft(()=>Ie(e),[e]),o=Ht(a=>ke(t,a.date),[t]);return Wt("div",{className:"rounded-small-1x scrollbar-hide border-border-layer-2 h-full w-full border",children:[D("div",{className:"bg-layer-2-hover h-large-4x rounded-t-small-1x sticky top-0 grid grid-cols-7","data-slot":"month-header",children:I.map(a=>D("div",{className:Re("p-small b border-border-layer-2 flex items-center justify-center border-r last:border-r-0"),"data-slot":"month-header-weekday",children:D(d,{size:"sm",variant:"label",weight:"medium",children:a})},a))}),D("div",{className:"grid h-full grid-cols-7 overflow-hidden","data-slot":"month-day-cells",children:r.map((a,n)=>{let i=(n+1)%7===0,s=(n+1)%7===1;return D("div",{className:Re("border-border-layer-2 border-t border-r",i&&"pr-small-2x border-r-0",s&&"pl-small-2x"),children:D(C,{cell:a,events:o(a)})},`${a.date.toISOString()}-${n}`)})})]})}import{useCallback as He,useMemo as At}from"react";import{cx as Fe}from"@xjur-ui/util";import{cx as de}from"@xjur-ui/util";import{jsx as pe,jsxs as Lt}from"react/jsx-runtime";function L({date:e,className:t,...r}){let o=k(e),a=e.getDate();return Lt("div",{className:de("p-small gap-small-1x flex w-full flex-1 flex-col items-center",t),"data-slot":"week-day",...r,children:[pe(d,{size:"sm",variant:"label",weight:"medium",children:I[e.getDay()]}),pe("div",{className:de("size-large-2x rounded-circle flex items-center justify-center",o&&"bg-primary-idle"),children:pe(d,{className:de(o&&"text-neutral-label"),size:"sm-1x",variant:"label",weight:"medium",children:a})})]},e.toISOString())}import{jsx as x,jsxs as We}from"react/jsx-runtime";function Le(){let{selectedDate:e,events:t}=c(),r=At(()=>Te(e),[e]),o=He((n,i)=>R(t,n,i),[t]),a=He((n,i)=>({...n,date:O(n.date,i)}),[]);return x("div",{className:"bg-layer-2-hover rounded-small-1x border-border-layer-2 scrollbar-hide h-full w-full border",children:We("div",{className:"flex flex-1 flex-col",children:[x("div",{className:Fe("bg-layer-2-hover sticky top-0 grid [grid-template-columns:64px_repeat(7,1fr)]","[&>*]:border-border-layer-2","[&>*]:border-l"),"data-slot":"week-header",children:r.map((n,i)=>x(L,{date:n.date,style:{gridColumnStart:i+2}},n.date.getDay()))}),x("div",{className:"overflow-hidden",children:V.map(({hour:n,label:i})=>We("div",{className:"flex items-start",children:[x("div",{className:"px-small flex h-full w-[64px] items-start justify-end",children:x(d,{size:"sm-1x",variant:"label",weight:"medium",children:i})}),x("div",{className:Fe("grid flex-1 grid-cols-7","[&>*]:border-border-layer-2","[&>*]:border-t","[&>*]:border-l"),children:r.map(s=>x(C,{cell:a(s,n),events:o(s.date,n)},s.date.toISOString()))})]},n))})]})})}import{useCallback as Ae}from"react";import{cx as Yt}from"@xjur-ui/util";import{jsx as g,jsxs as me}from"react/jsx-runtime";function Ye(){let{selectedDate:e,events:t}=c(),r=Ae((a,n)=>R(t,a,n),[t]),o=Ae((a,n)=>({...a,date:O(a.date,n)}),[]);return g("div",{className:"bg-layer-2-hover rounded-small-1x border-border-layer-2 scrollbar-hide h-full w-full border",children:me("div",{className:"flex flex-1 flex-col",children:[me("div",{className:"bg-layer-2-hover sticky top-0 z-10 flex w-full","data-slot":"week-header",children:[g("div",{className:"w-[64px]"}),g(L,{className:"border-border-layer-2 items-start border-l",date:e})]}),g("div",{className:"overflow-hidden",children:V.map(({hour:a,label:n})=>me("div",{className:"flex items-start",children:[g("div",{className:"px-small flex h-full w-[64px] items-start justify-end",children:g(d,{size:"sm-1x",variant:"label",weight:"medium",children:n})}),g("div",{className:Yt("flex flex-1","[&>*]:border-border-layer-2","[&>*]:border-t","[&>*]:border-l"),children:g(C,{cell:o({date:e,type:"day"},a),events:r(e,a)})})]},a))})]})})}import{jsx as A}from"react/jsx-runtime";function di(){let{calendarView:e}=c();switch(e){case"month":return A(le,{});case"week":return A(Le,{});case"day":return A(Ye,{});default:return A(le,{})}}export{di as CalendarViewRenderer};
1
+ import{createContext as $e,use as Qe,useCallback as $t,useMemo as Qt,useState as qt}from"react";import{DndContext as Gt,closestCenter as Jt,useSensor as Xt,useSensors as Zt,PointerSensor as jt,KeyboardSensor as er,MouseSensor as tr}from"@dnd-kit/core";import{sortableKeyboardCoordinates as or}from"@dnd-kit/sortable";import{jsx as nr}from"react/jsx-runtime";var qe=$e({events:[],calendarView:"month",selectedDate:new Date,activeEventId:null,disableEventCreationInPast:!0,renderEvent:()=>null,setSelectedDate:()=>{},handleChangeView:()=>{},onEventMove:()=>{},onAddEvent:()=>{}});function c(){let e=Qe(qe);if(!e)throw new Error("useFullCalendar must be used within a CalendarRoot");return e}import{useCallback as Ht,useMemo as Ft}from"react";import{cx as Re}from"@xjur-ui/util";import{Slot as Xe}from"@radix-ui/react-slot";import{cva as Ze}from"@xjur-ui/util";import{memo as fe,useState as je}from"react";import*as M from"@radix-ui/react-tooltip";import{jsx as K}from"react/jsx-runtime";function Ue({delayDuration:e=0,...t}){return K(M.Provider,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function $({...e}){return K(Ue,{children:K(M.Root,{"data-slot":"tooltip",...e})})}import*as ce from"@radix-ui/react-tooltip";import{jsx as Ge}from"react/jsx-runtime";function Q({...e}){return Ge(ce.Trigger,{"data-slot":"tooltip-trigger",...e})}import*as z from"@radix-ui/react-tooltip";import{cx as Je}from"@xjur-ui/util";import{jsx as ue}from"react/jsx-runtime";function q({className:e,sideOffset:t=1,variant:r="simple",children:o,...a}){return ue(z.Portal,{children:ue(z.Content,{className:Je("text-size-body-sm z-99999 text-balance","data-[variant=simple]:bg-alt-2 data-[variant=simple]:text-neutral-label data-[variant=simple]:rounded-small-1x data-[variant=simple]:px-small data-[variant=simple]:py-small-1x","data-[variant=rich]:bg-layer-2-idle data-[variant=rich]:text-neutral-dark data-[variant=rich]:rounded-small data-[variant=rich]:border-border-layer-2 data-[variant=rich]:p-large data-[variant=rich]:border","animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin)",e),"data-slot":"tooltip-content","data-variant":r,sideOffset:t,...a,children:o})})}import{jsx as S,jsxs as rt}from"react/jsx-runtime";var et=Ze("",{variants:{variant:{body:"",label:"",title:"",headline:""},size:{"sm-2x":"","sm-1x":"",sm:"",md:"",lg:""},weight:{thin:"font-thin",extraLight:"font-extralight",light:"font-light",normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold",extraBold:"font-extrabold",black:"font-black"}},compoundVariants:[{variant:"body",size:"sm-1x",class:"text-size-body-sm-1x"},{variant:"body",size:"sm",class:"text-size-body-sm"},{variant:"body",size:"md",class:"text-size-body-md"},{variant:"body",size:"lg",class:"text-size-body-lg"},{variant:"label",size:"sm-2x",class:"text-size-label-sm-2x"},{variant:"label",size:"sm-1x",class:"text-size-label-sm-1x"},{variant:"label",size:"sm",class:"text-size-label-sm"},{variant:"label",size:"md",class:"text-size-label-md"},{variant:"label",size:"lg",class:"text-size-label-lg"},{variant:"title",size:"sm",class:"text-size-title-sm"},{variant:"title",size:"md",class:"text-size-title-md"},{variant:"title",size:"lg",class:"text-size-title-lg"},{variant:"headline",size:"sm",class:"text-size-headline-sm"},{variant:"headline",size:"md",class:"text-size-headline-md"},{variant:"headline",size:"lg",class:"text-size-headline-lg"}],defaultVariants:{variant:"body",size:"md",weight:"normal"}}),d=fe(({variant:e,size:t,weight:r,asChild:o,className:a,children:n,...i})=>S(o?Xe:"span",{className:et({variant:e,size:t,weight:r,className:a}),...i,children:n}));d.displayName="Typography";var tt=fe(({children:e,...t})=>{let[r,o]=je(!1);return rt($,{children:[S(Q,{asChild:!0,children:S(d,{onMouseEnter:({currentTarget:n})=>{let i=n.scrollWidth>n.clientWidth;o(i),i?n.style.cursor="pointer":n.style.cursor="text"},...t,children:e})}),r&&S(q,{children:e})]})});tt.displayName="TruncatedTypography";var ot=Math.pow(10,8)*24*60*60*1e3,_r=-ot;var at=3600;var ye=at*24,Pr=ye*7,nt=ye*365.2425,it=nt/12,kr=it*3,U=Symbol.for("constructDateFrom");function m(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&U in e?e[U](t):e instanceof Date?new e.constructor(t):new Date(t)}function l(e,t){return m(t||e,e)}function ve(e,t,r){let o=l(e,r?.in);if(isNaN(t))return m(r?.in||e,NaN);if(!t)return o;let a=o.getDate(),n=m(r?.in||e,o.getTime());n.setMonth(o.getMonth()+t+1,0);let i=n.getDate();return a>=i?n:(o.setFullYear(n.getFullYear(),n.getMonth(),a),o)}var st={};function E(){return st}function xe(e,t){let r=E(),o=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=l(e,t?.in),n=a.getDay(),i=(n<o?7:0)+n-o;return a.setDate(a.getDate()-i),a.setHours(0,0,0,0),a}function N(e,...t){let r=m.bind(null,e||t.find(o=>typeof o=="object"));return t.map(r)}function G(e,t){let r=l(e,t?.in);return r.setHours(0,0,0,0),r}function ge(e){return m(e,Date.now())}function P(e,t,r){let[o,a]=N(r?.in,e,t);return+G(o)==+G(a)}function J(e,t){let r=l(e,t?.in),o=r.getMonth();return r.setFullYear(r.getFullYear(),o+1,0),r.setHours(23,59,59,999),r}function he(e,t){let[r,o]=N(e,t.start,t.end);return{start:r,end:o}}function be(e,t){let{start:r,end:o}=he(t?.in,e),a=+r>+o,n=a?+r:+o,i=a?o:r;i.setHours(0,0,0,0);let s=t?.step??1;if(!s)return[];s<0&&(s=-s,a=!a);let p=[];for(;+i<=n;)p.push(m(r,i)),i.setDate(i.getDate()+s),i.setHours(0,0,0,0);return a?p.reverse():p}function Ce(e,t){let r=l(e,t?.in);return r.setDate(1),r.setHours(0,0,0,0),r}function De(e,t){let r=E(),o=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=l(e,t?.in),n=a.getDay(),i=(n<o?-7:0)+6-(n-o);return a.setDate(a.getDate()+i),a.setHours(23,59,59,999),a}function we(e){return+l(e)<Date.now()}function _e(e,t){return P(m(t?.in||e,e),ge(t?.in||e))}function O(e,t,r){let o=l(e,r?.in);return o.setHours(t),o}function Pe(e,t,r){return ve(e,-t,r)}function X(e){return Array.from({length:e},(t,r)=>r)}var k=["Domingo","Segunda","Ter\xE7a","Quarta","Quinta","Sexta","S\xE1bado"],V=Array.from({length:16},(e,t)=>{let r=t+8;return{hour:r,label:`${r.toString().padStart(2,"0")}:00`}});function ke(e){let t=e.getFullYear(),r=e.getMonth(),o=Ce(e).getDay(),a=J(Pe(e,1)).getDate(),n=J(e).getDate(),i=X(o).map(y=>{y+=1;let h=r-1,b=a-o+y,_=new Date(t,h,b);return{dayOfWeekNumber:_.getDay(),date:_,type:"month"}}),s=X(n).map(y=>{let h=y+1,v=new Date(t,r,h);return{dayOfWeekNumber:v.getDay(),date:v,type:"month"}}),p=7,u=o+n,w=p-u%p%p,Y=X(w).map(y=>{let h=y+1,v=new Date(t,r+1,h);return{dayOfWeekNumber:v.getDay(),date:v,type:"month"}});return[...i,...s,...Y]}function Ie(e,t){return e.filter(r=>P(r.eventDate,t))}function I(e){return _e(e)}function Te(e){let t=xe(e,{weekStartsOn:0}),r=De(e,{weekStartsOn:0}),o=be({start:t,end:r}),a=t.getDay(),n=k[a];return o.map(i=>({date:i,dayOfWeekNumber:a,dayOfWeekName:n,fullDate:i,type:"week"}))}function R(e,t,r){return e.filter(o=>P(o.eventDate,t)&&o.eventDate.getHours()===r)}import{Fragment as Et,useMemo as ie}from"react";import{useDroppable as Nt}from"@dnd-kit/core";import{cx as Ot,tv as Vt}from"@xjur-ui/util";import{Slot as lt}from"@radix-ui/react-slot";import{cva as dt,cx as pt}from"@xjur-ui/util";import{jsx as ct}from"react/jsx-runtime";var mt=dt(["outline-none inline-flex items-center justify-center rounded-circle gap-small cursor-pointer disabled:opacity-38 disabled:pointer-events-none transition-colors"],{variants:{size:{md:"py-small_1x-alt px-medium text-size-body-md",sm:"py-small-1x px-small text-size-label-sm",icon_md:"p-small text-size-body-md h-large-4x w-large-4x",icon_sm:"p-small-1x text-size-label-sm h-large-2x w-large-2x"},variant:{primary:"",secondary:"",tertiary:"",destructive:"",outlined:"bg-layer-2-idle border border-border-layer-2 hover:bg-layer-2-hover active:bg-layer-2-pressed"},appearance:{solid:"",ghost:"bg-transparent"}},compoundVariants:[{variant:"primary",appearance:"solid",class:"bg-primary-idle text-neutral-label hover:bg-primary-hover active:bg-primary-pressed"},{variant:"primary",appearance:"ghost",class:"text-primary-idle hover:bg-primary-alt-idle active:bg-primary-alt-pressed"},{variant:"secondary",appearance:"solid",class:"bg-layer-1-hover text-neutral-dark hover:bg-layer-1-pressed active:bg-layer-1-active"},{variant:"secondary",appearance:"ghost",class:"hover:bg-layer-1-hover active:bg-layer-1-pressed"},{variant:"tertiary",appearance:"solid",class:"bg-layer-2-hover text-neutral-dark hover:bg-layer-2-pressed active:bg-layer-2-active"},{variant:"tertiary",appearance:"ghost",class:"hover:bg-layer-2-hover active:bg-layer-2-pressed"},{variant:"destructive",appearance:"solid",class:"bg-danger-idle text-neutral-label hover:bg-danger-hover active:bg-danger-pressed"},{variant:"destructive",appearance:"ghost",class:"text-danger-label-idle hover:bg-danger-alt-idle active:bg-danger-alt-pressed"}],defaultVariants:{size:"md",variant:"primary",appearance:"solid"}});function H({asChild:e,className:t,variant:r="primary",size:o="md",appearance:a="solid",...n}){return ct(e?lt:"button",{className:pt(mt({variant:r,appearance:a,size:o}),t),...n})}import{cx as ut}from"@xjur-ui/util";import{jsx as ft}from"react/jsx-runtime";function Me({className:e,filled:t=!1,name:r,...o}){return ft("span",{...o,className:ut("material-symbols-outlined","text-size-body-lg select-none",e),style:{fontVariationSettings:`'FILL' ${t?1:0}, 'wght' 600, 'GRAD' 0, 'opsz' 20`,...o.style},children:r})}import{Fragment as St}from"react/jsx-runtime";import"react";import*as ze from"@radix-ui/react-dropdown-menu";import{jsx as yt}from"react/jsx-runtime";function Z({...e}){return yt(ze.Root,{"data-slot":"dropdown-menu",...e})}import*as Se from"@radix-ui/react-dropdown-menu";import{jsx as vt}from"react/jsx-runtime";function j({...e}){return vt(Se.Trigger,{"data-slot":"dropdown-menu-trigger",...e})}import*as F from"@radix-ui/react-dropdown-menu";import{cx as Tt}from"@xjur-ui/util";import{Slot as gt}from"@radix-ui/react-slot";import{cx as ht}from"@xjur-ui/util";import{useVirtualizer as bt}from"@tanstack/react-virtual";import{useRef as Ct}from"react";import{createContext as xt}from"react";var T=xt({virtualizer:null,enabled:!1});import{jsx as Ee}from"react/jsx-runtime";function ee({className:e,asChild:t,children:r,virtualized:o=!1,itemCount:a=0,estimateSize:n=()=>48,overscan:i=5,...s}){let p=t?gt:"div",u=Ct(null),w=bt({count:a,getScrollElement:()=>u.current,estimateSize:n,overscan:i,enabled:o});return Ee(T.Provider,{value:{virtualizer:w,enabled:o},children:Ee(p,{...s,className:ht(e,"rounded-small scrollbar-thin bg-layer-2-idle border-border-layer-2 shadow-elevation-3 z-1000 max-h-[400px] list-none overflow-x-hidden overflow-y-auto border"),ref:u,children:r})})}import{Slot as Ko}from"@radix-ui/react-slot";import{cx as Qo}from"@xjur-ui/util";import{jsx as Uo}from"react/jsx-runtime";import{cx as Xo}from"@xjur-ui/util";import{jsx as ea}from"react/jsx-runtime";import{Slot as Dt}from"@radix-ui/react-slot";import{cx as Ne}from"@xjur-ui/util";import{useContext as wt}from"react";import{jsx as te}from"react/jsx-runtime";function re({className:e,asChild:t,children:r,renderItem:o,...a}){let n=t?Dt:"ul",{virtualizer:i,enabled:s}=wt(T);if(s&&i&&o){let p=i.getVirtualItems();return te(n,{...a,className:Ne("p-small relative flex flex-col",e),style:{height:`${i.getTotalSize()}px`},children:p.map(u=>te("div",{className:"absolute top-0 left-0 w-full","data-index":u.index,ref:i.measureElement,style:{transform:`translateY(${u.start}px)`},children:o(u.index)},u.key))})}return te(n,{...a,className:Ne("gap-small-1x p-small flex flex-col",e),children:r})}import{Slot as da}from"@radix-ui/react-slot";import{cx as ma,cva as _t}from"@xjur-ui/util";import{jsx as fa}from"react/jsx-runtime";var ca=_t(["py-medium px-small flex items-center gap-small rounded-small-1x","bg-layer-2-idle text-neutral-dark","hover:bg-layer-2-hover transition-colors duration-100 ease-out","active:bg-layer-2-pressed"],{variants:{size:{md:"h-large-4x",lg:"h-large-7x"},isActive:{true:"bg-primary-alt-active text-primary-label-active hover:bg-primary-alt-hover active:bg-primary-alt-pressed"}},defaultVariants:{size:"md",isActive:!1}});import{jsx as oe}from"react/jsx-runtime";function ae({className:e,sideOffset:t=4,align:r="start",side:o="bottom",children:a,...n}){return oe(F.Portal,{children:oe(F.Content,{align:r,className:Tt("group z-1000 max-h-[var(--radix-popover-content-available-height)] max-w-[240px] min-w-[var(--radix-popover-trigger-width)]",e),"data-slot":"dropdown-menu-content",side:o,sideOffset:t,...n,children:oe(ee,{children:a})})})}import{jsx as Mt}from"react/jsx-runtime";function ne({...e}){return Mt(re,{...e})}import{jsx as Ea}from"react/jsx-runtime";import{cx as Ya}from"@xjur-ui/util";import"react";import*as zt from"@radix-ui/react-separator";import{cx as Ra}from"@xjur-ui/util";import{jsx as Fa}from"react/jsx-runtime";import{jsx as qa}from"react/jsx-runtime";import{jsx as W,jsxs as Oe}from"react/jsx-runtime";function Ve({events:e}){let{renderEvent:t}=c();return Oe(Z,{children:[W(j,{asChild:!0,children:Oe(H,{size:"sm",variant:"outlined",children:["Mais ",e.length]})}),W(ae,{className:"w-[240px]",children:W(ne,{children:e.map(r=>W(St,{children:t?.(r)},r.eventDate.toISOString()))})})]})}import{jsx as f,jsxs as se}from"react/jsx-runtime";var Rt=Vt({base:"group/calendar-cell p-small flex flex-col gap-small-1x w-full bg-layer-2-idle ",variants:{type:{month:"h-[212px]",week:"min-h-[64px] max-h-[212px]",day:"min-h-[64px] max-h-[212px]"}}});function C({cell:e,events:t}){let{date:r,type:o}=e,{renderEvent:a,activeEventId:n,onAddEvent:i,disableEventCreationInPast:s}=c(),p=ie(()=>t.slice(0,2),[t]),u=t.length>=3,{isOver:w,setNodeRef:Y}=Nt({id:`calendar-cell-${o}-${r.toISOString()}`,data:{date:r,type:o}}),y=ie(()=>{let b=t.find(B=>B.id===n);if(!b)return!1;let _=B=>B.toLocaleDateString("pt-BR",{year:"numeric",month:"2-digit",day:"2-digit"}),Be=_(r),Ke=_(b.eventDate);return Be===Ke},[n,r,t]),h=Rt({type:o}),v=ie(()=>s&&we(r)&&!I(r),[s,r]);return se("div",{className:h,"data-slot":"calendar-cell",ref:Y,children:[o==="month"&&f("div",{className:"flex items-center justify-center",children:f("div",{className:Ot("size-large-2x rounded-circle bg-layer-2-idle flex items-center justify-center",I(r)&&"bg-primary-idle text-neutral-label"),children:f(d,{size:"sm",variant:"label",weight:"medium",children:e.date.getDate()})})}),se("div",{className:"gap-small-1x flex flex-col",children:[p.map(b=>f(Et,{children:a(b)},b.id)),w&&p.length<2&&!y&&f("div",{className:"border-border-layer-4 rounded-small-2x h-[68px] w-full border border-dashed"})]}),se("div",{className:"mt-auto flex items-center justify-between",children:[u&&f(Ve,{events:t.slice(2)}),i&&!v&&f("div",{className:"invisible ml-auto transition-opacity duration-100 ease-in-out group-hover/calendar-cell:visible",children:f(H,{size:"icon_sm",variant:"outlined",onClick:()=>i(r),children:f(Me,{className:"text-icon-neutral-3",name:"add"})})})]})]})}import{jsx as D,jsxs as Wt}from"react/jsx-runtime";function le(){let{selectedDate:e,events:t}=c(),r=Ft(()=>ke(e),[e]),o=Ht(a=>Ie(t,a.date),[t]);return Wt("div",{className:"rounded-small-1x scrollbar-hide border-border-layer-2 h-full w-full border",children:[D("div",{className:"bg-layer-2-hover h-large-4x rounded-t-small-1x sticky top-0 grid grid-cols-7","data-slot":"month-header",children:k.map(a=>D("div",{className:Re("p-small b border-border-layer-2 flex items-center justify-center border-r last:border-r-0"),"data-slot":"month-header-weekday",children:D(d,{size:"sm",variant:"label",weight:"medium",children:a})},a))}),D("div",{className:"grid h-full grid-cols-7 overflow-hidden","data-slot":"month-day-cells",children:r.map((a,n)=>{let i=(n+1)%7===0,s=(n+1)%7===1;return D("div",{className:Re("border-border-layer-2 border-t border-r",i&&"pr-small-2x border-r-0",s&&"pl-small-2x"),children:D(C,{cell:a,events:o(a)})},`${a.date.toISOString()}-${n}`)})})]})}import{useCallback as He,useMemo as At}from"react";import{cx as Fe}from"@xjur-ui/util";import{cx as de}from"@xjur-ui/util";import{jsx as pe,jsxs as Lt}from"react/jsx-runtime";function L({date:e,className:t,...r}){let o=I(e),a=e.getDate();return Lt("div",{className:de("p-small gap-small-1x flex w-full flex-1 flex-col items-center",t),"data-slot":"week-day",...r,children:[pe(d,{size:"sm",variant:"label",weight:"medium",children:k[e.getDay()]}),pe("div",{className:de("size-large-2x rounded-circle flex items-center justify-center",o&&"bg-primary-idle"),children:pe(d,{className:de(o&&"text-neutral-label"),size:"sm-1x",variant:"label",weight:"medium",children:a})})]},e.toISOString())}import{jsx as x,jsxs as We}from"react/jsx-runtime";function Le(){let{selectedDate:e,events:t}=c(),r=At(()=>Te(e),[e]),o=He((n,i)=>R(t,n,i),[t]),a=He((n,i)=>({...n,date:O(n.date,i)}),[]);return x("div",{className:"bg-layer-2-hover rounded-small-1x border-border-layer-2 scrollbar-hide h-full w-full border",children:We("div",{className:"flex flex-1 flex-col",children:[x("div",{className:Fe("bg-layer-2-hover sticky top-0 grid [grid-template-columns:64px_repeat(7,1fr)]","[&>*]:border-border-layer-2","[&>*]:border-l"),"data-slot":"week-header",children:r.map((n,i)=>x(L,{date:n.date,style:{gridColumnStart:i+2}},n.date.getDay()))}),x("div",{className:"overflow-hidden",children:V.map(({hour:n,label:i})=>We("div",{className:"flex items-start",children:[x("div",{className:"px-small flex h-full w-[64px] items-start justify-end",children:x(d,{size:"sm-1x",variant:"label",weight:"medium",children:i})}),x("div",{className:Fe("grid flex-1 grid-cols-7","[&>*]:border-border-layer-2","[&>*]:border-t","[&>*]:border-l"),children:r.map(s=>x(C,{cell:a(s,n),events:o(s.date,n)},s.date.toISOString()))})]},n))})]})})}import{useCallback as Ae}from"react";import{cx as Yt}from"@xjur-ui/util";import{jsx as g,jsxs as me}from"react/jsx-runtime";function Ye(){let{selectedDate:e,events:t}=c(),r=Ae((a,n)=>R(t,a,n),[t]),o=Ae((a,n)=>({...a,date:O(a.date,n)}),[]);return g("div",{className:"bg-layer-2-hover rounded-small-1x border-border-layer-2 scrollbar-hide h-full w-full border",children:me("div",{className:"flex flex-1 flex-col",children:[me("div",{className:"bg-layer-2-hover sticky top-0 z-10 flex w-full","data-slot":"week-header",children:[g("div",{className:"w-[64px]"}),g(L,{className:"border-border-layer-2 items-start border-l",date:e})]}),g("div",{className:"overflow-hidden",children:V.map(({hour:a,label:n})=>me("div",{className:"flex items-start",children:[g("div",{className:"px-small flex h-full w-[64px] items-start justify-end",children:g(d,{size:"sm-1x",variant:"label",weight:"medium",children:n})}),g("div",{className:Yt("flex flex-1","[&>*]:border-border-layer-2","[&>*]:border-t","[&>*]:border-l"),children:g(C,{cell:o({date:e,type:"day"},a),events:r(e,a)})})]},a))})]})})}import{jsx as A}from"react/jsx-runtime";function di(){let{calendarView:e}=c();switch(e){case"month":return A(le,{});case"week":return A(Le,{});case"day":return A(Ye,{});default:return A(le,{})}}export{di as CalendarViewRenderer};
@@ -1 +1 @@
1
- import{cx as n}from"@xjur-ui/util";var a=["account_balance","assignment","task","ad_units","add_a_photo","add","adjust","archive","arrow_downward_alt","arrow_downward","arrow_drop_down","arrow_drop_up","arrow_split","arrow_upward_alt","arrow_upward","attach_file","attach_money","autorenew","brightness_1","calendar_today","call","chat_bubble","check_circle","check","chevron_left","chevron_right","close","collapse_all","contacts","content_copy","dangerous","dashboard","delete","download","draft","drafts","drag_handle","drag_indicator","edit_document","edit_square","edit","error","expand_all","expand_content","file_export","filter_alt","filter_list","first_page","flag_2","folder_open","folder","format_bold","format_italic","format_italic","format_size","format_strikethrough","gavel","group","headphones","help","hourglass_bottom","imagesmode","import_contacts","inbox","info","inventory_2","keep","keep","keyboard_arrow_down","keyboard_arrow_up","keyboard_return","label_off","label","last_page","left_panel_close","left_panel_open","link_off","link","linked_services","list","location_on","lock","logout","mail","menu","mic","more_vert","notifications","numbers","person_add","person_off","person","play_circle","progress_activity","question_mark","radio_button_unchecked","refresh","remove","reply","right_panel_close","right_panel_open","schedule","search","sell","send","settings","share","smart_display","star","star","swap_vert","thumb_down","thumb_up","tune","unarchive","undo","upload","verified_user","videocam","view_list","view_module","view_object_track","visibility_off","visibility","warning","wifi_2_bar","wifi_off","wifi","work","workspaces","article","id_card","badge","home","save","code","favorite","analytics","reports","event","account_circle","history","security","bar_chart","category","format_underlined","format_list_bulleted","format_list_numbered","redo","more_horiz","grid_view","open_in_new"];import{jsx as i}from"react/jsx-runtime";function l({className:o,filled:r=!1,name:t,...e}){return i("span",{...e,className:n("material-symbols-outlined","text-size-body-lg select-none",o),style:{fontVariationSettings:`'FILL' ${r?1:0}, 'wght' 600, 'GRAD' 0, 'opsz' 20`,...e.style},children:t})}export{l as Icon,a as icons};
1
+ import{cx as n}from"@xjur-ui/util";var a=["account_balance","assignment","task","ad_units","add_a_photo","add","adjust","archive","arrow_downward_alt","arrow_downward","arrow_drop_down","arrow_drop_up","arrow_split","arrow_upward_alt","arrow_upward","attach_file","attach_money","autorenew","brightness_1","calendar_today","call","chat_bubble","check_circle","check","chevron_left","chevron_right","close","collapse_all","contacts","content_copy","dangerous","dashboard","delete","download","draft","drafts","drag_handle","drag_indicator","edit_document","edit_square","edit","error","expand_all","expand_content","file_export","filter_alt","filter_list","first_page","flag_2","folder_open","folder","format_bold","format_italic","format_italic","format_size","format_strikethrough","gavel","group","headphones","help","hourglass_bottom","imagesmode","import_contacts","inbox","info","inventory_2","keep","keep","keyboard_arrow_down","keyboard_arrow_up","keyboard_return","label_off","label","last_page","left_panel_close","left_panel_open","link_off","link","linked_services","list","location_on","lock","logout","mail","menu","mic","more_vert","notifications","numbers","person_add","person_off","person","play_circle","progress_activity","question_mark","radio_button_unchecked","refresh","remove","reply","right_panel_close","right_panel_open","schedule","search","sell","send","settings","share","smart_display","star","star","swap_vert","thumb_down","thumb_up","tune","unarchive","undo","upload","verified_user","videocam","view_list","view_module","view_object_track","visibility_off","visibility","warning","wifi_2_bar","wifi_off","wifi","work","workspaces","article","id_card","badge","home","save","code","favorite","analytics","reports","event","account_circle","history","security","bar_chart","category","format_underlined","format_list_bulleted","format_list_numbered","redo","more_horiz","grid_view","open_in_new","folder_check_2"];import{jsx as i}from"react/jsx-runtime";function s({className:o,filled:r=!1,name:t,...e}){return i("span",{...e,className:n("material-symbols-outlined","text-size-body-lg select-none",o),style:{fontVariationSettings:`'FILL' ${r?1:0}, 'wght' 600, 'GRAD' 0, 'opsz' 20`,...e.style},children:t})}export{s as Icon,a as icons};
@@ -1 +1 @@
1
- import{cx as Se}from"@xjur-ui/util";import{jsx as ne}from"react/jsx-runtime";function Vt({className:t,...e}){return ne("div",{className:"text-size-body-md scrollbar-thin relative w-full overflow-hidden transition-all hover:overflow-x-auto","data-slot":"table-container",children:ne("table",{className:Se("w-full caption-bottom",t),"data-slot":"table",...e})})}import{cx as ke}from"@xjur-ui/util";import{jsx as _e}from"react/jsx-runtime";function Ft({className:t,...e}){return _e("tbody",{className:ke("[&_tr]:border-border-layer-2 [&_tr]:border-b [&_tr:last-child]:border-0",t),"data-slot":"table-body",...e})}import{cx as Re}from"@xjur-ui/util";import{jsx as ze}from"react/jsx-runtime";function At({className:t,...e}){return ze("td",{className:Re("px-small py-none h-large-8x text-left align-middle whitespace-nowrap",t),"data-slot":"table-cell",...e})}import{cx as Ne}from"@xjur-ui/util";import{jsx as Ve}from"react/jsx-runtime";function qt({className:t,...e}){return Ve("tfoot",{className:Ne("border-border-layer-2 border-t font-medium [&>tr]:last:border-b-0",t),"data-slot":"table-footer",...e})}import{cx as Ie}from"@xjur-ui/util";import{jsx as Le}from"react/jsx-runtime";function Kt({className:t,...e}){return Le("thead",{className:Ie("group/table-header [&_tr]:border-border-layer-2 hover:bg-layer-2-hover [&_tr]:border-b",t),"data-slot":"table-header",...e})}import{cx as se}from"@xjur-ui/util";import{jsx as pe}from"react/jsx-runtime";function Zt({className:t,...e}){return pe("th",{className:se("group/th text-neutral-placeholder text-size-label-sm h-large-4x py-small-1x px-small text-left align-middle font-medium whitespace-nowrap","relative","animate-in fade-in duration-200 ease-in",t),"data-slot":"table-head",...e})}function jt({className:t,...e}){return pe("div",{className:se("gap-small pr-large-3x relative flex w-fit items-center",t),...e})}import le,{useState as we}from"react";import{cx as E}from"@xjur-ui/util";import*as I from"@radix-ui/react-checkbox";import{cx as We}from"@xjur-ui/util";import{cx as Oe}from"@xjur-ui/util";import{jsx as Fe}from"react/jsx-runtime";function C({className:t,filled:e=!1,name:r,...o}){return Fe("span",{...o,className:Oe("material-symbols-outlined","text-size-body-lg select-none",t),style:{fontVariationSettings:`'FILL' ${e?1:0}, 'wght' 600, 'GRAD' 0, 'opsz' 20`,...o.style},children:r})}import{Slot as Ae}from"@radix-ui/react-slot";import{cva as Ge}from"@xjur-ui/util";import{memo as ce,useState as Be}from"react";import*as z from"@radix-ui/react-tooltip";import{jsx as H}from"react/jsx-runtime";function Me({delayDuration:t=0,...e}){return H(z.Provider,{"data-slot":"tooltip-provider",delayDuration:t,...e})}function A({...t}){return H(Me,{children:H(z.Root,{"data-slot":"tooltip",...t})})}import*as de from"@radix-ui/react-tooltip";import{jsx as Ee}from"react/jsx-runtime";function G({...t}){return Ee(de.Trigger,{"data-slot":"tooltip-trigger",...t})}import*as N from"@radix-ui/react-tooltip";import{cx as He}from"@xjur-ui/util";import{jsx as me}from"react/jsx-runtime";function B({className:t,sideOffset:e=1,variant:r="simple",children:o,...i}){return me(N.Portal,{children:me(N.Content,{className:He("text-size-body-sm z-99999 text-balance","data-[variant=simple]:bg-alt-2 data-[variant=simple]:text-neutral-label data-[variant=simple]:rounded-small-1x data-[variant=simple]:px-small data-[variant=simple]:py-small-1x","data-[variant=rich]:bg-layer-2-idle data-[variant=rich]:text-neutral-dark data-[variant=rich]:rounded-small data-[variant=rich]:border-border-layer-2 data-[variant=rich]:p-large data-[variant=rich]:border","animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin)",t),"data-slot":"tooltip-content","data-variant":r,sideOffset:e,...i,children:o})})}import{jsx as V,jsxs as qe}from"react/jsx-runtime";var $e=Ge("",{variants:{variant:{body:"",label:"",title:"",headline:""},size:{"sm-2x":"","sm-1x":"",sm:"",md:"",lg:""},weight:{thin:"font-thin",extraLight:"font-extralight",light:"font-light",normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold",extraBold:"font-extrabold",black:"font-black"}},compoundVariants:[{variant:"body",size:"sm-1x",class:"text-size-body-sm-1x"},{variant:"body",size:"sm",class:"text-size-body-sm"},{variant:"body",size:"md",class:"text-size-body-md"},{variant:"body",size:"lg",class:"text-size-body-lg"},{variant:"label",size:"sm-2x",class:"text-size-label-sm-2x"},{variant:"label",size:"sm-1x",class:"text-size-label-sm-1x"},{variant:"label",size:"sm",class:"text-size-label-sm"},{variant:"label",size:"md",class:"text-size-label-md"},{variant:"label",size:"lg",class:"text-size-label-lg"},{variant:"title",size:"sm",class:"text-size-title-sm"},{variant:"title",size:"md",class:"text-size-title-md"},{variant:"title",size:"lg",class:"text-size-title-lg"},{variant:"headline",size:"sm",class:"text-size-headline-sm"},{variant:"headline",size:"md",class:"text-size-headline-md"},{variant:"headline",size:"lg",class:"text-size-headline-lg"}],defaultVariants:{variant:"body",size:"md",weight:"normal"}}),f=ce(({variant:t,size:e,weight:r,asChild:o,className:i,children:l,...a})=>V(o?Ae:"span",{className:$e({variant:t,size:e,weight:r,className:i}),...a,children:l}));f.displayName="Typography";var $=ce(({children:t,...e})=>{let[r,o]=Be(!1);return qe(A,{children:[V(G,{asChild:!0,children:V(f,{onMouseEnter:({currentTarget:l})=>{let a=l.scrollWidth>l.clientWidth;o(a),a?l.style.cursor="pointer":l.style.cursor="text"},...e,children:t})}),r&&V(B,{children:t})]})});$.displayName="TruncatedTypography";import{jsx as k,jsxs as Je}from"react/jsx-runtime";function ue({label:t,name:e,className:r,disabled:o=!1,...i}){let l=`field-checkbox-${e}`;return Je("div",{className:"group gap-small flex items-center",children:[k(I.Root,{disabled:o,...i,className:We("size-large-alt rounded-small-1x inline-flex items-center justify-center transition-[border-color,box-shadow,background-color] duration-200 outline-none","border-border-layer-2 bg-layer-2-idle cursor-pointer border-2","hover:border-primary-idle focus:border-primary-idle focus:shadow-focus-primary","data-[state=checked]:bg-primary-active data-[state=checked]:border-primary-active","data-[state=checked]:hover:border-primary-idle","disabled:hover:border-border-layer-2 disabled:cursor-not-allowed disabled:opacity-[38%]",r),id:l,name:e,children:k(I.Indicator,{className:"flex items-center justify-center",children:k(C,{className:"text-neutral-label",name:"check"})})}),!!t&&k(f,{asChild:!0,className:"text-size-body-sm data-[disabled=true]:opacity-38","data-disabled":o,weight:"medium",children:k("label",{htmlFor:l,children:t})})]})}import*as d from"react";import*as T from"@radix-ui/react-radio-group";import{cx as L}from"@xjur-ui/util";import{jsx as g,jsxs as O}from"react/jsx-runtime";function Ye({children:t,allowToggle:e,value:r,onValueChange:o}){let[i,l]=d.useState([]),[a,s]=d.useState([]);d.useEffect(()=>{let u=d.Children.toArray(t).filter(b=>d.isValidElement(b)&&typeof b.props=="object"&&b.props!==null&&"value"in b.props&&typeof b.props.value=="string").map(b=>b.props.value);s(u)},[t]),d.useEffect(()=>{e&&l(r?r.split(",").filter(Boolean):[])},[r,e]);let c=d.useCallback(u=>{if(!e){o?.(u);return}l(b=>{let w=b.includes(u)?b.filter(x=>x!==u):[...b,u];return o?.(w.join(",")),w})},[e,o]),m=a.length>0&&a.every(u=>i.includes(u)),v=d.useCallback(()=>{if(!e)return;let u=m?[]:a;l(u),o?.(u.join(","))},[e,m,a,o]);return{selected:i,allValues:a,toggleValue:c,toggleAll:v,allSelected:m}}function fe({checked:t,disabled:e,onClick:r,className:o,...i}){let l=d.useCallback(()=>{r?.()},[r]);return g("button",{className:L("size-large-alt rounded-circle inline-flex items-center justify-center transition-[border-color,box-shadow,background-color] duration-200 outline-none","border-border-layer-2 bg-layer-2-idle cursor-pointer border-2","hover:border-primary-idle focus:border-primary-idle focus:shadow-focus-primary",t?"bg-primary-active border-primary-active":"",e&&"hover:border-border-layer-2 cursor-not-allowed opacity-[38%]",o),disabled:e,type:"button",onClick:l,...i,children:t&&g("div",{className:"relative flex items-center justify-center","data-slot":"radio-group-indicator"})})}function Ke({label:t,checked:e,onClick:r}){let o=d.useCallback(()=>{r()},[r]);return O("div",{className:"gap-small flex items-center",children:[g(fe,{checked:e,onClick:o}),g(f,{asChild:!0,className:"text-size-body-sm",weight:"medium",children:g("button",{className:"cursor-pointer border-none bg-transparent p-0 text-left",type:"button",onClick:o,children:t})})]})}function be({className:t,orientation:e="vertical",allowToggle:r=!1,allowSelectAll:o=!1,selectAllLabel:i="Selecionar todos",value:l,onValueChange:a,children:s,...c}){let{selected:m,toggleValue:v,toggleAll:u,allSelected:b}=Ye({children:s,allowToggle:r,value:l||void 0,onValueChange:a}),S=e==="horizontal",w=d.useCallback(x=>{a?.(x)},[a]);return r?O("div",{className:"gap-small flex flex-col",children:[o&&g(Ke,{checked:b,label:i,onClick:u}),g("div",{className:L("gap-small flex",S?"flex-row":"flex-col",t),children:d.Children.map(s,x=>{if(d.isValidElement(x)&&typeof x.props=="object"&&x.props!==null&&"value"in x.props){let R=x.props;return d.cloneElement(x,{allowToggle:!0,checked:m.includes(R.value),onToggle:()=>v(R.value)})}return x})})]}):g(T.Root,{className:L("gap-small flex",S?"flex-row":"flex-col",t),"data-slot":"radio-group",value:l,onValueChange:w,...c,children:s})}function ge({className:t,id:e,label:r,disabled:o=!1,allowToggle:i=!1,checked:l=!1,onToggle:a,...s}){let c=d.useCallback(()=>a?.(),[a]);return i?O("div",{className:"gap-small flex items-center",children:[g(fe,{checked:l,disabled:o,onClick:c}),!!r&&g(f,{asChild:!0,className:"text-size-body-sm","data-disabled":o,weight:"medium",children:g("button",{className:"cursor-pointer border-none bg-transparent p-0 text-left",disabled:o,type:"button",onClick:c,children:r})})]}):O("div",{className:"gap-small flex items-center",children:[g(T.Item,{className:L("size-large-alt rounded-circle inline-flex items-center justify-center transition-[border-color,box-shadow,background-color] duration-200 outline-none","border-border-layer-2 bg-layer-2-idle cursor-pointer border-2","hover:border-primary-idle focus:border-primary-idle focus:shadow-focus-primary","data-[state=checked]:bg-primary-active data-[state=checked]:border-primary-active","data-[state=checked]:hover:border-primary-idle",o&&"hover:border-border-layer-2 cursor-not-allowed opacity-[38%]",t),disabled:o,id:e,...s,children:g(T.Indicator,{className:"relative flex items-center justify-center"})}),!!r&&g(f,{asChild:!0,className:"text-size-body-sm","data-disabled":o,weight:"medium",children:g("label",{htmlFor:e,children:r})})]})}import*as xe from"@radix-ui/react-popover";import{createContext as Qe,useContext as Ue}from"react";var q=Qe({state:"normal",variant:"normal",customMask:void 0,mask:void 0});function y(){let t=Ue(q);if(!t)throw new Error("useFieldContext must be used within a InputRoot, SelectRoot, DatePickerRoot, etc.");return t}import{tv as Xe}from"@xjur-ui/util";var h=Xe({slots:{wrapper:"group flex flex-col gap-small-2x",trigger:["h-large-4x w-auto inline-flex cursor-pointer relative","items-center gap-small rounded-small-1x","py-small_1x-alt px-small","bg-layer-2-idle border border-border-layer-2","group-has-[div[data-slot=input-action-slot]]:rounded-r-none","transition-all duration-200"],content:["group z-1000 max-h-[var(--radix-popover-content-available-height)] max-w-[240px] min-w-[var(--radix-popover-trigger-width)] group-data-[state=open]:rotate-180 transition-transform duration-200"],icon:"size-large text-icon-neutral-3 flex items-center justify-center",slotText:"size-large flex items-center justify-center !text-size-label-md text-neutral-placeholder",caption:"!text-size-body-sm font-normal"},variants:{state:{normal:{trigger:"hover:border-border-layer-3 data-[state=open]:border-primary-idle data-[state=open]:hover:border-primary-idle"},error:{trigger:"border-danger-idle hover:border-danger-idle data-[state=open]:border-danger-idle data-[state=open]:hover:border-danger-idle",caption:"text-danger-label-idle"},disabled:{trigger:"pointer-events-none border-transparent bg-layer-2-idle"}}}});import{jsx as W}from"react/jsx-runtime";var{wrapper:Ze}=h();function J({className:t,state:e="normal",defaultOpen:r,variant:o="normal",modal:i,open:l,onOpenChange:a,...s}){return W(xe.Root,{defaultOpen:r,modal:i,open:l,onOpenChange:a,children:W(q.Provider,{value:{state:e,variant:o},children:W("div",{className:Ze({className:t,state:e}),...s})})})}import{tv as je,twMerge as De}from"@xjur-ui/util";import*as ye from"@radix-ui/react-popover";import{jsx as tt}from"react/jsx-runtime";var{trigger:et}=h();function Y({className:t,...e}){let{state:r,variant:o}=y(),i=je({base:["group bg-layer-2-idle"],variants:{state:{normal:["border-border-layer-2 hover:border-border-layer-3 has-[input:not(:placeholder-shown)]:border-primary-idle"],error:["border-danger-idle hover:border-danger-idle"],disabled:["border border-border-layer-2 opacity-60"]}}}),l=De(et({state:r,className:t}),o==="filter"&&i({state:r,className:t}));return tt(ye.Trigger,{className:l,disabled:r==="disabled",...e})}import{jsx as he}from"react/jsx-runtime";var{icon:ot}=h();function K({className:t,name:e,orientation:r="left",...o}){let{state:i}=y();return he("div",{className:ot({className:t,state:i}),"data-slot":`control-${r}-slot`,...o,children:he(C,{name:e})})}import{twJoin as at}from"@xjur-ui/util";import{useMemo as lt}from"react";import{tv as rt}from"@xjur-ui/util";import{jsx as ve}from"react/jsx-runtime";function Q({className:t,htmlFor:e,children:r,...o}){let{state:i}=y(),l=rt({base:["group inline-block max-w-full truncate text-left","ease animate-in left-small right-small pointer-events-none absolute top-1/2 -translate-y-1/2 transition-all duration-250","text-size-body-md","group-focus-within:-top-[3px]","group-data-[state=open]:-top-[3px]","group-focus-within:text-size-label-sm-1x group-focus-within:font-medium","group-data-[state=open]:text-size-label-sm-1x group-data-[state=open]:font-medium","group-has-[input:not(:placeholder-shown)]:-top-[3px]","group-has-[input:not(:placeholder-shown)]:text-size-label-sm-1x","group-has-[input:not(:placeholder-shown)]:font-medium","group-has-[div[data-slot=control-left-slot]]:left-large-4x","group-has-[div[data-slot=control-left-slot]]:group-focus-within:left-small","group-has-[div[data-slot=control-left-slot]]:group-has-[input:not(:placeholder-shown)]:left-small","group-has-[div[data-slot=control-left-slot]]:group-data-[state=open]:left-small","group-focus-within:animate-in","group-has-[input:not(:placeholder-shown)]:animate-out","data-[disabled=true]:hidden"],variants:{state:{normal:["group-focus-within:!text-primary-idle group-data-[state=open]:!text-primary-idle","group-has-[input:not(:placeholder-shown)]:!text-primary-idle"],error:["group-focus-within:!text-danger-label-active group-data-[state=open]:!text-danger-label-active","group-has-[input:not(:placeholder-shown)]:!text-danger-label-active"],disabled:[]}}});return ve("label",{className:l({className:t,state:i}),htmlFor:e,...o,children:ve("span",{className:"rounded-small-1x bg-layer-2-idle max-w-full",children:r})})}import{jsx as F,jsxs as it}from"react/jsx-runtime";function U({className:t,value:e,placeholder:r,renderValue:o,...i}){let{variant:l}=y(),a=lt(()=>{let s=o?o(e??""):typeof e=="object"?e?.label:e;return l==="filter"?s:s||r},[e,r,l,o]);return it("div",{className:"grid w-full items-center",children:[r&&l==="filter"&&F(Q,{children:r}),r&&l==="filter"&&F(f,{className:"invisible col-start-1 row-start-1 self-center",children:r}),F(f,{className:"text-neutral-dark z-10 col-start-1 row-start-1 self-center text-left",children:a}),F("input",{...i,"aria-readonly":!0,className:at("pointer-events-none",t),hidden:!0,placeholder:" ",readOnly:!0,value:typeof e=="object"?e?.value??"":e??""})]})}import{twMerge as dr}from"@xjur-ui/util";import{Fragment as cr,useMemo as ur}from"react";import{jsx as yr,jsxs as hr}from"react/jsx-runtime";import*as M from"@radix-ui/react-popover";import{Slot as st}from"@radix-ui/react-slot";import{cx as pt}from"@xjur-ui/util";import{useVirtualizer as dt}from"@tanstack/react-virtual";import{useRef as mt}from"react";import{createContext as nt}from"react";var _=nt({virtualizer:null,enabled:!1});import{jsx as Ce}from"react/jsx-runtime";function X({className:t,asChild:e,children:r,virtualized:o=!1,itemCount:i=0,estimateSize:l=()=>48,overscan:a=5,...s}){let c=e?st:"div",m=mt(null),v=dt({count:i,getScrollElement:()=>m.current,estimateSize:l,overscan:a,enabled:o});return Ce(_.Provider,{value:{virtualizer:v,enabled:o},children:Ce(c,{...s,className:pt(t,"rounded-small scrollbar-thin bg-layer-2-idle border-border-layer-2 shadow-elevation-3 z-1000 max-h-[400px] list-none overflow-x-hidden overflow-y-auto border"),ref:m,children:r})})}import{Slot as Vr}from"@radix-ui/react-slot";import{cx as Lr}from"@xjur-ui/util";import{jsx as Fr}from"react/jsx-runtime";import{cx as Hr}from"@xjur-ui/util";import{jsx as Br}from"react/jsx-runtime";import{Slot as ct}from"@radix-ui/react-slot";import{cx as Pe}from"@xjur-ui/util";import{useContext as ut}from"react";import{jsx as Z}from"react/jsx-runtime";function j({className:t,asChild:e,children:r,renderItem:o,...i}){let l=e?ct:"ul",{virtualizer:a,enabled:s}=ut(_);if(s&&a&&o){let c=a.getVirtualItems();return Z(l,{...i,className:Pe("p-small relative flex flex-col",t),style:{height:`${a.getTotalSize()}px`},children:c.map(m=>Z("div",{className:"absolute top-0 left-0 w-full","data-index":m.index,ref:a.measureElement,style:{transform:`translateY(${m.start}px)`},children:o(m.index)},m.key))})}return Z(l,{...i,className:Pe("gap-small-1x p-small flex flex-col",t),children:r})}import{Slot as ft}from"@radix-ui/react-slot";import{cx as bt,cva as gt}from"@xjur-ui/util";import{jsx as yt}from"react/jsx-runtime";var xt=gt(["py-medium px-small flex items-center gap-small rounded-small-1x","bg-layer-2-idle text-neutral-dark","hover:bg-layer-2-hover transition-colors duration-100 ease-out","active:bg-layer-2-pressed"],{variants:{size:{md:"h-large-4x",lg:"h-large-7x"},isActive:{true:"bg-primary-alt-active text-primary-label-active hover:bg-primary-alt-hover active:bg-primary-alt-pressed"}},defaultVariants:{size:"md",isActive:!1}});function D({className:t,size:e,isActive:r,asChild:o,...i}){return yt(o?ft:"li",{...i,className:bt(xt({size:e,isActive:r}),t)})}import{jsx as ee}from"react/jsx-runtime";var{content:Ct}=h();function te({className:t,sideOffset:e=5,side:r="bottom",align:o="start",children:i,virtualized:l=!1,overscan:a=5,estimateSize:s=()=>32,...c}){let{state:m}=y();return ee(M.Portal,{children:ee(M.Content,{align:o,className:Ct({className:t,state:m}),side:r,sideOffset:e,...c,children:ee(X,{estimateSize:s,overscan:a,virtualized:l,children:i})})})}import{jsx as ba}from"react/jsx-runtime";var{caption:ua}=h();import{jsx as Ca}from"react/jsx-runtime";var{slotText:ha}=h();import{jsx as Pt}from"react/jsx-runtime";function oe(t){return Pt(j,{...t})}import{twMerge as wt}from"@xjur-ui/util";import{jsx as Tt}from"react/jsx-runtime";function re({className:t,value:e,...r}){return Tt(D,{className:wt(t,"cursor-pointer"),value:typeof e=="object"?e?.value:e,...r})}import{twMerge as St}from"@xjur-ui/util";import{jsx as kt}from"react/jsx-runtime";function ae({className:t,...e}){return kt($,{className:St(t,"truncate"),...e})}import{jsx as Ma}from"react/jsx-runtime";import{jsx as Ga}from"react/jsx-runtime";import{Fragment as _t,jsx as p,jsxs as P}from"react/jsx-runtime";function fl({className:t,isSelected:e=!1,variant:r="default",accordionContent:o,isAccordionOpen:i=!1,onAccordionToggle:l,accordionData:a,...s}){let[c,m]=we(i),[v,u]=we("");le.useEffect(()=>{m(i)},[i]);let b=()=>{if(!o)return;m(!c),l?.()},S=n=>{a?.checkbox?.onCheckedChange(n)},w=le.useCallback(n=>{a?.radio&&a.radio.onCheckedChange(a.radio.value,n)},[a?.radio]),x=le.useMemo(()=>!a?.searchSelect?.options||!v?a?.searchSelect?.options||[]:a.searchSelect.options.filter(n=>n.label.toLowerCase().includes(v.toLowerCase())),[a?.searchSelect?.options,v]),R=n=>{u(n.target.value)},Te=n=>{a?.searchSelect?.onChangeSearchOption(n),u("")};return r==="accordion"?P(_t,{children:[P("tr",{"aria-expanded":o?c:void 0,className:E("bg-layer-2-idle hover:bg-layer-2-hover ease border-b transition-colors duration-100","active:bg-layer-2-pressed","data-[selected=true]:bg-primary-alt-active",o&&"cursor-pointer",t),"data-selected":e,"data-slot":"table-row-accordion",role:o?"button":void 0,tabIndex:o?0:void 0,onClick:b,...s,children:[p("td",{className:"w-6 px-2 py-3",children:a?.checkbox&&p(ue,{checked:a.checkbox.checked,onCheckedChange:S,onClick:n=>n.stopPropagation()})}),p("td",{className:"px-2 py-3",children:P("div",{className:"flex items-center gap-2",children:[o&&p(C,{className:E("text-neutral-medium transition-transform duration-200",c&&"rotate-90"),name:"keyboard_arrow_up"}),p(f,{children:a?.text1})]})}),p("td",{className:"px-2 py-3",children:p(f,{children:a?.text2})}),p("td",{className:"px-2 py-3",onClick:n=>n.stopPropagation(),children:a?.searchSelect&&P(J,{children:[P(Y,{children:[p(U,{placeholder:"Selecione",value:{value:a.searchSelect?.selectedSearchOption||"",label:a.searchSelect?.options.find(n=>n.value===a.searchSelect?.selectedSearchOption)?.label||""}}),p(K,{className:"text-layer-1-active",name:"keyboard_arrow_down"})]}),p(te,{children:P(oe,{className:"p-0",children:[p("div",{className:"py-small border-border-layer-2 border-b",children:P("div",{className:"gap-small py-small_1x-alt bg-layer-2-idle rounded-small flex items-center",children:[p(C,{className:"text-layer-1-active",name:"search"}),p("input",{className:"text-size-body-md text-neutral-dark placeholder:text-neutral-placeholder flex-1 bg-transparent outline-none",placeholder:"Pesquisar",value:v,onChange:R})]})}),x.map(n=>p(re,{className:"p-0",isActive:a.searchSelect?.selectedSearchOption===n.value,value:n,onClick:()=>Te(n.value),children:p(ae,{children:n.label})},n.value))]})})]})}),p("td",{className:"px-2 py-3",onClick:n=>n.stopPropagation(),children:a?.radio&&p(be,{allowToggle:!0,className:"",value:a.radio.checked?a.radio.value:"",onValueChange:n=>{a?.radio&&w(n!=="")},children:p(ge,{className:"",id:`principal-${a.radio.value}`,label:"",value:a.radio.value})})})]}),c&&o&&p("tr",{className:E("bg-layer-2-idle hover:bg-layer-2-hover ease border-b transition-colors duration-100","active:bg-layer-2-pressed","data-[selected=true]:bg-primary-alt-active",t),children:p("td",{colSpan:5,children:o})})]}):p("tr",{className:E("bg-layer-2-idle hover:bg-layer-2-hover ease border-b transition-colors duration-100","active:bg-layer-2-pressed","data-[selected=true]:bg-primary-alt-active",t),"data-selected":e,"data-slot":"table-row",...s})}import{cx as Rt}from"@xjur-ui/util";import{jsx as ie}from"react/jsx-runtime";function hl({className:t,sortedDirection:e,...r}){return ie("button",{className:Rt("size-large-1x rounded-small-1x","flex cursor-pointer items-center justify-center","hidden group-hover/th:flex","data-[sorted=true]:flex","transition-all duration-200 ease-out","data-[sorted=true]:bg-primary-alt-active data-[sorted=true]:text-primary-label-active","absolute top-1/2 right-0 -translate-y-1/2",t),"data-sorted":e!==void 0,type:"button",...r,children:e!==void 0?ie(C,{name:e==="asc"?"arrow_downward":"arrow_upward"}):ie(C,{name:"swap_vert"})})}export{Vt as Table,Ft as TableBody,At as TableCell,qt as TableFooter,Zt as TableHead,jt as TableHeadContent,Kt as TableHeader,fl as TableRow,hl as TableSort};
1
+ import{cx as _e}from"@xjur-ui/util";import{jsx as ne}from"react/jsx-runtime";function Vt({className:t,...e}){return ne("div",{className:"text-size-body-md scrollbar-thin relative w-full overflow-hidden transition-all hover:overflow-x-auto","data-slot":"table-container",children:ne("table",{className:_e("w-full caption-bottom",t),"data-slot":"table",...e})})}import{cx as ke}from"@xjur-ui/util";import{jsx as Se}from"react/jsx-runtime";function Ft({className:t,...e}){return Se("tbody",{className:ke("[&_tr]:border-border-layer-2 [&_tr]:border-b [&_tr:last-child]:border-0",t),"data-slot":"table-body",...e})}import{cx as Re}from"@xjur-ui/util";import{jsx as ze}from"react/jsx-runtime";function At({className:t,...e}){return ze("td",{className:Re("px-small py-none h-large-8x text-left align-middle whitespace-nowrap",t),"data-slot":"table-cell",...e})}import{cx as Ne}from"@xjur-ui/util";import{jsx as Ve}from"react/jsx-runtime";function qt({className:t,...e}){return Ve("tfoot",{className:Ne("border-border-layer-2 border-t font-medium [&>tr]:last:border-b-0",t),"data-slot":"table-footer",...e})}import{cx as Ie}from"@xjur-ui/util";import{jsx as Le}from"react/jsx-runtime";function Kt({className:t,...e}){return Le("thead",{className:Ie("group/table-header [&_tr]:border-border-layer-2 hover:bg-layer-2-hover [&_tr]:border-b",t),"data-slot":"table-header",...e})}import{cx as se}from"@xjur-ui/util";import{jsx as pe}from"react/jsx-runtime";function Zt({className:t,...e}){return pe("th",{className:se("group/th text-neutral-placeholder text-size-label-sm h-large-4x py-small-1x px-small text-left align-middle font-medium whitespace-nowrap","relative","animate-in fade-in duration-200 ease-in",t),"data-slot":"table-head",...e})}function jt({className:t,...e}){return pe("div",{className:se("gap-small pr-large-3x relative flex w-fit items-center",t),...e})}import le,{useState as we}from"react";import{cx as E}from"@xjur-ui/util";import*as I from"@radix-ui/react-checkbox";import{cx as We}from"@xjur-ui/util";import{cx as Oe}from"@xjur-ui/util";import{jsx as Fe}from"react/jsx-runtime";function C({className:t,filled:e=!1,name:r,...o}){return Fe("span",{...o,className:Oe("material-symbols-outlined","text-size-body-lg select-none",t),style:{fontVariationSettings:`'FILL' ${e?1:0}, 'wght' 600, 'GRAD' 0, 'opsz' 20`,...o.style},children:r})}import{Slot as Ae}from"@radix-ui/react-slot";import{cva as Ge}from"@xjur-ui/util";import{memo as ce,useState as Be}from"react";import*as z from"@radix-ui/react-tooltip";import{jsx as H}from"react/jsx-runtime";function Me({delayDuration:t=0,...e}){return H(z.Provider,{"data-slot":"tooltip-provider",delayDuration:t,...e})}function A({...t}){return H(Me,{children:H(z.Root,{"data-slot":"tooltip",...t})})}import*as de from"@radix-ui/react-tooltip";import{jsx as Ee}from"react/jsx-runtime";function G({...t}){return Ee(de.Trigger,{"data-slot":"tooltip-trigger",...t})}import*as N from"@radix-ui/react-tooltip";import{cx as He}from"@xjur-ui/util";import{jsx as me}from"react/jsx-runtime";function B({className:t,sideOffset:e=1,variant:r="simple",children:o,...i}){return me(N.Portal,{children:me(N.Content,{className:He("text-size-body-sm z-99999 text-balance","data-[variant=simple]:bg-alt-2 data-[variant=simple]:text-neutral-label data-[variant=simple]:rounded-small-1x data-[variant=simple]:px-small data-[variant=simple]:py-small-1x","data-[variant=rich]:bg-layer-2-idle data-[variant=rich]:text-neutral-dark data-[variant=rich]:rounded-small data-[variant=rich]:border-border-layer-2 data-[variant=rich]:p-large data-[variant=rich]:border","animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin)",t),"data-slot":"tooltip-content","data-variant":r,sideOffset:e,...i,children:o})})}import{jsx as V,jsxs as qe}from"react/jsx-runtime";var $e=Ge("",{variants:{variant:{body:"",label:"",title:"",headline:""},size:{"sm-2x":"","sm-1x":"",sm:"",md:"",lg:""},weight:{thin:"font-thin",extraLight:"font-extralight",light:"font-light",normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold",extraBold:"font-extrabold",black:"font-black"}},compoundVariants:[{variant:"body",size:"sm-1x",class:"text-size-body-sm-1x"},{variant:"body",size:"sm",class:"text-size-body-sm"},{variant:"body",size:"md",class:"text-size-body-md"},{variant:"body",size:"lg",class:"text-size-body-lg"},{variant:"label",size:"sm-2x",class:"text-size-label-sm-2x"},{variant:"label",size:"sm-1x",class:"text-size-label-sm-1x"},{variant:"label",size:"sm",class:"text-size-label-sm"},{variant:"label",size:"md",class:"text-size-label-md"},{variant:"label",size:"lg",class:"text-size-label-lg"},{variant:"title",size:"sm",class:"text-size-title-sm"},{variant:"title",size:"md",class:"text-size-title-md"},{variant:"title",size:"lg",class:"text-size-title-lg"},{variant:"headline",size:"sm",class:"text-size-headline-sm"},{variant:"headline",size:"md",class:"text-size-headline-md"},{variant:"headline",size:"lg",class:"text-size-headline-lg"}],defaultVariants:{variant:"body",size:"md",weight:"normal"}}),f=ce(({variant:t,size:e,weight:r,asChild:o,className:i,children:l,...a})=>V(o?Ae:"span",{className:$e({variant:t,size:e,weight:r,className:i}),...a,children:l}));f.displayName="Typography";var $=ce(({children:t,...e})=>{let[r,o]=Be(!1);return qe(A,{children:[V(G,{asChild:!0,children:V(f,{onMouseEnter:({currentTarget:l})=>{let a=l.scrollWidth>l.clientWidth;o(a),a?l.style.cursor="pointer":l.style.cursor="text"},...e,children:t})}),r&&V(B,{children:t})]})});$.displayName="TruncatedTypography";import{jsx as k,jsxs as Je}from"react/jsx-runtime";function ue({label:t,name:e,className:r,disabled:o=!1,...i}){let l=`field-checkbox-${e}`;return Je("div",{className:"group gap-small flex items-center",children:[k(I.Root,{disabled:o,...i,className:We("size-large-alt rounded-small-1x inline-flex items-center justify-center transition-[border-color,box-shadow,background-color] duration-200 outline-none","border-border-layer-2 bg-layer-2-idle cursor-pointer border-2","hover:border-primary-idle focus:border-primary-idle focus:shadow-focus-primary","data-[state=checked]:bg-primary-active data-[state=checked]:border-primary-active","data-[state=checked]:hover:border-primary-idle","disabled:hover:border-border-layer-2 disabled:cursor-not-allowed disabled:opacity-[38%]",r),id:l,name:e,children:k(I.Indicator,{className:"flex items-center justify-center",children:k(C,{className:"text-neutral-label",name:"check"})})}),!!t&&k(f,{asChild:!0,className:"text-size-body-sm data-[disabled=true]:opacity-38","data-disabled":o,weight:"medium",children:k("label",{htmlFor:l,children:t})})]})}import*as d from"react";import*as T from"@radix-ui/react-radio-group";import{cx as L}from"@xjur-ui/util";import{jsx as g,jsxs as O}from"react/jsx-runtime";function Ye({children:t,allowToggle:e,value:r,onValueChange:o}){let[i,l]=d.useState([]),[a,s]=d.useState([]);d.useEffect(()=>{let u=d.Children.toArray(t).filter(b=>d.isValidElement(b)&&typeof b.props=="object"&&b.props!==null&&"value"in b.props&&typeof b.props.value=="string").map(b=>b.props.value);s(u)},[t]),d.useEffect(()=>{e&&l(r?r.split(",").filter(Boolean):[])},[r,e]);let c=d.useCallback(u=>{if(!e){o?.(u);return}l(b=>{let w=b.includes(u)?b.filter(x=>x!==u):[...b,u];return o?.(w.join(",")),w})},[e,o]),m=a.length>0&&a.every(u=>i.includes(u)),v=d.useCallback(()=>{if(!e)return;let u=m?[]:a;l(u),o?.(u.join(","))},[e,m,a,o]);return{selected:i,allValues:a,toggleValue:c,toggleAll:v,allSelected:m}}function fe({checked:t,disabled:e,onClick:r,className:o,...i}){let l=d.useCallback(()=>{r?.()},[r]);return g("button",{className:L("size-large-alt rounded-circle inline-flex items-center justify-center transition-[border-color,box-shadow,background-color] duration-200 outline-none","border-border-layer-2 bg-layer-2-idle cursor-pointer border-2","hover:border-primary-idle focus:border-primary-idle focus:shadow-focus-primary",t?"bg-primary-active border-primary-active":"",e&&"hover:border-border-layer-2 cursor-not-allowed opacity-[38%]",o),disabled:e,type:"button",onClick:l,...i,children:t&&g("div",{className:"relative flex items-center justify-center","data-slot":"radio-group-indicator"})})}function Ke({label:t,checked:e,onClick:r}){let o=d.useCallback(()=>{r()},[r]);return O("div",{className:"gap-small flex items-center",children:[g(fe,{checked:e,onClick:o}),g(f,{asChild:!0,className:"text-size-body-sm",weight:"medium",children:g("button",{className:"cursor-pointer border-none bg-transparent p-0 text-left",type:"button",onClick:o,children:t})})]})}function be({className:t,orientation:e="vertical",allowToggle:r=!1,allowSelectAll:o=!1,selectAllLabel:i="Selecionar todos",value:l,onValueChange:a,children:s,...c}){let{selected:m,toggleValue:v,toggleAll:u,allSelected:b}=Ye({children:s,allowToggle:r,value:l||void 0,onValueChange:a}),_=e==="horizontal",w=d.useCallback(x=>{a?.(x)},[a]);return r?O("div",{className:"gap-small flex flex-col",children:[o&&g(Ke,{checked:b,label:i,onClick:u}),g("div",{className:L("gap-small flex",_?"flex-row":"flex-col",t),children:d.Children.map(s,x=>{if(d.isValidElement(x)&&typeof x.props=="object"&&x.props!==null&&"value"in x.props){let R=x.props;return d.cloneElement(x,{allowToggle:!0,checked:m.includes(R.value),onToggle:()=>v(R.value)})}return x})})]}):g(T.Root,{className:L("gap-small flex",_?"flex-row":"flex-col",t),"data-slot":"radio-group",value:l,onValueChange:w,...c,children:s})}function ge({className:t,id:e,label:r,disabled:o=!1,allowToggle:i=!1,checked:l=!1,onToggle:a,...s}){let c=d.useCallback(()=>a?.(),[a]);return i?O("div",{className:"gap-small flex items-center",children:[g(fe,{checked:l,disabled:o,onClick:c}),!!r&&g(f,{asChild:!0,className:"text-size-body-sm","data-disabled":o,weight:"medium",children:g("button",{className:"cursor-pointer border-none bg-transparent p-0 text-left",disabled:o,type:"button",onClick:c,children:r})})]}):O("div",{className:"gap-small flex items-center",children:[g(T.Item,{className:L("size-large-alt rounded-circle inline-flex items-center justify-center transition-[border-color,box-shadow,background-color] duration-200 outline-none","border-border-layer-2 bg-layer-2-idle cursor-pointer border-2","hover:border-primary-idle focus:border-primary-idle focus:shadow-focus-primary","data-[state=checked]:bg-primary-active data-[state=checked]:border-primary-active","data-[state=checked]:hover:border-primary-idle",o&&"hover:border-border-layer-2 cursor-not-allowed opacity-[38%]",t),disabled:o,id:e,...s,children:g(T.Indicator,{className:"relative flex items-center justify-center"})}),!!r&&g(f,{asChild:!0,className:"text-size-body-sm","data-disabled":o,weight:"medium",children:g("label",{htmlFor:e,children:r})})]})}import*as xe from"@radix-ui/react-popover";import{createContext as Qe,useContext as Ue}from"react";var q=Qe({state:"normal",variant:"normal",customMask:void 0,mask:void 0});function y(){let t=Ue(q);if(!t)throw new Error("useFieldContext must be used within a InputRoot, SelectRoot, DatePickerRoot, etc.");return t}import{tv as Xe}from"@xjur-ui/util";var h=Xe({slots:{wrapper:"group flex flex-col gap-small-2x",trigger:["h-large-4x w-auto inline-flex cursor-pointer relative","items-center gap-small rounded-small-1x","py-small_1x-alt px-small","bg-layer-2-idle border border-border-layer-2","group-has-[div[data-slot=input-action-slot]]:rounded-r-none","transition-all duration-200"],content:["group z-1000 max-h-[var(--radix-popover-content-available-height)] max-w-[240px] min-w-[var(--radix-popover-trigger-width)] group-data-[state=open]:rotate-180 transition-transform duration-200"],icon:"size-large text-icon-neutral-3 flex items-center justify-center",slotText:"size-large flex items-center justify-center !text-size-label-md text-neutral-placeholder",caption:"!text-size-body-sm font-normal"},variants:{state:{normal:{trigger:"hover:border-border-layer-3 data-[state=open]:border-primary-idle data-[state=open]:hover:border-primary-idle"},error:{trigger:"border-danger-idle hover:border-danger-idle data-[state=open]:border-danger-idle data-[state=open]:hover:border-danger-idle",caption:"text-danger-label-idle"},disabled:{trigger:"pointer-events-none border-transparent bg-layer-2-idle"}}}});import{jsx as W}from"react/jsx-runtime";var{wrapper:Ze}=h();function J({className:t,state:e="normal",defaultOpen:r,variant:o="normal",modal:i,open:l,onOpenChange:a,...s}){return W(xe.Root,{defaultOpen:r,modal:i,open:l,onOpenChange:a,children:W(q.Provider,{value:{state:e,variant:o},children:W("div",{className:Ze({className:t,state:e}),...s})})})}import{tv as je,twMerge as De}from"@xjur-ui/util";import*as ye from"@radix-ui/react-popover";import{jsx as tt}from"react/jsx-runtime";var{trigger:et}=h();function Y({className:t,...e}){let{state:r,variant:o}=y(),i=je({base:["group bg-layer-2-idle"],variants:{state:{normal:["border-border-layer-2 hover:border-border-layer-3 has-[input:not(:placeholder-shown)]:border-primary-idle"],error:["border-danger-idle hover:border-danger-idle"],disabled:["border border-border-layer-2 opacity-60"]}}}),l=De(et({state:r,className:t}),o==="filter"&&i({state:r,className:t}));return tt(ye.Trigger,{className:l,disabled:r==="disabled",...e})}import{jsx as he}from"react/jsx-runtime";var{icon:ot}=h();function K({className:t,name:e,orientation:r="left",...o}){let{state:i}=y();return he("div",{className:ot({className:t,state:i}),"data-slot":`control-${r}-slot`,...o,children:he(C,{name:e})})}import{twJoin as at}from"@xjur-ui/util";import{useMemo as lt}from"react";import{tv as rt}from"@xjur-ui/util";import{jsx as ve}from"react/jsx-runtime";function Q({className:t,htmlFor:e,children:r,...o}){let{state:i}=y(),l=rt({base:["group inline-block max-w-full truncate text-left","ease animate-in left-small right-small pointer-events-none absolute top-1/2 -translate-y-1/2 transition-all duration-250","text-size-body-md","group-focus-within:-top-[3px]","group-data-[state=open]:-top-[3px]","group-focus-within:text-size-label-sm-1x group-focus-within:font-medium","group-data-[state=open]:text-size-label-sm-1x group-data-[state=open]:font-medium","group-has-[input:not(:placeholder-shown)]:-top-[3px]","group-has-[input:not(:placeholder-shown)]:text-size-label-sm-1x","group-has-[input:not(:placeholder-shown)]:font-medium","group-has-[div[data-slot=control-left-slot]]:left-large-4x","group-has-[div[data-slot=control-left-slot]]:group-focus-within:left-small","group-has-[div[data-slot=control-left-slot]]:group-has-[input:not(:placeholder-shown)]:left-small","group-has-[div[data-slot=control-left-slot]]:group-data-[state=open]:left-small","group-focus-within:animate-in","group-has-[input:not(:placeholder-shown)]:animate-out","data-[disabled=true]:hidden"],variants:{state:{normal:["group-focus-within:!text-primary-idle group-data-[state=open]:!text-primary-idle","group-has-[input:not(:placeholder-shown)]:!text-primary-idle"],error:["group-focus-within:!text-danger-label-active group-data-[state=open]:!text-danger-label-active","group-has-[input:not(:placeholder-shown)]:!text-danger-label-active"],disabled:[]}}});return ve("label",{className:l({className:t,state:i}),htmlFor:e,...o,children:ve("span",{className:"rounded-small-1x bg-layer-2-idle max-w-full",children:r})})}import{jsx as F,jsxs as it}from"react/jsx-runtime";function U({className:t,value:e,placeholder:r,renderValue:o,...i}){let{variant:l}=y(),a=lt(()=>{let s=o?o(e??""):typeof e=="object"?e?.label:e;return l==="filter"?s:s||r},[e,r,l,o]);return it("div",{className:"grid w-full items-center",children:[r&&l==="filter"&&F(Q,{children:r}),r&&l==="filter"&&F(f,{className:"invisible col-start-1 row-start-1 self-center",children:r}),F(f,{className:"text-neutral-dark z-10 col-start-1 row-start-1 self-center text-left",children:a}),F("input",{...i,"aria-readonly":!0,className:at("pointer-events-none",t),hidden:!0,placeholder:" ",readOnly:!0,value:typeof e=="object"?e?.value??"":e??""})]})}import{twMerge as dr}from"@xjur-ui/util";import{Fragment as cr,useMemo as ur}from"react";import{jsx as yr,jsxs as hr}from"react/jsx-runtime";import*as M from"@radix-ui/react-popover";import{Slot as st}from"@radix-ui/react-slot";import{cx as pt}from"@xjur-ui/util";import{useVirtualizer as dt}from"@tanstack/react-virtual";import{useRef as mt}from"react";import{createContext as nt}from"react";var S=nt({virtualizer:null,enabled:!1});import{jsx as Ce}from"react/jsx-runtime";function X({className:t,asChild:e,children:r,virtualized:o=!1,itemCount:i=0,estimateSize:l=()=>48,overscan:a=5,...s}){let c=e?st:"div",m=mt(null),v=dt({count:i,getScrollElement:()=>m.current,estimateSize:l,overscan:a,enabled:o});return Ce(S.Provider,{value:{virtualizer:v,enabled:o},children:Ce(c,{...s,className:pt(t,"rounded-small scrollbar-thin bg-layer-2-idle border-border-layer-2 shadow-elevation-3 z-1000 max-h-[400px] list-none overflow-x-hidden overflow-y-auto border"),ref:m,children:r})})}import{Slot as Vr}from"@radix-ui/react-slot";import{cx as Lr}from"@xjur-ui/util";import{jsx as Fr}from"react/jsx-runtime";import{cx as Hr}from"@xjur-ui/util";import{jsx as Br}from"react/jsx-runtime";import{Slot as ct}from"@radix-ui/react-slot";import{cx as Pe}from"@xjur-ui/util";import{useContext as ut}from"react";import{jsx as Z}from"react/jsx-runtime";function j({className:t,asChild:e,children:r,renderItem:o,...i}){let l=e?ct:"ul",{virtualizer:a,enabled:s}=ut(S);if(s&&a&&o){let c=a.getVirtualItems();return Z(l,{...i,className:Pe("p-small relative flex flex-col",t),style:{height:`${a.getTotalSize()}px`},children:c.map(m=>Z("div",{className:"absolute top-0 left-0 w-full","data-index":m.index,ref:a.measureElement,style:{transform:`translateY(${m.start}px)`},children:o(m.index)},m.key))})}return Z(l,{...i,className:Pe("gap-small-1x p-small flex flex-col",t),children:r})}import{Slot as ft}from"@radix-ui/react-slot";import{cx as bt,cva as gt}from"@xjur-ui/util";import{jsx as yt}from"react/jsx-runtime";var xt=gt(["py-medium px-small flex items-center gap-small rounded-small-1x","bg-layer-2-idle text-neutral-dark","hover:bg-layer-2-hover transition-colors duration-100 ease-out","active:bg-layer-2-pressed"],{variants:{size:{md:"h-large-4x",lg:"h-large-7x"},isActive:{true:"bg-primary-alt-active text-primary-label-active hover:bg-primary-alt-hover active:bg-primary-alt-pressed"}},defaultVariants:{size:"md",isActive:!1}});function D({className:t,size:e,isActive:r,asChild:o,...i}){return yt(o?ft:"li",{...i,className:bt(xt({size:e,isActive:r}),t)})}import{jsx as ee}from"react/jsx-runtime";var{content:Ct}=h();function te({className:t,sideOffset:e=5,side:r="bottom",align:o="start",children:i,virtualized:l=!1,overscan:a=5,estimateSize:s=()=>32,...c}){let{state:m}=y();return ee(M.Portal,{children:ee(M.Content,{align:o,className:Ct({className:t,state:m}),side:r,sideOffset:e,...c,children:ee(X,{estimateSize:s,overscan:a,virtualized:l,children:i})})})}import{jsx as ba}from"react/jsx-runtime";var{caption:ua}=h();import{jsx as Ca}from"react/jsx-runtime";var{slotText:ha}=h();import{jsx as Pt}from"react/jsx-runtime";function oe(t){return Pt(j,{...t})}import{twMerge as wt}from"@xjur-ui/util";import{jsx as Tt}from"react/jsx-runtime";function re({className:t,value:e,...r}){return Tt(D,{className:wt(t,"cursor-pointer"),value:typeof e=="object"?e?.value:e,...r})}import{twMerge as _t}from"@xjur-ui/util";import{jsx as kt}from"react/jsx-runtime";function ae({className:t,...e}){return kt($,{className:_t(t,"truncate"),...e})}import{jsx as Ma}from"react/jsx-runtime";import{jsx as Ga}from"react/jsx-runtime";import{Fragment as St,jsx as p,jsxs as P}from"react/jsx-runtime";function fl({className:t,isSelected:e=!1,variant:r="default",accordionContent:o,isAccordionOpen:i=!1,onAccordionToggle:l,accordionData:a,...s}){let[c,m]=we(i),[v,u]=we("");le.useEffect(()=>{m(i)},[i]);let b=()=>{if(!o)return;m(!c),l?.()},_=n=>{a?.checkbox?.onCheckedChange(n)},w=le.useCallback(n=>{a?.radio&&a.radio.onCheckedChange(a.radio.value,n)},[a?.radio]),x=le.useMemo(()=>!a?.searchSelect?.options||!v?a?.searchSelect?.options||[]:a.searchSelect.options.filter(n=>n.label.toLowerCase().includes(v.toLowerCase())),[a?.searchSelect?.options,v]),R=n=>{u(n.target.value)},Te=n=>{a?.searchSelect?.onChangeSearchOption(n),u("")};return r==="accordion"?P(St,{children:[P("tr",{"aria-expanded":o?c:void 0,className:E("bg-layer-2-idle hover:bg-layer-2-hover ease border-b transition-colors duration-100","active:bg-layer-2-pressed","data-[selected=true]:bg-primary-alt-active",o&&"cursor-pointer",t),"data-selected":e,"data-slot":"table-row-accordion",role:o?"button":void 0,tabIndex:o?0:void 0,onClick:b,...s,children:[p("td",{className:"w-6 px-2 py-3",children:a?.checkbox&&p(ue,{checked:a.checkbox.checked,onCheckedChange:_,onClick:n=>n.stopPropagation()})}),p("td",{className:"px-2 py-3",children:P("div",{className:"flex items-center gap-2",children:[o&&p(C,{className:E("text-neutral-medium transition-transform duration-200",c&&"rotate-90"),name:"keyboard_arrow_up"}),p(f,{children:a?.text1})]})}),p("td",{className:"px-2 py-3",children:p(f,{children:a?.text2})}),p("td",{className:"px-2 py-3",onClick:n=>n.stopPropagation(),children:a?.searchSelect&&P(J,{children:[P(Y,{children:[p(U,{placeholder:"Selecione",value:{value:a.searchSelect?.selectedSearchOption||"",label:a.searchSelect?.options.find(n=>n.value===a.searchSelect?.selectedSearchOption)?.label||""}}),p(K,{className:"text-layer-1-active",name:"keyboard_arrow_down"})]}),p(te,{children:P(oe,{className:"p-0",children:[p("div",{className:"py-small border-border-layer-2 border-b",children:P("div",{className:"gap-small py-small_1x-alt bg-layer-2-idle rounded-small flex items-center",children:[p(C,{className:"text-layer-1-active",name:"search"}),p("input",{className:"text-size-body-md text-neutral-dark placeholder:text-neutral-placeholder flex-1 bg-transparent outline-none",placeholder:"Pesquisar",value:v,onChange:R})]})}),x.map(n=>p(re,{className:"p-0",isActive:a.searchSelect?.selectedSearchOption===n.value,value:n,onClick:()=>Te(n.value),children:p(ae,{children:n.label})},n.value))]})})]})}),p("td",{className:"px-2 py-3",onClick:n=>n.stopPropagation(),children:a?.radio&&p(be,{allowToggle:!0,className:"",value:a.radio.checked?a.radio.value:"",onValueChange:n=>{a?.radio&&w(n!=="")},children:p(ge,{className:"",id:`principal-${a.radio.value}`,label:"",value:a.radio.value})})})]}),c&&o&&p("tr",{className:E("bg-layer-2-idle hover:bg-layer-2-hover ease border-b transition-colors duration-100","active:bg-layer-2-pressed","data-[selected=true]:bg-primary-alt-active",t),children:p("td",{colSpan:5,children:o})})]}):p("tr",{className:E("bg-layer-2-idle hover:bg-layer-2-hover ease border-b transition-colors duration-100","active:bg-layer-2-pressed","data-[selected=true]:bg-primary-alt-active",t),"data-selected":e,"data-slot":"table-row",...s})}import{cx as Rt}from"@xjur-ui/util";import{jsx as ie}from"react/jsx-runtime";function hl({className:t,sortedDirection:e,...r}){return ie("button",{className:Rt("size-large-1x rounded-small-1x","flex cursor-pointer items-center justify-center","hidden group-hover/th:flex","data-[sorted=true]:flex","transition-all duration-200 ease-out","data-[sorted=true]:bg-primary-alt-active data-[sorted=true]:text-primary-label-active","absolute top-1/2 right-0 -translate-y-1/2",t),"data-sorted":e!==void 0,type:"button",...r,children:e!==void 0?ie(C,{name:e==="asc"?"arrow_downward":"arrow_upward"}):ie(C,{name:"swap_vert"})})}export{Vt as Table,Ft as TableBody,At as TableCell,qt as TableFooter,Zt as TableHead,jt as TableHeadContent,Kt as TableHeader,fl as TableRow,hl as TableSort};
@@ -1 +1 @@
1
- import ie,{useState as he}from"react";import{cx as E}from"@xjur-ui/util";import*as I from"@radix-ui/react-checkbox";import{cx as Ve}from"@xjur-ui/util";import{cx as Ce}from"@xjur-ui/util";import{jsx as Pe}from"react/jsx-runtime";function C({className:t,filled:e=!1,name:r,...o}){return Pe("span",{...o,className:Ce("material-symbols-outlined","text-size-body-lg select-none",t),style:{fontVariationSettings:`'FILL' ${e?1:0}, 'wght' 600, 'GRAD' 0, 'opsz' 20`,...o.style},children:r})}import{Slot as Se}from"@radix-ui/react-slot";import{cva as _e}from"@xjur-ui/util";import{memo as se,useState as Re}from"react";import*as z from"@radix-ui/react-tooltip";import{jsx as A}from"react/jsx-runtime";function Te({delayDuration:t=0,...e}){return A(z.Provider,{"data-slot":"tooltip-provider",delayDuration:t,...e})}function H({...t}){return A(Te,{children:A(z.Root,{"data-slot":"tooltip",...t})})}import*as le from"@radix-ui/react-tooltip";import{jsx as we}from"react/jsx-runtime";function G({...t}){return we(le.Trigger,{"data-slot":"tooltip-trigger",...t})}import*as N from"@radix-ui/react-tooltip";import{cx as ke}from"@xjur-ui/util";import{jsx as ne}from"react/jsx-runtime";function B({className:t,sideOffset:e=1,variant:r="simple",children:o,...l}){return ne(N.Portal,{children:ne(N.Content,{className:ke("text-size-body-sm z-99999 text-balance","data-[variant=simple]:bg-alt-2 data-[variant=simple]:text-neutral-label data-[variant=simple]:rounded-small-1x data-[variant=simple]:px-small data-[variant=simple]:py-small-1x","data-[variant=rich]:bg-layer-2-idle data-[variant=rich]:text-neutral-dark data-[variant=rich]:rounded-small data-[variant=rich]:border-border-layer-2 data-[variant=rich]:p-large data-[variant=rich]:border","animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin)",t),"data-slot":"tooltip-content","data-variant":r,sideOffset:e,...l,children:o})})}import{jsx as V,jsxs as Ne}from"react/jsx-runtime";var ze=_e("",{variants:{variant:{body:"",label:"",title:"",headline:""},size:{"sm-2x":"","sm-1x":"",sm:"",md:"",lg:""},weight:{thin:"font-thin",extraLight:"font-extralight",light:"font-light",normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold",extraBold:"font-extrabold",black:"font-black"}},compoundVariants:[{variant:"body",size:"sm-1x",class:"text-size-body-sm-1x"},{variant:"body",size:"sm",class:"text-size-body-sm"},{variant:"body",size:"md",class:"text-size-body-md"},{variant:"body",size:"lg",class:"text-size-body-lg"},{variant:"label",size:"sm-2x",class:"text-size-label-sm-2x"},{variant:"label",size:"sm-1x",class:"text-size-label-sm-1x"},{variant:"label",size:"sm",class:"text-size-label-sm"},{variant:"label",size:"md",class:"text-size-label-md"},{variant:"label",size:"lg",class:"text-size-label-lg"},{variant:"title",size:"sm",class:"text-size-title-sm"},{variant:"title",size:"md",class:"text-size-title-md"},{variant:"title",size:"lg",class:"text-size-title-lg"},{variant:"headline",size:"sm",class:"text-size-headline-sm"},{variant:"headline",size:"md",class:"text-size-headline-md"},{variant:"headline",size:"lg",class:"text-size-headline-lg"}],defaultVariants:{variant:"body",size:"md",weight:"normal"}}),f=se(({variant:t,size:e,weight:r,asChild:o,className:l,children:i,...a})=>V(o?Se:"span",{className:ze({variant:t,size:e,weight:r,className:l}),...a,children:i}));f.displayName="Typography";var $=se(({children:t,...e})=>{let[r,o]=Re(!1);return Ne(H,{children:[V(G,{asChild:!0,children:V(f,{onMouseEnter:({currentTarget:i})=>{let a=i.scrollWidth>i.clientWidth;o(a),a?i.style.cursor="pointer":i.style.cursor="text"},...e,children:t})}),r&&V(B,{children:t})]})});$.displayName="TruncatedTypography";import{jsx as S,jsxs as Ie}from"react/jsx-runtime";function pe({label:t,name:e,className:r,disabled:o=!1,...l}){let i=`field-checkbox-${e}`;return Ie("div",{className:"group gap-small flex items-center",children:[S(I.Root,{disabled:o,...l,className:Ve("size-large-alt rounded-small-1x inline-flex items-center justify-center transition-[border-color,box-shadow,background-color] duration-200 outline-none","border-border-layer-2 bg-layer-2-idle cursor-pointer border-2","hover:border-primary-idle focus:border-primary-idle focus:shadow-focus-primary","data-[state=checked]:bg-primary-active data-[state=checked]:border-primary-active","data-[state=checked]:hover:border-primary-idle","disabled:hover:border-border-layer-2 disabled:cursor-not-allowed disabled:opacity-[38%]",r),id:i,name:e,children:S(I.Indicator,{className:"flex items-center justify-center",children:S(C,{className:"text-neutral-label",name:"check"})})}),!!t&&S(f,{asChild:!0,className:"text-size-body-sm data-[disabled=true]:opacity-38","data-disabled":o,weight:"medium",children:S("label",{htmlFor:i,children:t})})]})}import*as d from"react";import*as w from"@radix-ui/react-radio-group";import{cx as L}from"@xjur-ui/util";import{jsx as b,jsxs as O}from"react/jsx-runtime";function Le({children:t,allowToggle:e,value:r,onValueChange:o}){let[l,i]=d.useState([]),[a,s]=d.useState([]);d.useEffect(()=>{let u=d.Children.toArray(t).filter(g=>d.isValidElement(g)&&typeof g.props=="object"&&g.props!==null&&"value"in g.props&&typeof g.props.value=="string").map(g=>g.props.value);s(u)},[t]),d.useEffect(()=>{e&&i(r?r.split(",").filter(Boolean):[])},[r,e]);let m=d.useCallback(u=>{if(!e){o?.(u);return}i(g=>{let T=g.includes(u)?g.filter(y=>y!==u):[...g,u];return o?.(T.join(",")),T})},[e,o]),c=a.length>0&&a.every(u=>l.includes(u)),v=d.useCallback(()=>{if(!e)return;let u=c?[]:a;i(u),o?.(u.join(","))},[e,c,a,o]);return{selected:l,allValues:a,toggleValue:m,toggleAll:v,allSelected:c}}function de({checked:t,disabled:e,onClick:r,className:o,...l}){let i=d.useCallback(()=>{r?.()},[r]);return b("button",{className:L("size-large-alt rounded-circle inline-flex items-center justify-center transition-[border-color,box-shadow,background-color] duration-200 outline-none","border-border-layer-2 bg-layer-2-idle cursor-pointer border-2","hover:border-primary-idle focus:border-primary-idle focus:shadow-focus-primary",t?"bg-primary-active border-primary-active":"",e&&"hover:border-border-layer-2 cursor-not-allowed opacity-[38%]",o),disabled:e,type:"button",onClick:i,...l,children:t&&b("div",{className:"relative flex items-center justify-center","data-slot":"radio-group-indicator"})})}function Oe({label:t,checked:e,onClick:r}){let o=d.useCallback(()=>{r()},[r]);return O("div",{className:"gap-small flex items-center",children:[b(de,{checked:e,onClick:o}),b(f,{asChild:!0,className:"text-size-body-sm",weight:"medium",children:b("button",{className:"cursor-pointer border-none bg-transparent p-0 text-left",type:"button",onClick:o,children:t})})]})}function ce({className:t,orientation:e="vertical",allowToggle:r=!1,allowSelectAll:o=!1,selectAllLabel:l="Selecionar todos",value:i,onValueChange:a,children:s,...m}){let{selected:c,toggleValue:v,toggleAll:u,allSelected:g}=Le({children:s,allowToggle:r,value:i||void 0,onValueChange:a}),k=e==="horizontal",T=d.useCallback(y=>{a?.(y)},[a]);return r?O("div",{className:"gap-small flex flex-col",children:[o&&b(Oe,{checked:g,label:l,onClick:u}),b("div",{className:L("gap-small flex",k?"flex-row":"flex-col",t),children:d.Children.map(s,y=>{if(d.isValidElement(y)&&typeof y.props=="object"&&y.props!==null&&"value"in y.props){let R=y.props;return d.cloneElement(y,{allowToggle:!0,checked:c.includes(R.value),onToggle:()=>v(R.value)})}return y})})]}):b(w.Root,{className:L("gap-small flex",k?"flex-row":"flex-col",t),"data-slot":"radio-group",value:i,onValueChange:T,...m,children:s})}function me({className:t,id:e,label:r,disabled:o=!1,allowToggle:l=!1,checked:i=!1,onToggle:a,...s}){let m=d.useCallback(()=>a?.(),[a]);return l?O("div",{className:"gap-small flex items-center",children:[b(de,{checked:i,disabled:o,onClick:m}),!!r&&b(f,{asChild:!0,className:"text-size-body-sm","data-disabled":o,weight:"medium",children:b("button",{className:"cursor-pointer border-none bg-transparent p-0 text-left",disabled:o,type:"button",onClick:m,children:r})})]}):O("div",{className:"gap-small flex items-center",children:[b(w.Item,{className:L("size-large-alt rounded-circle inline-flex items-center justify-center transition-[border-color,box-shadow,background-color] duration-200 outline-none","border-border-layer-2 bg-layer-2-idle cursor-pointer border-2","hover:border-primary-idle focus:border-primary-idle focus:shadow-focus-primary","data-[state=checked]:bg-primary-active data-[state=checked]:border-primary-active","data-[state=checked]:hover:border-primary-idle",o&&"hover:border-border-layer-2 cursor-not-allowed opacity-[38%]",t),disabled:o,id:e,...s,children:b(w.Indicator,{className:"relative flex items-center justify-center"})}),!!r&&b(f,{asChild:!0,className:"text-size-body-sm","data-disabled":o,weight:"medium",children:b("label",{htmlFor:e,children:r})})]})}import*as ue from"@radix-ui/react-popover";import{createContext as Fe,useContext as Me}from"react";var q=Fe({state:"normal",variant:"normal",customMask:void 0,mask:void 0});function x(){let t=Me(q);if(!t)throw new Error("useFieldContext must be used within a InputRoot, SelectRoot, DatePickerRoot, etc.");return t}import{tv as Ee}from"@xjur-ui/util";var h=Ee({slots:{wrapper:"group flex flex-col gap-small-2x",trigger:["h-large-4x w-auto inline-flex cursor-pointer relative","items-center gap-small rounded-small-1x","py-small_1x-alt px-small","bg-layer-2-idle border border-border-layer-2","group-has-[div[data-slot=input-action-slot]]:rounded-r-none","transition-all duration-200"],content:["group z-1000 max-h-[var(--radix-popover-content-available-height)] max-w-[240px] min-w-[var(--radix-popover-trigger-width)] group-data-[state=open]:rotate-180 transition-transform duration-200"],icon:"size-large text-icon-neutral-3 flex items-center justify-center",slotText:"size-large flex items-center justify-center !text-size-label-md text-neutral-placeholder",caption:"!text-size-body-sm font-normal"},variants:{state:{normal:{trigger:"hover:border-border-layer-3 data-[state=open]:border-primary-idle data-[state=open]:hover:border-primary-idle"},error:{trigger:"border-danger-idle hover:border-danger-idle data-[state=open]:border-danger-idle data-[state=open]:hover:border-danger-idle",caption:"text-danger-label-idle"},disabled:{trigger:"pointer-events-none border-transparent bg-layer-2-idle"}}}});import{jsx as W}from"react/jsx-runtime";var{wrapper:Ae}=h();function J({className:t,state:e="normal",defaultOpen:r,variant:o="normal",modal:l,open:i,onOpenChange:a,...s}){return W(ue.Root,{defaultOpen:r,modal:l,open:i,onOpenChange:a,children:W(q.Provider,{value:{state:e,variant:o},children:W("div",{className:Ae({className:t,state:e}),...s})})})}import{tv as He,twMerge as Ge}from"@xjur-ui/util";import*as fe from"@radix-ui/react-popover";import{jsx as $e}from"react/jsx-runtime";var{trigger:Be}=h();function Y({className:t,...e}){let{state:r,variant:o}=x(),l=He({base:["group bg-layer-2-idle"],variants:{state:{normal:["border-border-layer-2 hover:border-border-layer-3 has-[input:not(:placeholder-shown)]:border-primary-idle"],error:["border-danger-idle hover:border-danger-idle"],disabled:["border border-border-layer-2 opacity-60"]}}}),i=Ge(Be({state:r,className:t}),o==="filter"&&l({state:r,className:t}));return $e(fe.Trigger,{className:i,disabled:r==="disabled",...e})}import{jsx as ge}from"react/jsx-runtime";var{icon:qe}=h();function K({className:t,name:e,orientation:r="left",...o}){let{state:l}=x();return ge("div",{className:qe({className:t,state:l}),"data-slot":`control-${r}-slot`,...o,children:ge(C,{name:e})})}import{twJoin as Je}from"@xjur-ui/util";import{useMemo as Ye}from"react";import{tv as We}from"@xjur-ui/util";import{jsx as be}from"react/jsx-runtime";function Q({className:t,htmlFor:e,children:r,...o}){let{state:l}=x(),i=We({base:["group inline-block max-w-full truncate text-left","ease animate-in left-small right-small pointer-events-none absolute top-1/2 -translate-y-1/2 transition-all duration-250","text-size-body-md","group-focus-within:-top-[3px]","group-data-[state=open]:-top-[3px]","group-focus-within:text-size-label-sm-1x group-focus-within:font-medium","group-data-[state=open]:text-size-label-sm-1x group-data-[state=open]:font-medium","group-has-[input:not(:placeholder-shown)]:-top-[3px]","group-has-[input:not(:placeholder-shown)]:text-size-label-sm-1x","group-has-[input:not(:placeholder-shown)]:font-medium","group-has-[div[data-slot=control-left-slot]]:left-large-4x","group-has-[div[data-slot=control-left-slot]]:group-focus-within:left-small","group-has-[div[data-slot=control-left-slot]]:group-has-[input:not(:placeholder-shown)]:left-small","group-has-[div[data-slot=control-left-slot]]:group-data-[state=open]:left-small","group-focus-within:animate-in","group-has-[input:not(:placeholder-shown)]:animate-out","data-[disabled=true]:hidden"],variants:{state:{normal:["group-focus-within:!text-primary-idle group-data-[state=open]:!text-primary-idle","group-has-[input:not(:placeholder-shown)]:!text-primary-idle"],error:["group-focus-within:!text-danger-label-active group-data-[state=open]:!text-danger-label-active","group-has-[input:not(:placeholder-shown)]:!text-danger-label-active"],disabled:[]}}});return be("label",{className:i({className:t,state:l}),htmlFor:e,...o,children:be("span",{className:"rounded-small-1x bg-layer-2-idle max-w-full",children:r})})}import{jsx as F,jsxs as Ke}from"react/jsx-runtime";function U({className:t,value:e,placeholder:r,renderValue:o,...l}){let{variant:i}=x(),a=Ye(()=>{let s=o?o(e??""):typeof e=="object"?e?.label:e;return i==="filter"?s:s||r},[e,r,i,o]);return Ke("div",{className:"grid w-full items-center",children:[r&&i==="filter"&&F(Q,{children:r}),r&&i==="filter"&&F(f,{className:"invisible col-start-1 row-start-1 self-center",children:r}),F(f,{className:"text-neutral-dark z-10 col-start-1 row-start-1 self-center text-left",children:a}),F("input",{...l,"aria-readonly":!0,className:Je("pointer-events-none",t),hidden:!0,placeholder:" ",readOnly:!0,value:typeof e=="object"?e?.value??"":e??""})]})}import{twMerge as ko}from"@xjur-ui/util";import{Fragment as _o,useMemo as Ro}from"react";import{jsx as Lo,jsxs as Oo}from"react/jsx-runtime";import*as M from"@radix-ui/react-popover";import{Slot as Ue}from"@radix-ui/react-slot";import{cx as Xe}from"@xjur-ui/util";import{useVirtualizer as Ze}from"@tanstack/react-virtual";import{useRef as je}from"react";import{createContext as Qe}from"react";var _=Qe({virtualizer:null,enabled:!1});import{jsx as ye}from"react/jsx-runtime";function X({className:t,asChild:e,children:r,virtualized:o=!1,itemCount:l=0,estimateSize:i=()=>48,overscan:a=5,...s}){let m=e?Ue:"div",c=je(null),v=Ze({count:l,getScrollElement:()=>c.current,estimateSize:i,overscan:a,enabled:o});return ye(_.Provider,{value:{virtualizer:v,enabled:o},children:ye(m,{...s,className:Xe(t,"rounded-small scrollbar-thin bg-layer-2-idle border-border-layer-2 shadow-elevation-3 z-1000 max-h-[400px] list-none overflow-x-hidden overflow-y-auto border"),ref:c,children:r})})}import{Slot as Yo}from"@radix-ui/react-slot";import{cx as Qo}from"@xjur-ui/util";import{jsx as Xo}from"react/jsx-runtime";import{cx as Do}from"@xjur-ui/util";import{jsx as or}from"react/jsx-runtime";import{Slot as De}from"@radix-ui/react-slot";import{cx as xe}from"@xjur-ui/util";import{useContext as et}from"react";import{jsx as Z}from"react/jsx-runtime";function j({className:t,asChild:e,children:r,renderItem:o,...l}){let i=e?De:"ul",{virtualizer:a,enabled:s}=et(_);if(s&&a&&o){let m=a.getVirtualItems();return Z(i,{...l,className:xe("p-small relative flex flex-col",t),style:{height:`${a.getTotalSize()}px`},children:m.map(c=>Z("div",{className:"absolute top-0 left-0 w-full","data-index":c.index,ref:a.measureElement,style:{transform:`translateY(${c.start}px)`},children:o(c.index)},c.key))})}return Z(i,{...l,className:xe("gap-small-1x p-small flex flex-col",t),children:r})}import{Slot as tt}from"@radix-ui/react-slot";import{cx as ot,cva as rt}from"@xjur-ui/util";import{jsx as it}from"react/jsx-runtime";var at=rt(["py-medium px-small flex items-center gap-small rounded-small-1x","bg-layer-2-idle text-neutral-dark","hover:bg-layer-2-hover transition-colors duration-100 ease-out","active:bg-layer-2-pressed"],{variants:{size:{md:"h-large-4x",lg:"h-large-7x"},isActive:{true:"bg-primary-alt-active text-primary-label-active hover:bg-primary-alt-hover active:bg-primary-alt-pressed"}},defaultVariants:{size:"md",isActive:!1}});function D({className:t,size:e,isActive:r,asChild:o,...l}){return it(o?tt:"li",{...l,className:ot(at({size:e,isActive:r}),t)})}import{jsx as ee}from"react/jsx-runtime";var{content:st}=h();function te({className:t,sideOffset:e=5,side:r="bottom",align:o="start",children:l,virtualized:i=!1,overscan:a=5,estimateSize:s=()=>32,...m}){let{state:c}=x();return ee(M.Portal,{children:ee(M.Content,{align:o,className:st({className:t,state:c}),side:r,sideOffset:e,...m,children:ee(X,{estimateSize:s,overscan:a,virtualized:i,children:l})})})}import{jsx as Nr}from"react/jsx-runtime";var{caption:Rr}=h();import{jsx as Mr}from"react/jsx-runtime";var{slotText:Or}=h();import{jsx as pt}from"react/jsx-runtime";function oe(t){return pt(j,{...t})}import{twMerge as dt}from"@xjur-ui/util";import{jsx as ct}from"react/jsx-runtime";function re({className:t,value:e,...r}){return ct(D,{className:dt(t,"cursor-pointer"),value:typeof e=="object"?e?.value:e,...r})}import{twMerge as mt}from"@xjur-ui/util";import{jsx as ut}from"react/jsx-runtime";function ae({className:t,...e}){return ut($,{className:mt(t,"truncate"),...e})}import{jsx as Zr}from"react/jsx-runtime";import{jsx as ta}from"react/jsx-runtime";import{Fragment as ft,jsx as p,jsxs as P}from"react/jsx-runtime";function za({className:t,isSelected:e=!1,variant:r="default",accordionContent:o,isAccordionOpen:l=!1,onAccordionToggle:i,accordionData:a,...s}){let[m,c]=he(l),[v,u]=he("");ie.useEffect(()=>{c(l)},[l]);let g=()=>{if(!o)return;c(!m),i?.()},k=n=>{a?.checkbox?.onCheckedChange(n)},T=ie.useCallback(n=>{a?.radio&&a.radio.onCheckedChange(a.radio.value,n)},[a?.radio]),y=ie.useMemo(()=>!a?.searchSelect?.options||!v?a?.searchSelect?.options||[]:a.searchSelect.options.filter(n=>n.label.toLowerCase().includes(v.toLowerCase())),[a?.searchSelect?.options,v]),R=n=>{u(n.target.value)},ve=n=>{a?.searchSelect?.onChangeSearchOption(n),u("")};return r==="accordion"?P(ft,{children:[P("tr",{"aria-expanded":o?m:void 0,className:E("bg-layer-2-idle hover:bg-layer-2-hover ease border-b transition-colors duration-100","active:bg-layer-2-pressed","data-[selected=true]:bg-primary-alt-active",o&&"cursor-pointer",t),"data-selected":e,"data-slot":"table-row-accordion",role:o?"button":void 0,tabIndex:o?0:void 0,onClick:g,...s,children:[p("td",{className:"w-6 px-2 py-3",children:a?.checkbox&&p(pe,{checked:a.checkbox.checked,onCheckedChange:k,onClick:n=>n.stopPropagation()})}),p("td",{className:"px-2 py-3",children:P("div",{className:"flex items-center gap-2",children:[o&&p(C,{className:E("text-neutral-medium transition-transform duration-200",m&&"rotate-90"),name:"keyboard_arrow_up"}),p(f,{children:a?.text1})]})}),p("td",{className:"px-2 py-3",children:p(f,{children:a?.text2})}),p("td",{className:"px-2 py-3",onClick:n=>n.stopPropagation(),children:a?.searchSelect&&P(J,{children:[P(Y,{children:[p(U,{placeholder:"Selecione",value:{value:a.searchSelect?.selectedSearchOption||"",label:a.searchSelect?.options.find(n=>n.value===a.searchSelect?.selectedSearchOption)?.label||""}}),p(K,{className:"text-layer-1-active",name:"keyboard_arrow_down"})]}),p(te,{children:P(oe,{className:"p-0",children:[p("div",{className:"py-small border-border-layer-2 border-b",children:P("div",{className:"gap-small py-small_1x-alt bg-layer-2-idle rounded-small flex items-center",children:[p(C,{className:"text-layer-1-active",name:"search"}),p("input",{className:"text-size-body-md text-neutral-dark placeholder:text-neutral-placeholder flex-1 bg-transparent outline-none",placeholder:"Pesquisar",value:v,onChange:R})]})}),y.map(n=>p(re,{className:"p-0",isActive:a.searchSelect?.selectedSearchOption===n.value,value:n,onClick:()=>ve(n.value),children:p(ae,{children:n.label})},n.value))]})})]})}),p("td",{className:"px-2 py-3",onClick:n=>n.stopPropagation(),children:a?.radio&&p(ce,{allowToggle:!0,className:"",value:a.radio.checked?a.radio.value:"",onValueChange:n=>{a?.radio&&T(n!=="")},children:p(me,{className:"",id:`principal-${a.radio.value}`,label:"",value:a.radio.value})})})]}),m&&o&&p("tr",{className:E("bg-layer-2-idle hover:bg-layer-2-hover ease border-b transition-colors duration-100","active:bg-layer-2-pressed","data-[selected=true]:bg-primary-alt-active",t),children:p("td",{colSpan:5,children:o})})]}):p("tr",{className:E("bg-layer-2-idle hover:bg-layer-2-hover ease border-b transition-colors duration-100","active:bg-layer-2-pressed","data-[selected=true]:bg-primary-alt-active",t),"data-selected":e,"data-slot":"table-row",...s})}export{za as TableRow};
1
+ import ie,{useState as he}from"react";import{cx as E}from"@xjur-ui/util";import*as I from"@radix-ui/react-checkbox";import{cx as Ve}from"@xjur-ui/util";import{cx as Ce}from"@xjur-ui/util";import{jsx as Pe}from"react/jsx-runtime";function C({className:t,filled:e=!1,name:r,...o}){return Pe("span",{...o,className:Ce("material-symbols-outlined","text-size-body-lg select-none",t),style:{fontVariationSettings:`'FILL' ${e?1:0}, 'wght' 600, 'GRAD' 0, 'opsz' 20`,...o.style},children:r})}import{Slot as Se}from"@radix-ui/react-slot";import{cva as _e}from"@xjur-ui/util";import{memo as se,useState as Re}from"react";import*as z from"@radix-ui/react-tooltip";import{jsx as A}from"react/jsx-runtime";function Te({delayDuration:t=0,...e}){return A(z.Provider,{"data-slot":"tooltip-provider",delayDuration:t,...e})}function H({...t}){return A(Te,{children:A(z.Root,{"data-slot":"tooltip",...t})})}import*as le from"@radix-ui/react-tooltip";import{jsx as ke}from"react/jsx-runtime";function G({...t}){return ke(le.Trigger,{"data-slot":"tooltip-trigger",...t})}import*as N from"@radix-ui/react-tooltip";import{cx as we}from"@xjur-ui/util";import{jsx as ne}from"react/jsx-runtime";function B({className:t,sideOffset:e=1,variant:r="simple",children:o,...l}){return ne(N.Portal,{children:ne(N.Content,{className:we("text-size-body-sm z-99999 text-balance","data-[variant=simple]:bg-alt-2 data-[variant=simple]:text-neutral-label data-[variant=simple]:rounded-small-1x data-[variant=simple]:px-small data-[variant=simple]:py-small-1x","data-[variant=rich]:bg-layer-2-idle data-[variant=rich]:text-neutral-dark data-[variant=rich]:rounded-small data-[variant=rich]:border-border-layer-2 data-[variant=rich]:p-large data-[variant=rich]:border","animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin)",t),"data-slot":"tooltip-content","data-variant":r,sideOffset:e,...l,children:o})})}import{jsx as V,jsxs as Ne}from"react/jsx-runtime";var ze=_e("",{variants:{variant:{body:"",label:"",title:"",headline:""},size:{"sm-2x":"","sm-1x":"",sm:"",md:"",lg:""},weight:{thin:"font-thin",extraLight:"font-extralight",light:"font-light",normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold",extraBold:"font-extrabold",black:"font-black"}},compoundVariants:[{variant:"body",size:"sm-1x",class:"text-size-body-sm-1x"},{variant:"body",size:"sm",class:"text-size-body-sm"},{variant:"body",size:"md",class:"text-size-body-md"},{variant:"body",size:"lg",class:"text-size-body-lg"},{variant:"label",size:"sm-2x",class:"text-size-label-sm-2x"},{variant:"label",size:"sm-1x",class:"text-size-label-sm-1x"},{variant:"label",size:"sm",class:"text-size-label-sm"},{variant:"label",size:"md",class:"text-size-label-md"},{variant:"label",size:"lg",class:"text-size-label-lg"},{variant:"title",size:"sm",class:"text-size-title-sm"},{variant:"title",size:"md",class:"text-size-title-md"},{variant:"title",size:"lg",class:"text-size-title-lg"},{variant:"headline",size:"sm",class:"text-size-headline-sm"},{variant:"headline",size:"md",class:"text-size-headline-md"},{variant:"headline",size:"lg",class:"text-size-headline-lg"}],defaultVariants:{variant:"body",size:"md",weight:"normal"}}),f=se(({variant:t,size:e,weight:r,asChild:o,className:l,children:i,...a})=>V(o?Se:"span",{className:ze({variant:t,size:e,weight:r,className:l}),...a,children:i}));f.displayName="Typography";var $=se(({children:t,...e})=>{let[r,o]=Re(!1);return Ne(H,{children:[V(G,{asChild:!0,children:V(f,{onMouseEnter:({currentTarget:i})=>{let a=i.scrollWidth>i.clientWidth;o(a),a?i.style.cursor="pointer":i.style.cursor="text"},...e,children:t})}),r&&V(B,{children:t})]})});$.displayName="TruncatedTypography";import{jsx as S,jsxs as Ie}from"react/jsx-runtime";function pe({label:t,name:e,className:r,disabled:o=!1,...l}){let i=`field-checkbox-${e}`;return Ie("div",{className:"group gap-small flex items-center",children:[S(I.Root,{disabled:o,...l,className:Ve("size-large-alt rounded-small-1x inline-flex items-center justify-center transition-[border-color,box-shadow,background-color] duration-200 outline-none","border-border-layer-2 bg-layer-2-idle cursor-pointer border-2","hover:border-primary-idle focus:border-primary-idle focus:shadow-focus-primary","data-[state=checked]:bg-primary-active data-[state=checked]:border-primary-active","data-[state=checked]:hover:border-primary-idle","disabled:hover:border-border-layer-2 disabled:cursor-not-allowed disabled:opacity-[38%]",r),id:i,name:e,children:S(I.Indicator,{className:"flex items-center justify-center",children:S(C,{className:"text-neutral-label",name:"check"})})}),!!t&&S(f,{asChild:!0,className:"text-size-body-sm data-[disabled=true]:opacity-38","data-disabled":o,weight:"medium",children:S("label",{htmlFor:i,children:t})})]})}import*as d from"react";import*as k from"@radix-ui/react-radio-group";import{cx as L}from"@xjur-ui/util";import{jsx as b,jsxs as O}from"react/jsx-runtime";function Le({children:t,allowToggle:e,value:r,onValueChange:o}){let[l,i]=d.useState([]),[a,s]=d.useState([]);d.useEffect(()=>{let u=d.Children.toArray(t).filter(g=>d.isValidElement(g)&&typeof g.props=="object"&&g.props!==null&&"value"in g.props&&typeof g.props.value=="string").map(g=>g.props.value);s(u)},[t]),d.useEffect(()=>{e&&i(r?r.split(",").filter(Boolean):[])},[r,e]);let m=d.useCallback(u=>{if(!e){o?.(u);return}i(g=>{let T=g.includes(u)?g.filter(y=>y!==u):[...g,u];return o?.(T.join(",")),T})},[e,o]),c=a.length>0&&a.every(u=>l.includes(u)),v=d.useCallback(()=>{if(!e)return;let u=c?[]:a;i(u),o?.(u.join(","))},[e,c,a,o]);return{selected:l,allValues:a,toggleValue:m,toggleAll:v,allSelected:c}}function de({checked:t,disabled:e,onClick:r,className:o,...l}){let i=d.useCallback(()=>{r?.()},[r]);return b("button",{className:L("size-large-alt rounded-circle inline-flex items-center justify-center transition-[border-color,box-shadow,background-color] duration-200 outline-none","border-border-layer-2 bg-layer-2-idle cursor-pointer border-2","hover:border-primary-idle focus:border-primary-idle focus:shadow-focus-primary",t?"bg-primary-active border-primary-active":"",e&&"hover:border-border-layer-2 cursor-not-allowed opacity-[38%]",o),disabled:e,type:"button",onClick:i,...l,children:t&&b("div",{className:"relative flex items-center justify-center","data-slot":"radio-group-indicator"})})}function Oe({label:t,checked:e,onClick:r}){let o=d.useCallback(()=>{r()},[r]);return O("div",{className:"gap-small flex items-center",children:[b(de,{checked:e,onClick:o}),b(f,{asChild:!0,className:"text-size-body-sm",weight:"medium",children:b("button",{className:"cursor-pointer border-none bg-transparent p-0 text-left",type:"button",onClick:o,children:t})})]})}function ce({className:t,orientation:e="vertical",allowToggle:r=!1,allowSelectAll:o=!1,selectAllLabel:l="Selecionar todos",value:i,onValueChange:a,children:s,...m}){let{selected:c,toggleValue:v,toggleAll:u,allSelected:g}=Le({children:s,allowToggle:r,value:i||void 0,onValueChange:a}),w=e==="horizontal",T=d.useCallback(y=>{a?.(y)},[a]);return r?O("div",{className:"gap-small flex flex-col",children:[o&&b(Oe,{checked:g,label:l,onClick:u}),b("div",{className:L("gap-small flex",w?"flex-row":"flex-col",t),children:d.Children.map(s,y=>{if(d.isValidElement(y)&&typeof y.props=="object"&&y.props!==null&&"value"in y.props){let R=y.props;return d.cloneElement(y,{allowToggle:!0,checked:c.includes(R.value),onToggle:()=>v(R.value)})}return y})})]}):b(k.Root,{className:L("gap-small flex",w?"flex-row":"flex-col",t),"data-slot":"radio-group",value:i,onValueChange:T,...m,children:s})}function me({className:t,id:e,label:r,disabled:o=!1,allowToggle:l=!1,checked:i=!1,onToggle:a,...s}){let m=d.useCallback(()=>a?.(),[a]);return l?O("div",{className:"gap-small flex items-center",children:[b(de,{checked:i,disabled:o,onClick:m}),!!r&&b(f,{asChild:!0,className:"text-size-body-sm","data-disabled":o,weight:"medium",children:b("button",{className:"cursor-pointer border-none bg-transparent p-0 text-left",disabled:o,type:"button",onClick:m,children:r})})]}):O("div",{className:"gap-small flex items-center",children:[b(k.Item,{className:L("size-large-alt rounded-circle inline-flex items-center justify-center transition-[border-color,box-shadow,background-color] duration-200 outline-none","border-border-layer-2 bg-layer-2-idle cursor-pointer border-2","hover:border-primary-idle focus:border-primary-idle focus:shadow-focus-primary","data-[state=checked]:bg-primary-active data-[state=checked]:border-primary-active","data-[state=checked]:hover:border-primary-idle",o&&"hover:border-border-layer-2 cursor-not-allowed opacity-[38%]",t),disabled:o,id:e,...s,children:b(k.Indicator,{className:"relative flex items-center justify-center"})}),!!r&&b(f,{asChild:!0,className:"text-size-body-sm","data-disabled":o,weight:"medium",children:b("label",{htmlFor:e,children:r})})]})}import*as ue from"@radix-ui/react-popover";import{createContext as Fe,useContext as Me}from"react";var q=Fe({state:"normal",variant:"normal",customMask:void 0,mask:void 0});function x(){let t=Me(q);if(!t)throw new Error("useFieldContext must be used within a InputRoot, SelectRoot, DatePickerRoot, etc.");return t}import{tv as Ee}from"@xjur-ui/util";var h=Ee({slots:{wrapper:"group flex flex-col gap-small-2x",trigger:["h-large-4x w-auto inline-flex cursor-pointer relative","items-center gap-small rounded-small-1x","py-small_1x-alt px-small","bg-layer-2-idle border border-border-layer-2","group-has-[div[data-slot=input-action-slot]]:rounded-r-none","transition-all duration-200"],content:["group z-1000 max-h-[var(--radix-popover-content-available-height)] max-w-[240px] min-w-[var(--radix-popover-trigger-width)] group-data-[state=open]:rotate-180 transition-transform duration-200"],icon:"size-large text-icon-neutral-3 flex items-center justify-center",slotText:"size-large flex items-center justify-center !text-size-label-md text-neutral-placeholder",caption:"!text-size-body-sm font-normal"},variants:{state:{normal:{trigger:"hover:border-border-layer-3 data-[state=open]:border-primary-idle data-[state=open]:hover:border-primary-idle"},error:{trigger:"border-danger-idle hover:border-danger-idle data-[state=open]:border-danger-idle data-[state=open]:hover:border-danger-idle",caption:"text-danger-label-idle"},disabled:{trigger:"pointer-events-none border-transparent bg-layer-2-idle"}}}});import{jsx as W}from"react/jsx-runtime";var{wrapper:Ae}=h();function J({className:t,state:e="normal",defaultOpen:r,variant:o="normal",modal:l,open:i,onOpenChange:a,...s}){return W(ue.Root,{defaultOpen:r,modal:l,open:i,onOpenChange:a,children:W(q.Provider,{value:{state:e,variant:o},children:W("div",{className:Ae({className:t,state:e}),...s})})})}import{tv as He,twMerge as Ge}from"@xjur-ui/util";import*as fe from"@radix-ui/react-popover";import{jsx as $e}from"react/jsx-runtime";var{trigger:Be}=h();function Y({className:t,...e}){let{state:r,variant:o}=x(),l=He({base:["group bg-layer-2-idle"],variants:{state:{normal:["border-border-layer-2 hover:border-border-layer-3 has-[input:not(:placeholder-shown)]:border-primary-idle"],error:["border-danger-idle hover:border-danger-idle"],disabled:["border border-border-layer-2 opacity-60"]}}}),i=Ge(Be({state:r,className:t}),o==="filter"&&l({state:r,className:t}));return $e(fe.Trigger,{className:i,disabled:r==="disabled",...e})}import{jsx as ge}from"react/jsx-runtime";var{icon:qe}=h();function K({className:t,name:e,orientation:r="left",...o}){let{state:l}=x();return ge("div",{className:qe({className:t,state:l}),"data-slot":`control-${r}-slot`,...o,children:ge(C,{name:e})})}import{twJoin as Je}from"@xjur-ui/util";import{useMemo as Ye}from"react";import{tv as We}from"@xjur-ui/util";import{jsx as be}from"react/jsx-runtime";function Q({className:t,htmlFor:e,children:r,...o}){let{state:l}=x(),i=We({base:["group inline-block max-w-full truncate text-left","ease animate-in left-small right-small pointer-events-none absolute top-1/2 -translate-y-1/2 transition-all duration-250","text-size-body-md","group-focus-within:-top-[3px]","group-data-[state=open]:-top-[3px]","group-focus-within:text-size-label-sm-1x group-focus-within:font-medium","group-data-[state=open]:text-size-label-sm-1x group-data-[state=open]:font-medium","group-has-[input:not(:placeholder-shown)]:-top-[3px]","group-has-[input:not(:placeholder-shown)]:text-size-label-sm-1x","group-has-[input:not(:placeholder-shown)]:font-medium","group-has-[div[data-slot=control-left-slot]]:left-large-4x","group-has-[div[data-slot=control-left-slot]]:group-focus-within:left-small","group-has-[div[data-slot=control-left-slot]]:group-has-[input:not(:placeholder-shown)]:left-small","group-has-[div[data-slot=control-left-slot]]:group-data-[state=open]:left-small","group-focus-within:animate-in","group-has-[input:not(:placeholder-shown)]:animate-out","data-[disabled=true]:hidden"],variants:{state:{normal:["group-focus-within:!text-primary-idle group-data-[state=open]:!text-primary-idle","group-has-[input:not(:placeholder-shown)]:!text-primary-idle"],error:["group-focus-within:!text-danger-label-active group-data-[state=open]:!text-danger-label-active","group-has-[input:not(:placeholder-shown)]:!text-danger-label-active"],disabled:[]}}});return be("label",{className:i({className:t,state:l}),htmlFor:e,...o,children:be("span",{className:"rounded-small-1x bg-layer-2-idle max-w-full",children:r})})}import{jsx as F,jsxs as Ke}from"react/jsx-runtime";function U({className:t,value:e,placeholder:r,renderValue:o,...l}){let{variant:i}=x(),a=Ye(()=>{let s=o?o(e??""):typeof e=="object"?e?.label:e;return i==="filter"?s:s||r},[e,r,i,o]);return Ke("div",{className:"grid w-full items-center",children:[r&&i==="filter"&&F(Q,{children:r}),r&&i==="filter"&&F(f,{className:"invisible col-start-1 row-start-1 self-center",children:r}),F(f,{className:"text-neutral-dark z-10 col-start-1 row-start-1 self-center text-left",children:a}),F("input",{...l,"aria-readonly":!0,className:Je("pointer-events-none",t),hidden:!0,placeholder:" ",readOnly:!0,value:typeof e=="object"?e?.value??"":e??""})]})}import{twMerge as wo}from"@xjur-ui/util";import{Fragment as _o,useMemo as Ro}from"react";import{jsx as Lo,jsxs as Oo}from"react/jsx-runtime";import*as M from"@radix-ui/react-popover";import{Slot as Ue}from"@radix-ui/react-slot";import{cx as Xe}from"@xjur-ui/util";import{useVirtualizer as Ze}from"@tanstack/react-virtual";import{useRef as je}from"react";import{createContext as Qe}from"react";var _=Qe({virtualizer:null,enabled:!1});import{jsx as ye}from"react/jsx-runtime";function X({className:t,asChild:e,children:r,virtualized:o=!1,itemCount:l=0,estimateSize:i=()=>48,overscan:a=5,...s}){let m=e?Ue:"div",c=je(null),v=Ze({count:l,getScrollElement:()=>c.current,estimateSize:i,overscan:a,enabled:o});return ye(_.Provider,{value:{virtualizer:v,enabled:o},children:ye(m,{...s,className:Xe(t,"rounded-small scrollbar-thin bg-layer-2-idle border-border-layer-2 shadow-elevation-3 z-1000 max-h-[400px] list-none overflow-x-hidden overflow-y-auto border"),ref:c,children:r})})}import{Slot as Yo}from"@radix-ui/react-slot";import{cx as Qo}from"@xjur-ui/util";import{jsx as Xo}from"react/jsx-runtime";import{cx as Do}from"@xjur-ui/util";import{jsx as or}from"react/jsx-runtime";import{Slot as De}from"@radix-ui/react-slot";import{cx as xe}from"@xjur-ui/util";import{useContext as et}from"react";import{jsx as Z}from"react/jsx-runtime";function j({className:t,asChild:e,children:r,renderItem:o,...l}){let i=e?De:"ul",{virtualizer:a,enabled:s}=et(_);if(s&&a&&o){let m=a.getVirtualItems();return Z(i,{...l,className:xe("p-small relative flex flex-col",t),style:{height:`${a.getTotalSize()}px`},children:m.map(c=>Z("div",{className:"absolute top-0 left-0 w-full","data-index":c.index,ref:a.measureElement,style:{transform:`translateY(${c.start}px)`},children:o(c.index)},c.key))})}return Z(i,{...l,className:xe("gap-small-1x p-small flex flex-col",t),children:r})}import{Slot as tt}from"@radix-ui/react-slot";import{cx as ot,cva as rt}from"@xjur-ui/util";import{jsx as it}from"react/jsx-runtime";var at=rt(["py-medium px-small flex items-center gap-small rounded-small-1x","bg-layer-2-idle text-neutral-dark","hover:bg-layer-2-hover transition-colors duration-100 ease-out","active:bg-layer-2-pressed"],{variants:{size:{md:"h-large-4x",lg:"h-large-7x"},isActive:{true:"bg-primary-alt-active text-primary-label-active hover:bg-primary-alt-hover active:bg-primary-alt-pressed"}},defaultVariants:{size:"md",isActive:!1}});function D({className:t,size:e,isActive:r,asChild:o,...l}){return it(o?tt:"li",{...l,className:ot(at({size:e,isActive:r}),t)})}import{jsx as ee}from"react/jsx-runtime";var{content:st}=h();function te({className:t,sideOffset:e=5,side:r="bottom",align:o="start",children:l,virtualized:i=!1,overscan:a=5,estimateSize:s=()=>32,...m}){let{state:c}=x();return ee(M.Portal,{children:ee(M.Content,{align:o,className:st({className:t,state:c}),side:r,sideOffset:e,...m,children:ee(X,{estimateSize:s,overscan:a,virtualized:i,children:l})})})}import{jsx as Nr}from"react/jsx-runtime";var{caption:Rr}=h();import{jsx as Mr}from"react/jsx-runtime";var{slotText:Or}=h();import{jsx as pt}from"react/jsx-runtime";function oe(t){return pt(j,{...t})}import{twMerge as dt}from"@xjur-ui/util";import{jsx as ct}from"react/jsx-runtime";function re({className:t,value:e,...r}){return ct(D,{className:dt(t,"cursor-pointer"),value:typeof e=="object"?e?.value:e,...r})}import{twMerge as mt}from"@xjur-ui/util";import{jsx as ut}from"react/jsx-runtime";function ae({className:t,...e}){return ut($,{className:mt(t,"truncate"),...e})}import{jsx as Zr}from"react/jsx-runtime";import{jsx as ta}from"react/jsx-runtime";import{Fragment as ft,jsx as p,jsxs as P}from"react/jsx-runtime";function za({className:t,isSelected:e=!1,variant:r="default",accordionContent:o,isAccordionOpen:l=!1,onAccordionToggle:i,accordionData:a,...s}){let[m,c]=he(l),[v,u]=he("");ie.useEffect(()=>{c(l)},[l]);let g=()=>{if(!o)return;c(!m),i?.()},w=n=>{a?.checkbox?.onCheckedChange(n)},T=ie.useCallback(n=>{a?.radio&&a.radio.onCheckedChange(a.radio.value,n)},[a?.radio]),y=ie.useMemo(()=>!a?.searchSelect?.options||!v?a?.searchSelect?.options||[]:a.searchSelect.options.filter(n=>n.label.toLowerCase().includes(v.toLowerCase())),[a?.searchSelect?.options,v]),R=n=>{u(n.target.value)},ve=n=>{a?.searchSelect?.onChangeSearchOption(n),u("")};return r==="accordion"?P(ft,{children:[P("tr",{"aria-expanded":o?m:void 0,className:E("bg-layer-2-idle hover:bg-layer-2-hover ease border-b transition-colors duration-100","active:bg-layer-2-pressed","data-[selected=true]:bg-primary-alt-active",o&&"cursor-pointer",t),"data-selected":e,"data-slot":"table-row-accordion",role:o?"button":void 0,tabIndex:o?0:void 0,onClick:g,...s,children:[p("td",{className:"w-6 px-2 py-3",children:a?.checkbox&&p(pe,{checked:a.checkbox.checked,onCheckedChange:w,onClick:n=>n.stopPropagation()})}),p("td",{className:"px-2 py-3",children:P("div",{className:"flex items-center gap-2",children:[o&&p(C,{className:E("text-neutral-medium transition-transform duration-200",m&&"rotate-90"),name:"keyboard_arrow_up"}),p(f,{children:a?.text1})]})}),p("td",{className:"px-2 py-3",children:p(f,{children:a?.text2})}),p("td",{className:"px-2 py-3",onClick:n=>n.stopPropagation(),children:a?.searchSelect&&P(J,{children:[P(Y,{children:[p(U,{placeholder:"Selecione",value:{value:a.searchSelect?.selectedSearchOption||"",label:a.searchSelect?.options.find(n=>n.value===a.searchSelect?.selectedSearchOption)?.label||""}}),p(K,{className:"text-layer-1-active",name:"keyboard_arrow_down"})]}),p(te,{children:P(oe,{className:"p-0",children:[p("div",{className:"py-small border-border-layer-2 border-b",children:P("div",{className:"gap-small py-small_1x-alt bg-layer-2-idle rounded-small flex items-center",children:[p(C,{className:"text-layer-1-active",name:"search"}),p("input",{className:"text-size-body-md text-neutral-dark placeholder:text-neutral-placeholder flex-1 bg-transparent outline-none",placeholder:"Pesquisar",value:v,onChange:R})]})}),y.map(n=>p(re,{className:"p-0",isActive:a.searchSelect?.selectedSearchOption===n.value,value:n,onClick:()=>ve(n.value),children:p(ae,{children:n.label})},n.value))]})})]})}),p("td",{className:"px-2 py-3",onClick:n=>n.stopPropagation(),children:a?.radio&&p(ce,{allowToggle:!0,className:"",value:a.radio.checked?a.radio.value:"",onValueChange:n=>{a?.radio&&T(n!=="")},children:p(me,{className:"",id:`principal-${a.radio.value}`,label:"",value:a.radio.value})})})]}),m&&o&&p("tr",{className:E("bg-layer-2-idle hover:bg-layer-2-hover ease border-b transition-colors duration-100","active:bg-layer-2-pressed","data-[selected=true]:bg-primary-alt-active",t),children:p("td",{colSpan:5,children:o})})]}):p("tr",{className:E("bg-layer-2-idle hover:bg-layer-2-hover ease border-b transition-colors duration-100","active:bg-layer-2-pressed","data-[selected=true]:bg-primary-alt-active",t),"data-selected":e,"data-slot":"table-row",...s})}export{za as TableRow};
@@ -1 +1 @@
1
- import{cx as l}from"@xjur-ui/util";import{cx as i}from"@xjur-ui/util";import{jsx as s}from"react/jsx-runtime";function r({className:o,filled:e=!1,name:t,...n}){return s("span",{...n,className:i("material-symbols-outlined","text-size-body-lg select-none",o),style:{fontVariationSettings:`'FILL' ${e?1:0}, 'wght' 600, 'GRAD' 0, 'opsz' 20`,...n.style},children:t})}import{jsx as a}from"react/jsx-runtime";function b({className:o,sortedDirection:e,...t}){return a("button",{className:l("size-large-1x rounded-small-1x","flex cursor-pointer items-center justify-center","hidden group-hover/th:flex","data-[sorted=true]:flex","transition-all duration-200 ease-out","data-[sorted=true]:bg-primary-alt-active data-[sorted=true]:text-primary-label-active","absolute top-1/2 right-0 -translate-y-1/2",o),"data-sorted":e!==void 0,type:"button",...t,children:e!==void 0?a(r,{name:e==="asc"?"arrow_downward":"arrow_upward"}):a(r,{name:"swap_vert"})})}export{b as TableSort};
1
+ import{cx as l}from"@xjur-ui/util";import{cx as i}from"@xjur-ui/util";import{jsx as s}from"react/jsx-runtime";function r({className:o,filled:e=!1,name:t,...n}){return s("span",{...n,className:i("material-symbols-outlined","text-size-body-lg select-none",o),style:{fontVariationSettings:`'FILL' ${e?1:0}, 'wght' 600, 'GRAD' 0, 'opsz' 20`,...n.style},children:t})}import{jsx as a}from"react/jsx-runtime";function w({className:o,sortedDirection:e,...t}){return a("button",{className:l("size-large-1x rounded-small-1x","flex cursor-pointer items-center justify-center","hidden group-hover/th:flex","data-[sorted=true]:flex","transition-all duration-200 ease-out","data-[sorted=true]:bg-primary-alt-active data-[sorted=true]:text-primary-label-active","absolute top-1/2 right-0 -translate-y-1/2",o),"data-sorted":e!==void 0,type:"button",...t,children:e!==void 0?a(r,{name:e==="asc"?"arrow_downward":"arrow_upward"}):a(r,{name:"swap_vert"})})}export{w as TableSort};
@@ -0,0 +1,4 @@
1
+ export { Timeline } from './timeline';
2
+ export { TimelineCard, timelineCardVariants } from './timeline-card';
3
+ export type { TimelineCardProps } from './timeline-card';
4
+ export type { TimelineProps } from './timeline';
@@ -0,0 +1 @@
1
+ import{cva as w,cx as y}from"@xjur-ui/util";import{jsx as b,jsxs as G}from"react/jsx-runtime";var we=w(["flex flex-row items-center gap-[40px] h-full"]),W=w(["w-0.5 bg-gray-300 min-h-[82px]"]),Ce=w(["w-3 h-3 rounded-full bg-gray-400"]),Pe=w(["text-sm font-medium text-gray-500 w-full"]);function M({className:e,date:t="04/07/2025",showTopLine:i=!0,showBottomLine:o=!0,...a}){return G("div",{className:y(we(),e),...a,children:[G("div",{className:"flex h-full flex-col items-center gap-1",children:[i&&b("div",{className:y(W())}),b("div",{className:y(Ce())}),o&&b("div",{className:y(W())})]}),b("div",{className:y(Pe(),!i&&"self-start",!o&&"self-end"),children:t})]})}import{Slot as it}from"@radix-ui/react-slot";import{cva as at,cx as oe}from"@xjur-ui/util";import{cx as _e}from"@xjur-ui/util";import{jsx as Te}from"react/jsx-runtime";function m({className:e,filled:t=!1,name:i,...o}){return Te("span",{...o,className:_e("material-symbols-outlined","text-size-body-lg select-none",e),style:{fontVariationSettings:`'FILL' ${t?1:0}, 'wght' 600, 'GRAD' 0, 'opsz' 20`,...o.style},children:i})}import*as T from"@radix-ui/react-checkbox";import{cx as Se}from"@xjur-ui/util";import{Slot as Me}from"@radix-ui/react-slot";import{cva as Ne}from"@xjur-ui/util";import{memo as J,useState as Re}from"react";import*as C from"@radix-ui/react-tooltip";import{jsx as N}from"react/jsx-runtime";function ze({delayDuration:e=0,...t}){return N(C.Provider,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function R({...e}){return N(ze,{children:N(C.Root,{"data-slot":"tooltip",...e})})}import*as K from"@radix-ui/react-tooltip";import{jsx as ke}from"react/jsx-runtime";function V({...e}){return ke(K.Trigger,{"data-slot":"tooltip-trigger",...e})}import*as P from"@radix-ui/react-tooltip";import{cx as De}from"@xjur-ui/util";import{jsx as Y}from"react/jsx-runtime";function I({className:e,sideOffset:t=1,variant:i="simple",children:o,...a}){return Y(P.Portal,{children:Y(P.Content,{className:De("text-size-body-sm z-99999 text-balance","data-[variant=simple]:bg-alt-2 data-[variant=simple]:text-neutral-label data-[variant=simple]:rounded-small-1x data-[variant=simple]:px-small data-[variant=simple]:py-small-1x","data-[variant=rich]:bg-layer-2-idle data-[variant=rich]:text-neutral-dark data-[variant=rich]:rounded-small data-[variant=rich]:border-border-layer-2 data-[variant=rich]:p-large data-[variant=rich]:border","animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin)",e),"data-slot":"tooltip-content","data-variant":i,sideOffset:t,...a,children:o})})}import{jsx as _,jsxs as Le}from"react/jsx-runtime";var Ve=Ne("",{variants:{variant:{body:"",label:"",title:"",headline:""},size:{"sm-2x":"","sm-1x":"",sm:"",md:"",lg:""},weight:{thin:"font-thin",extraLight:"font-extralight",light:"font-light",normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold",extraBold:"font-extrabold",black:"font-black"}},compoundVariants:[{variant:"body",size:"sm-1x",class:"text-size-body-sm-1x"},{variant:"body",size:"sm",class:"text-size-body-sm"},{variant:"body",size:"md",class:"text-size-body-md"},{variant:"body",size:"lg",class:"text-size-body-lg"},{variant:"label",size:"sm-2x",class:"text-size-label-sm-2x"},{variant:"label",size:"sm-1x",class:"text-size-label-sm-1x"},{variant:"label",size:"sm",class:"text-size-label-sm"},{variant:"label",size:"md",class:"text-size-label-md"},{variant:"label",size:"lg",class:"text-size-label-lg"},{variant:"title",size:"sm",class:"text-size-title-sm"},{variant:"title",size:"md",class:"text-size-title-md"},{variant:"title",size:"lg",class:"text-size-title-lg"},{variant:"headline",size:"sm",class:"text-size-headline-sm"},{variant:"headline",size:"md",class:"text-size-headline-md"},{variant:"headline",size:"lg",class:"text-size-headline-lg"}],defaultVariants:{variant:"body",size:"md",weight:"normal"}}),c=J(({variant:e,size:t,weight:i,asChild:o,className:a,children:n,...l})=>_(o?Me:"span",{className:Ve({variant:e,size:t,weight:i,className:a}),...l,children:n}));c.displayName="Typography";var Ie=J(({children:e,...t})=>{let[i,o]=Re(!1);return Le(R,{children:[_(V,{asChild:!0,children:_(c,{onMouseEnter:({currentTarget:n})=>{let l=n.scrollWidth>n.clientWidth;o(l),l?n.style.cursor="pointer":n.style.cursor="text"},...t,children:e})}),i&&_(I,{children:e})]})});Ie.displayName="TruncatedTypography";import{jsx as h,jsxs as He}from"react/jsx-runtime";function Q({label:e,name:t,className:i,disabled:o=!1,...a}){let n=`field-checkbox-${t}`;return He("div",{className:"group gap-small flex items-center",children:[h(T.Root,{disabled:o,...a,className:Se("size-large-alt rounded-small-1x inline-flex items-center justify-center transition-[border-color,box-shadow,background-color] duration-200 outline-none","border-border-layer-2 bg-layer-2-idle cursor-pointer border-2","hover:border-primary-idle focus:border-primary-idle focus:shadow-focus-primary","data-[state=checked]:bg-primary-active data-[state=checked]:border-primary-active","data-[state=checked]:hover:border-primary-idle","disabled:hover:border-border-layer-2 disabled:cursor-not-allowed disabled:opacity-[38%]",i),id:n,name:t,children:h(T.Indicator,{className:"flex items-center justify-center",children:h(m,{className:"text-neutral-label",name:"check"})})}),!!e&&h(c,{asChild:!0,className:"text-size-body-sm data-[disabled=true]:opacity-38","data-disabled":o,weight:"medium",children:h("label",{htmlFor:n,children:e})})]})}import"react";import*as U from"@radix-ui/react-dropdown-menu";import{jsx as Ee}from"react/jsx-runtime";function L({...e}){return Ee(U.Root,{"data-slot":"dropdown-menu",...e})}import*as X from"@radix-ui/react-dropdown-menu";import{jsx as Ae}from"react/jsx-runtime";function S({...e}){return Ae(X.Trigger,{"data-slot":"dropdown-menu-trigger",...e})}import*as z from"@radix-ui/react-dropdown-menu";import{cx as je}from"@xjur-ui/util";import{Slot as qe}from"@radix-ui/react-slot";import{cx as Fe}from"@xjur-ui/util";import{useVirtualizer as Be}from"@tanstack/react-virtual";import{useRef as Oe}from"react";import{createContext as $e}from"react";var g=$e({virtualizer:null,enabled:!1});import{jsx as Z}from"react/jsx-runtime";function H({className:e,asChild:t,children:i,virtualized:o=!1,itemCount:a=0,estimateSize:n=()=>48,overscan:l=5,...f}){let v=t?qe:"div",d=Oe(null),D=Be({count:a,getScrollElement:()=>d.current,estimateSize:n,overscan:l,enabled:o});return Z(g.Provider,{value:{virtualizer:D,enabled:o},children:Z(v,{...f,className:Fe(e,"rounded-small scrollbar-thin bg-layer-2-idle border-border-layer-2 shadow-elevation-3 z-1000 max-h-[400px] list-none overflow-x-hidden overflow-y-auto border"),ref:d,children:i})})}import{Slot as jt}from"@radix-ui/react-slot";import{cx as to}from"@xjur-ui/util";import{jsx as ro}from"react/jsx-runtime";import{cx as no}from"@xjur-ui/util";import{jsx as po}from"react/jsx-runtime";import{Slot as We}from"@radix-ui/react-slot";import{cx as j}from"@xjur-ui/util";import{useContext as Ge}from"react";import{jsx as E}from"react/jsx-runtime";function A({className:e,asChild:t,children:i,renderItem:o,...a}){let n=t?We:"ul",{virtualizer:l,enabled:f}=Ge(g);if(f&&l&&o){let v=l.getVirtualItems();return E(n,{...a,className:j("p-small relative flex flex-col",e),style:{height:`${l.getTotalSize()}px`},children:v.map(d=>E("div",{className:"absolute top-0 left-0 w-full","data-index":d.index,ref:l.measureElement,style:{transform:`translateY(${d.start}px)`},children:o(d.index)},d.key))})}return E(n,{...a,className:j("gap-small-1x p-small flex flex-col",e),children:i})}import{Slot as Ke}from"@radix-ui/react-slot";import{cx as Ye,cva as Je}from"@xjur-ui/util";import{jsx as Ue}from"react/jsx-runtime";var Qe=Je(["py-medium px-small flex items-center gap-small rounded-small-1x","bg-layer-2-idle text-neutral-dark","hover:bg-layer-2-hover transition-colors duration-100 ease-out","active:bg-layer-2-pressed"],{variants:{size:{md:"h-large-4x",lg:"h-large-7x"},isActive:{true:"bg-primary-alt-active text-primary-label-active hover:bg-primary-alt-hover active:bg-primary-alt-pressed"}},defaultVariants:{size:"md",isActive:!1}});function $({className:e,size:t,isActive:i,asChild:o,...a}){return Ue(o?Ke:"li",{...a,className:Ye(Qe({size:t,isActive:i}),e)})}import{jsx as q}from"react/jsx-runtime";function F({className:e,sideOffset:t=4,align:i="start",side:o="bottom",children:a,...n}){return q(z.Portal,{children:q(z.Content,{align:i,className:je("group z-1000 max-h-[var(--radix-popover-content-available-height)] max-w-[240px] min-w-[var(--radix-popover-trigger-width)]",e),"data-slot":"dropdown-menu-content",side:o,sideOffset:t,...n,children:q(H,{children:a})})})}import{jsx as et}from"react/jsx-runtime";function B({...e}){return et(A,{...e})}import{jsx as Ao}from"react/jsx-runtime";import{cx as rt}from"@xjur-ui/util";import"react";import*as ee from"@radix-ui/react-separator";import{cx as tt}from"@xjur-ui/util";import{jsx as ot}from"react/jsx-runtime";function te({className:e,orientation:t="horizontal",decorative:i=!0,...o}){return ot(ee.Root,{className:tt("bg-border-layer-2 shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full","data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),"data-slot":"separator",decorative:i,orientation:t,...o})}import{jsx as O}from"react/jsx-runtime";function u({className:e,...t}){return O($,{className:rt(e,"cursor-pointer"),...t})}function x({...e}){return O(c,{...e})}function k({...e}){return O(te,{...e})}import{jsx as r,jsxs as p}from"react/jsx-runtime";var re=at(["border border-gray-200 rounded-lg p-4 transition-all duration-200 cursor-pointer shadow-sm min-h-[184px]","hover:shadow-md hover:border-gray-300"],{variants:{status:{default:"border-gray-200",selected:"border-primary-border-active bg-primary-alt-idle shadow-md"}},defaultVariants:{status:"default"}});function nt({asChild:e,className:t,status:i="default",title:o,content:a,tags:n=[],isSelected:l=!1,isChecked:f=!1,onSelect:v,onCheck:d,onCopy:D,onFolder:ie,onMarkAsRead:ae,onEdit:ne,onArchive:se,onDelete:le,timelineProps:pe,...me}){let de=e?it:"div",ce=l?"selected":i,fe=()=>{v?.()},ue=s=>{d?.(s)},xe=()=>{ae?.()},ve=()=>{ne?.()},ye=()=>{se?.()},he=()=>{le?.()},ge=s=>{switch(s){case"success":return"bg-success-idle text-white";case"warning":return"bg-red-500 text-white";case"info":return"bg-blue-500 text-white";case"restricted":return"bg-layer-1-idle text-gray-700";default:return"bg-white text-gray-700"}};return p("div",{className:"relative flex items-end gap-6",children:[r(M,{...pe}),r(de,{className:oe(re({status:ce}),t,"flex-1"),onClick:fe,...me,children:p("div",{className:"mb-3 flex items-start justify-start gap-4",children:[r("div",{role:"button",tabIndex:0,onClick:s=>s.stopPropagation(),onKeyDown:s=>{(s.key==="Enter"||s.key===" ")&&s.stopPropagation()},children:r(Q,{checked:f,className:"size-4",name:`timeline-card-${Math.random()}`,onCheckedChange:ue})}),p("div",{className:"flex w-full flex-col gap-4",children:[p("div",{className:"flex items-start justify-between gap-4",children:[r("div",{className:"flex items-center gap-3",children:r("div",{className:"flex items-center gap-2",children:n.map((s,be)=>p("div",{className:oe("flex items-center gap-2 rounded px-2 py-1 text-xs font-medium",ge(s.variant)),children:[s.variant==="restricted"&&r(m,{className:"flex h-3 w-3 items-center",name:"lock"}),r("p",{className:"flex items-center text-xs font-medium",children:s.label})]},be))})}),p("div",{className:"flex items-center gap-2",children:[r("button",{className:"p-1 text-gray-400 transition-colors hover:text-gray-600",type:"button",onClick:s=>{s.stopPropagation(),D?.()},children:r(m,{className:"h-4 w-4",name:"attach_file"})}),r("button",{className:"p-1 text-gray-400 transition-colors hover:text-gray-600",type:"button",onClick:s=>{s.stopPropagation(),ie?.()},children:r(m,{className:"h-4 w-4",name:"folder_check_2"})}),p(L,{children:[r(S,{asChild:!0,children:r("button",{className:"p-1 text-gray-400 transition-colors hover:text-gray-600",type:"button",onClick:s=>s.stopPropagation(),children:r(m,{className:"h-4 w-4",name:"more_vert"})})}),r(F,{align:"end",children:p(B,{children:[p(u,{onClick:xe,children:[r(m,{className:"flex h-4 w-4 items-center",name:"check"}),r(x,{children:"Marcar como lido"})]}),r(k,{}),p(u,{onClick:ve,children:[r(m,{className:"flex h-4 w-4 items-center",name:"edit"}),r(x,{children:"Editar"})]}),p(u,{onClick:ye,children:[r(m,{className:"flex h-4 w-4 items-center",name:"archive"}),r(x,{children:"Arquivar"})]}),r(k,{}),p(u,{onClick:he,children:[r(m,{className:"flex h-4 w-4 items-center text-red-500",name:"delete"}),r(x,{className:"text-red-500",children:"Excluir"})]})]})})]})]})]}),p("div",{className:"flex flex-col gap-4",children:[r("p",{className:"text-size-body-md-medium text-neutral-dark font-medium",children:o}),r("p",{className:"text-size-body-sm text-neutral-light",children:a})]})]})]})})]})}export{M as Timeline,nt as TimelineCard,re as timelineCardVariants};