@medway-ui/core 1.33.1 → 1.35.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/COMPONENTS.md +118 -8
  2. package/COMPONENTS_SUMMARY.md +4 -2
  3. package/dist/COMPONENTS.md +118 -8
  4. package/dist/COMPONENTS_SUMMARY.md +4 -2
  5. package/dist/assets/css/tokens.css +49 -22
  6. package/dist/components/Alert.mjs +1 -1
  7. package/dist/components/AlertDialog.js +1 -1
  8. package/dist/components/AlertDialog.mjs +1 -1
  9. package/dist/components/Autocomplete.mjs +1 -1
  10. package/dist/components/Button.d.mts +2 -0
  11. package/dist/components/Button.d.mts.map +1 -1
  12. package/dist/components/Button.d.ts +2 -0
  13. package/dist/components/Button.d.ts.map +1 -1
  14. package/dist/components/Button.js +1 -1
  15. package/dist/components/Button.mjs +1 -1
  16. package/dist/components/CardContinue.mjs +1 -1
  17. package/dist/components/CardLesson.mjs +1 -1
  18. package/dist/components/CardModule.mjs +1 -1
  19. package/dist/components/CardNews.mjs +1 -1
  20. package/dist/components/CardTopic.mjs +1 -1
  21. package/dist/components/CardWeek.mjs +1 -1
  22. package/dist/components/Carousel.js +1 -1
  23. package/dist/components/Carousel.mjs +1 -1
  24. package/dist/components/Chip.d.mts +5 -3
  25. package/dist/components/Chip.d.mts.map +1 -1
  26. package/dist/components/Chip.d.ts +5 -3
  27. package/dist/components/Chip.d.ts.map +1 -1
  28. package/dist/components/Chip.js +1 -1
  29. package/dist/components/Chip.mjs +1 -1
  30. package/dist/components/ConfirmDeleteButton.d.mts +26 -0
  31. package/dist/components/ConfirmDeleteButton.d.mts.map +1 -0
  32. package/dist/components/ConfirmDeleteButton.d.ts +26 -0
  33. package/dist/components/ConfirmDeleteButton.d.ts.map +1 -0
  34. package/dist/components/ConfirmDeleteButton.js +4 -0
  35. package/dist/components/ConfirmDeleteButton.js.map +1 -0
  36. package/dist/components/ConfirmDeleteButton.mjs +4 -0
  37. package/dist/components/ConfirmDeleteButton.mjs.map +1 -0
  38. package/dist/components/NoteEditor.d.mts.map +1 -1
  39. package/dist/components/NoteEditor.d.ts.map +1 -1
  40. package/dist/components/NoteEditor.js +1 -1
  41. package/dist/components/NoteEditor.mjs +1 -1
  42. package/dist/components/NoteEditorLinkDialog.d.mts +36 -0
  43. package/dist/components/NoteEditorLinkDialog.d.mts.map +1 -0
  44. package/dist/components/NoteEditorLinkDialog.d.ts +36 -0
  45. package/dist/components/NoteEditorLinkDialog.d.ts.map +1 -0
  46. package/dist/components/NoteEditorLinkDialog.js +4 -0
  47. package/dist/components/NoteEditorLinkDialog.js.map +1 -0
  48. package/dist/components/NoteEditorLinkDialog.mjs +4 -0
  49. package/dist/components/NoteEditorLinkDialog.mjs.map +1 -0
  50. package/dist/components/Pagination.mjs +1 -1
  51. package/dist/components/Ranking.mjs +1 -1
  52. package/dist/components/Skeleton.js +1 -1
  53. package/dist/components/Skeleton.mjs +1 -1
  54. package/dist/components/Tag.d.mts +2 -1
  55. package/dist/components/Tag.d.mts.map +1 -1
  56. package/dist/components/Tag.d.ts +2 -1
  57. package/dist/components/Tag.d.ts.map +1 -1
  58. package/dist/components/Tag.js +1 -1
  59. package/dist/components/TagPicker.d.mts +91 -0
  60. package/dist/components/TagPicker.d.mts.map +1 -0
  61. package/dist/components/TagPicker.d.ts +91 -0
  62. package/dist/components/TagPicker.d.ts.map +1 -0
  63. package/dist/components/TagPicker.js +4 -0
  64. package/dist/components/TagPicker.js.map +1 -0
  65. package/dist/components/TagPicker.mjs +4 -0
  66. package/dist/components/TagPicker.mjs.map +1 -0
  67. package/dist/components/Toast.mjs +1 -1
  68. package/dist/index.d.mts +5 -1
  69. package/dist/index.d.mts.map +1 -1
  70. package/dist/index.d.ts +5 -1
  71. package/dist/index.d.ts.map +1 -1
  72. package/dist/index.js +1 -1
  73. package/dist/index.mjs +1 -1
  74. package/package.json +2 -2
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  "use client";
3
- import{jsx as l,jsxs as N}from"react/jsx-runtime";import{createContext as O,forwardRef as p,useContext as b,useMemo as j}from"react";import{cva as _}from"class-variance-authority";import{AlertDialog as c}from"radix-ui";import{CloseMd as P}from"@medway-ui/icons";import{cn as d}from"../lib/utils.mjs";import{buttonVariants as h,Button as T}from"./Button.mjs";import{Tag as B}from"./Tag.mjs";var L=Object.defineProperty,F=Object.defineProperties,I=Object.getOwnPropertyDescriptors,m=Object.getOwnPropertySymbols,y=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable,k=(e,a,t)=>a in e?L(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,s=(e,a)=>{for(var t in a||(a={}))y.call(a,t)&&k(e,t,a[t]);if(m)for(var t of m(a))w.call(a,t)&&k(e,t,a[t]);return e},D=(e,a)=>F(e,I(a)),n=(e,a)=>{var t={};for(var r in e)y.call(e,r)&&a.indexOf(r)<0&&(t[r]=e[r]);if(e!=null&&m)for(var r of m(e))a.indexOf(r)<0&&w.call(e,r)&&(t[r]=e[r]);return t};const f="regular",v=O(null),R=_("flex w-full items-center justify-center px-8 py-8",{variants:{variant:{regular:"[background-image:radial-gradient(50%_100%_at_50%_0%,var(--color-primary-background-soft)_0%,transparent_100%)]",emphasis:"[background-image:radial-gradient(50%_100%_at_50%_0%,var(--color-secondary-background-soft)_0%,transparent_100%)]",warning:"[background-image:radial-gradient(50%_100%_at_50%_0%,var(--color-feedback-warning-background-soft)_0%,transparent_100%)]",error:"[background-image:radial-gradient(50%_100%_at_50%_0%,var(--color-feedback-error-background-soft)_0%,transparent_100%)]",success:"[background-image:radial-gradient(50%_100%_at_50%_0%,var(--color-feedback-success-background-soft)_0%,transparent_100%)]"}},defaultVariants:{variant:f}}),V=_("flex items-center justify-center rounded-full p-4 [&_svg]:size-8",{variants:{variant:{regular:"bg-primary-background-fill text-primary-foreground-onfill",emphasis:"bg-secondary-background-fill text-secondary-foreground-onfill",warning:"bg-yellow-background-fill text-yellow-foreground-onfill",error:"bg-red-background-fill text-red-foreground-onfill",success:"bg-green-background-fill text-green-foreground-onfill"}},defaultVariants:{variant:f}}),H={regular:"regular-soft",emphasis:"emphasis-soft",warning:"warning-soft",error:"error-soft",success:"success-soft"},K={regular:"regular",emphasis:"emphasis",warning:"warning",error:"error",success:"success"};function M(e){var a=e,{variant:t=f}=a,r=n(a,["variant"]);const o=j(()=>({variant:t}),[t]);return l(v.Provider,{value:o,children:l(c.Root,s({"data-slot":"alert-dialog"},r))})}const S=p(function(e,a){return l(c.Trigger,s({ref:a,"data-slot":"alert-dialog-trigger"},e))});function A(e){var a=n(e,[]);return l(c.Portal,s({"data-slot":"alert-dialog-portal"},a))}function C(e){var a=e,{className:t}=a,r=n(a,["className"]);return l(c.Overlay,s({"data-slot":"alert-dialog-overlay",className:d("fixed inset-0 z-50 bg-black-48 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t)},r))}function $(e){var a=e,{className:t,overlayClassName:r,showCloseButton:o=!1,closeLabel:i="Fechar",children:u}=a,g=n(a,["className","overlayClassName","showCloseButton","closeLabel","children"]);return N(A,{children:[l(C,{className:r}),N(c.Content,D(s({"data-slot":"alert-dialog-content",className:d("fixed left-1/2 top-1/2 z-50 flex w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-xl border bg-surface-elevated 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-1/2 data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-1/2 sm:max-w-lg",t)},g),{children:[u,o&&l(c.Cancel,{"data-slot":"alert-dialog-close",asChild:!0,children:l(T,{type:"button",variant:"regular-basic",size:"sm","aria-label":i,containerClassName:"absolute right-2 top-2",iconLeft:l(P,{"aria-hidden":"true",className:"!size-4 !text-gray-foreground"})})})]}))]})}function q(e){var a=e,{className:t}=a,r=n(a,["className"]);return l("div",s({"data-slot":"alert-dialog-header",className:d("flex flex-col items-center gap-3 px-8 pt-8 text-center","[[data-slot=alert-dialog-content]:has([data-slot=alert-dialog-icon])_&]:pt-0",t)},r))}function E(e){var a=e,{className:t,icon:r}=a,o=n(a,["className","icon"]),i;const u=b(v),g=(i=u==null?void 0:u.variant)!=null?i:f;return l("div",D(s({"data-slot":"alert-dialog-icon",className:d(R({variant:g}),t)},o),{children:l("div",{className:V({variant:g}),children:r})}))}function G({className:e,variant:a,children:t}){var r;const o=b(v),i=(r=a!=null?a:o==null?void 0:o.variant)!=null?r:f;return l("div",{"data-slot":"alert-dialog-tag",className:"flex justify-center",children:l(B,{variant:H[i],className:e,children:t})})}function J(e){var a=e,{className:t}=a,r=n(a,["className"]);return l(c.Title,s({"data-slot":"alert-dialog-title",className:d("text-title-sm font-semibold leading-title-sm text-content-title",t)},r))}function Q(e){var a=e,{className:t}=a,r=n(a,["className"]);return l(c.Description,s({"data-slot":"alert-dialog-description",className:d("text-md leading-md text-content-paragraph",t)},r))}function U(e){var a=e,{className:t}=a,r=n(a,["className"]);return l("div",s({"data-slot":"alert-dialog-footer",className:d("flex flex-row items-center justify-center gap-4 px-8 pb-8 pt-6 max-[500px]:flex-col max-[500px]:items-stretch",t)},r))}const W=p(function(e,a){var t=e,{className:r,variant:o,size:i="lg"}=t,u=n(t,["className","variant","size"]),g;const x=b(v),z=o!=null?o:K[(g=x==null?void 0:x.variant)!=null?g:f];return l(c.Action,s({ref:a,className:d(h({variant:z,size:i}),"max-[500px]:w-full",r)},u))}),X=p(function(e,a){var t=e,{className:r,variant:o="regular-soft",size:i="lg"}=t,u=n(t,["className","variant","size"]);return l(c.Cancel,s({ref:a,className:d(h({variant:o,size:i}),"max-[500px]:w-full",r)},u))});export{M as AlertDialog,W as AlertDialogAction,X as AlertDialogCancel,$ as AlertDialogContent,Q as AlertDialogDescription,U as AlertDialogFooter,q as AlertDialogHeader,E as AlertDialogIcon,C as AlertDialogOverlay,A as AlertDialogPortal,G as AlertDialogTag,J as AlertDialogTitle,S as AlertDialogTrigger};
3
+ import{jsx as l,jsxs as _}from"react/jsx-runtime";import{createContext as j,forwardRef as p,useContext as b,useMemo as P}from"react";import{cva as h}from"class-variance-authority";import{AlertDialog as c}from"radix-ui";import{CloseMd as T}from"@medway-ui/icons";import{cn as d}from"../lib/utils.mjs";import{buttonVariants as y,Button as B}from"./Button.mjs";import{Tag as L}from"./Tag.mjs";var $=Object.defineProperty,I=Object.defineProperties,R=Object.getOwnPropertyDescriptors,m=Object.getOwnPropertySymbols,w=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable,D=(e,a,t)=>a in e?$(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,s=(e,a)=>{for(var t in a||(a={}))w.call(a,t)&&D(e,t,a[t]);if(m)for(var t of m(a))k.call(a,t)&&D(e,t,a[t]);return e},A=(e,a)=>I(e,R(a)),n=(e,a)=>{var t={};for(var r in e)w.call(e,r)&&a.indexOf(r)<0&&(t[r]=e[r]);if(e!=null&&m)for(var r of m(e))a.indexOf(r)<0&&k.call(e,r)&&(t[r]=e[r]);return t};const g="regular",v=j(null),S=h("flex w-full items-center justify-center px-8 py-8",{variants:{variant:{regular:"[background-image:radial-gradient(50%_100%_at_50%_0%,var(--color-primary-background-soft)_0%,transparent_100%)]",emphasis:"[background-image:radial-gradient(50%_100%_at_50%_0%,var(--color-secondary-background-soft)_0%,transparent_100%)]",warning:"[background-image:radial-gradient(50%_100%_at_50%_0%,var(--color-feedback-warning-background-soft)_0%,transparent_100%)]",error:"[background-image:radial-gradient(50%_100%_at_50%_0%,var(--color-feedback-error-background-soft)_0%,transparent_100%)]",success:"[background-image:radial-gradient(50%_100%_at_50%_0%,var(--color-feedback-success-background-soft)_0%,transparent_100%)]"}},defaultVariants:{variant:g}}),V=h("flex items-center justify-center rounded-full p-4 [&_svg]:size-8",{variants:{variant:{regular:"bg-primary-background-fill text-primary-foreground-onfill",emphasis:"bg-secondary-background-fill text-secondary-foreground-onfill",warning:"bg-yellow-background-fill text-yellow-foreground-onfill",error:"bg-red-background-fill text-red-foreground-onfill",success:"bg-green-background-fill text-green-foreground-onfill"}},defaultVariants:{variant:g}}),F={regular:"regular-soft",emphasis:"emphasis-soft",warning:"warning-soft",error:"error-soft",success:"success-soft"},H={regular:"regular",emphasis:"emphasis",warning:"warning",error:"error",success:"success"};function M(e){var a=e,{variant:t=g}=a,r=n(a,["variant"]);const o=P(()=>({variant:t}),[t]);return l(v.Provider,{value:o,children:l(c.Root,s({"data-slot":"alert-dialog"},r))})}const U=p(function(e,a){return l(c.Trigger,s({ref:a,"data-slot":"alert-dialog-trigger"},e))});function C(e){var a=n(e,[]);return l(c.Portal,s({"data-slot":"alert-dialog-portal"},a))}function z(e){var a=e,{className:t}=a,r=n(a,["className"]);return l(c.Overlay,s({"data-slot":"alert-dialog-overlay",className:d("fixed inset-0 z-50 bg-black-48 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t)},r))}function q(e){var a=e,{className:t,overlayClassName:r,showCloseButton:o=!1,closeLabel:i="Fechar",children:u}=a,f=n(a,["className","overlayClassName","showCloseButton","closeLabel","children"]);return _(C,{children:[l(z,{className:r}),_(c.Content,A(s({"data-slot":"alert-dialog-content",className:d("fixed left-1/2 top-1/2 z-50 flex w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-xl border bg-surface-elevated 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-1/2 data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-1/2 sm:max-w-lg",t)},f),{children:[u,o&&l(c.Cancel,{"data-slot":"alert-dialog-close",asChild:!0,children:l(B,{type:"button",variant:"regular-basic",size:"sm","aria-label":i,containerClassName:"absolute right-2 top-2",iconLeft:l(T,{"aria-hidden":"true",className:"!size-4 !text-gray-foreground"})})})]}))]})}function E(e){var a=e,{className:t}=a,r=n(a,["className"]);return l("div",s({"data-slot":"alert-dialog-header",className:d("flex flex-col items-center gap-3 px-8 pt-8 text-center","[[data-slot=alert-dialog-content]:has([data-slot=alert-dialog-icon])_&]:pt-0",t)},r))}function G(e){var a=e,{className:t,icon:r}=a,o=n(a,["className","icon"]),i;const u=b(v),f=(i=u==null?void 0:u.variant)!=null?i:g;return l("div",A(s({"data-slot":"alert-dialog-icon",className:d(S({variant:f}),t)},o),{children:l("div",{className:V({variant:f}),children:r})}))}function J({className:e,variant:a,children:t}){var r;const o=b(v),i=(r=a!=null?a:o==null?void 0:o.variant)!=null?r:g;return l("div",{"data-slot":"alert-dialog-tag",className:"flex justify-center",children:l(L,{variant:F[i],className:e,children:t})})}function K(e){var a=e,{className:t}=a,r=n(a,["className"]);return l(c.Title,s({"data-slot":"alert-dialog-title",className:d("text-title-sm font-semibold leading-title-sm text-content-title",t)},r))}function Q(e){var a=e,{className:t}=a,r=n(a,["className"]);return l(c.Description,s({"data-slot":"alert-dialog-description",className:d("text-md leading-md text-content-paragraph",t)},r))}function W(e){var a=e,{className:t}=a,r=n(a,["className"]);return l("div",s({"data-slot":"alert-dialog-footer",className:d("flex flex-row items-center justify-center gap-4 px-8 pb-8 pt-6 max-[500px]:flex-col max-[500px]:items-stretch",t)},r))}const X=p(function(e,a){var t=e,{className:r,variant:o,size:i="lg",full:u}=t,f=n(t,["className","variant","size","full"]),x;const N=b(v),O=o!=null?o:H[(x=N==null?void 0:N.variant)!=null?x:g];return l(c.Action,s({ref:a,className:d(y({variant:O,size:i,full:u}),"max-[500px]:w-full",r)},f))}),Y=p(function(e,a){var t=e,{className:r,variant:o="regular-soft",size:i="lg",full:u}=t,f=n(t,["className","variant","size","full"]);return l(c.Cancel,s({ref:a,className:d(y({variant:o,size:i,full:u}),"max-[500px]:w-full",r)},f))});export{M as AlertDialog,X as AlertDialogAction,Y as AlertDialogCancel,q as AlertDialogContent,Q as AlertDialogDescription,W as AlertDialogFooter,E as AlertDialogHeader,G as AlertDialogIcon,z as AlertDialogOverlay,C as AlertDialogPortal,J as AlertDialogTag,K as AlertDialogTitle,U as AlertDialogTrigger};
4
4
  //# sourceMappingURL=AlertDialog.mjs.map
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  "use client";
3
- import{jsx as n,jsxs as g}from"react/jsx-runtime";import{Check as B,ChevronDown as H}from"@medway-ui/icons";import{createContext as J,useState as y,useCallback as I,useMemo as U,useContext as v,Children as X,isValidElement as P}from"react";import{useId as L}from"../hooks/use-id.mjs";import{cn as p}from"../lib/utils.mjs";import{Command as Y,CommandInput as Q,CommandList as Z,CommandEmpty as ee,CommandGroup as re,CommandItem as ae}from"./Command.mjs";import{Popover as oe,PopoverContent as te,PopoverTrigger as ne}from"./Popover.mjs";import{Button as T}from"./Button.mjs";var le=Object.defineProperty,se=Object.defineProperties,ie=Object.getOwnPropertyDescriptors,x=Object.getOwnPropertySymbols,G=Object.prototype.hasOwnProperty,M=Object.prototype.propertyIsEnumerable,R=(e,r,a)=>r in e?le(e,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[r]=a,C=(e,r)=>{for(var a in r||(r={}))G.call(r,a)&&R(e,a,r[a]);if(x)for(var a of x(r))M.call(r,a)&&R(e,a,r[a]);return e},de=(e,r)=>se(e,ie(r)),k=(e,r)=>{var a={};for(var o in e)G.call(e,o)&&r.indexOf(o)<0&&(a[o]=e[o]);if(e!=null&&x)for(var o of x(e))r.indexOf(o)<0&&M.call(e,o)&&(a[o]=e[o]);return a};const h=J({invalid:!1,disabled:!1,open:!1,setOpen:()=>{},values:[],toggleValue:()=>{},onCancelSelection:()=>{},listId:""});function ce({children:e,invalid:r=!1,disabled:a=!1,values:o,onValuesChange:t,open:l,onOpenChange:s,defaultValues:i=[]}){const[d,b]=y(i),[N,w]=y(!1),u=o!==void 0,O=l!==void 0,c=u?o:d,m=O?l:N,[A,_]=y(c),[D,F]=y(m);m!==D&&(F(m),m&&_(c));const E=I(f=>{const $=c.includes(f)?c.filter(q=>q!==f):[...c,f];u||b($),t==null||t($)},[c,u,t]),j=I(f=>{a||(O||w(f),s==null||s(f))},[a,O,s]),V=I(()=>{u||b(A),t==null||t(A)},[u,A,t]),W=L(),K=U(()=>({invalid:r,disabled:a,open:m,setOpen:j,values:c,toggleValue:E,onCancelSelection:V,listId:W}),[r,a,m,j,c,E,V,W]);return n(h.Provider,{value:K,children:n(oe,{open:m,onOpenChange:j,children:e})})}function ue(e){var r=e,{className:a}=r,o=k(r,["className"]);return n("div",C({className:p("group relative flex flex-col gap-2",a),"data-slot":"autocomplete-wrapper"},o))}function me(e){var r=e,{className:a,placeholder:o="Selecione uma op\xE7\xE3o",children:t}=r,l=k(r,["className","placeholder","children"]);const{invalid:s,disabled:i,open:d,values:b,listId:N}=v(h),w=L(),u=b.length>0;return n(ne,{asChild:!0,children:g("button",de(C({"aria-controls":N,"aria-expanded":d,"aria-invalid":s||void 0,className:p("flex h-12 max-h-12 w-full items-center justify-between gap-2 rounded-md border-2 border-gray-stroke-muted bg-surface-card px-4 py-3 text-left text-md text-gray-foreground outline-none transition-[color,box-shadow] hover:border-gray-stroke-emphasis hover:ring-[3px] hover:ring-state-focus disabled:cursor-default disabled:bg-gray-background-soft-muted disabled:hover:border-gray-stroke-muted disabled:hover:ring-0 aria-[invalid]:border-feedback-error-stroke aria-[invalid]:hover:ring-[3px] aria-[invalid]:hover:ring-state-error [&_svg]:pointer-events-none [&_svg]:shrink-0",u&&!s&&"border-gray-stroke-emphasis",a),"data-slot":"autocomplete-trigger","data-placeholder":"",disabled:i,id:w,role:"combobox",type:"button"},l),{children:[n("span",{className:"min-w-0 truncate text-gray-foreground-emphasis",children:t!=null?t:o}),n(H,{"aria-hidden":"true",className:"shrink-0 text-gray-foreground",size:24,strokeWidth:1.6})]}))})}function S({className:e,cancelLabel:r="Cancelar",confirmLabel:a="Concluir",onCancel:o,onConfirm:t}){const{setOpen:l,onCancelSelection:s,values:i}=v(h);return g("div",{className:p("flex items-center justify-between border-t border-gray-stroke-muted px-4 py-3",e),"data-slot":"autocomplete-content-footer",children:[n(T,{size:"sm",variant:"regular-soft",onClick:()=>{s(),o==null||o(),l(!1)},children:r}),n(T,{size:"sm",variant:"emphasis",iconLeft:n(B,{strokeWidth:2.6}),onClick:()=>{t==null||t(i),l(!1)},children:a})]})}function z(e){return typeof e=="string"||typeof e=="number"?String(e):Array.isArray(e)?e.map(z).join(""):P(e)?z(e.props.children):""}function pe({children:e,className:r,searchPlaceholder:a="Buscar...",emptyMessage:o="Nenhum resultado encontrado"}){const{listId:t}=v(h),l=X.toArray(e),s=l.filter(d=>P(d)&&d.type===S),i=l.filter(d=>!(P(d)&&d.type===S));return g(te,{id:t,align:"start",className:p("w-full min-w-[var(--radix-popper-anchor-width)] border-gray-stroke-muted p-0",r),children:[g(Y,{children:[n(Q,{placeholder:a}),g(Z,{children:[n(ee,{children:o}),i]})]}),s]})}function fe({children:e,value:r,name:a,className:o,disabled:t=!1}){const{values:l,toggleValue:s}=v(h),i=l.includes(r);return g(ae,{className:p("relative flex w-full cursor-default select-none items-center gap-3 rounded px-2 py-2.5 text-base font-medium text-gray-foreground outline-none hover:cursor-pointer hover:bg-secondary-background-soft-emphasis data-[selected=true]:bg-secondary-background-soft-emphasis",o),disabled:t,"aria-checked":i,onSelect:()=>{s(r)},value:r,keywords:[a!=null?a:z(e)].filter(Boolean),children:[n("span",{"aria-hidden":"true",className:p("inline-flex size-[18px] shrink-0 items-center justify-center rounded-sm border-2 transition-all",i?"border-primary-background-fill bg-primary-background-fill":"border-gray-stroke-muted bg-surface-card"),children:i&&n(B,{size:12,strokeWidth:2.6,className:"text-primary-foreground-onfill"})}),e]})}function ge(e){var r=e,{className:a}=r,o=k(r,["className"]);return n(re,C({className:a},o))}function he(e){var r=e,{className:a}=r,o=k(r,["className"]);const{invalid:t}=v(h);return n("span",C({className:p("-mt-1 text-xs",t?"text-feedback-error-foreground":"text-gray-foreground",a),"data-slot":"autocomplete-text"},o))}export{ce as Autocomplete,pe as AutocompleteContent,S as AutocompleteContentFooter,ge as AutocompleteGroup,fe as AutocompleteItem,he as AutocompleteText,me as AutocompleteTrigger,ue as AutocompleteWrapper};
3
+ import{jsx as n,jsxs as g}from"react/jsx-runtime";import{Check as B,ChevronDown as H}from"@medway-ui/icons";import{createContext as J,useState as y,useCallback as I,useMemo as K,useContext as v,Children as X,isValidElement as P}from"react";import{useId as L}from"../hooks/use-id.mjs";import{cn as p}from"../lib/utils.mjs";import{Command as Y,CommandInput as Q,CommandList as Z,CommandEmpty as ee,CommandGroup as re,CommandItem as ae}from"./Command.mjs";import{Popover as oe,PopoverContent as te,PopoverTrigger as ne}from"./Popover.mjs";import{Button as T}from"./Button.mjs";var le=Object.defineProperty,se=Object.defineProperties,ie=Object.getOwnPropertyDescriptors,x=Object.getOwnPropertySymbols,G=Object.prototype.hasOwnProperty,M=Object.prototype.propertyIsEnumerable,R=(e,r,a)=>r in e?le(e,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[r]=a,C=(e,r)=>{for(var a in r||(r={}))G.call(r,a)&&R(e,a,r[a]);if(x)for(var a of x(r))M.call(r,a)&&R(e,a,r[a]);return e},de=(e,r)=>se(e,ie(r)),k=(e,r)=>{var a={};for(var o in e)G.call(e,o)&&r.indexOf(o)<0&&(a[o]=e[o]);if(e!=null&&x)for(var o of x(e))r.indexOf(o)<0&&M.call(e,o)&&(a[o]=e[o]);return a};const h=J({invalid:!1,disabled:!1,open:!1,setOpen:()=>{},values:[],toggleValue:()=>{},onCancelSelection:()=>{},listId:""});function ce({children:e,invalid:r=!1,disabled:a=!1,values:o,onValuesChange:t,open:l,onOpenChange:s,defaultValues:i=[]}){const[d,b]=y(i),[N,w]=y(!1),u=o!==void 0,O=l!==void 0,c=u?o:d,m=O?l:N,[A,_]=y(c),[D,F]=y(m);m!==D&&(F(m),m&&_(c));const E=I(f=>{const W=c.includes(f)?c.filter(q=>q!==f):[...c,f];u||b(W),t==null||t(W)},[c,u,t]),j=I(f=>{a||(O||w(f),s==null||s(f))},[a,O,s]),V=I(()=>{u||b(A),t==null||t(A)},[u,A,t]),$=L(),U=K(()=>({invalid:r,disabled:a,open:m,setOpen:j,values:c,toggleValue:E,onCancelSelection:V,listId:$}),[r,a,m,j,c,E,V,$]);return n(h.Provider,{value:U,children:n(oe,{open:m,onOpenChange:j,children:e})})}function ue(e){var r=e,{className:a}=r,o=k(r,["className"]);return n("div",C({className:p("group relative flex flex-col gap-2",a),"data-slot":"autocomplete-wrapper"},o))}function me(e){var r=e,{className:a,placeholder:o="Selecione uma op\xE7\xE3o",children:t}=r,l=k(r,["className","placeholder","children"]);const{invalid:s,disabled:i,open:d,values:b,listId:N}=v(h),w=L(),u=b.length>0;return n(ne,{asChild:!0,children:g("button",de(C({"aria-controls":N,"aria-expanded":d,"aria-invalid":s||void 0,className:p("flex h-12 max-h-12 w-full items-center justify-between gap-2 rounded-md border-2 border-gray-stroke-muted bg-surface-card px-4 py-3 text-left text-md text-gray-foreground outline-none transition-[color,box-shadow] hover:border-gray-stroke-emphasis hover:ring-[3px] hover:ring-state-focus disabled:cursor-default disabled:bg-gray-background-soft-muted disabled:hover:border-gray-stroke-muted disabled:hover:ring-0 aria-[invalid]:border-feedback-error-stroke aria-[invalid]:hover:ring-[3px] aria-[invalid]:hover:ring-state-error [&_svg]:pointer-events-none [&_svg]:shrink-0",u&&!s&&"border-gray-stroke-emphasis",a),"data-slot":"autocomplete-trigger","data-placeholder":"",disabled:i,id:w,role:"combobox",type:"button"},l),{children:[n("span",{className:"min-w-0 truncate text-gray-foreground-emphasis",children:t!=null?t:o}),n(H,{"aria-hidden":"true",className:"shrink-0 text-gray-foreground",size:24,strokeWidth:1.6})]}))})}function S({className:e,cancelLabel:r="Cancelar",confirmLabel:a="Concluir",onCancel:o,onConfirm:t}){const{setOpen:l,onCancelSelection:s,values:i}=v(h);return g("div",{className:p("flex items-center justify-between border-t border-gray-stroke-muted px-4 py-3",e),"data-slot":"autocomplete-content-footer",children:[n(T,{size:"sm",variant:"regular-soft",onClick:()=>{s(),o==null||o(),l(!1)},children:r}),n(T,{size:"sm",variant:"emphasis",iconLeft:n(B,{strokeWidth:2.6}),onClick:()=>{t==null||t(i),l(!1)},children:a})]})}function z(e){return typeof e=="string"||typeof e=="number"?String(e):Array.isArray(e)?e.map(z).join(""):P(e)?z(e.props.children):""}function pe({children:e,className:r,searchPlaceholder:a="Buscar...",emptyMessage:o="Nenhum resultado encontrado"}){const{listId:t}=v(h),l=X.toArray(e),s=l.filter(d=>P(d)&&d.type===S),i=l.filter(d=>!(P(d)&&d.type===S));return g(te,{id:t,align:"start",className:p("w-full min-w-[var(--radix-popper-anchor-width)] border-gray-stroke-muted p-0",r),children:[g(Y,{children:[n(Q,{placeholder:a}),g(Z,{children:[n(ee,{children:o}),i]})]}),s]})}function fe({children:e,value:r,name:a,className:o,disabled:t=!1}){const{values:l,toggleValue:s}=v(h),i=l.includes(r);return g(ae,{className:p("relative flex w-full cursor-default select-none items-center gap-3 rounded px-2 py-2.5 text-base font-medium text-gray-foreground outline-none hover:cursor-pointer hover:bg-secondary-background-soft-emphasis data-[selected=true]:bg-secondary-background-soft-emphasis",o),disabled:t,"aria-checked":i,onSelect:()=>{s(r)},value:r,keywords:[a!=null?a:z(e)].filter(Boolean),children:[n("span",{"aria-hidden":"true",className:p("inline-flex size-[18px] shrink-0 items-center justify-center rounded-sm border-2 transition-all",i?"border-primary-background-fill bg-primary-background-fill":"border-gray-stroke-muted bg-surface-card"),children:i&&n(B,{size:12,strokeWidth:2.6,className:"text-primary-foreground-onfill"})}),e]})}function ge(e){var r=e,{className:a}=r,o=k(r,["className"]);return n(re,C({className:a},o))}function he(e){var r=e,{className:a}=r,o=k(r,["className"]);const{invalid:t}=v(h);return n("span",C({className:p("-mt-1 text-xs",t?"text-feedback-error-foreground":"text-gray-foreground",a),"data-slot":"autocomplete-text"},o))}export{ce as Autocomplete,pe as AutocompleteContent,S as AutocompleteContentFooter,ge as AutocompleteGroup,fe as AutocompleteItem,he as AutocompleteText,me as AutocompleteTrigger,ue as AutocompleteWrapper};
4
4
  //# sourceMappingURL=Autocomplete.mjs.map
@@ -2,6 +2,7 @@ import { type VariantProps } from "class-variance-authority";
2
2
  import { type ComponentProps, type ReactNode } from "react";
3
3
  interface ButtonProps extends ComponentProps<"button">, VariantProps<typeof buttonVariants> {
4
4
  asChild?: boolean;
5
+ full?: boolean;
5
6
  containerClassName?: string;
6
7
  iconRight?: ReactNode;
7
8
  iconLeft?: ReactNode;
@@ -12,6 +13,7 @@ interface ButtonProps extends ComponentProps<"button">, VariantProps<typeof butt
12
13
  declare const buttonVariants: (props?: ({
13
14
  variant?: "regular" | "error" | "warning" | "regular-soft" | "regular-basic" | "emphasis" | "emphasis-soft" | "emphasis-basic" | "error-soft" | "error-basic" | "warning-soft" | "warning-basic" | "success" | "success-soft" | "success-basic" | "outlined" | "gradient" | "medbrain" | null | undefined;
14
15
  size?: "sm" | "md" | "lg" | "xl" | null | undefined;
16
+ full?: boolean | null | undefined;
15
17
  } & ({ class: import("clsx").ClassValue; className?: never } | { class?: never; className: import("clsx").ClassValue } | { class?: never; className?: never })) | undefined) => string;
16
18
  declare const Button: import("react").ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
17
19
  export { Button, buttonVariants };
@@ -1 +1 @@
1
- {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/components/Button.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAEL,KAAK,cAAc,EAEnB,KAAK,SAAS,EAEf,MAAM,OAAO,CAAC;AA8Bf,UAAU,WACR,SAAQ,cAAc,CAAC,QAAQ,CAAC,EAC9B,YAAY,CAAC,OAAO,cAAc,CAAC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,QAAA,MAAM,cAAc;;;8EAsDnB,CAAC;AAEF,QAAA,MAAM,MAAM,wHA8GV,CAAC;AAEH,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC;AAClC,YAAY,EAAE,WAAW,EAAE,CAAC"}
1
+ {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/components/Button.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAEL,KAAK,cAAc,EAEnB,KAAK,SAAS,EAEf,MAAM,OAAO,CAAC;AA8Bf,UAAU,WACR,SAAQ,cAAc,CAAC,QAAQ,CAAC,EAC9B,YAAY,CAAC,OAAO,cAAc,CAAC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,QAAA,MAAM,cAAc;;;;8EAyDnB,CAAC;AAEF,QAAA,MAAM,MAAM,wHAkHV,CAAC;AAEH,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC;AAClC,YAAY,EAAE,WAAW,EAAE,CAAC"}
@@ -2,6 +2,7 @@ import { type VariantProps } from "class-variance-authority";
2
2
  import { type ComponentProps, type ReactNode } from "react";
3
3
  interface ButtonProps extends ComponentProps<"button">, VariantProps<typeof buttonVariants> {
4
4
  asChild?: boolean;
5
+ full?: boolean;
5
6
  containerClassName?: string;
6
7
  iconRight?: ReactNode;
7
8
  iconLeft?: ReactNode;
@@ -12,6 +13,7 @@ interface ButtonProps extends ComponentProps<"button">, VariantProps<typeof butt
12
13
  declare const buttonVariants: (props?: ({
13
14
  variant?: "regular" | "error" | "warning" | "regular-soft" | "regular-basic" | "emphasis" | "emphasis-soft" | "emphasis-basic" | "error-soft" | "error-basic" | "warning-soft" | "warning-basic" | "success" | "success-soft" | "success-basic" | "outlined" | "gradient" | "medbrain" | null | undefined;
14
15
  size?: "sm" | "md" | "lg" | "xl" | null | undefined;
16
+ full?: boolean | null | undefined;
15
17
  } & ({ class: import("clsx").ClassValue; className?: never } | { class?: never; className: import("clsx").ClassValue } | { class?: never; className?: never })) | undefined) => string;
16
18
  declare const Button: import("react").ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
17
19
  export { Button, buttonVariants };
@@ -1 +1 @@
1
- {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/components/Button.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAEL,KAAK,cAAc,EAEnB,KAAK,SAAS,EAEf,MAAM,OAAO,CAAC;AA8Bf,UAAU,WACR,SAAQ,cAAc,CAAC,QAAQ,CAAC,EAC9B,YAAY,CAAC,OAAO,cAAc,CAAC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,QAAA,MAAM,cAAc;;;8EAsDnB,CAAC;AAEF,QAAA,MAAM,MAAM,wHA8GV,CAAC;AAEH,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC;AAClC,YAAY,EAAE,WAAW,EAAE,CAAC"}
1
+ {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/components/Button.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAEL,KAAK,cAAc,EAEnB,KAAK,SAAS,EAEf,MAAM,OAAO,CAAC;AA8Bf,UAAU,WACR,SAAQ,cAAc,CAAC,QAAQ,CAAC,EAC9B,YAAY,CAAC,OAAO,cAAc,CAAC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,QAAA,MAAM,cAAc;;;;8EAyDnB,CAAC;AAEF,QAAA,MAAM,MAAM,wHAkHV,CAAC;AAEH,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC;AAClC,YAAY,EAAE,WAAW,EAAE,CAAC"}
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  "use client";
3
- "use strict";var t=require("react/jsx-runtime"),v=require("radix-ui"),A=require("class-variance-authority"),E=require("react"),$=require("./Loading.js"),G=require("./Badge.js"),g=require("../lib/utils.js"),H=Object.defineProperty,J=Object.defineProperties,K=Object.getOwnPropertyDescriptors,u=Object.getOwnPropertySymbols,k=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable,_=(e,r,a)=>r in e?H(e,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[r]=a,z=(e,r)=>{for(var a in r||(r={}))k.call(r,a)&&_(e,a,r[a]);if(u)for(var a of u(r))w.call(r,a)&&_(e,a,r[a]);return e},j=(e,r)=>J(e,K(r)),M=(e,r)=>{var a={};for(var o in e)k.call(e,o)&&r.indexOf(o)<0&&(a[o]=e[o]);if(e!=null&&u)for(var o of u(e))r.indexOf(o)<0&&w.call(e,o)&&(a[o]=e[o]);return a};const T={sm:"!h-8 !min-h-8 !w-8 !px-3 !py-2",md:"!h-10 !min-h-10 !w-10 !px-[14px] !py-[10px]",lg:"!h-12 !min-h-12 !w-12 !p-3",xl:"!h-14 !min-h-14 !w-14 !p-3"},N={sm:"size-2",md:"size-2.5",lg:"size-2.5",xl:"size-3"},U={sm:"sm",md:"md",lg:"md",xl:"lg"},O=A.cva("inline-flex items-center justify-center place-items-center gap-2 rounded-pill text-sm font-semibold whitespace-nowrap transition-all disabled:pointer-events-none min-w-0 max-w-full overflow-hidden [&_svg]:shrink-0 hover:cursor-pointer focus:outline-0 focus-visible:ring-[3px] focus-visible:ring-state-focus [grid-template-areas:'stack']",{variants:{variant:{regular:"bg-primary-background-fill text-primary-foreground-onfill hover:bg-primary-background-fill-emphasis disabled:bg-gray-background-fill-muted disabled:text-gray-foreground-onfill","regular-soft":"bg-primary-background-soft text-primary-foreground hover:bg-primary-background-soft-emphasis hover:text-primary-foreground-emphasis disabled:bg-gray-background-soft-muted disabled:text-gray-foreground-muted","regular-basic":"bg-transparent text-primary-foreground hover:bg-primary-background-soft-emphasis hover:text-primary-foreground-emphasis disabled:bg-transparent disabled:text-gray-foreground-muted",emphasis:"bg-secondary-background-fill text-secondary-foreground-onfill hover:bg-secondary-background-fill-emphasis disabled:bg-gray-background-fill-muted disabled:text-gray-foreground-onfill","emphasis-soft":"bg-secondary-background-soft text-secondary-foreground hover:bg-secondary-background-soft-emphasis hover:text-secondary-foreground-emphasis disabled:bg-gray-background-soft-muted disabled:text-gray-foreground-muted","emphasis-basic":"bg-transparent text-secondary-foreground hover:bg-secondary-background-soft-emphasis hover:text-secondary-foreground-emphasis disabled:bg-transparent disabled:text-gray-foreground-muted",error:"bg-red-background-fill text-red-foreground-onfill hover:bg-red-background-fill-emphasis disabled:bg-gray-background-fill-muted disabled:text-gray-foreground-onfill","error-soft":"bg-red-background-soft text-red-foreground hover:bg-red-background-soft-emphasis hover:text-red-foreground-emphasis disabled:bg-gray-background-soft-muted disabled:text-gray-foreground-muted","error-basic":"bg-transparent text-red-foreground hover:bg-red-background-soft-emphasis hover:text-red-foreground-emphasis disabled:bg-transparent disabled:text-gray-foreground-muted",warning:"bg-yellow-background-fill text-yellow-foreground-onfill hover:bg-yellow-background-fill-emphasis disabled:bg-gray-background-fill-muted disabled:text-gray-foreground-onfill","warning-soft":"bg-yellow-background-soft text-yellow-foreground hover:bg-yellow-background-soft-emphasis hover:text-yellow-foreground-emphasis disabled:bg-gray-background-soft-muted disabled:text-gray-foreground-muted","warning-basic":"bg-transparent text-yellow-foreground hover:bg-yellow-background-soft-emphasis hover:text-yellow-foreground-emphasis disabled:bg-transparent disabled:text-gray-foreground-muted",success:"bg-green-background-fill text-green-foreground-onfill hover:bg-green-background-fill-emphasis disabled:bg-gray-background-fill-muted disabled:text-gray-foreground-onfill","success-soft":"bg-green-background-soft text-green-foreground hover:bg-green-background-soft-emphasis hover:text-green-foreground-emphasis disabled:bg-gray-background-soft-muted disabled:text-gray-foreground-muted","success-basic":"bg-transparent text-green-foreground hover:bg-green-background-soft-emphasis hover:text-green-foreground-emphasis disabled:bg-transparent disabled:text-gray-foreground-muted",outlined:"border border-gray-stroke-muted bg-transparent text-primary-foreground hover:border-transparent hover:bg-gray-50 disabled:border-transparent dark:bg-transparent hover:dark:border-gray-400 disabled:border-gray-stroke-muted disabled:text-gray-foreground-muted",gradient:"text-white [background:linear-gradient(284deg,var(--color-primary)_2.11%,var(--color-secondary)_128.06%)] hover:[background:linear-gradient(284deg,var(--color-primary)2.11%,var(--color-secondary)102.63%)] disabled:[background:var(--color-gray-50)] disabled:bg-gray-background-fill-muted disabled:text-gray-foreground-onfill",medbrain:"border-2 border-transparent bg-clip-text [background:linear-gradient(var(--color-white),var(--color-white))_padding-box,linear-gradient(75deg,var(--color-secondary),var(--color-cm-lighten-3))_border-box] [box-shadow:-8px_0_8px_0_var(--color-prev-16)_inset,8px_0_8px_0_var(--color-secondary-24)_inset,0_0_8px_0_var(--color-cm-16)_inset] hover:[background:linear-gradient(var(--color-white),var(--color-white))_padding-box,linear-gradient(75deg,var(--color-cm-lighten-3),var(--color-secondary))_border-box] [&_span]:bg-clip-text [&_span]:text-transparent [&_span]:bg-gradient-to-r [&_span]:from-cm [&_span]:to-primary [&_span]:hover:to-secondary disabled:bg-gray-background-fill-muted disabled:text-gray-foreground-onfill [&_svg]:text-cm-darken-1"},size:{sm:"min-h-8 min-w-8 px-3 py-1 has-[>svg]:px-3 [&_svg:not([class*='size-'])]:size-[13px] text-xs",md:"min-h-10 min-w-10 px-3.5 py-2 has-[>svg]:px-3.5 [&_svg:not([class*='size-'])]:size-4 text-sm",lg:"min-h-12 min-w-12 px-4 py-3 has-[>svg]:px-4 [&_svg:not([class*='size-'])]:size-6 text-md",xl:"min-h-14 min-w-14 px-[18px] py-3.5 has-[>svg]:px-[18px] [&_svg:not([class*='size-'])]:size-7 text-lg"}},defaultVariants:{variant:"regular",size:"md"}}),Y=E.forwardRef(function(e,r){var a=e,{className:o,containerClassName:C,variant:q,size:i,asChild:b=!1,iconRight:c,iconLeft:f,badge:p,loading:n=!1,alert:l,type:m,disabled:S}=a,d=M(a,["className","containerClassName","variant","size","asChild","iconRight","iconLeft","badge","loading","alert","type","disabled"]);const L=b?v.Slot.Slot:"button",P=b||m!=null?m:"button",h=n||S,x=b&&h,R=s=>s!=null&&s!==0&&s!==""&&s!=="0",y=s=>s,V=!d.children&&(f||c||l),B=()=>l?t.jsxs("span",{className:g.cn("relative mr-1 flex size-2.5",N[i||"md"]),children:[t.jsx("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full opacity-75",style:{backgroundColor:l}}),t.jsx("span",{className:g.cn("relative inline-flex size-2.5 rounded-full",N[i||"md"]),style:{backgroundColor:l}})]}):null,D=()=>n?t.jsx($.Loading,{className:"[grid-area:stack]"}):l?B():f&&y(f),I=()=>b?t.jsx(v.Slot.Slottable,{children:d.children}):n?t.jsx("span",{className:"opacity-0 [grid-area:stack]",children:d.children}):d.children&&t.jsx("span",{className:"truncate",children:d.children});return t.jsxs("div",{className:g.cn("relative min-w-0",C),children:[R(p)&&t.jsx(G.Badge,{size:U[i||"md"],variant:"regular",className:g.cn("absolute -right-2 -top-1 z-10"),role:"status","aria-label":`${p}-notifications`,children:String(p)}),t.jsxs(L,j(z(j(z({ref:r,type:P,"aria-busy":n,"aria-live":n?"polite":void 0,"data-slot":"button",className:g.cn(V&&T[i||"md"],n&&"!inline-grid",x&&"pointer-events-none opacity-50",O({variant:q,size:i,className:o}))},d),{disabled:h}),x&&{"aria-disabled":!0,tabIndex:-1,onClick:s=>s.preventDefault()}),{children:[D(),I(),!n&&c&&y(c)]}))]})});exports.Button=Y,exports.buttonVariants=O;
3
+ "use strict";var t=require("react/jsx-runtime"),w=require("radix-ui"),I=require("class-variance-authority"),U=require("react"),F=require("./Loading.js"),H=require("./Badge.js"),g=require("../lib/utils.js"),K=Object.defineProperty,Q=Object.defineProperties,T=Object.getOwnPropertyDescriptors,u=Object.getOwnPropertySymbols,_=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,j=(e,r,a)=>r in e?K(e,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[r]=a,N=(e,r)=>{for(var a in r||(r={}))_.call(r,a)&&j(e,a,r[a]);if(u)for(var a of u(r))z.call(r,a)&&j(e,a,r[a]);return e},O=(e,r)=>Q(e,T(r)),Y=(e,r)=>{var a={};for(var o in e)_.call(e,o)&&r.indexOf(o)<0&&(a[o]=e[o]);if(e!=null&&u)for(var o of u(e))r.indexOf(o)<0&&z.call(e,o)&&(a[o]=e[o]);return a};const Z={sm:"!h-8 !min-h-8 !w-8 !px-3 !py-2",md:"!h-10 !min-h-10 !w-10 !px-[14px] !py-[10px]",lg:"!h-12 !min-h-12 !w-12 !p-3",xl:"!h-14 !min-h-14 !w-14 !p-3"},C={sm:"size-2",md:"size-2.5",lg:"size-2.5",xl:"size-3"},G={sm:"sm",md:"md",lg:"md",xl:"lg"},q=I.cva("inline-flex items-center justify-center place-items-center gap-2 rounded-pill text-sm font-semibold whitespace-nowrap transition-all disabled:pointer-events-none min-w-0 max-w-full overflow-hidden [&_svg]:shrink-0 hover:cursor-pointer focus:outline-0 focus-visible:ring-[3px] focus-visible:ring-state-focus [grid-template-areas:'stack']",{variants:{variant:{regular:"bg-primary-background-fill text-primary-foreground-onfill hover:bg-primary-background-fill-emphasis disabled:bg-gray-background-fill-muted disabled:text-gray-foreground-onfill","regular-soft":"bg-primary-background-soft text-primary-foreground hover:bg-primary-background-soft-emphasis hover:text-primary-foreground-emphasis disabled:bg-gray-background-soft-muted disabled:text-gray-foreground-muted","regular-basic":"bg-transparent text-primary-foreground hover:bg-primary-background-soft-emphasis hover:text-primary-foreground-emphasis disabled:bg-transparent disabled:text-gray-foreground-muted",emphasis:"bg-secondary-background-fill text-secondary-foreground-onfill hover:bg-secondary-background-fill-emphasis disabled:bg-gray-background-fill-muted disabled:text-gray-foreground-onfill","emphasis-soft":"bg-secondary-background-soft text-secondary-foreground hover:bg-secondary-background-soft-emphasis hover:text-secondary-foreground-emphasis disabled:bg-gray-background-soft-muted disabled:text-gray-foreground-muted","emphasis-basic":"bg-transparent text-secondary-foreground hover:bg-secondary-background-soft-emphasis hover:text-secondary-foreground-emphasis disabled:bg-transparent disabled:text-gray-foreground-muted",error:"bg-red-background-fill text-red-foreground-onfill hover:bg-red-background-fill-emphasis disabled:bg-gray-background-fill-muted disabled:text-gray-foreground-onfill","error-soft":"bg-red-background-soft text-red-foreground hover:bg-red-background-soft-emphasis hover:text-red-foreground-emphasis disabled:bg-gray-background-soft-muted disabled:text-gray-foreground-muted","error-basic":"bg-transparent text-red-foreground hover:bg-red-background-soft-emphasis hover:text-red-foreground-emphasis disabled:bg-transparent disabled:text-gray-foreground-muted",warning:"bg-yellow-background-fill text-yellow-foreground-onfill hover:bg-yellow-background-fill-emphasis disabled:bg-gray-background-fill-muted disabled:text-gray-foreground-onfill","warning-soft":"bg-yellow-background-soft text-yellow-foreground hover:bg-yellow-background-soft-emphasis hover:text-yellow-foreground-emphasis disabled:bg-gray-background-soft-muted disabled:text-gray-foreground-muted","warning-basic":"bg-transparent text-yellow-foreground hover:bg-yellow-background-soft-emphasis hover:text-yellow-foreground-emphasis disabled:bg-transparent disabled:text-gray-foreground-muted",success:"bg-green-background-fill text-green-foreground-onfill hover:bg-green-background-fill-emphasis disabled:bg-gray-background-fill-muted disabled:text-gray-foreground-onfill","success-soft":"bg-green-background-soft text-green-foreground hover:bg-green-background-soft-emphasis hover:text-green-foreground-emphasis disabled:bg-gray-background-soft-muted disabled:text-gray-foreground-muted","success-basic":"bg-transparent text-green-foreground hover:bg-green-background-soft-emphasis hover:text-green-foreground-emphasis disabled:bg-transparent disabled:text-gray-foreground-muted",outlined:"border border-gray-stroke-muted bg-transparent text-primary-foreground hover:border-transparent hover:bg-gray-50 disabled:border-transparent dark:bg-transparent hover:dark:border-gray-400 disabled:border-gray-stroke-muted disabled:text-gray-foreground-muted",gradient:"text-white [background:linear-gradient(284deg,var(--color-primary)_2.11%,var(--color-secondary)_128.06%)] hover:[background:linear-gradient(284deg,var(--color-primary)2.11%,var(--color-secondary)102.63%)] disabled:[background:var(--color-gray-50)] disabled:bg-gray-background-fill-muted disabled:text-gray-foreground-onfill",medbrain:"border-2 border-transparent bg-clip-text [background:linear-gradient(var(--color-white),var(--color-white))_padding-box,linear-gradient(75deg,var(--color-secondary),var(--color-cm-lighten-3))_border-box] [box-shadow:-8px_0_8px_0_var(--color-prev-16)_inset,8px_0_8px_0_var(--color-secondary-24)_inset,0_0_8px_0_var(--color-cm-16)_inset] hover:[background:linear-gradient(var(--color-white),var(--color-white))_padding-box,linear-gradient(75deg,var(--color-cm-lighten-3),var(--color-secondary))_border-box] [&_span]:bg-clip-text [&_span]:text-transparent [&_span]:bg-gradient-to-r [&_span]:from-cm [&_span]:to-primary [&_span]:hover:to-secondary disabled:bg-gray-background-fill-muted disabled:text-gray-foreground-onfill [&_svg]:text-cm-darken-1"},size:{sm:"min-h-8 min-w-8 px-3 py-1 has-[>svg]:px-3 [&_svg:not([class*='size-'])]:size-[13px] text-xs",md:"min-h-10 min-w-10 px-3.5 py-2 has-[>svg]:px-3.5 [&_svg:not([class*='size-'])]:size-4 text-sm",lg:"min-h-12 min-w-12 px-4 py-3 has-[>svg]:px-4 [&_svg:not([class*='size-'])]:size-6 text-md",xl:"min-h-14 min-w-14 px-[18px] py-3.5 has-[>svg]:px-[18px] [&_svg:not([class*='size-'])]:size-7 text-lg"},full:{true:"w-full"}},defaultVariants:{variant:"regular",size:"md"}}),J=U.forwardRef(function(e,r){var a=e,{className:o,containerClassName:S,variant:P,size:i,full:L,asChild:b=!1,iconRight:c,iconLeft:f,badge:p,loading:n=!1,alert:l,type:m,disabled:R}=a,d=Y(a,["className","containerClassName","variant","size","full","asChild","iconRight","iconLeft","badge","loading","alert","type","disabled"]);const B=b?w.Slot.Slot:"button",V=b||m!=null?m:"button",h=n||R,x=b&&h,D=s=>s!=null&&s!==0&&s!==""&&s!=="0",y=s=>s,v=!d.children&&(f||c||l),k=!!L&&!v,$=()=>l?t.jsxs("span",{className:g.cn("relative mr-1 flex size-2.5",C[i||"md"]),children:[t.jsx("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full opacity-75",style:{backgroundColor:l}}),t.jsx("span",{className:g.cn("relative inline-flex size-2.5 rounded-full",C[i||"md"]),style:{backgroundColor:l}})]}):null,A=()=>n?t.jsx(F.Loading,{className:"[grid-area:stack]"}):l?$():f&&y(f),E=()=>b?t.jsx(w.Slot.Slottable,{children:d.children}):n?t.jsx("span",{className:"opacity-0 [grid-area:stack]",children:d.children}):d.children&&t.jsx("span",{className:"truncate",children:d.children});return t.jsxs("div",{className:g.cn("relative min-w-0",k&&"w-full",S),children:[D(p)&&t.jsx(H.Badge,{size:G[i||"md"],variant:"regular",className:g.cn("absolute -right-2 -top-1 z-10"),role:"status","aria-label":`${p}-notifications`,children:String(p)}),t.jsxs(B,O(N(O(N({ref:r,type:V,"aria-busy":n,"aria-live":n?"polite":void 0,"data-slot":"button",className:g.cn(v&&Z[i||"md"],n&&"!inline-grid",x&&"pointer-events-none opacity-50",q({variant:P,size:i,full:k,className:o}))},d),{disabled:h}),x&&{"aria-disabled":!0,tabIndex:-1,onClick:s=>s.preventDefault()}),{children:[A(),E(),!n&&c&&y(c)]}))]})});exports.Button=J,exports.buttonVariants=q;
4
4
  //# sourceMappingURL=Button.js.map
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  "use client";
3
- import{jsxs as p,jsx as s}from"react/jsx-runtime";import{Slot as k}from"radix-ui";import{cva as A}from"class-variance-authority";import{forwardRef as G}from"react";import{Loading as H}from"./Loading.mjs";import{Badge as J}from"./Badge.mjs";import{cn as g}from"../lib/utils.mjs";var K=Object.defineProperty,M=Object.defineProperties,T=Object.getOwnPropertyDescriptors,u=Object.getOwnPropertySymbols,w=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable,z=(r,e,a)=>e in r?K(r,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):r[e]=a,N=(r,e)=>{for(var a in e||(e={}))w.call(e,a)&&z(r,a,e[a]);if(u)for(var a of u(e))_.call(e,a)&&z(r,a,e[a]);return r},O=(r,e)=>M(r,T(e)),Y=(r,e)=>{var a={};for(var o in r)w.call(r,o)&&e.indexOf(o)<0&&(a[o]=r[o]);if(r!=null&&u)for(var o of u(r))e.indexOf(o)<0&&_.call(r,o)&&(a[o]=r[o]);return a};const Z={sm:"!h-8 !min-h-8 !w-8 !px-3 !py-2",md:"!h-10 !min-h-10 !w-10 !px-[14px] !py-[10px]",lg:"!h-12 !min-h-12 !w-12 !p-3",xl:"!h-14 !min-h-14 !w-14 !p-3"},j={sm:"size-2",md:"size-2.5",lg:"size-2.5",xl:"size-3"},q={sm:"sm",md:"md",lg:"md",xl:"lg"},C=A("inline-flex items-center justify-center place-items-center gap-2 rounded-pill text-sm font-semibold whitespace-nowrap transition-all disabled:pointer-events-none min-w-0 max-w-full overflow-hidden [&_svg]:shrink-0 hover:cursor-pointer focus:outline-0 focus-visible:ring-[3px] focus-visible:ring-state-focus [grid-template-areas:'stack']",{variants:{variant:{regular:"bg-primary-background-fill text-primary-foreground-onfill hover:bg-primary-background-fill-emphasis disabled:bg-gray-background-fill-muted disabled:text-gray-foreground-onfill","regular-soft":"bg-primary-background-soft text-primary-foreground hover:bg-primary-background-soft-emphasis hover:text-primary-foreground-emphasis disabled:bg-gray-background-soft-muted disabled:text-gray-foreground-muted","regular-basic":"bg-transparent text-primary-foreground hover:bg-primary-background-soft-emphasis hover:text-primary-foreground-emphasis disabled:bg-transparent disabled:text-gray-foreground-muted",emphasis:"bg-secondary-background-fill text-secondary-foreground-onfill hover:bg-secondary-background-fill-emphasis disabled:bg-gray-background-fill-muted disabled:text-gray-foreground-onfill","emphasis-soft":"bg-secondary-background-soft text-secondary-foreground hover:bg-secondary-background-soft-emphasis hover:text-secondary-foreground-emphasis disabled:bg-gray-background-soft-muted disabled:text-gray-foreground-muted","emphasis-basic":"bg-transparent text-secondary-foreground hover:bg-secondary-background-soft-emphasis hover:text-secondary-foreground-emphasis disabled:bg-transparent disabled:text-gray-foreground-muted",error:"bg-red-background-fill text-red-foreground-onfill hover:bg-red-background-fill-emphasis disabled:bg-gray-background-fill-muted disabled:text-gray-foreground-onfill","error-soft":"bg-red-background-soft text-red-foreground hover:bg-red-background-soft-emphasis hover:text-red-foreground-emphasis disabled:bg-gray-background-soft-muted disabled:text-gray-foreground-muted","error-basic":"bg-transparent text-red-foreground hover:bg-red-background-soft-emphasis hover:text-red-foreground-emphasis disabled:bg-transparent disabled:text-gray-foreground-muted",warning:"bg-yellow-background-fill text-yellow-foreground-onfill hover:bg-yellow-background-fill-emphasis disabled:bg-gray-background-fill-muted disabled:text-gray-foreground-onfill","warning-soft":"bg-yellow-background-soft text-yellow-foreground hover:bg-yellow-background-soft-emphasis hover:text-yellow-foreground-emphasis disabled:bg-gray-background-soft-muted disabled:text-gray-foreground-muted","warning-basic":"bg-transparent text-yellow-foreground hover:bg-yellow-background-soft-emphasis hover:text-yellow-foreground-emphasis disabled:bg-transparent disabled:text-gray-foreground-muted",success:"bg-green-background-fill text-green-foreground-onfill hover:bg-green-background-fill-emphasis disabled:bg-gray-background-fill-muted disabled:text-gray-foreground-onfill","success-soft":"bg-green-background-soft text-green-foreground hover:bg-green-background-soft-emphasis hover:text-green-foreground-emphasis disabled:bg-gray-background-soft-muted disabled:text-gray-foreground-muted","success-basic":"bg-transparent text-green-foreground hover:bg-green-background-soft-emphasis hover:text-green-foreground-emphasis disabled:bg-transparent disabled:text-gray-foreground-muted",outlined:"border border-gray-stroke-muted bg-transparent text-primary-foreground hover:border-transparent hover:bg-gray-50 disabled:border-transparent dark:bg-transparent hover:dark:border-gray-400 disabled:border-gray-stroke-muted disabled:text-gray-foreground-muted",gradient:"text-white [background:linear-gradient(284deg,var(--color-primary)_2.11%,var(--color-secondary)_128.06%)] hover:[background:linear-gradient(284deg,var(--color-primary)2.11%,var(--color-secondary)102.63%)] disabled:[background:var(--color-gray-50)] disabled:bg-gray-background-fill-muted disabled:text-gray-foreground-onfill",medbrain:"border-2 border-transparent bg-clip-text [background:linear-gradient(var(--color-white),var(--color-white))_padding-box,linear-gradient(75deg,var(--color-secondary),var(--color-cm-lighten-3))_border-box] [box-shadow:-8px_0_8px_0_var(--color-prev-16)_inset,8px_0_8px_0_var(--color-secondary-24)_inset,0_0_8px_0_var(--color-cm-16)_inset] hover:[background:linear-gradient(var(--color-white),var(--color-white))_padding-box,linear-gradient(75deg,var(--color-cm-lighten-3),var(--color-secondary))_border-box] [&_span]:bg-clip-text [&_span]:text-transparent [&_span]:bg-gradient-to-r [&_span]:from-cm [&_span]:to-primary [&_span]:hover:to-secondary disabled:bg-gray-background-fill-muted disabled:text-gray-foreground-onfill [&_svg]:text-cm-darken-1"},size:{sm:"min-h-8 min-w-8 px-3 py-1 has-[>svg]:px-3 [&_svg:not([class*='size-'])]:size-[13px] text-xs",md:"min-h-10 min-w-10 px-3.5 py-2 has-[>svg]:px-3.5 [&_svg:not([class*='size-'])]:size-4 text-sm",lg:"min-h-12 min-w-12 px-4 py-3 has-[>svg]:px-4 [&_svg:not([class*='size-'])]:size-6 text-md",xl:"min-h-14 min-w-14 px-[18px] py-3.5 has-[>svg]:px-[18px] [&_svg:not([class*='size-'])]:size-7 text-lg"}},defaultVariants:{variant:"regular",size:"md"}}),F=G(function(r,e){var a=r,{className:o,containerClassName:S,variant:P,size:i,asChild:b=!1,iconRight:c,iconLeft:f,badge:m,loading:n=!1,alert:l,type:h,disabled:D}=a,d=Y(a,["className","containerClassName","variant","size","asChild","iconRight","iconLeft","badge","loading","alert","type","disabled"]);const L=b?k.Slot:"button",R=b||h!=null?h:"button",y=n||D,x=b&&y,I=t=>t!=null&&t!==0&&t!==""&&t!=="0",v=t=>t,V=!d.children&&(f||c||l),B=()=>l?p("span",{className:g("relative mr-1 flex size-2.5",j[i||"md"]),children:[s("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full opacity-75",style:{backgroundColor:l}}),s("span",{className:g("relative inline-flex size-2.5 rounded-full",j[i||"md"]),style:{backgroundColor:l}})]}):null,E=()=>n?s(H,{className:"[grid-area:stack]"}):l?B():f&&v(f),$=()=>b?s(k.Slottable,{children:d.children}):n?s("span",{className:"opacity-0 [grid-area:stack]",children:d.children}):d.children&&s("span",{className:"truncate",children:d.children});return p("div",{className:g("relative min-w-0",S),children:[I(m)&&s(J,{size:q[i||"md"],variant:"regular",className:g("absolute -right-2 -top-1 z-10"),role:"status","aria-label":`${m}-notifications`,children:String(m)}),p(L,O(N(O(N({ref:e,type:R,"aria-busy":n,"aria-live":n?"polite":void 0,"data-slot":"button",className:g(V&&Z[i||"md"],n&&"!inline-grid",x&&"pointer-events-none opacity-50",C({variant:P,size:i,className:o}))},d),{disabled:y}),x&&{"aria-disabled":!0,tabIndex:-1,onClick:t=>t.preventDefault()}),{children:[E(),$(),!n&&c&&v(c)]}))]})});export{F as Button,C as buttonVariants};
3
+ import{jsxs as p,jsx as s}from"react/jsx-runtime";import{Slot as _}from"radix-ui";import{cva as H}from"class-variance-authority";import{forwardRef as K}from"react";import{Loading as Q}from"./Loading.mjs";import{Badge as T}from"./Badge.mjs";import{cn as g}from"../lib/utils.mjs";var U=Object.defineProperty,Y=Object.defineProperties,Z=Object.getOwnPropertyDescriptors,u=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable,O=(r,e,a)=>e in r?U(r,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):r[e]=a,j=(r,e)=>{for(var a in e||(e={}))z.call(e,a)&&O(r,a,e[a]);if(u)for(var a of u(e))N.call(e,a)&&O(r,a,e[a]);return r},C=(r,e)=>Y(r,Z(e)),q=(r,e)=>{var a={};for(var o in r)z.call(r,o)&&e.indexOf(o)<0&&(a[o]=r[o]);if(r!=null&&u)for(var o of u(r))e.indexOf(o)<0&&N.call(r,o)&&(a[o]=r[o]);return a};const G={sm:"!h-8 !min-h-8 !w-8 !px-3 !py-2",md:"!h-10 !min-h-10 !w-10 !px-[14px] !py-[10px]",lg:"!h-12 !min-h-12 !w-12 !p-3",xl:"!h-14 !min-h-14 !w-14 !p-3"},P={sm:"size-2",md:"size-2.5",lg:"size-2.5",xl:"size-3"},J={sm:"sm",md:"md",lg:"md",xl:"lg"},S=H("inline-flex items-center justify-center place-items-center gap-2 rounded-pill text-sm font-semibold whitespace-nowrap transition-all disabled:pointer-events-none min-w-0 max-w-full overflow-hidden [&_svg]:shrink-0 hover:cursor-pointer focus:outline-0 focus-visible:ring-[3px] focus-visible:ring-state-focus [grid-template-areas:'stack']",{variants:{variant:{regular:"bg-primary-background-fill text-primary-foreground-onfill hover:bg-primary-background-fill-emphasis disabled:bg-gray-background-fill-muted disabled:text-gray-foreground-onfill","regular-soft":"bg-primary-background-soft text-primary-foreground hover:bg-primary-background-soft-emphasis hover:text-primary-foreground-emphasis disabled:bg-gray-background-soft-muted disabled:text-gray-foreground-muted","regular-basic":"bg-transparent text-primary-foreground hover:bg-primary-background-soft-emphasis hover:text-primary-foreground-emphasis disabled:bg-transparent disabled:text-gray-foreground-muted",emphasis:"bg-secondary-background-fill text-secondary-foreground-onfill hover:bg-secondary-background-fill-emphasis disabled:bg-gray-background-fill-muted disabled:text-gray-foreground-onfill","emphasis-soft":"bg-secondary-background-soft text-secondary-foreground hover:bg-secondary-background-soft-emphasis hover:text-secondary-foreground-emphasis disabled:bg-gray-background-soft-muted disabled:text-gray-foreground-muted","emphasis-basic":"bg-transparent text-secondary-foreground hover:bg-secondary-background-soft-emphasis hover:text-secondary-foreground-emphasis disabled:bg-transparent disabled:text-gray-foreground-muted",error:"bg-red-background-fill text-red-foreground-onfill hover:bg-red-background-fill-emphasis disabled:bg-gray-background-fill-muted disabled:text-gray-foreground-onfill","error-soft":"bg-red-background-soft text-red-foreground hover:bg-red-background-soft-emphasis hover:text-red-foreground-emphasis disabled:bg-gray-background-soft-muted disabled:text-gray-foreground-muted","error-basic":"bg-transparent text-red-foreground hover:bg-red-background-soft-emphasis hover:text-red-foreground-emphasis disabled:bg-transparent disabled:text-gray-foreground-muted",warning:"bg-yellow-background-fill text-yellow-foreground-onfill hover:bg-yellow-background-fill-emphasis disabled:bg-gray-background-fill-muted disabled:text-gray-foreground-onfill","warning-soft":"bg-yellow-background-soft text-yellow-foreground hover:bg-yellow-background-soft-emphasis hover:text-yellow-foreground-emphasis disabled:bg-gray-background-soft-muted disabled:text-gray-foreground-muted","warning-basic":"bg-transparent text-yellow-foreground hover:bg-yellow-background-soft-emphasis hover:text-yellow-foreground-emphasis disabled:bg-transparent disabled:text-gray-foreground-muted",success:"bg-green-background-fill text-green-foreground-onfill hover:bg-green-background-fill-emphasis disabled:bg-gray-background-fill-muted disabled:text-gray-foreground-onfill","success-soft":"bg-green-background-soft text-green-foreground hover:bg-green-background-soft-emphasis hover:text-green-foreground-emphasis disabled:bg-gray-background-soft-muted disabled:text-gray-foreground-muted","success-basic":"bg-transparent text-green-foreground hover:bg-green-background-soft-emphasis hover:text-green-foreground-emphasis disabled:bg-transparent disabled:text-gray-foreground-muted",outlined:"border border-gray-stroke-muted bg-transparent text-primary-foreground hover:border-transparent hover:bg-gray-50 disabled:border-transparent dark:bg-transparent hover:dark:border-gray-400 disabled:border-gray-stroke-muted disabled:text-gray-foreground-muted",gradient:"text-white [background:linear-gradient(284deg,var(--color-primary)_2.11%,var(--color-secondary)_128.06%)] hover:[background:linear-gradient(284deg,var(--color-primary)2.11%,var(--color-secondary)102.63%)] disabled:[background:var(--color-gray-50)] disabled:bg-gray-background-fill-muted disabled:text-gray-foreground-onfill",medbrain:"border-2 border-transparent bg-clip-text [background:linear-gradient(var(--color-white),var(--color-white))_padding-box,linear-gradient(75deg,var(--color-secondary),var(--color-cm-lighten-3))_border-box] [box-shadow:-8px_0_8px_0_var(--color-prev-16)_inset,8px_0_8px_0_var(--color-secondary-24)_inset,0_0_8px_0_var(--color-cm-16)_inset] hover:[background:linear-gradient(var(--color-white),var(--color-white))_padding-box,linear-gradient(75deg,var(--color-cm-lighten-3),var(--color-secondary))_border-box] [&_span]:bg-clip-text [&_span]:text-transparent [&_span]:bg-gradient-to-r [&_span]:from-cm [&_span]:to-primary [&_span]:hover:to-secondary disabled:bg-gray-background-fill-muted disabled:text-gray-foreground-onfill [&_svg]:text-cm-darken-1"},size:{sm:"min-h-8 min-w-8 px-3 py-1 has-[>svg]:px-3 [&_svg:not([class*='size-'])]:size-[13px] text-xs",md:"min-h-10 min-w-10 px-3.5 py-2 has-[>svg]:px-3.5 [&_svg:not([class*='size-'])]:size-4 text-sm",lg:"min-h-12 min-w-12 px-4 py-3 has-[>svg]:px-4 [&_svg:not([class*='size-'])]:size-6 text-md",xl:"min-h-14 min-w-14 px-[18px] py-3.5 has-[>svg]:px-[18px] [&_svg:not([class*='size-'])]:size-7 text-lg"},full:{true:"w-full"}},defaultVariants:{variant:"regular",size:"md"}}),M=K(function(r,e){var a=r,{className:o,containerClassName:D,variant:L,size:i,full:R,asChild:b=!1,iconRight:c,iconLeft:f,badge:m,loading:n=!1,alert:l,type:h,disabled:B}=a,d=q(a,["className","containerClassName","variant","size","full","asChild","iconRight","iconLeft","badge","loading","alert","type","disabled"]);const V=b?_.Slot:"button",$=b||h!=null?h:"button",y=n||B,x=b&&y,E=t=>t!=null&&t!==0&&t!==""&&t!=="0",v=t=>t,k=!d.children&&(f||c||l),w=!!R&&!k,I=()=>l?p("span",{className:g("relative mr-1 flex size-2.5",P[i||"md"]),children:[s("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full opacity-75",style:{backgroundColor:l}}),s("span",{className:g("relative inline-flex size-2.5 rounded-full",P[i||"md"]),style:{backgroundColor:l}})]}):null,A=()=>n?s(Q,{className:"[grid-area:stack]"}):l?I():f&&v(f),F=()=>b?s(_.Slottable,{children:d.children}):n?s("span",{className:"opacity-0 [grid-area:stack]",children:d.children}):d.children&&s("span",{className:"truncate",children:d.children});return p("div",{className:g("relative min-w-0",w&&"w-full",D),children:[E(m)&&s(T,{size:J[i||"md"],variant:"regular",className:g("absolute -right-2 -top-1 z-10"),role:"status","aria-label":`${m}-notifications`,children:String(m)}),p(V,C(j(C(j({ref:e,type:$,"aria-busy":n,"aria-live":n?"polite":void 0,"data-slot":"button",className:g(k&&G[i||"md"],n&&"!inline-grid",x&&"pointer-events-none opacity-50",S({variant:L,size:i,full:w,className:o}))},d),{disabled:y}),x&&{"aria-disabled":!0,tabIndex:-1,onClick:t=>t.preventDefault()}),{children:[A(),F(),!n&&c&&v(c)]}))]})});export{M as Button,S as buttonVariants};
4
4
  //# sourceMappingURL=Button.mjs.map
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  "use client";
3
- import{jsx as n,jsxs as x,Fragment as N}from"react/jsx-runtime";import{Fragment as w,useState as C}from"react";import{Button as y}from"./Button.mjs";import{Breadcrumb as j,BreadcrumbList as O,BreadcrumbItem as d,BreadcrumbSeparator as B,BreadcrumbPage as P}from"./Breadcrumb.mjs";import{FallbackImage as $}from"./FallbackImage.mjs";import{cn as s}from"../lib/utils.mjs";import{ChevronRight as k,ArrowRightSm as z}from"@medway-ui/icons";var I=Object.defineProperty,E=Object.defineProperties,F=Object.getOwnPropertyDescriptors,c=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,p=(e,a,r)=>a in e?I(e,a,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[a]=r,l=(e,a)=>{for(var r in a||(a={}))u.call(a,r)&&p(e,r,a[r]);if(c)for(var r of c(a))f.call(a,r)&&p(e,r,a[r]);return e},b=(e,a)=>E(e,F(a)),o=(e,a)=>{var r={};for(var t in e)u.call(e,t)&&a.indexOf(t)<0&&(r[t]=e[t]);if(e!=null&&c)for(var t of c(e))a.indexOf(t)<0&&f.call(e,t)&&(r[t]=e[t]);return r};function R(e){var a=e,{className:r}=a,t=o(a,["className"]);return n("div",l({"data-slot":"card-continue",className:s("flex gap-3 bg-transparent",r)},t))}function S(e){var a=e,{className:r,src:t,alt:i="",children:m}=a,g=o(a,["className","src","alt","children"]);const[h,v]=C();return n("div",b(l({"data-slot":"card-continue-image",className:s("relative h-[122px] w-[200px] max-w-[45%] shrink-0 overflow-hidden rounded-md bg-gray-background-soft",r)},g),{children:t&&h!==t?n("img",{src:t,alt:i,loading:"lazy",onError:()=>v(t),className:"absolute inset-0 size-full object-cover"}):m!=null?m:n($,{className:"absolute inset-0"})}))}function A(e){var a=e,{className:r}=a,t=o(a,["className"]);return n("div",l({"data-slot":"card-continue-content",className:s("flex min-w-0 flex-1 flex-col justify-between gap-2",r)},t))}function H(e){var a=e,{className:r}=a,t=o(a,["className"]);return n("div",l({"data-slot":"card-continue-header",className:s("flex min-w-0 flex-col gap-1",r)},t))}function L({items:e,className:a}){return n(j,{"data-slot":"card-continue-breadcrumb",className:"min-w-0 overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:n(O,{className:s("w-max flex-nowrap gap-1 whitespace-nowrap text-xs font-medium leading-xs",a),children:e.map((r,t)=>n(w,{children:t<e.length-1?x(N,{children:[n(d,{className:"text-content-paragraph",children:r}),n(B,{children:n(k,{size:12,className:"text-gray-foreground"})})]}):n(d,{children:n(P,{className:"font-medium text-content-paragraph",children:r})})},`${r}-${t}`))})})}function D(e){var a=e,{className:r}=a,t=o(a,["className"]);return n("div",l({"data-slot":"card-continue-title",className:s("line-clamp-2 break-words text-lg font-semibold leading-lg text-primary-foreground",r)},t))}function K(e){var a=e,{className:r,children:t}=a,i=o(a,["className","children"]);return n(y,b(l({"data-slot":"card-continue-button",variant:"emphasis-soft",size:"sm",iconRight:n(z,{}),className:s("self-start max-[500px]:w-full",r),containerClassName:"max-[500px]:self-stretch"},i),{children:t}))}export{R as CardContinue,L as CardContinueBreadcrumb,K as CardContinueButton,A as CardContinueContent,H as CardContinueHeader,S as CardContinueImage,D as CardContinueTitle};
3
+ import{jsx as n,jsxs as x,Fragment as N}from"react/jsx-runtime";import{Fragment as w,useState as C}from"react";import{Button as y}from"./Button.mjs";import{Breadcrumb as j,BreadcrumbList as O,BreadcrumbItem as d,BreadcrumbSeparator as B,BreadcrumbPage as P}from"./Breadcrumb.mjs";import{FallbackImage as $}from"./FallbackImage.mjs";import{cn as s}from"../lib/utils.mjs";import{ChevronRight as k,ArrowRightSm as z}from"@medway-ui/icons";var I=Object.defineProperty,E=Object.defineProperties,F=Object.getOwnPropertyDescriptors,c=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,p=(e,a,r)=>a in e?I(e,a,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[a]=r,l=(e,a)=>{for(var r in a||(a={}))u.call(a,r)&&p(e,r,a[r]);if(c)for(var r of c(a))f.call(a,r)&&p(e,r,a[r]);return e},b=(e,a)=>E(e,F(a)),o=(e,a)=>{var r={};for(var t in e)u.call(e,t)&&a.indexOf(t)<0&&(r[t]=e[t]);if(e!=null&&c)for(var t of c(e))a.indexOf(t)<0&&f.call(e,t)&&(r[t]=e[t]);return r};function R(e){var a=e,{className:r}=a,t=o(a,["className"]);return n("div",l({"data-slot":"card-continue",className:s("flex gap-3 bg-transparent",r)},t))}function S(e){var a=e,{className:r,src:t,alt:i="",children:m}=a,g=o(a,["className","src","alt","children"]);const[h,v]=C();return n("div",b(l({"data-slot":"card-continue-image",className:s("relative h-[122px] w-[200px] max-w-[45%] shrink-0 overflow-hidden rounded-md bg-gray-background-soft",r)},g),{children:t&&h!==t?n("img",{src:t,alt:i,loading:"lazy",onError:()=>v(t),className:"absolute inset-0 size-full object-cover"}):m!=null?m:n($,{className:"absolute inset-0"})}))}function A(e){var a=e,{className:r}=a,t=o(a,["className"]);return n("div",l({"data-slot":"card-continue-content",className:s("flex min-w-0 flex-1 flex-col justify-between gap-2",r)},t))}function H(e){var a=e,{className:r}=a,t=o(a,["className"]);return n("div",l({"data-slot":"card-continue-header",className:s("flex min-w-0 flex-col gap-1",r)},t))}function L({items:e,className:a}){return n(j,{"data-slot":"card-continue-breadcrumb",className:"min-w-0 overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:n(O,{className:s("w-max flex-nowrap gap-1 whitespace-nowrap text-xs font-medium leading-xs",a),children:e.map((r,t)=>n(w,{children:t<e.length-1?x(N,{children:[n(d,{className:"text-content-paragraph",children:r}),n(B,{children:n(k,{size:12,className:"text-gray-foreground"})})]}):n(d,{children:n(P,{className:"font-medium text-content-paragraph",children:r})})},`${r}-${t}`))})})}function D(e){var a=e,{className:r}=a,t=o(a,["className"]);return n("div",l({"data-slot":"card-continue-title",className:s("line-clamp-2 break-words text-lg font-semibold leading-lg text-primary-foreground",r)},t))}function T(e){var a=e,{className:r,children:t}=a,i=o(a,["className","children"]);return n(y,b(l({"data-slot":"card-continue-button",variant:"emphasis-soft",size:"sm",iconRight:n(z,{}),className:s("self-start max-[500px]:w-full",r),containerClassName:"max-[500px]:self-stretch"},i),{children:t}))}export{R as CardContinue,L as CardContinueBreadcrumb,T as CardContinueButton,A as CardContinueContent,H as CardContinueHeader,S as CardContinueImage,D as CardContinueTitle};
4
4
  //# sourceMappingURL=CardContinue.mjs.map
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  "use client";
3
- import{jsx as n,jsxs as x}from"react/jsx-runtime";import{cva as O}from"class-variance-authority";import{createContext as D,useMemo as I,useState as P,useContext as S}from"react";import{Badge as E}from"./Badge.mjs";import{Button as B}from"./Button.mjs";import{FallbackImage as V}from"./FallbackImage.mjs";import{Tag as h}from"./Tag.mjs";import{cn as l}from"../lib/utils.mjs";import{Lock as $,Check as F}from"@medway-ui/icons";var K=Object.defineProperty,T=Object.defineProperties,Z=Object.getOwnPropertyDescriptors,p=Object.getOwnPropertySymbols,y=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable,C=(e,a,r)=>a in e?K(e,a,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[a]=r,i=(e,a)=>{for(var r in a||(a={}))y.call(a,r)&&C(e,r,a[r]);if(p)for(var r of p(a))k.call(a,r)&&C(e,r,a[r]);return e},g=(e,a)=>T(e,Z(a)),c=(e,a)=>{var r={};for(var t in e)y.call(e,t)&&a.indexOf(t)<0&&(r[t]=e[t]);if(e!=null&&p)for(var t of p(e))a.indexOf(t)<0&&k.call(e,t)&&(r[t]=e[t]);return r};const w=O("flex flex-col overflow-hidden rounded-2xl border border-gray-stroke-muted",{variants:{variant:{default:"bg-surface-card",blocked:"bg-gray-background-soft"},orientation:{vertical:"",horizontal:"lg:flex-row lg:flex-wrap lg:items-center lg:gap-x-6 lg:gap-y-3 lg:p-3 lg:pr-6"}},defaultVariants:{variant:"default",orientation:"vertical"}}),L=D(null);function u(){var e;return(e=S(L))!=null?e:{}}function _(e){var a=e,{className:r,variant:t,orientation:s="vertical",availableDate:o,children:d}=a,m=c(a,["className","variant","orientation","availableDate","children"]);const f=I(()=>({variant:t,orientation:s,availableDate:o}),[t,s,o]);return n(L.Provider,{value:f,children:n("div",g(i({"data-slot":"card-lesson",className:l(w({variant:t,orientation:s}),r)},m),{children:d}))})}function q(e){var a=e,{className:r,src:t,alt:s="",children:o}=a,d=c(a,["className","src","alt","children"]);const{variant:m,orientation:f}=u(),[j,z]=P(),N=f==="horizontal",b=l("h-[153px] w-full overflow-hidden rounded-md",N&&"lg:h-[120px] lg:w-[200px]",m==="blocked"&&"opacity-20");let v;return o?v=n("div",{className:l(b,"bg-gray-background-soft"),children:o}):t&&j!==t?v=n("img",{src:t,alt:s,loading:"lazy",onError:()=>z(t),className:l(b,"object-cover")}):v=n(V,{className:b}),n("div",g(i({"data-slot":"card-lesson-image",className:l("px-3 pt-3",N&&"lg:shrink-0 lg:p-0",r)},d),{children:v}))}function A(e){var a=e,{className:r}=a,t=c(a,["className"]);const{orientation:s}=u();return n("div",i({"data-slot":"card-lesson-content",className:l("flex flex-col gap-4 px-6 pt-4",s==="horizontal"&&"lg:min-w-[12rem] lg:flex-1 lg:justify-center lg:p-0",r)},t))}function G(e){var a=e,{className:r}=a,t=c(a,["className"]);return n("div",i({"data-slot":"card-lesson-header",className:l("flex flex-col",r)},t))}function H(e){var a=e,{className:r}=a,t=c(a,["className"]);const{variant:s}=u();return n("div",i({"data-slot":"card-lesson-label",className:l("text-xs font-medium leading-xs",s==="blocked"?"text-gray-foreground-muted":"text-content-paragraph",r)},t))}function J(e){var a=e,{className:r}=a,t=c(a,["className"]);const{variant:s}=u();return n("div",i({"data-slot":"card-lesson-title",className:l("line-clamp-2 text-lg font-semibold leading-lg",s==="blocked"?"text-primary-foreground-muted":"text-primary-foreground",r)},t))}function M(e){var a=e,{className:r,children:t}=a,s=c(a,["className","children"]);return n("div",g(i({"data-slot":"card-lesson-duration",className:l("flex items-center gap-1 text-sm font-medium leading-sm text-gray-foreground-muted",r)},s),{children:t}))}function Q(e){var a=e,{className:r}=a,t=c(a,["className"]);const{orientation:s}=u();return n("div",i({"data-slot":"card-lesson-icons",className:l("-my-2 -me-6 flex items-center gap-2.5 overflow-x-auto py-2 pe-6 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",s==="horizontal"&&"lg:me-0 lg:pe-1",r)},t))}function U(e){var a=e,{className:r,icon:t,badge:s}=a,o=c(a,["className","icon","badge"]);const{variant:d}=u(),m=Number(s),f=s!=null&&s!==""&&(Number.isNaN(m)||m>=2);return x("div",g(i({"data-slot":"card-lesson-icon",className:l("relative flex size-10 shrink-0 items-center justify-center rounded-pill text-gray-foreground-muted [&_svg]:size-5",d==="blocked"?"bg-gray-background-soft-muted":"bg-gray-background-soft",r)},o),{children:[t,f?n(E,{size:"sm",className:"absolute -right-1 -top-1 bg-gray-stroke text-primary-foreground",children:String(s)}):null]}))}function W(e){var a=e,{className:r,children:t}=a,s=c(a,["className","children"]);const{variant:o,availableDate:d,orientation:m}=u();return x("div",g(i({"data-slot":"card-lesson-footer",className:l("mt-auto flex flex-wrap items-center justify-between gap-4 px-6 pb-6 pt-4",m==="horizontal"&&"lg:ml-auto lg:mt-0 lg:shrink-0 lg:justify-start lg:p-0",r)},s),{children:[o==="blocked"&&d?x(h,{variant:"gray-soft",icon:n($,{}),children:["Dispon\xEDvel em ",d]}):null,t]}))}function X(e){var a=e,{className:r,status:t}=a,s=c(a,["className","status"]);const o=t==="completed";return n(h,g(i({"data-slot":"card-lesson-status",variant:o?"success-soft":"warning-soft",icon:o?n(F,{}):void 0,className:r},s),{children:o?"Conclu\xEDdo":"Iniciado"}))}function Y(e){var a=e,{className:r,children:t,containerClassName:s}=a,o=c(a,["className","children","containerClassName"]);const{variant:d}=u();return n(B,g(i({"data-slot":"card-lesson-button",variant:"regular",size:"sm",disabled:d==="blocked",containerClassName:l("ml-auto max-[500px]:w-full",s),className:l("rounded-full disabled:bg-gray-background-soft-muted disabled:text-gray-foreground-muted max-[500px]:w-full",r)},o),{children:t}))}export{_ as CardLesson,Y as CardLessonButton,A as CardLessonContent,M as CardLessonDuration,W as CardLessonFooter,G as CardLessonHeader,U as CardLessonIcon,Q as CardLessonIcons,q as CardLessonImage,H as CardLessonLabel,X as CardLessonStatus,J as CardLessonTitle,w as cardLessonVariants};
3
+ import{jsx as n,jsxs as x}from"react/jsx-runtime";import{cva as O}from"class-variance-authority";import{createContext as D,useMemo as I,useState as P,useContext as S}from"react";import{Badge as E}from"./Badge.mjs";import{Button as B}from"./Button.mjs";import{FallbackImage as V}from"./FallbackImage.mjs";import{Tag as h}from"./Tag.mjs";import{cn as l}from"../lib/utils.mjs";import{Lock as $,Check as F}from"@medway-ui/icons";var T=Object.defineProperty,U=Object.defineProperties,Z=Object.getOwnPropertyDescriptors,p=Object.getOwnPropertySymbols,y=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable,C=(e,a,r)=>a in e?T(e,a,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[a]=r,i=(e,a)=>{for(var r in a||(a={}))y.call(a,r)&&C(e,r,a[r]);if(p)for(var r of p(a))k.call(a,r)&&C(e,r,a[r]);return e},g=(e,a)=>U(e,Z(a)),c=(e,a)=>{var r={};for(var t in e)y.call(e,t)&&a.indexOf(t)<0&&(r[t]=e[t]);if(e!=null&&p)for(var t of p(e))a.indexOf(t)<0&&k.call(e,t)&&(r[t]=e[t]);return r};const w=O("flex flex-col overflow-hidden rounded-2xl border border-gray-stroke-muted",{variants:{variant:{default:"bg-surface-card",blocked:"bg-gray-background-soft"},orientation:{vertical:"",horizontal:"lg:flex-row lg:flex-wrap lg:items-center lg:gap-x-6 lg:gap-y-3 lg:p-3 lg:pr-6"}},defaultVariants:{variant:"default",orientation:"vertical"}}),L=D(null);function u(){var e;return(e=S(L))!=null?e:{}}function _(e){var a=e,{className:r,variant:t,orientation:s="vertical",availableDate:o,children:d}=a,m=c(a,["className","variant","orientation","availableDate","children"]);const f=I(()=>({variant:t,orientation:s,availableDate:o}),[t,s,o]);return n(L.Provider,{value:f,children:n("div",g(i({"data-slot":"card-lesson",className:l(w({variant:t,orientation:s}),r)},m),{children:d}))})}function q(e){var a=e,{className:r,src:t,alt:s="",children:o}=a,d=c(a,["className","src","alt","children"]);const{variant:m,orientation:f}=u(),[j,z]=P(),N=f==="horizontal",b=l("h-[153px] w-full overflow-hidden rounded-md",N&&"lg:h-[120px] lg:w-[200px]",m==="blocked"&&"opacity-20");let v;return o?v=n("div",{className:l(b,"bg-gray-background-soft"),children:o}):t&&j!==t?v=n("img",{src:t,alt:s,loading:"lazy",onError:()=>z(t),className:l(b,"object-cover")}):v=n(V,{className:b}),n("div",g(i({"data-slot":"card-lesson-image",className:l("px-3 pt-3",N&&"lg:shrink-0 lg:p-0",r)},d),{children:v}))}function A(e){var a=e,{className:r}=a,t=c(a,["className"]);const{orientation:s}=u();return n("div",i({"data-slot":"card-lesson-content",className:l("flex flex-col gap-4 px-6 pt-4",s==="horizontal"&&"lg:min-w-[12rem] lg:flex-1 lg:justify-center lg:p-0",r)},t))}function G(e){var a=e,{className:r}=a,t=c(a,["className"]);return n("div",i({"data-slot":"card-lesson-header",className:l("flex flex-col",r)},t))}function H(e){var a=e,{className:r}=a,t=c(a,["className"]);const{variant:s}=u();return n("div",i({"data-slot":"card-lesson-label",className:l("text-xs font-medium leading-xs",s==="blocked"?"text-gray-foreground-muted":"text-content-paragraph",r)},t))}function J(e){var a=e,{className:r}=a,t=c(a,["className"]);const{variant:s}=u();return n("div",i({"data-slot":"card-lesson-title",className:l("line-clamp-2 text-lg font-semibold leading-lg",s==="blocked"?"text-primary-foreground-muted":"text-primary-foreground",r)},t))}function K(e){var a=e,{className:r,children:t}=a,s=c(a,["className","children"]);return n("div",g(i({"data-slot":"card-lesson-duration",className:l("flex items-center gap-1 text-sm font-medium leading-sm text-gray-foreground-muted",r)},s),{children:t}))}function M(e){var a=e,{className:r}=a,t=c(a,["className"]);const{orientation:s}=u();return n("div",i({"data-slot":"card-lesson-icons",className:l("-my-2 -me-6 flex items-center gap-2.5 overflow-x-auto py-2 pe-6 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",s==="horizontal"&&"lg:me-0 lg:pe-1",r)},t))}function Q(e){var a=e,{className:r,icon:t,badge:s}=a,o=c(a,["className","icon","badge"]);const{variant:d}=u(),m=Number(s),f=s!=null&&s!==""&&(Number.isNaN(m)||m>=2);return x("div",g(i({"data-slot":"card-lesson-icon",className:l("relative flex size-10 shrink-0 items-center justify-center rounded-pill text-gray-foreground-muted [&_svg]:size-5",d==="blocked"?"bg-gray-background-soft-muted":"bg-gray-background-soft",r)},o),{children:[t,f?n(E,{size:"sm",className:"absolute -right-1 -top-1 bg-gray-stroke text-primary-foreground",children:String(s)}):null]}))}function W(e){var a=e,{className:r,children:t}=a,s=c(a,["className","children"]);const{variant:o,availableDate:d,orientation:m}=u();return x("div",g(i({"data-slot":"card-lesson-footer",className:l("mt-auto flex flex-wrap items-center justify-between gap-4 px-6 pb-6 pt-4",m==="horizontal"&&"lg:ml-auto lg:mt-0 lg:shrink-0 lg:justify-start lg:p-0",r)},s),{children:[o==="blocked"&&d?x(h,{variant:"gray-soft",icon:n($,{}),children:["Dispon\xEDvel em ",d]}):null,t]}))}function X(e){var a=e,{className:r,status:t}=a,s=c(a,["className","status"]);const o=t==="completed";return n(h,g(i({"data-slot":"card-lesson-status",variant:o?"success-soft":"warning-soft",icon:o?n(F,{}):void 0,className:r},s),{children:o?"Conclu\xEDdo":"Iniciado"}))}function Y(e){var a=e,{className:r,children:t,containerClassName:s}=a,o=c(a,["className","children","containerClassName"]);const{variant:d}=u();return n(B,g(i({"data-slot":"card-lesson-button",variant:"regular",size:"sm",disabled:d==="blocked",containerClassName:l("ml-auto max-[500px]:w-full",s),className:l("rounded-full disabled:bg-gray-background-soft-muted disabled:text-gray-foreground-muted max-[500px]:w-full",r)},o),{children:t}))}export{_ as CardLesson,Y as CardLessonButton,A as CardLessonContent,K as CardLessonDuration,W as CardLessonFooter,G as CardLessonHeader,Q as CardLessonIcon,M as CardLessonIcons,q as CardLessonImage,H as CardLessonLabel,X as CardLessonStatus,J as CardLessonTitle,w as cardLessonVariants};
4
4
  //# sourceMappingURL=CardLesson.mjs.map
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  "use client";
3
- import{jsx as o,jsxs as i}from"react/jsx-runtime";import{cva as N}from"class-variance-authority";import{createContext as j,useMemo as O,useContext as P}from"react";import{Button as D}from"./Button.mjs";import{Progress as E}from"./Progress.mjs";import{cn as d}from"../lib/utils.mjs";import{ArrowRightMd as L,Lock as S}from"@medway-ui/icons";import{Tag as V}from"./Tag.mjs";var z=Object.defineProperty,I=Object.defineProperties,A=Object.getOwnPropertyDescriptors,f=Object.getOwnPropertySymbols,y=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable,w=(e,a,r)=>a in e?z(e,a,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[a]=r,c=(e,a)=>{for(var r in a||(a={}))y.call(a,r)&&w(e,r,a[r]);if(f)for(var r of f(a))k.call(a,r)&&w(e,r,a[r]);return e},u=(e,a)=>I(e,A(a)),m=(e,a)=>{var r={};for(var t in e)y.call(e,t)&&a.indexOf(t)<0&&(r[t]=e[t]);if(e!=null&&f)for(var t of f(e))a.indexOf(t)<0&&k.call(e,t)&&(r[t]=e[t]);return r};const M=N("relative z-0 flex flex-col gap-4 overflow-hidden rounded-2xl border border-gray-stroke-muted p-6",{variants:{variant:{default:"bg-surface-card",blocked:"bg-gray-background-soft"}},defaultVariants:{variant:"default"}}),v=N("text-xs font-medium leading-xs text-gray-foreground-muted"),C=j(null);function p(){var e;return(e=P(C))!=null?e:{}}function B(e){var a=e,{className:r,variant:t,availableDate:s,showStack:n=!0,children:l}=a,b=m(a,["className","variant","availableDate","showStack","children"]);const x=O(()=>({variant:t,availableDate:s}),[t,s]),g=d("pointer-events-none absolute bottom-0 z-0 max-h-[20%] rounded-2xl border border-gray-stroke-muted",t==="blocked"?"bg-gray-background-soft":"bg-surface-card"),h=o("div",u(c({"data-slot":"card-module",className:d(M({variant:t}),r)},b),{children:l}));return o(C.Provider,{value:x,children:n?i("div",{"data-slot":"card-module-stack",className:"relative pt-[17px]",children:[o("div",{"aria-hidden":!0,className:d(g,"inset-x-[34px] top-0")}),o("div",{"aria-hidden":!0,className:d(g,"inset-x-4 top-2")}),h]}):h})}function F(e){var a=e,{className:r}=a,t=m(a,["className"]);return o("div",c({"data-slot":"card-module-header",className:d("flex flex-col",r)},t))}function H(e){var a=e,{className:r,children:t,count:s}=a,n=m(a,["className","children","count"]);const{variant:l}=p();return i("div",u(c({"data-slot":"card-module-label",className:d("flex items-center justify-between gap-2 text-xs font-medium leading-xs",l==="blocked"?"text-gray-foreground-muted":"text-content-paragraph",r)},n),{children:[o("span",{className:"min-w-0 truncate",children:t}),s!=null&&s!==""&&o("span",{className:"shrink-0 whitespace-nowrap text-sm leading-sm text-gray-foreground-muted",children:s})]}))}function K(e){var a=e,{className:r}=a,t=m(a,["className"]);const{variant:s}=p();return o("div",c({"data-slot":"card-module-title",className:d("line-clamp-2 min-h-14 min-w-[min(100%,12ch)] max-w-[70%] break-words text-lg font-semibold",s==="blocked"?"text-primary-foreground-muted":"text-primary-foreground",r)},t))}function R(e){var a=e,{className:r,progress:t}=a,s=m(a,["className","progress"]);const{variant:n}=p(),l=Number.isFinite(t)?Math.min(100,Math.max(0,t)):0,b=Math.round(l),x=n==="blocked"?o("div",{"data-slot":"card-module-status",className:v(),children:"N\xE3o iniciado"}):l>=100?o("div",{"data-slot":"card-module-status",className:v(),children:"Conclu\xEDdo"}):i("div",{"data-slot":"card-module-status",className:v(),children:[i("span",{className:"font-semibold text-gray-foreground",children:[b,"%"]})," ","de progresso"]});return i("div",u(c({"data-slot":"card-module-progress",className:d("flex flex-col gap-2",r)},s),{children:[x,n!=="blocked"&&o(E,{"aria-hidden":"true",value:l,indicatorClassName:l===100?"bg-secondary-stroke-emphasis":"bg-primary-stroke"})]}))}function T(e){var a=e,{className:r,children:t}=a,s=m(a,["className","children"]);const{variant:n,availableDate:l}=p();return n!=="blocked"||!l?null:i("div",u(c({"data-slot":"card-module-footer",className:d("flex flex-col gap-3",r)},s),{children:[o("div",{className:"border-t border-gray-stroke-muted"}),i("div",{className:"flex items-center justify-between",children:[i(V,{variant:"gray-soft",icon:o(S,{}),children:["Dispon\xEDvel em ",l]}),t]})]}))}function $(e){var a=e,{className:r}=a,t=m(a,["className"]);return o(D,c({"data-slot":"card-module-button",size:"sm",iconLeft:o(L,{}),className:d(r)},t))}function q(e){var a=e,{className:r,children:t}=a,s=m(a,["className","children"]);return o("div",u(c({"data-slot":"card-module-action",className:d("flex items-center justify-end",r)},s),{children:t}))}export{B as CardModule,q as CardModuleAction,$ as CardModuleButton,T as CardModuleFooter,F as CardModuleHeader,H as CardModuleLabel,R as CardModuleProgress,K as CardModuleTitle,v as cardModuleStatusVariants,M as cardModuleVariants};
3
+ import{jsx as o,jsxs as i}from"react/jsx-runtime";import{cva as N}from"class-variance-authority";import{createContext as j,useMemo as O,useContext as P}from"react";import{Button as D}from"./Button.mjs";import{Progress as E}from"./Progress.mjs";import{cn as d}from"../lib/utils.mjs";import{ArrowRightMd as S,Lock as L}from"@medway-ui/icons";import{Tag as V}from"./Tag.mjs";var z=Object.defineProperty,I=Object.defineProperties,A=Object.getOwnPropertyDescriptors,f=Object.getOwnPropertySymbols,y=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable,w=(e,a,r)=>a in e?z(e,a,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[a]=r,c=(e,a)=>{for(var r in a||(a={}))y.call(a,r)&&w(e,r,a[r]);if(f)for(var r of f(a))k.call(a,r)&&w(e,r,a[r]);return e},u=(e,a)=>I(e,A(a)),m=(e,a)=>{var r={};for(var t in e)y.call(e,t)&&a.indexOf(t)<0&&(r[t]=e[t]);if(e!=null&&f)for(var t of f(e))a.indexOf(t)<0&&k.call(e,t)&&(r[t]=e[t]);return r};const M=N("relative z-0 flex flex-col gap-4 overflow-hidden rounded-2xl border border-gray-stroke-muted p-6",{variants:{variant:{default:"bg-surface-card",blocked:"bg-gray-background-soft"}},defaultVariants:{variant:"default"}}),v=N("text-xs font-medium leading-xs text-gray-foreground-muted"),C=j(null);function p(){var e;return(e=P(C))!=null?e:{}}function B(e){var a=e,{className:r,variant:t,availableDate:s,showStack:n=!0,children:l}=a,b=m(a,["className","variant","availableDate","showStack","children"]);const x=O(()=>({variant:t,availableDate:s}),[t,s]),g=d("pointer-events-none absolute bottom-0 z-0 max-h-[20%] rounded-2xl border border-gray-stroke-muted",t==="blocked"?"bg-gray-background-soft":"bg-surface-card"),h=o("div",u(c({"data-slot":"card-module",className:d(M({variant:t}),r)},b),{children:l}));return o(C.Provider,{value:x,children:n?i("div",{"data-slot":"card-module-stack",className:"relative pt-[17px]",children:[o("div",{"aria-hidden":!0,className:d(g,"inset-x-[34px] top-0")}),o("div",{"aria-hidden":!0,className:d(g,"inset-x-4 top-2")}),h]}):h})}function F(e){var a=e,{className:r}=a,t=m(a,["className"]);return o("div",c({"data-slot":"card-module-header",className:d("flex flex-col",r)},t))}function H(e){var a=e,{className:r,children:t,count:s}=a,n=m(a,["className","children","count"]);const{variant:l}=p();return i("div",u(c({"data-slot":"card-module-label",className:d("flex items-center justify-between gap-2 text-xs font-medium leading-xs",l==="blocked"?"text-gray-foreground-muted":"text-content-paragraph",r)},n),{children:[o("span",{className:"min-w-0 truncate",children:t}),s!=null&&s!==""&&o("span",{className:"shrink-0 whitespace-nowrap text-sm leading-sm text-gray-foreground-muted",children:s})]}))}function R(e){var a=e,{className:r}=a,t=m(a,["className"]);const{variant:s}=p();return o("div",c({"data-slot":"card-module-title",className:d("line-clamp-2 min-h-14 min-w-[min(100%,12ch)] max-w-[70%] break-words text-lg font-semibold",s==="blocked"?"text-primary-foreground-muted":"text-primary-foreground",r)},t))}function T(e){var a=e,{className:r,progress:t}=a,s=m(a,["className","progress"]);const{variant:n}=p(),l=Number.isFinite(t)?Math.min(100,Math.max(0,t)):0,b=Math.round(l),x=n==="blocked"?o("div",{"data-slot":"card-module-status",className:v(),children:"N\xE3o iniciado"}):l>=100?o("div",{"data-slot":"card-module-status",className:v(),children:"Conclu\xEDdo"}):i("div",{"data-slot":"card-module-status",className:v(),children:[i("span",{className:"font-semibold text-gray-foreground",children:[b,"%"]})," ","de progresso"]});return i("div",u(c({"data-slot":"card-module-progress",className:d("flex flex-col gap-2",r)},s),{children:[x,n!=="blocked"&&o(E,{"aria-hidden":"true",value:l,indicatorClassName:l===100?"bg-secondary-stroke-emphasis":"bg-primary-stroke"})]}))}function q(e){var a=e,{className:r,children:t}=a,s=m(a,["className","children"]);const{variant:n,availableDate:l}=p();return n!=="blocked"||!l?null:i("div",u(c({"data-slot":"card-module-footer",className:d("flex flex-col gap-3",r)},s),{children:[o("div",{className:"border-t border-gray-stroke-muted"}),i("div",{className:"flex items-center justify-between",children:[i(V,{variant:"gray-soft",icon:o(L,{}),children:["Dispon\xEDvel em ",l]}),t]})]}))}function G(e){var a=e,{className:r}=a,t=m(a,["className"]);return o(D,c({"data-slot":"card-module-button",size:"sm",iconLeft:o(S,{}),className:d(r)},t))}function J(e){var a=e,{className:r,children:t}=a,s=m(a,["className","children"]);return o("div",u(c({"data-slot":"card-module-action",className:d("flex items-center justify-end",r)},s),{children:t}))}export{B as CardModule,J as CardModuleAction,G as CardModuleButton,q as CardModuleFooter,F as CardModuleHeader,H as CardModuleLabel,T as CardModuleProgress,R as CardModuleTitle,v as cardModuleStatusVariants,M as cardModuleVariants};
4
4
  //# sourceMappingURL=CardModule.mjs.map
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  "use client";
3
- import{jsx as t,jsxs as f,Fragment as h}from"react/jsx-runtime";import{cva as y}from"class-variance-authority";import{createContext as C,useContext as j,useState as k}from"react";import{Avatar as O,AvatarImage as P,AvatarFallback as z}from"./Avatar.mjs";import{Button as I}from"./Button.mjs";import{FallbackImage as A}from"./FallbackImage.mjs";import{cn as i}from"../lib/utils.mjs";import{Calendar as F}from"@medway-ui/icons";var R=Object.defineProperty,D=Object.defineProperties,E=Object.getOwnPropertyDescriptors,v=Object.getOwnPropertySymbols,N=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable,g=(a,e,r)=>e in a?R(a,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):a[e]=r,o=(a,e)=>{for(var r in e||(e={}))N.call(e,r)&&g(a,r,e[r]);if(v)for(var r of v(e))w.call(e,r)&&g(a,r,e[r]);return a},p=(a,e)=>D(a,E(e)),c=(a,e)=>{var r={};for(var s in a)N.call(a,s)&&e.indexOf(s)<0&&(r[s]=a[s]);if(a!=null&&v)for(var s of v(a))e.indexOf(s)<0&&w.call(a,s)&&(r[s]=a[s]);return r};const b=C({orientation:"vertical"}),S=y("flex border",{variants:{variant:{default:"rounded-lg border-secondary-stroke bg-secondary-background-soft-muted p-6",read:"rounded-lg border-gray-stroke-muted bg-surface-card p-6",compact:"rounded-xl border-gray-stroke-muted bg-surface-card p-4"},orientation:{vertical:"flex-col gap-6",horizontal:"flex-row gap-10"}},defaultVariants:{variant:"default",orientation:"vertical"}});function T(a){var e=a,{className:r,isRead:s,variant:n,orientation:l="vertical"}=e,d=c(e,["className","isRead","variant","orientation"]);const m=s?"read":n!=null?n:"default";return t(b.Provider,{value:{orientation:l!=null?l:"vertical"},children:t("div",o({"data-slot":"card-news",className:i(S({variant:m,orientation:l}),r)},d))})}function $(a){var e=a,{className:r}=e,s=c(e,["className"]);return t("div",o({"data-slot":"card-news-body",className:i("flex min-w-0 flex-1 flex-col gap-6 min-[1280px]:flex-auto",r)},s))}function B(a){var e=a,{className:r}=e,s=c(e,["className"]);return t("div",o({"data-slot":"card-news-header",className:i("flex w-full flex-col items-start justify-between gap-4 md:flex-row md:items-center",r)},s))}function H(a){var e=a,{className:r}=e,s=c(e,["className"]);return t("div",o({"data-slot":"card-news-tags",className:i("flex min-w-0 max-w-full flex-wrap items-center gap-x-4 gap-y-3",r)},s))}function K(a){var e=a,{className:r,icon:s=t(F,{}),children:n}=e,l=c(e,["className","icon","children"]);return f("div",p(o({"data-slot":"card-news-date",className:i("flex min-w-0 items-center gap-1.5 text-xs font-semibold leading-xs text-primary-foreground [&>svg]:size-4",r)},l),{children:[s,n&&t("span",{children:n})]}))}function U(a){var e=a,{className:r,src:s,alt:n="",children:l}=e,d=c(e,["className","src","alt","children"]);const{orientation:m}=j(b),[x,u]=k();return t("div",p(o({"data-slot":"card-news-image",className:i("relative overflow-hidden bg-gray-background-soft",m==="vertical"?"h-[300px] w-full rounded-lg":"hidden w-[482px] rounded-xl min-[1280px]:block",r)},d),{children:s&&x!==s?t("img",{src:s,alt:n,loading:"lazy",onError:()=>u(s),className:"absolute inset-0 size-full object-cover"}):l!=null?l:t(A,{className:"absolute inset-0"})}))}function _(a){var e=a,{className:r}=e,s=c(e,["className"]);return t("div",o({"data-slot":"card-news-content",className:i("flex w-full min-w-0 flex-col gap-6",r)},s))}function q(a){var e=a,{className:r}=e,s=c(e,["className"]);return t("div",o({"data-slot":"card-news-title",className:i("-mb-2 line-clamp-2 break-words text-title-xs font-semibold leading-title-xs text-primary-foreground",r)},s))}function G(a){var e=a,{className:r}=e,s=c(e,["className"]);return t("div",o({"data-slot":"card-news-description",className:i("line-clamp-3 break-words text-md leading-md text-primary-foreground",r)},s))}function J(a){var e=a,{className:r,label:s,children:n}=e,l=c(e,["className","label","children"]);return f("div",p(o({"data-slot":"card-news-resources",className:i("flex flex-col gap-2",r)},l),{children:[t("span",{className:"text-sm font-semibold leading-sm text-primary-foreground-muted",children:s}),t("div",{className:"flex flex-wrap gap-2",children:n})]}))}function L(a){var e=a,{className:r,children:s,disabled:n,loading:l,type:d,onClick:m,asChild:x}=e,u=c(e,["className","children","disabled","loading","type","onClick","asChild"]);return t(I,p(o({"data-slot":"card-news-resource-item",variant:"outlined",size:"sm",className:i("pointer-events-none max-w-full bg-surface-card",r)},u),{asChild:!0,children:t("span",{children:t("span",{className:"truncate",children:s})})}))}function M(a){return a.trim().split(/\s+/).slice(0,2).map(e=>{var r;return(r=e[0])!=null?r:""}).join("").toUpperCase()}function Q(a){var e=a,{className:r,src:s,alt:n,name:l,role:d,children:m}=e,x=c(e,["className","src","alt","name","role","children"]),u;return t("div",p(o({"data-slot":"card-news-author",className:i("flex min-w-0 items-center gap-2",r)},x),{children:m!=null?m:f(h,{children:[f(O,{size:"md",children:[s&&t(P,{src:s,alt:(u=n!=null?n:l)!=null?u:""}),t(z,{children:l?M(l):void 0})]}),f("div",{className:"flex min-w-0 flex-col gap-0.5",children:[d&&t("span",{className:"text-xs font-medium leading-xs text-secondary-foreground",children:d}),l&&t("span",{className:"break-words text-sm font-semibold leading-sm text-primary-foreground",children:l})]})]})}))}function V(a){var e=a,{className:r}=e,s=c(e,["className"]);return t("div",o({"data-slot":"card-news-footer",className:i("flex w-full flex-wrap items-center gap-6 gap-y-3 max-[500px]:flex-col max-[500px]:flex-nowrap max-[500px]:items-stretch max-[500px]:[&_[data-slot=button]]:w-full",r)},s))}export{T as CardNews,Q as CardNewsAuthor,$ as CardNewsBody,_ as CardNewsContent,K as CardNewsDate,G as CardNewsDescription,V as CardNewsFooter,B as CardNewsHeader,U as CardNewsImage,L as CardNewsResourceItem,J as CardNewsResources,H as CardNewsTags,q as CardNewsTitle};
3
+ import{jsx as t,jsxs as f,Fragment as h}from"react/jsx-runtime";import{cva as y}from"class-variance-authority";import{createContext as C,useContext as j,useState as k}from"react";import{Avatar as O,AvatarImage as P,AvatarFallback as z}from"./Avatar.mjs";import{Button as I}from"./Button.mjs";import{FallbackImage as A}from"./FallbackImage.mjs";import{cn as i}from"../lib/utils.mjs";import{Calendar as F}from"@medway-ui/icons";var R=Object.defineProperty,D=Object.defineProperties,E=Object.getOwnPropertyDescriptors,v=Object.getOwnPropertySymbols,N=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable,g=(a,e,r)=>e in a?R(a,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):a[e]=r,o=(a,e)=>{for(var r in e||(e={}))N.call(e,r)&&g(a,r,e[r]);if(v)for(var r of v(e))w.call(e,r)&&g(a,r,e[r]);return a},p=(a,e)=>D(a,E(e)),c=(a,e)=>{var r={};for(var s in a)N.call(a,s)&&e.indexOf(s)<0&&(r[s]=a[s]);if(a!=null&&v)for(var s of v(a))e.indexOf(s)<0&&w.call(a,s)&&(r[s]=a[s]);return r};const b=C({orientation:"vertical"}),S=y("flex border",{variants:{variant:{default:"rounded-lg border-secondary-stroke bg-secondary-background-soft-muted p-6",read:"rounded-lg border-gray-stroke-muted bg-surface-card p-6",compact:"rounded-xl border-gray-stroke-muted bg-surface-card p-4"},orientation:{vertical:"flex-col gap-6",horizontal:"flex-row gap-10"}},defaultVariants:{variant:"default",orientation:"vertical"}});function T(a){var e=a,{className:r,isRead:s,variant:n,orientation:l="vertical"}=e,d=c(e,["className","isRead","variant","orientation"]);const m=s?"read":n!=null?n:"default";return t(b.Provider,{value:{orientation:l!=null?l:"vertical"},children:t("div",o({"data-slot":"card-news",className:i(S({variant:m,orientation:l}),r)},d))})}function U(a){var e=a,{className:r}=e,s=c(e,["className"]);return t("div",o({"data-slot":"card-news-body",className:i("flex min-w-0 flex-1 flex-col gap-6 min-[1280px]:flex-auto",r)},s))}function $(a){var e=a,{className:r}=e,s=c(e,["className"]);return t("div",o({"data-slot":"card-news-header",className:i("flex w-full flex-col items-start justify-between gap-4 md:flex-row md:items-center",r)},s))}function B(a){var e=a,{className:r}=e,s=c(e,["className"]);return t("div",o({"data-slot":"card-news-tags",className:i("flex min-w-0 max-w-full flex-wrap items-center gap-x-4 gap-y-3",r)},s))}function H(a){var e=a,{className:r,icon:s=t(F,{}),children:n}=e,l=c(e,["className","icon","children"]);return f("div",p(o({"data-slot":"card-news-date",className:i("flex min-w-0 items-center gap-1.5 text-xs font-semibold leading-xs text-primary-foreground [&>svg]:size-4",r)},l),{children:[s,n&&t("span",{children:n})]}))}function _(a){var e=a,{className:r,src:s,alt:n="",children:l}=e,d=c(e,["className","src","alt","children"]);const{orientation:m}=j(b),[x,u]=k();return t("div",p(o({"data-slot":"card-news-image",className:i("relative overflow-hidden bg-gray-background-soft",m==="vertical"?"h-[300px] w-full rounded-lg":"hidden w-[482px] rounded-xl min-[1280px]:block",r)},d),{children:s&&x!==s?t("img",{src:s,alt:n,loading:"lazy",onError:()=>u(s),className:"absolute inset-0 size-full object-cover"}):l!=null?l:t(A,{className:"absolute inset-0"})}))}function q(a){var e=a,{className:r}=e,s=c(e,["className"]);return t("div",o({"data-slot":"card-news-content",className:i("flex w-full min-w-0 flex-col gap-6",r)},s))}function G(a){var e=a,{className:r}=e,s=c(e,["className"]);return t("div",o({"data-slot":"card-news-title",className:i("-mb-2 line-clamp-2 break-words text-title-xs font-semibold leading-title-xs text-primary-foreground",r)},s))}function J(a){var e=a,{className:r}=e,s=c(e,["className"]);return t("div",o({"data-slot":"card-news-description",className:i("line-clamp-3 break-words text-md leading-md text-primary-foreground",r)},s))}function K(a){var e=a,{className:r,label:s,children:n}=e,l=c(e,["className","label","children"]);return f("div",p(o({"data-slot":"card-news-resources",className:i("flex flex-col gap-2",r)},l),{children:[t("span",{className:"text-sm font-semibold leading-sm text-primary-foreground-muted",children:s}),t("div",{className:"flex flex-wrap gap-2",children:n})]}))}function L(a){var e=a,{className:r,children:s,disabled:n,loading:l,type:d,onClick:m,asChild:x}=e,u=c(e,["className","children","disabled","loading","type","onClick","asChild"]);return t(I,p(o({"data-slot":"card-news-resource-item",variant:"outlined",size:"sm",className:i("pointer-events-none max-w-full bg-surface-card",r)},u),{asChild:!0,children:t("span",{children:t("span",{className:"truncate",children:s})})}))}function M(a){return a.trim().split(/\s+/).slice(0,2).map(e=>{var r;return(r=e[0])!=null?r:""}).join("").toUpperCase()}function Q(a){var e=a,{className:r,src:s,alt:n,name:l,role:d,children:m}=e,x=c(e,["className","src","alt","name","role","children"]),u;return t("div",p(o({"data-slot":"card-news-author",className:i("flex min-w-0 items-center gap-2",r)},x),{children:m!=null?m:f(h,{children:[f(O,{size:"md",children:[s&&t(P,{src:s,alt:(u=n!=null?n:l)!=null?u:""}),t(z,{children:l?M(l):void 0})]}),f("div",{className:"flex min-w-0 flex-col gap-0.5",children:[d&&t("span",{className:"text-xs font-medium leading-xs text-secondary-foreground",children:d}),l&&t("span",{className:"break-words text-sm font-semibold leading-sm text-primary-foreground",children:l})]})]})}))}function V(a){var e=a,{className:r}=e,s=c(e,["className"]);return t("div",o({"data-slot":"card-news-footer",className:i("flex w-full flex-wrap items-center gap-6 gap-y-3 max-[500px]:flex-col max-[500px]:flex-nowrap max-[500px]:items-stretch max-[500px]:[&_[data-slot=button]]:w-full",r)},s))}export{T as CardNews,Q as CardNewsAuthor,U as CardNewsBody,q as CardNewsContent,H as CardNewsDate,J as CardNewsDescription,V as CardNewsFooter,$ as CardNewsHeader,_ as CardNewsImage,L as CardNewsResourceItem,K as CardNewsResources,B as CardNewsTags,G as CardNewsTitle};
4
4
  //# sourceMappingURL=CardNews.mjs.map
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  "use client";
3
- import{jsx as o,jsxs as f,Fragment as k}from"react/jsx-runtime";import{cva as w}from"class-variance-authority";import{createContext as T,useMemo as O,useContext as P}from"react";import{Collapsible as j,CollapsibleContent as D,CollapsibleTrigger as $}from"./Collapsible.mjs";import{Progress as E}from"./Progress.mjs";import{Tag as I}from"./Tag.mjs";import{cn as i,clampPercentage as z}from"../lib/utils.mjs";import{ChevronDown as F,Lock as M}from"@medway-ui/icons";var V=Object.defineProperty,G=Object.defineProperties,H=Object.getOwnPropertyDescriptors,v=Object.getOwnPropertySymbols,b=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable,h=(a,r,e)=>r in a?V(a,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[r]=e,s=(a,r)=>{for(var e in r||(r={}))b.call(r,e)&&h(a,e,r[e]);if(v)for(var e of v(r))x.call(r,e)&&h(a,e,r[e]);return a},m=(a,r)=>G(a,H(r)),c=(a,r)=>{var e={};for(var t in a)b.call(a,t)&&r.indexOf(t)<0&&(e[t]=a[t]);if(a!=null&&v)for(var t of v(a))r.indexOf(t)<0&&x.call(a,t)&&(e[t]=a[t]);return e};const N=w("flex flex-col overflow-hidden rounded-2xl border border-gray-stroke-muted",{variants:{variant:{default:"bg-surface-card",blocked:"bg-gray-background-soft"}},defaultVariants:{variant:"default"}}),y=T(null);function p(){var a;return(a=P(y))!=null?a:{}}function J(a){var r=a,{className:e,variant:t,availableDate:n,children:l}=r,d=c(r,["className","variant","availableDate","children"]);const u=O(()=>({variant:t,availableDate:n}),[t,n]);return o(y.Provider,{value:u,children:o(j,m(s({"data-slot":"card-topic",animation:"accordion",className:i(N({variant:t}),e)},d),{children:l}))})}function K(a){var r=a,{className:e,children:t}=r,n=c(r,["className","children"]);const{variant:l}=p(),d=l==="blocked";return o($,m(s({"data-slot":"card-topic-trigger",disabled:d,className:i("group flex min-h-16 w-full select-none flex-wrap items-center gap-4 p-4 text-left","[&>*:first-child]:flex-1","disabled:pointer-events-none disabled:cursor-default",!d&&"cursor-pointer",e)},n),{children:t}))}function L(a){var r=a,{className:e}=r,t=c(r,["className"]);return o("div",s({"data-slot":"card-topic-column",className:i("flex min-w-[min(100%,10rem)] max-w-full flex-wrap items-center gap-4",e)},t))}function Q(a){var r=a,{className:e,children:t}=r,n=c(r,["className","children"]);const{variant:l}=p();return o("div",m(s({"data-slot":"card-topic-number",className:i("flex size-[30px] shrink-0 items-center justify-center rounded-full text-md font-medium text-primary-foreground-onfill",l==="blocked"?"bg-primary-foreground-muted":"bg-primary-foreground",e)},n),{children:t}))}function R(a){var r=a,{className:e}=r,t=c(r,["className"]);const{variant:n}=p();return o("div",s({"data-slot":"card-topic-title",className:i("min-w-[min(100%,6rem)] flex-1 break-words text-md font-semibold leading-md",n==="blocked"?"text-primary-foreground-muted":"text-primary-foreground",e)},t))}function S(a){var r=a,{className:e,progress:t}=r,n=c(r,["className","progress"]);const{variant:l,availableDate:d}=p();if(l==="blocked")return d?o("div",m(s({"data-slot":"card-topic-progress",className:i("flex min-w-0",e)},n),{children:f(I,{variant:"gray-soft",icon:o(M,{"aria-hidden":!0}),children:["Dispon\xEDvel em ",d]})})):null;if(t===void 0)return null;const u=z(t),C=Math.round(u),g=u>=100;return f("div",m(s({"data-slot":"card-topic-progress",className:i("flex min-w-[min(180px,100%)] flex-col gap-2",e)},n),{children:[o("div",{className:"text-xs font-medium leading-xs text-gray-foreground-muted",children:g?"Conclu\xEDdo":f(k,{children:[f("span",{className:"font-semibold text-gray-foreground",children:[C,"%"]})," de progresso"]})}),o(E,{"aria-hidden":"true",value:u,indicatorClassName:g?"bg-secondary-stroke-emphasis":"bg-primary-stroke"})]}))}function W(a){var r=a,{className:e,children:t}=r,n=c(r,["className","children"]);const{variant:l}=p();return f("div",m(s({"data-slot":"card-topic-count",className:i("flex shrink-0 items-center gap-2",e)},n),{children:[o("span",{className:"text-sm font-medium leading-sm text-gray-foreground-muted",children:t}),o(F,{"aria-hidden":!0,size:18,strokeWidth:2.4,className:i("shrink-0 text-gray-foreground",l!=="blocked"&&"transition-transform duration-200 group-data-[state=open]:rotate-180")})]}))}function q(a){var r=a,{className:e,children:t}=r,n=c(r,["className","children"]);return o(D,m(s({"data-slot":"card-topic-content"},n),{children:o("div",{className:i("px-4 pb-4",e),children:t})}))}export{J as CardTopic,L as CardTopicColumn,q as CardTopicContent,W as CardTopicCount,Q as CardTopicNumber,S as CardTopicProgress,R as CardTopicTitle,K as CardTopicTrigger,N as cardTopicVariants};
3
+ import{jsx as o,jsxs as f,Fragment as k}from"react/jsx-runtime";import{cva as w}from"class-variance-authority";import{createContext as T,useMemo as O,useContext as P}from"react";import{Collapsible as j,CollapsibleContent as D,CollapsibleTrigger as E}from"./Collapsible.mjs";import{Progress as I}from"./Progress.mjs";import{Tag as $}from"./Tag.mjs";import{cn as i,clampPercentage as z}from"../lib/utils.mjs";import{ChevronDown as F,Lock as M}from"@medway-ui/icons";var S=Object.defineProperty,V=Object.defineProperties,G=Object.getOwnPropertyDescriptors,v=Object.getOwnPropertySymbols,b=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable,h=(a,r,e)=>r in a?S(a,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[r]=e,s=(a,r)=>{for(var e in r||(r={}))b.call(r,e)&&h(a,e,r[e]);if(v)for(var e of v(r))x.call(r,e)&&h(a,e,r[e]);return a},m=(a,r)=>V(a,G(r)),c=(a,r)=>{var e={};for(var t in a)b.call(a,t)&&r.indexOf(t)<0&&(e[t]=a[t]);if(a!=null&&v)for(var t of v(a))r.indexOf(t)<0&&x.call(a,t)&&(e[t]=a[t]);return e};const N=w("flex flex-col overflow-hidden rounded-2xl border border-gray-stroke-muted",{variants:{variant:{default:"bg-surface-card",blocked:"bg-gray-background-soft"}},defaultVariants:{variant:"default"}}),y=T(null);function p(){var a;return(a=P(y))!=null?a:{}}function H(a){var r=a,{className:e,variant:t,availableDate:n,children:l}=r,d=c(r,["className","variant","availableDate","children"]);const u=O(()=>({variant:t,availableDate:n}),[t,n]);return o(y.Provider,{value:u,children:o(j,m(s({"data-slot":"card-topic",animation:"accordion",className:i(N({variant:t}),e)},d),{children:l}))})}function J(a){var r=a,{className:e,children:t}=r,n=c(r,["className","children"]);const{variant:l}=p(),d=l==="blocked";return o(E,m(s({"data-slot":"card-topic-trigger",disabled:d,className:i("group flex min-h-16 w-full select-none flex-wrap items-center gap-4 p-4 text-left","[&>*:first-child]:flex-1","disabled:pointer-events-none disabled:cursor-default",!d&&"cursor-pointer",e)},n),{children:t}))}function K(a){var r=a,{className:e}=r,t=c(r,["className"]);return o("div",s({"data-slot":"card-topic-column",className:i("flex min-w-[min(100%,10rem)] max-w-full flex-wrap items-center gap-4",e)},t))}function L(a){var r=a,{className:e,children:t}=r,n=c(r,["className","children"]);const{variant:l}=p();return o("div",m(s({"data-slot":"card-topic-number",className:i("flex size-[30px] shrink-0 items-center justify-center rounded-full text-md font-medium text-primary-foreground-onfill",l==="blocked"?"bg-primary-foreground-muted":"bg-primary-foreground",e)},n),{children:t}))}function Q(a){var r=a,{className:e}=r,t=c(r,["className"]);const{variant:n}=p();return o("div",s({"data-slot":"card-topic-title",className:i("min-w-[min(100%,6rem)] flex-1 break-words text-md font-semibold leading-md",n==="blocked"?"text-primary-foreground-muted":"text-primary-foreground",e)},t))}function R(a){var r=a,{className:e,progress:t}=r,n=c(r,["className","progress"]);const{variant:l,availableDate:d}=p();if(l==="blocked")return d?o("div",m(s({"data-slot":"card-topic-progress",className:i("flex min-w-0",e)},n),{children:f($,{variant:"gray-soft",icon:o(M,{"aria-hidden":!0}),children:["Dispon\xEDvel em ",d]})})):null;if(t===void 0)return null;const u=z(t),C=Math.round(u),g=u>=100;return f("div",m(s({"data-slot":"card-topic-progress",className:i("flex min-w-[min(180px,100%)] flex-col gap-2",e)},n),{children:[o("div",{className:"text-xs font-medium leading-xs text-gray-foreground-muted",children:g?"Conclu\xEDdo":f(k,{children:[f("span",{className:"font-semibold text-gray-foreground",children:[C,"%"]})," de progresso"]})}),o(I,{"aria-hidden":"true",value:u,indicatorClassName:g?"bg-secondary-stroke-emphasis":"bg-primary-stroke"})]}))}function W(a){var r=a,{className:e,children:t}=r,n=c(r,["className","children"]);const{variant:l}=p();return f("div",m(s({"data-slot":"card-topic-count",className:i("flex shrink-0 items-center gap-2",e)},n),{children:[o("span",{className:"text-sm font-medium leading-sm text-gray-foreground-muted",children:t}),o(F,{"aria-hidden":!0,size:18,strokeWidth:2.4,className:i("shrink-0 text-gray-foreground",l!=="blocked"&&"transition-transform duration-200 group-data-[state=open]:rotate-180")})]}))}function q(a){var r=a,{className:e,children:t}=r,n=c(r,["className","children"]);return o(D,m(s({"data-slot":"card-topic-content"},n),{children:o("div",{className:i("px-4 pb-4",e),children:t})}))}export{H as CardTopic,K as CardTopicColumn,q as CardTopicContent,W as CardTopicCount,L as CardTopicNumber,R as CardTopicProgress,Q as CardTopicTitle,J as CardTopicTrigger,N as cardTopicVariants};
4
4
  //# sourceMappingURL=CardTopic.mjs.map
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  "use client";
3
- import{jsx as o,jsxs as f}from"react/jsx-runtime";import{createContext as P,forwardRef as z,useContext as x,useRef as $,useState as R,useMemo as H}from"react";import{Breadcrumb as I,BreadcrumbList as B}from"./Breadcrumb.mjs";import{Progress as D}from"./Progress.mjs";import{ProgressCircle as S}from"./ProgressCircle.mjs";import{Tag as A}from"./Tag.mjs";import{TooltipProvider as E,Tooltip as F,TooltipTrigger as L,TooltipContent as M}from"./Tooltip.mjs";import{useComposedRefs as U}from"../hooks/use-composed-refs.mjs";import{cn as n}from"../lib/utils.mjs";import{Check as k,TimeRemaining as X}from"@medway-ui/icons";var Y=Object.defineProperty,Z=Object.defineProperties,_=Object.getOwnPropertyDescriptors,v=Object.getOwnPropertySymbols,h=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable,b=(a,e,r)=>e in a?Y(a,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):a[e]=r,d=(a,e)=>{for(var r in e||(e={}))h.call(e,r)&&b(a,r,e[r]);if(v)for(var r of v(e))N.call(e,r)&&b(a,r,e[r]);return a},u=(a,e)=>Z(a,_(e)),c=(a,e)=>{var r={};for(var s in a)h.call(a,s)&&e.indexOf(s)<0&&(r[s]=a[s]);if(a!=null&&v)for(var s of v(a))e.indexOf(s)<0&&N.call(a,s)&&(r[s]=a[s]);return r};const p=P(null);function q(a){var e=a,{className:r,done:s,postponed:t,skipped:i}=e,l=c(e,["className","done","postponed","skipped"]);const m=H(()=>({done:s,postponed:t,skipped:i}),[s,t,i]);return o(p.Provider,{value:m,children:o("div",d({"data-slot":"card-week",className:n("flex flex-col overflow-hidden rounded-xl border border-gray-stroke-muted text-gray-foreground-muted",r)},l))})}function G(a){var e=a,{className:r,children:s,tag:t,tagIcon:i}=e,l=c(e,["className","children","tag","tagIcon"]);return f("div",u(d({"data-slot":"card-week-breadcrumb",className:n("flex min-h-12 min-w-0 items-center gap-4 bg-primary-background-soft-muted px-6 py-3",r)},l),{children:[o(I,{className:"min-w-0 flex-1 overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:o(B,{className:"w-max flex-nowrap gap-1.5 whitespace-nowrap text-xs",children:s})}),t&&o(A,{variant:"regular-soft",icon:i,children:t})]}))}function J(a){var e=a,{className:r}=e,s=c(e,["className"]);return o("div",d({"data-slot":"card-week-container",className:n("flex flex-1 flex-col gap-5 bg-surface-card px-6 py-5",r)},s))}function K(a){var e=a,{className:r}=e,s=c(e,["className"]);return o("div",d({"data-slot":"card-week-header",className:n("flex items-start justify-between gap-4 [&.border-b]:pb-6 [&>*]:min-w-0",r)},s))}const Q=z(function(a,e){var r=a,{className:s,children:t}=r,i=c(r,["className","children"]);const l=x(p),m=l==null?void 0:l.done,C=l==null?void 0:l.postponed,y=l==null?void 0:l.skipped,w=$(null),W=U(e,w),[O,j]=R(!1);return o(E,{children:f(F,{open:O,onOpenChange:T=>{const g=w.current;j(T&&!!g&&g.scrollHeight>g.clientHeight+1)},children:[o(L,{asChild:!0,children:o("div",u(d({ref:W,"data-slot":"card-week-title",className:n("line-clamp-2 break-words text-lg font-semibold leading-lg text-primary-foreground",(m||C||y)&&"text-primary-foreground-muted line-through",s)},i),{children:t}))}),o(M,{side:"top",className:"max-w-xs break-words",children:t})]})})});function V(a){var e=a,{className:r}=e,s=c(e,["className"]);const t=x(p),i=t==null?void 0:t.done,l=t==null?void 0:t.postponed,m=t==null?void 0:t.skipped;return o("div",d({"data-slot":"card-week-description",className:n("text-xs font-semibold leading-xs text-gray-foreground",(i||l||m)&&"text-gray-foreground-muted",r)},s))}function ee(a){var e=a,{className:r}=e,s=c(e,["className"]);return o("div",d({"data-slot":"card-week-tags",className:n("flex flex-wrap items-center gap-2 [[data-slot=card-week-header]:not(:has([data-slot=card-week-progress]))+&]:mt-6",r)},s))}function ae(a){var e=a,{className:r,value:s}=e,t=c(e,["className","value"]);return o("div",{"data-slot":"card-week-progress-circle",className:n("ml-auto flex shrink-0 justify-end",r),children:o(S,d({size:104,value:s},t))})}function re(a){var e=a,{className:r,value:s,indicatorClassName:t}=e,i=c(e,["className","value","indicatorClassName"]);const l=x(p),m=l==null?void 0:l.done;return o("div",{"data-slot":"card-week-progress",className:n("flex flex-1",r),children:o(D,u(d({},i),{value:m?100:s,indicatorClassName:n(m&&"bg-secondary-stroke-emphasis",t)}))})}function se(a){var e=a,{className:r}=e,s=c(e,["className"]);return o("div",d({"data-slot":"card-week-footer",className:n("mt-auto flex flex-col gap-2",r)},s))}function te(a){var e=a,{className:r,children:s}=e,t=c(e,["className","children"]);return o("div",u(d({"data-slot":"card-week-content",className:n("flex min-w-0 flex-col text-xs font-medium",r)},t),{children:s}))}function oe(a){var e=a,{className:r,children:s,isTime:t}=e,i=c(e,["className","children","isTime"]);return f("div",u(d({"data-slot":"card-week-text",className:n("flex min-w-0 items-center gap-1.5",t?"text-secondary-foreground":"text-gray-foreground-muted",r)},i),{children:[t&&o(X,{size:16}),o("span",{className:"min-w-0 break-words",children:s})]}))}function le(a){var e=a,{className:r}=e,s=c(e,["className"]);const t=x(p),i=t==null?void 0:t.done,l=t==null?void 0:t.postponed,m=t==null?void 0:t.skipped;return!i&&!l&&!m?null:l||m?f("div",u(d({"data-slot":"card-week-status",className:n("ml-auto flex min-w-0 max-w-full items-center gap-1.5",r)},s),{children:[o("div",{className:"flex size-4 shrink-0 items-center justify-center rounded-full bg-yellow-24 text-feedback-warning-foreground",children:o(k,{size:12,strokeWidth:1.67})}),o("div",{className:"min-w-0 break-words font-semibold text-feedback-warning-foreground",children:l?"Adiado":"Pulado"})]})):f("div",u(d({"data-slot":"card-week-status",className:n("ml-auto flex min-w-0 max-w-full items-center gap-1.5",r)},s),{children:[o("div",{className:"flex size-4 shrink-0 items-center justify-center rounded-full bg-secondary-background-soft text-secondary-foreground",children:o(k,{size:12,strokeWidth:1.67})}),o("div",{className:"min-w-0 break-words font-semibold text-secondary-foreground",children:"Conclu\xEDdo"})]}))}function ne(a){var e=a,{className:r}=e,s=c(e,["className"]);return o("div",d({"data-slot":"card-week-actions",className:n("flex flex-wrap items-center justify-end gap-2 pt-4 max-[500px]:flex-col max-[500px]:flex-nowrap max-[500px]:items-stretch max-[500px]:[&_[data-slot=button]]:w-full",r)},s))}export{q as CardWeek,ne as CardWeekActions,G as CardWeekBreadcrumb,J as CardWeekContainer,te as CardWeekContent,V as CardWeekDescription,se as CardWeekFooter,K as CardWeekHeader,re as CardWeekProgress,ae as CardWeekProgressCircle,le as CardWeekStatus,ee as CardWeekTags,oe as CardWeekText,Q as CardWeekTitle};
3
+ import{jsx as o,jsxs as f}from"react/jsx-runtime";import{createContext as P,forwardRef as z,useContext as x,useRef as $,useState as R,useMemo as H}from"react";import{Breadcrumb as I,BreadcrumbList as S}from"./Breadcrumb.mjs";import{Progress as B}from"./Progress.mjs";import{ProgressCircle as D}from"./ProgressCircle.mjs";import{Tag as A}from"./Tag.mjs";import{TooltipProvider as E,Tooltip as F,TooltipTrigger as L,TooltipContent as M}from"./Tooltip.mjs";import{useComposedRefs as U}from"../hooks/use-composed-refs.mjs";import{cn as n}from"../lib/utils.mjs";import{Check as k,TimeRemaining as X}from"@medway-ui/icons";var Y=Object.defineProperty,Z=Object.defineProperties,_=Object.getOwnPropertyDescriptors,v=Object.getOwnPropertySymbols,h=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable,b=(a,e,r)=>e in a?Y(a,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):a[e]=r,d=(a,e)=>{for(var r in e||(e={}))h.call(e,r)&&b(a,r,e[r]);if(v)for(var r of v(e))N.call(e,r)&&b(a,r,e[r]);return a},u=(a,e)=>Z(a,_(e)),c=(a,e)=>{var r={};for(var s in a)h.call(a,s)&&e.indexOf(s)<0&&(r[s]=a[s]);if(a!=null&&v)for(var s of v(a))e.indexOf(s)<0&&N.call(a,s)&&(r[s]=a[s]);return r};const p=P(null);function q(a){var e=a,{className:r,done:s,postponed:t,skipped:i}=e,l=c(e,["className","done","postponed","skipped"]);const m=H(()=>({done:s,postponed:t,skipped:i}),[s,t,i]);return o(p.Provider,{value:m,children:o("div",d({"data-slot":"card-week",className:n("flex flex-col overflow-hidden rounded-xl border border-gray-stroke-muted text-gray-foreground-muted",r)},l))})}function G(a){var e=a,{className:r,children:s,tag:t,tagIcon:i}=e,l=c(e,["className","children","tag","tagIcon"]);return f("div",u(d({"data-slot":"card-week-breadcrumb",className:n("flex min-h-12 min-w-0 items-center gap-4 bg-primary-background-soft-muted px-6 py-3",r)},l),{children:[o(I,{className:"min-w-0 flex-1 overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:o(S,{className:"w-max flex-nowrap gap-1.5 whitespace-nowrap text-xs",children:s})}),t&&o(A,{variant:"regular-soft",icon:i,children:t})]}))}function J(a){var e=a,{className:r}=e,s=c(e,["className"]);return o("div",d({"data-slot":"card-week-container",className:n("flex flex-1 flex-col gap-5 bg-surface-card px-6 py-5",r)},s))}function K(a){var e=a,{className:r}=e,s=c(e,["className"]);return o("div",d({"data-slot":"card-week-header",className:n("flex items-start justify-between gap-4 [&.border-b]:pb-6 [&>*]:min-w-0",r)},s))}const Q=z(function(a,e){var r=a,{className:s,children:t}=r,i=c(r,["className","children"]);const l=x(p),m=l==null?void 0:l.done,y=l==null?void 0:l.postponed,C=l==null?void 0:l.skipped,w=$(null),W=U(e,w),[O,j]=R(!1);return o(E,{children:f(F,{open:O,onOpenChange:T=>{const g=w.current;j(T&&!!g&&g.scrollHeight>g.clientHeight+1)},children:[o(L,{asChild:!0,children:o("div",u(d({ref:W,"data-slot":"card-week-title",className:n("line-clamp-2 break-words text-lg font-semibold leading-lg text-primary-foreground",(m||y||C)&&"text-primary-foreground-muted line-through",s)},i),{children:t}))}),o(M,{side:"top",className:"max-w-xs break-words",children:t})]})})});function V(a){var e=a,{className:r}=e,s=c(e,["className"]);const t=x(p),i=t==null?void 0:t.done,l=t==null?void 0:t.postponed,m=t==null?void 0:t.skipped;return o("div",d({"data-slot":"card-week-description",className:n("text-xs font-semibold leading-xs text-gray-foreground",(i||l||m)&&"text-gray-foreground-muted",r)},s))}function ee(a){var e=a,{className:r}=e,s=c(e,["className"]);return o("div",d({"data-slot":"card-week-tags",className:n("flex flex-wrap items-center gap-2 [[data-slot=card-week-header]:not(:has([data-slot=card-week-progress]))+&]:mt-6",r)},s))}function ae(a){var e=a,{className:r,value:s}=e,t=c(e,["className","value"]);return o("div",{"data-slot":"card-week-progress-circle",className:n("ml-auto flex shrink-0 justify-end",r),children:o(D,d({size:104,value:s},t))})}function re(a){var e=a,{className:r,value:s,indicatorClassName:t}=e,i=c(e,["className","value","indicatorClassName"]);const l=x(p),m=l==null?void 0:l.done;return o("div",{"data-slot":"card-week-progress",className:n("flex flex-1",r),children:o(B,u(d({},i),{value:m?100:s,indicatorClassName:n(m&&"bg-secondary-stroke-emphasis",t)}))})}function se(a){var e=a,{className:r}=e,s=c(e,["className"]);return o("div",d({"data-slot":"card-week-footer",className:n("mt-auto flex flex-col gap-2",r)},s))}function te(a){var e=a,{className:r,children:s}=e,t=c(e,["className","children"]);return o("div",u(d({"data-slot":"card-week-content",className:n("flex min-w-0 flex-col text-xs font-medium",r)},t),{children:s}))}function oe(a){var e=a,{className:r,children:s,isTime:t}=e,i=c(e,["className","children","isTime"]);return f("div",u(d({"data-slot":"card-week-text",className:n("flex min-w-0 items-center gap-1.5",t?"text-secondary-foreground":"text-gray-foreground-muted",r)},i),{children:[t&&o(X,{size:16}),o("span",{className:"min-w-0 break-words",children:s})]}))}function le(a){var e=a,{className:r}=e,s=c(e,["className"]);const t=x(p),i=t==null?void 0:t.done,l=t==null?void 0:t.postponed,m=t==null?void 0:t.skipped;return!i&&!l&&!m?null:l||m?f("div",u(d({"data-slot":"card-week-status",className:n("ml-auto flex min-w-0 max-w-full items-center gap-1.5",r)},s),{children:[o("div",{className:"flex size-4 shrink-0 items-center justify-center rounded-full bg-yellow-24 text-feedback-warning-foreground",children:o(k,{size:12,strokeWidth:1.67})}),o("div",{className:"min-w-0 break-words font-semibold text-feedback-warning-foreground",children:l?"Adiado":"Pulado"})]})):f("div",u(d({"data-slot":"card-week-status",className:n("ml-auto flex min-w-0 max-w-full items-center gap-1.5",r)},s),{children:[o("div",{className:"flex size-4 shrink-0 items-center justify-center rounded-full bg-secondary-background-soft text-secondary-foreground",children:o(k,{size:12,strokeWidth:1.67})}),o("div",{className:"min-w-0 break-words font-semibold text-secondary-foreground",children:"Conclu\xEDdo"})]}))}function ne(a){var e=a,{className:r}=e,s=c(e,["className"]);return o("div",d({"data-slot":"card-week-actions",className:n("flex flex-wrap items-center justify-end gap-2 pt-4 max-[500px]:flex-col max-[500px]:flex-nowrap max-[500px]:items-stretch max-[500px]:[&_[data-slot=button]]:w-full",r)},s))}export{q as CardWeek,ne as CardWeekActions,G as CardWeekBreadcrumb,J as CardWeekContainer,te as CardWeekContent,V as CardWeekDescription,se as CardWeekFooter,K as CardWeekHeader,re as CardWeekProgress,ae as CardWeekProgressCircle,le as CardWeekStatus,ee as CardWeekTags,oe as CardWeekText,Q as CardWeekTitle};
4
4
  //# sourceMappingURL=CardWeek.mjs.map
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  "use client";
3
- "use strict";var f=require("react/jsx-runtime"),Qe=require("embla-carousel-autoplay"),et=require("embla-carousel-fade"),tt=require("embla-carousel-react"),G=require("class-variance-authority"),B=require("@medway-ui/icons"),a=require("react"),ke=require("./Button.js"),nt=require("../hooks/use-composed-refs.js"),ot=require("../hooks/use-prefers-reduced-motion.js"),w=require("../lib/utils.js"),rt=Object.defineProperty,at=Object.defineProperties,lt=Object.getOwnPropertyDescriptors,oe=Object.getOwnPropertySymbols,je=Object.prototype.hasOwnProperty,Ae=Object.prototype.propertyIsEnumerable,Oe=(e,t,n)=>t in e?rt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,S=(e,t)=>{for(var n in t||(t={}))je.call(t,n)&&Oe(e,n,t[n]);if(oe)for(var n of oe(t))Ae.call(t,n)&&Oe(e,n,t[n]);return e},A=(e,t)=>at(e,lt(t)),W=(e,t)=>{var n={};for(var r in e)je.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&oe)for(var r of oe(e))t.indexOf(r)<0&&Ae.call(e,r)&&(n[r]=e[r]);return n};const it=5e3,Le="data-consumer-inert",st={selectedIndex:0,snapCount:0,canScrollPrev:!1,canScrollNext:!1,slideCount:0,snapFirstSlides:[],announcement:""},ct={horizontal:{ArrowLeft:"previous",ArrowRight:"next"},vertical:{ArrowUp:"previous",ArrowDown:"next"}},ut=["TEXTAREA","SELECT","VIDEO","AUDIO"],dt=["button","checkbox","color","file","image","reset","submit"],ft=["combobox","grid","listbox","menu","menubar","radiogroup","searchbox","slider","spinbutton","tablist","textbox","toolbar","tree","treegrid"],vt={horizontal:{previous:B.ArrowLeftMd,next:B.ArrowRightMd},vertical:{previous:B.ArrowUpMd,next:B.ArrowDownMd}},pt={previous:"Anterior",next:"Pr\xF3ximo"},gt={none:{horizontal:{content:"",item:"",focusRing:""},vertical:{content:"",item:"",focusRing:""}},xs:{horizontal:{content:"-ml-2",item:"pl-2",focusRing:"focus-visible:after:left-2"},vertical:{content:"-mt-2",item:"pt-2",focusRing:"focus-visible:after:top-2"}},sm:{horizontal:{content:"-ml-3",item:"pl-3",focusRing:"focus-visible:after:left-3"},vertical:{content:"-mt-3",item:"pt-3",focusRing:"focus-visible:after:top-3"}},md:{horizontal:{content:"-ml-4",item:"pl-4",focusRing:"focus-visible:after:left-4"},vertical:{content:"-mt-4",item:"pt-4",focusRing:"focus-visible:after:top-4"}},lg:{horizontal:{content:"-ml-6",item:"pl-6",focusRing:"focus-visible:after:left-6"},vertical:{content:"-mt-6",item:"pt-6",focusRing:"focus-visible:after:top-6"}},xl:{horizontal:{content:"-ml-8",item:"pl-8",focusRing:"focus-visible:after:left-8"},vertical:{content:"-mt-8",item:"pt-8",focusRing:"focus-visible:after:top-8"}}},K=["side","floating","outside"],mt=G.cva("relative",{variants:{orientation:{horizontal:"",vertical:""},controls:{side:"",floating:"",outside:"",inline:""}},compoundVariants:[{orientation:"horizontal",controls:K,class:"grid grid-flow-row-dense grid-cols-[auto_minmax(0,1fr)_auto] items-center [&>*]:col-span-full"},{orientation:"vertical",controls:K,class:"flex flex-col"}]}),ht=G.cva("relative overflow-hidden",{variants:{orientation:{horizontal:"",vertical:""},controls:{side:"",floating:"",outside:"",inline:""}},compoundVariants:[{orientation:"horizontal",controls:K,class:"!col-start-2 !col-span-1 min-w-0"}]}),bt=G.cva("relative z-10 shrink-0",{variants:{orientation:{horizontal:"",vertical:""},controls:{side:"",floating:"",outside:"",inline:""},direction:{previous:"",next:""},controlsFrom:{always:"",md:"hidden md:block",lg:"hidden lg:block"}},compoundVariants:[{orientation:"horizontal",controls:K,direction:"previous",class:"!col-start-1 !col-span-1"},{orientation:"horizontal",controls:K,direction:"next",class:"!col-start-3 !col-span-1"},{orientation:"horizontal",controls:"side",direction:"previous",class:"mr-2"},{orientation:"horizontal",controls:"side",direction:"next",class:"ml-2"},{orientation:"horizontal",controls:["floating","outside"],class:"w-0"},{orientation:"vertical",controls:K,class:"self-center"},{orientation:"vertical",controls:"side",direction:"previous",class:"mb-2"},{orientation:"vertical",controls:"side",direction:"next",class:"mt-2"},{orientation:"vertical",controls:["floating","outside"],class:"h-0"}]}),xt=G.cva("touch-manipulation disabled:opacity-50",{variants:{orientation:{horizontal:"",vertical:""},controls:{side:"",floating:"",outside:"",inline:""},direction:{previous:"",next:""},opaque:{true:"",false:""}},compoundVariants:[{controls:["floating","outside"],class:"disabled:pointer-events-auto disabled:cursor-default"},{controls:"floating",class:"shadow-level-1"},{controls:"floating",opaque:!0,class:"bg-surface-elevated dark:bg-surface-elevated disabled:hover:bg-surface-elevated"},{controls:"outside",opaque:!0,class:"disabled:hover:bg-transparent"},{controls:["floating","outside"],opaque:!0,class:"disabled:hover:dark:border-gray-stroke-muted"},{orientation:"horizontal",controls:["floating","outside"],class:"absolute top-1/2 -translate-y-1/2"},{orientation:"horizontal",controls:"floating",direction:"previous",class:"left-2"},{orientation:"horizontal",controls:"floating",direction:"next",class:"right-2"},{orientation:"horizontal",controls:"outside",direction:"previous",class:"right-2"},{orientation:"horizontal",controls:"outside",direction:"next",class:"left-2"},{orientation:"vertical",controls:["floating","outside"],class:"absolute left-1/2 -translate-x-1/2"},{orientation:"vertical",controls:"floating",direction:"previous",class:"top-2"},{orientation:"vertical",controls:"floating",direction:"next",class:"bottom-2"},{orientation:"vertical",controls:"outside",direction:"previous",class:"bottom-2"},{orientation:"vertical",controls:"outside",direction:"next",class:"top-2"}]}),Te=G.cva("pointer-events-none absolute z-[1] transition-opacity duration-200 motion-reduce:transition-none",{variants:{orientation:{horizontal:"inset-y-0 w-8",vertical:"inset-x-0 h-8"},edge:{start:"",end:""},visible:{true:"opacity-100",false:"opacity-0"}},compoundVariants:[{orientation:"horizontal",edge:"start",class:"left-0 bg-gradient-to-r from-background to-transparent"},{orientation:"horizontal",edge:"end",class:"right-0 bg-gradient-to-l from-background to-transparent"},{orientation:"vertical",edge:"start",class:"top-0 bg-gradient-to-b from-background to-transparent"},{orientation:"vertical",edge:"end",class:"bottom-0 bg-gradient-to-t from-background to-transparent"}]}),yt="focus:outline-0 focus-visible:after:pointer-events-none focus-visible:after:absolute focus-visible:after:inset-0 focus-visible:after:ring-[3px] focus-visible:after:ring-inset focus-visible:after:ring-state-focus",Ct="group flex size-6 items-center justify-center rounded-pill hover:cursor-pointer focus:outline-0 focus-visible:ring-[3px] focus-visible:ring-state-focus",Nt="h-2 w-2 rounded-pill bg-gray-stroke transition-[width,background-color] duration-200 motion-reduce:transition-none group-hover:data-[active=false]:bg-gray-stroke-emphasis data-[active=true]:w-4 data-[active=true]:bg-primary-background-fill",ge=a.createContext(null),Me=a.createContext(null);function J(){const e=a.useContext(ge);if(!e)throw new Error("useCarousel must be used within a Carousel component.");return e}function St(){const{selectedIndex:e,snapCount:t,canScrollPrev:n,canScrollNext:r,isScrollable:c,scrollPrev:v,scrollNext:u,scrollTo:p,autoplay:s}=J();return a.useMemo(()=>({selectedIndex:e,snapCount:t,canScrollPrev:n,canScrollNext:r,isScrollable:c,scrollPrev:v,scrollNext:u,scrollTo:p,autoplay:s}),[e,t,n,r,c,v,u,p,s])}function wt(e){return{selectedIndex:e.selectedScrollSnap(),snapCount:e.scrollSnapList().length,canScrollPrev:e.canScrollPrev(),canScrollNext:e.canScrollNext(),slideCount:e.slideNodes().length,snapFirstSlides:e.internalEngine().slideRegistry.map((t,n)=>{var r;return(r=t[0])!=null?r:n})}}function Rt(e,t){return e.selectedIndex===t.selectedIndex&&e.snapCount===t.snapCount&&e.canScrollPrev===t.canScrollPrev&&e.canScrollNext===t.canScrollNext&&e.slideCount===t.slideCount&&e.snapFirstSlides.length===t.snapFirstSlides.length&&e.snapFirstSlides.every((n,r)=>n===t.snapFirstSlides[r])&&e.announcement===t.announcement}function Pt(e,t){const n=Object.keys(e);return n.length===Object.keys(t).length&&n.every(r=>Object.is(e[r],t[r]))}function qe(e,t){return Number.isFinite(e)&&e>=1?Math.trunc(e):t}function me(e){if(!(e===void 0||!Number.isFinite(e)))return Math.max(0,Math.trunc(e))}function De(e,t=""){return a.Children.toArray(e).flatMap(n=>{var r;if(!a.isValidElement(n))return[];const c=`${t}${(r=n.key)!=null?r:""}`;return n.type===a.Fragment?De(n.props.children,`${c}/`):[a.cloneElement(n,{key:c})]})}function Et(e,t,n){const r=document.activeElement;return r===n&&!e.canScrollNext&&e.canScrollPrev?"previous":r===t&&!e.canScrollPrev&&e.canScrollNext?"next":null}function zt(e,t){const n=getComputedStyle(e);return t==="horizontal"?/auto|scroll/.test(n.overflowX)&&e.scrollWidth>e.clientWidth:/auto|scroll/.test(n.overflowY)&&e.scrollHeight>e.clientHeight}function It(e,t){var n;return e instanceof HTMLElement&&e.isContentEditable||e instanceof HTMLInputElement&&!dt.includes(e.type)||ut.includes(e.tagName)||ft.includes((n=e.getAttribute("role"))!=null?n:"")||zt(e,t)}function Ft(e,t){const n=e.nativeEvent.composedPath();return n.slice(0,n.indexOf(e.currentTarget)).some(r=>r instanceof Element&&It(r,t))}function kt(e){try{return e.matches(":focus-visible")}catch(t){return!1}}function $e(e){var t;return(t=e.internalEngine().slideRegistry[e.selectedScrollSnap()])!=null?t:[]}function Be(e){return e.hasAttribute(Le)}function We(e){e.getAttribute("tabindex")==="-1"&&e.removeAttribute("tabindex")}function he(e){var t,n;(n=(t=e.plugins())==null?void 0:t.autoplay)==null||n.reset()}function jt(e){const t=typeof e=="object"?e.delay:void 0;return t!==void 0&&Number.isFinite(t)&&t>0?t:it}function Ke(e,t){return e==="page"?t.snapCount!==t.slideCount:qe(e,1)>1}function At(e,t){var n;const r=e.slideNodes().length;if(r===0)return"";const c=e.selectedScrollSnap();return t?`P\xE1gina ${c+1} de ${e.scrollSnapList().length}`:`Slide ${((n=$e(e)[0])!=null?n:c)+1} de ${r}`}function Ot(e,t){return t?`Ir para a p\xE1gina ${e+1}`:`Ir para o slide ${e+1}`}const Lt=a.forwardRef(function(e,t){const n=e,{orientation:r="horizontal",align:c="start",step:v=1,loop:u=!1,dragFree:p=!1,transition:s="slide",autoplay:h=!1,controls:b="side",controlsFrom:d="always",edgeBehavior:R="disable",hideControlsWhenFits:z=!0,index:F,defaultIndex:k,onIndexChange:x,setApi:P,opts:E,className:M,children:q,onKeyDown:O,onFocus:V,onPointerEnter:H,onPointerLeave:Y}=n,re=W(n,["orientation","align","step","loop","dragFree","transition","autoplay","controls","controlsFrom","edgeBehavior","hideControlsWhenFits","index","defaultIndex","onIndexChange","setApi","opts","className","children","onKeyDown","onFocus","onPointerEnter","onPointerLeave"]),C=ot.usePrefersReducedMotion(),j=h!==!1,U=jt(h),L=me(F),[ae]=a.useState(()=>{var o;return(o=L!=null?L:me(k))!=null?o:0}),He=a.useMemo(()=>{const o=[];return j&&o.push(Qe({delay:U,playOnInit:!1,stopOnInteraction:!0,stopOnFocusIn:!1,stopOnMouseEnter:!1})),s==="fade"&&o.push(et()),o},[j,U,s]),[be,l]=tt(A(S({containScroll:"trimSnaps"},E),{axis:r==="horizontal"?"x":"y",align:c,loop:u,dragFree:p,slidesToScroll:v==="page"?"auto":qe(v,1),startIndex:ae}),He),[_,Ue]=a.useState(()=>A(S({},st),{selectedIndex:ae})),[le,xe]=a.useState(null),[_e,ye]=a.useState(!1),ie=a.useRef(null),se=a.useRef(null),ce=a.useRef(null),ue=a.useRef(!1),T=a.useRef(ae),de=a.useRef(x),Ce=a.useRef(v),Ne=a.useRef(null),Z=a.useRef(null),Q=_.snapCount>1,Se=Ke(v,_),X=le?le==="paused":C,D=j&&Q&&!X&&!_e,we=a.useRef(D),ee=a.useRef(null),Re=a.useRef(C),te=a.useCallback(()=>{l&&(l.scrollPrev(C),he(l))},[l,C]),ne=a.useCallback(()=>{l&&(l.scrollNext(C),he(l))},[l,C]),fe=a.useCallback(o=>{if(!l)return;const i=o!==l.selectedScrollSnap();l.scrollTo(o,C),i&&he(l)},[l,C]),ve=a.useCallback(o=>{ue.current=!0;try{o==="previous"?te():ne()}finally{ue.current=!1}},[te,ne]),Pe=a.useCallback(()=>{var o;return(o=ee.current)==null?void 0:o.call(ee)},[]),Ee=a.useCallback(()=>xe(X?"playing":"paused"),[X]),Xe=o=>{O==null||O(o);const i=ct[r][o.key];!i||o.defaultPrevented||o.altKey||o.ctrlKey||o.metaKey||o.shiftKey||o.currentTarget.contains(o.target)&&(Ft(o,r)||(o.preventDefault(),ve(i)))},Ge=o=>{V==null||V(o),!(!j||le==="playing")&&kt(o.target)&&xe("paused")},Je=o=>{H==null||H(o),o.pointerType==="mouse"&&ye(!0)},Ye=o=>{Y==null||Y(o),o.pointerType==="mouse"&&ye(!1)},ze=a.useMemo(()=>({isEnabled:j,isPaused:X,isRotating:D,toggle:Ee}),[j,X,D,Ee]),Ze=a.useMemo(()=>A(S({},_),{orientation:r,transition:s,controls:b,controlsFrom:d,edgeBehavior:R,hideControlsWhenFits:z,isPaged:Se,isScrollable:Q,viewportRef:be,previousButtonRef:ie,nextButtonRef:se,scrollPrev:te,scrollNext:ne,scrollTo:fe,scrollFromArrow:ve,syncFadeInert:Pe,autoplay:ze}),[_,r,s,b,d,R,z,Se,Q,be,te,ne,fe,ve,Pe,ze]);return a.useEffect(()=>{de.current=x,Ce.current=v,we.current=D,Re.current=C}),a.useEffect(()=>{l&&P&&P(l)},[l,P]),a.useEffect(()=>{if(!l)return;let o=!1;const i=(N,m)=>{const g=wt(l),$=m==="select"&&o;$&&(o=!1);const Ie=m!=="select"?void 0:$?"":At(l,Ke(Ce.current,g));ce.current=ue.current?Et(g,ie.current,se.current):null,Ue(pe=>{const Fe=A(S({},g),{announcement:Ie!=null?Ie:pe.announcement});return Rt(pe,Fe)?pe:Fe})},y=()=>{const N=Z.current,m=N!==null&&N<l.scrollSnapList().length;m&&(Z.current=null,T.current=N);const g=T.current;if(l.selectedScrollSnap()!==g){o=!m;try{l.scrollTo(g,!0)}finally{o=!1}}},I=()=>{var N;const m=l.selectedScrollSnap();m!==T.current&&(T.current=m,(N=de.current)==null||N.call(de,m))};return T.current=l.selectedScrollSnap(),i(),l.on("reInit",y).on("select",i).on("reInit",i).on("select",I).on("reInit",I),()=>{l.off("reInit",y).off("select",i).off("reInit",i).off("select",I).off("reInit",I)}},[l]),a.useEffect(()=>{var o;const i=ce.current;i&&(ce.current=null,(o=(i==="previous"?ie:se).current)==null||o.focus({preventScroll:!0}))},[_]),a.useEffect(()=>{const o=Ne.current;if(!l||o&&Pt(o,e))return;if(Ne.current=e,L===void 0){Z.current=null;return}const i=l.selectedScrollSnap(),y=L===me(o==null?void 0:o.index);if(i!==T.current&&y)return;const I=Math.max(0,l.scrollSnapList().length-1);Z.current=L>I?L:null;const N=Math.min(L,I);N!==i&&(T.current=N,fe(N))}),a.useEffect(()=>{if(!l||s!=="fade")return;const o=new Set,i=()=>{const y=l.slideNodes(),I=new Set($e(l)),N=y.some((g,$)=>!I.has($)&&g.contains(document.activeElement));y.forEach((g,$)=>{g.inert=!I.has($)||Be(g),g.inert&&o.has(g)&&(We(g),o.delete(g))});const m=N?y.find(g=>!g.inert):void 0;m&&(m.hasAttribute("tabindex")||(m.tabIndex=-1,o.add(m)),m.focus({preventScroll:!0}))};return ee.current=i,i(),l.on("select",i).on("reInit",i),()=>{ee.current=null,l.off("select",i).off("reInit",i);for(const y of l.slideNodes())y.inert=Be(y);o.forEach(We)}},[l,s]),a.useEffect(()=>{var o;const i=(o=l==null?void 0:l.plugins())==null?void 0:o.autoplay;i&&(D?i.play(C):i.stop())},[l,D,C]),a.useEffect(()=>{if(!l)return;const o=()=>{var i,y;we.current&&((y=(i=l.plugins())==null?void 0:i.autoplay)==null||y.play(Re.current))};return l.on("pointerUp",o).on("reInit",o),()=>{l.off("pointerUp",o).off("reInit",o)}},[l]),f.jsx(ge.Provider,{value:Ze,children:f.jsx("div",A(S({ref:t,role:"region","aria-roledescription":"carousel","data-slot":"carousel","data-orientation":r,"data-scrollable":Q,className:w.cn(mt({orientation:r,controls:b}),M),onKeyDown:Xe,onFocus:Ge,onPointerEnter:Je,onPointerLeave:Ye},re),{children:q}))})}),Tt=a.forwardRef(function(e,t){var n=e,{gap:r="md",fadeEdges:c=!1,fadeClassName:v,viewportClassName:u,className:p,children:s}=n,h=W(n,["gap","fadeEdges","fadeClassName","viewportClassName","className","children"]);const{viewportRef:b,orientation:d,controls:R,canScrollPrev:z,canScrollNext:F,announcement:k,autoplay:x}=J(),P=De(s),E=gt[r][d];return f.jsxs("div",{ref:b,"data-slot":"carousel-viewport",className:w.cn(ht({orientation:d,controls:R}),u),children:[f.jsx("div",A(S({ref:t,"data-slot":"carousel-content",className:w.cn("flex touch-pinch-zoom",d==="horizontal"?"touch-pan-y":"touch-pan-x flex-col",E.content,p)},h),{children:P.map((M,q)=>{var O;return f.jsx(Me.Provider,{value:{index:q,total:P.length,gapClassName:E.item,focusRingClassName:E.focusRing},children:M},(O=M.key)!=null?O:q)})})),f.jsx("div",{"data-slot":"carousel-live","aria-live":x.isRotating?"off":"polite","aria-atomic":"true",className:"sr-only",children:k}),c&&f.jsxs(f.Fragment,{children:[f.jsx("div",{"aria-hidden":"true","data-slot":"carousel-fade-start",className:w.cn(Te({orientation:d,edge:"start",visible:z}),v)}),f.jsx("div",{"aria-hidden":"true","data-slot":"carousel-fade-end",className:w.cn(Te({orientation:d,edge:"end",visible:F}),v)})]})]})}),Mt=a.forwardRef(function(e,t){var n=e,{className:r,inert:c}=n,v=W(n,["className","inert"]);const u=a.useContext(Me),p=a.useContext(ge),s=p==null?void 0:p.syncFadeInert,h=(p==null?void 0:p.transition)==="fade",b=!!c||c==="",d={[Le]:b||void 0};return a.useEffect(()=>{s==null||s()},[b,s]),f.jsx("div",S(A(S({ref:t,role:"group","aria-roledescription":"slide","aria-label":u?`${u.index+1} de ${u.total}`:void 0,"data-slot":"carousel-item"},d),{inert:c,className:w.cn("min-w-0 shrink-0 grow-0 basis-full",u==null?void 0:u.gapClassName,h&&yt,h&&(u==null?void 0:u.focusRingClassName),r)}),v))}),Ve=a.forwardRef(function(e,t){var n=e,{direction:r,variant:c="outlined",size:v="md",className:u,containerClassName:p,disabled:s,onClick:h}=n,b=W(n,["direction","variant","size","className","containerClassName","disabled","onClick"]);const{orientation:d,controls:R,controlsFrom:z,edgeBehavior:F,hideControlsWhenFits:k,isScrollable:x,canScrollPrev:P,canScrollNext:E,scrollFromArrow:M,previousButtonRef:q,nextButtonRef:O}=J(),V=r==="previous",H=V?P:E,Y=nt.useComposedRefs(t,V?q:O),re=F==="hide"&&!H||k&&!x,C=vt[d][r],j=U=>{h==null||h(U),!U.defaultPrevented&&M(r)};return f.jsx(ke.Button,S({ref:Y,"data-slot":`carousel-${r}`,variant:c,size:v,"aria-label":pt[r],iconLeft:f.jsx(C,{"aria-hidden":"true"}),disabled:s||!H,containerClassName:w.cn(bt({orientation:d,controls:R,direction:r,controlsFrom:z}),re&&"invisible",p),className:w.cn(xt({orientation:d,controls:R,direction:r,opaque:c==="outlined"}),u),onClick:j},b))}),qt=a.forwardRef(function(e,t){return f.jsx(Ve,S({ref:t,direction:"previous"},e))}),Dt=a.forwardRef(function(e,t){return f.jsx(Ve,S({ref:t,direction:"next"},e))}),$t=a.forwardRef(function(e,t){var n=e,{getDotLabel:r,dotClassName:c,indicatorClassName:v,className:u}=n,p=W(n,["getDotLabel","dotClassName","indicatorClassName","className"]);const{snapCount:s,snapFirstSlides:h,selectedIndex:b,isPaged:d,isScrollable:R,hideControlsWhenFits:z,scrollTo:F}=J();return f.jsx("div",A(S({ref:t,role:"group","aria-label":d?"Escolher p\xE1gina":"Escolher slide","data-slot":"carousel-dots",className:w.cn("mt-2 flex min-h-6 items-center justify-center",z&&!R&&"invisible",u)},p),{children:Array.from({length:s},(k,x)=>{var P;const E=x===b;return f.jsx("button",{type:"button","data-slot":"carousel-dot","data-active":E,"aria-label":r?r(x,s):Ot(d?x:(P=h[x])!=null?P:x,d),"aria-current":E||void 0,onClick:()=>F(x),className:w.cn(Ct,c),children:f.jsx("span",{"data-slot":"carousel-dot-indicator","data-active":E,className:w.cn(Nt,v)})},x)})}))}),Bt=a.forwardRef(function(e,t){var n=e,{variant:r="outlined",size:c="sm",containerClassName:v,onClick:u}=n,p=W(n,["variant","size","containerClassName","onClick"]);const{autoplay:s,isScrollable:h,hideControlsWhenFits:b}=J(),d=s.isPaused?B.Play:B.Pause,R=s.isPaused?"Iniciar rota\xE7\xE3o autom\xE1tica":"Pausar rota\xE7\xE3o autom\xE1tica",z=b&&!h,F=k=>{u==null||u(k),k.defaultPrevented||s.toggle()};return s.isEnabled?f.jsx(ke.Button,S({ref:t,"data-slot":"carousel-autoplay-toggle",variant:r,size:c,"aria-label":R,iconLeft:f.jsx(d,{"aria-hidden":"true"}),containerClassName:w.cn("relative z-10",z&&"invisible",v),onClick:F},p)):null});exports.Carousel=Lt,exports.CarouselAutoplayToggle=Bt,exports.CarouselContent=Tt,exports.CarouselDots=$t,exports.CarouselItem=Mt,exports.CarouselNext=Dt,exports.CarouselPrevious=qt,exports.useCarousel=St;
3
+ "use strict";var f=require("react/jsx-runtime"),Qe=require("embla-carousel-autoplay"),et=require("embla-carousel-fade"),tt=require("embla-carousel-react"),G=require("class-variance-authority"),B=require("@medway-ui/icons"),a=require("react"),ke=require("./Button.js"),ot=require("../hooks/use-composed-refs.js"),nt=require("../hooks/use-prefers-reduced-motion.js"),w=require("../lib/utils.js"),rt=Object.defineProperty,at=Object.defineProperties,lt=Object.getOwnPropertyDescriptors,ne=Object.getOwnPropertySymbols,je=Object.prototype.hasOwnProperty,Ae=Object.prototype.propertyIsEnumerable,Oe=(e,t,o)=>t in e?rt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,S=(e,t)=>{for(var o in t||(t={}))je.call(t,o)&&Oe(e,o,t[o]);if(ne)for(var o of ne(t))Ae.call(t,o)&&Oe(e,o,t[o]);return e},A=(e,t)=>at(e,lt(t)),W=(e,t)=>{var o={};for(var r in e)je.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(e!=null&&ne)for(var r of ne(e))t.indexOf(r)<0&&Ae.call(e,r)&&(o[r]=e[r]);return o};const it=5e3,Le="data-consumer-inert",st={selectedIndex:0,snapCount:0,canScrollPrev:!1,canScrollNext:!1,slideCount:0,snapFirstSlides:[],announcement:""},ct={horizontal:{ArrowLeft:"previous",ArrowRight:"next"},vertical:{ArrowUp:"previous",ArrowDown:"next"}},ut=["TEXTAREA","SELECT","VIDEO","AUDIO"],dt=["button","checkbox","color","file","image","reset","submit"],ft=["combobox","grid","listbox","menu","menubar","radiogroup","searchbox","slider","spinbutton","tablist","textbox","toolbar","tree","treegrid"],vt={horizontal:{previous:B.ArrowLeftMd,next:B.ArrowRightMd},vertical:{previous:B.ArrowUpMd,next:B.ArrowDownMd}},pt={previous:"Anterior",next:"Pr\xF3ximo"},gt={none:{horizontal:{content:"",item:"",focusRing:""},vertical:{content:"",item:"",focusRing:""}},xs:{horizontal:{content:"-ml-2",item:"pl-2",focusRing:"focus-visible:after:left-2"},vertical:{content:"-mt-2",item:"pt-2",focusRing:"focus-visible:after:top-2"}},sm:{horizontal:{content:"-ml-3",item:"pl-3",focusRing:"focus-visible:after:left-3"},vertical:{content:"-mt-3",item:"pt-3",focusRing:"focus-visible:after:top-3"}},md:{horizontal:{content:"-ml-4",item:"pl-4",focusRing:"focus-visible:after:left-4"},vertical:{content:"-mt-4",item:"pt-4",focusRing:"focus-visible:after:top-4"}},lg:{horizontal:{content:"-ml-6",item:"pl-6",focusRing:"focus-visible:after:left-6"},vertical:{content:"-mt-6",item:"pt-6",focusRing:"focus-visible:after:top-6"}},xl:{horizontal:{content:"-ml-8",item:"pl-8",focusRing:"focus-visible:after:left-8"},vertical:{content:"-mt-8",item:"pt-8",focusRing:"focus-visible:after:top-8"}}},K=["side","floating","outside"],mt=G.cva("relative",{variants:{orientation:{horizontal:"",vertical:""},controls:{side:"",floating:"",outside:"",inline:""}},compoundVariants:[{orientation:"horizontal",controls:K,class:"grid grid-flow-row-dense grid-cols-[auto_minmax(0,1fr)_auto] items-center [&>*]:col-span-full"},{orientation:"vertical",controls:K,class:"flex flex-col"}]}),ht=G.cva("relative overflow-hidden",{variants:{orientation:{horizontal:"",vertical:""},controls:{side:"",floating:"",outside:"",inline:""}},compoundVariants:[{orientation:"horizontal",controls:K,class:"!col-start-2 !col-span-1 min-w-0"}]}),bt=G.cva("relative z-10 shrink-0",{variants:{orientation:{horizontal:"",vertical:""},controls:{side:"",floating:"",outside:"",inline:""},direction:{previous:"",next:""},controlsFrom:{always:"",md:"hidden md:block",lg:"hidden lg:block"}},compoundVariants:[{orientation:"horizontal",controls:K,direction:"previous",class:"!col-start-1 !col-span-1"},{orientation:"horizontal",controls:K,direction:"next",class:"!col-start-3 !col-span-1"},{orientation:"horizontal",controls:"side",direction:"previous",class:"mr-2"},{orientation:"horizontal",controls:"side",direction:"next",class:"ml-2"},{orientation:"horizontal",controls:["floating","outside"],class:"w-0"},{orientation:"vertical",controls:K,class:"self-center"},{orientation:"vertical",controls:"side",direction:"previous",class:"mb-2"},{orientation:"vertical",controls:"side",direction:"next",class:"mt-2"},{orientation:"vertical",controls:["floating","outside"],class:"h-0"}]}),xt=G.cva("touch-manipulation disabled:opacity-50 dark:disabled:opacity-30",{variants:{orientation:{horizontal:"",vertical:""},controls:{side:"",floating:"",outside:"",inline:""},direction:{previous:"",next:""},opaque:{true:"",false:""}},compoundVariants:[{controls:["floating","outside"],class:"disabled:pointer-events-auto disabled:cursor-default"},{controls:"floating",class:"shadow-level-1"},{controls:"floating",opaque:!0,class:"bg-surface-elevated dark:bg-surface-elevated disabled:hover:bg-surface-elevated"},{controls:"outside",opaque:!0,class:"disabled:hover:bg-transparent"},{controls:["floating","outside"],opaque:!0,class:"disabled:hover:dark:border-gray-stroke-muted"},{orientation:"horizontal",controls:["floating","outside"],class:"absolute top-1/2 -translate-y-1/2"},{orientation:"horizontal",controls:"floating",direction:"previous",class:"left-2"},{orientation:"horizontal",controls:"floating",direction:"next",class:"right-2"},{orientation:"horizontal",controls:"outside",direction:"previous",class:"right-2"},{orientation:"horizontal",controls:"outside",direction:"next",class:"left-2"},{orientation:"vertical",controls:["floating","outside"],class:"absolute left-1/2 -translate-x-1/2"},{orientation:"vertical",controls:"floating",direction:"previous",class:"top-2"},{orientation:"vertical",controls:"floating",direction:"next",class:"bottom-2"},{orientation:"vertical",controls:"outside",direction:"previous",class:"bottom-2"},{orientation:"vertical",controls:"outside",direction:"next",class:"top-2"}]}),Te=G.cva("pointer-events-none absolute z-[1] transition-opacity duration-200 motion-reduce:transition-none",{variants:{orientation:{horizontal:"inset-y-0 w-8",vertical:"inset-x-0 h-8"},edge:{start:"",end:""},visible:{true:"opacity-100",false:"opacity-0"}},compoundVariants:[{orientation:"horizontal",edge:"start",class:"left-0 bg-gradient-to-r from-background to-transparent"},{orientation:"horizontal",edge:"end",class:"right-0 bg-gradient-to-l from-background to-transparent"},{orientation:"vertical",edge:"start",class:"top-0 bg-gradient-to-b from-background to-transparent"},{orientation:"vertical",edge:"end",class:"bottom-0 bg-gradient-to-t from-background to-transparent"}]}),yt="focus:outline-0 focus-visible:after:pointer-events-none focus-visible:after:absolute focus-visible:after:inset-0 focus-visible:after:ring-[3px] focus-visible:after:ring-inset focus-visible:after:ring-state-focus",Ct="group flex size-6 items-center justify-center rounded-pill hover:cursor-pointer focus:outline-0 focus-visible:ring-[3px] focus-visible:ring-state-focus",Nt="h-2 w-2 rounded-pill bg-gray-stroke transition-[width,background-color] duration-200 motion-reduce:transition-none group-hover:data-[active=false]:bg-gray-stroke-emphasis data-[active=true]:w-4 data-[active=true]:bg-primary-background-fill",ge=a.createContext(null),Me=a.createContext(null);function J(){const e=a.useContext(ge);if(!e)throw new Error("useCarousel must be used within a Carousel component.");return e}function St(){const{selectedIndex:e,snapCount:t,canScrollPrev:o,canScrollNext:r,isScrollable:c,scrollPrev:v,scrollNext:u,scrollTo:p,autoplay:s}=J();return a.useMemo(()=>({selectedIndex:e,snapCount:t,canScrollPrev:o,canScrollNext:r,isScrollable:c,scrollPrev:v,scrollNext:u,scrollTo:p,autoplay:s}),[e,t,o,r,c,v,u,p,s])}function wt(e){return{selectedIndex:e.selectedScrollSnap(),snapCount:e.scrollSnapList().length,canScrollPrev:e.canScrollPrev(),canScrollNext:e.canScrollNext(),slideCount:e.slideNodes().length,snapFirstSlides:e.internalEngine().slideRegistry.map((t,o)=>{var r;return(r=t[0])!=null?r:o})}}function Rt(e,t){return e.selectedIndex===t.selectedIndex&&e.snapCount===t.snapCount&&e.canScrollPrev===t.canScrollPrev&&e.canScrollNext===t.canScrollNext&&e.slideCount===t.slideCount&&e.snapFirstSlides.length===t.snapFirstSlides.length&&e.snapFirstSlides.every((o,r)=>o===t.snapFirstSlides[r])&&e.announcement===t.announcement}function Pt(e,t){const o=Object.keys(e);return o.length===Object.keys(t).length&&o.every(r=>Object.is(e[r],t[r]))}function qe(e,t){return Number.isFinite(e)&&e>=1?Math.trunc(e):t}function me(e){if(!(e===void 0||!Number.isFinite(e)))return Math.max(0,Math.trunc(e))}function De(e,t=""){return a.Children.toArray(e).flatMap(o=>{var r;if(!a.isValidElement(o))return[];const c=`${t}${(r=o.key)!=null?r:""}`;return o.type===a.Fragment?De(o.props.children,`${c}/`):[a.cloneElement(o,{key:c})]})}function Et(e,t,o){const r=document.activeElement;return r===o&&!e.canScrollNext&&e.canScrollPrev?"previous":r===t&&!e.canScrollPrev&&e.canScrollNext?"next":null}function zt(e,t){const o=getComputedStyle(e);return t==="horizontal"?/auto|scroll/.test(o.overflowX)&&e.scrollWidth>e.clientWidth:/auto|scroll/.test(o.overflowY)&&e.scrollHeight>e.clientHeight}function It(e,t){var o;return e instanceof HTMLElement&&e.isContentEditable||e instanceof HTMLInputElement&&!dt.includes(e.type)||ut.includes(e.tagName)||ft.includes((o=e.getAttribute("role"))!=null?o:"")||zt(e,t)}function Ft(e,t){const o=e.nativeEvent.composedPath();return o.slice(0,o.indexOf(e.currentTarget)).some(r=>r instanceof Element&&It(r,t))}function kt(e){try{return e.matches(":focus-visible")}catch(t){return!1}}function $e(e){var t;return(t=e.internalEngine().slideRegistry[e.selectedScrollSnap()])!=null?t:[]}function Be(e){return e.hasAttribute(Le)}function We(e){e.getAttribute("tabindex")==="-1"&&e.removeAttribute("tabindex")}function he(e){var t,o;(o=(t=e.plugins())==null?void 0:t.autoplay)==null||o.reset()}function jt(e){const t=typeof e=="object"?e.delay:void 0;return t!==void 0&&Number.isFinite(t)&&t>0?t:it}function Ke(e,t){return e==="page"?t.snapCount!==t.slideCount:qe(e,1)>1}function At(e,t){var o;const r=e.slideNodes().length;if(r===0)return"";const c=e.selectedScrollSnap();return t?`P\xE1gina ${c+1} de ${e.scrollSnapList().length}`:`Slide ${((o=$e(e)[0])!=null?o:c)+1} de ${r}`}function Ot(e,t){return t?`Ir para a p\xE1gina ${e+1}`:`Ir para o slide ${e+1}`}const Lt=a.forwardRef(function(e,t){const o=e,{orientation:r="horizontal",align:c="start",step:v=1,loop:u=!1,dragFree:p=!1,transition:s="slide",autoplay:h=!1,controls:b="side",controlsFrom:d="always",edgeBehavior:R="disable",hideControlsWhenFits:z=!0,index:F,defaultIndex:k,onIndexChange:x,setApi:P,opts:E,className:M,children:q,onKeyDown:O,onFocus:V,onPointerEnter:H,onPointerLeave:Y}=o,re=W(o,["orientation","align","step","loop","dragFree","transition","autoplay","controls","controlsFrom","edgeBehavior","hideControlsWhenFits","index","defaultIndex","onIndexChange","setApi","opts","className","children","onKeyDown","onFocus","onPointerEnter","onPointerLeave"]),C=nt.usePrefersReducedMotion(),j=h!==!1,U=jt(h),L=me(F),[ae]=a.useState(()=>{var n;return(n=L!=null?L:me(k))!=null?n:0}),He=a.useMemo(()=>{const n=[];return j&&n.push(Qe({delay:U,playOnInit:!1,stopOnInteraction:!0,stopOnFocusIn:!1,stopOnMouseEnter:!1})),s==="fade"&&n.push(et()),n},[j,U,s]),[be,l]=tt(A(S({containScroll:"trimSnaps"},E),{axis:r==="horizontal"?"x":"y",align:c,loop:u,dragFree:p,slidesToScroll:v==="page"?"auto":qe(v,1),startIndex:ae}),He),[_,Ue]=a.useState(()=>A(S({},st),{selectedIndex:ae})),[le,xe]=a.useState(null),[_e,ye]=a.useState(!1),ie=a.useRef(null),se=a.useRef(null),ce=a.useRef(null),ue=a.useRef(!1),T=a.useRef(ae),de=a.useRef(x),Ce=a.useRef(v),Ne=a.useRef(null),Z=a.useRef(null),Q=_.snapCount>1,Se=Ke(v,_),X=le?le==="paused":C,D=j&&Q&&!X&&!_e,we=a.useRef(D),ee=a.useRef(null),Re=a.useRef(C),te=a.useCallback(()=>{l&&(l.scrollPrev(C),he(l))},[l,C]),oe=a.useCallback(()=>{l&&(l.scrollNext(C),he(l))},[l,C]),fe=a.useCallback(n=>{if(!l)return;const i=n!==l.selectedScrollSnap();l.scrollTo(n,C),i&&he(l)},[l,C]),ve=a.useCallback(n=>{ue.current=!0;try{n==="previous"?te():oe()}finally{ue.current=!1}},[te,oe]),Pe=a.useCallback(()=>{var n;return(n=ee.current)==null?void 0:n.call(ee)},[]),Ee=a.useCallback(()=>xe(X?"playing":"paused"),[X]),Xe=n=>{O==null||O(n);const i=ct[r][n.key];!i||n.defaultPrevented||n.altKey||n.ctrlKey||n.metaKey||n.shiftKey||n.currentTarget.contains(n.target)&&(Ft(n,r)||(n.preventDefault(),ve(i)))},Ge=n=>{V==null||V(n),!(!j||le==="playing")&&kt(n.target)&&xe("paused")},Je=n=>{H==null||H(n),n.pointerType==="mouse"&&ye(!0)},Ye=n=>{Y==null||Y(n),n.pointerType==="mouse"&&ye(!1)},ze=a.useMemo(()=>({isEnabled:j,isPaused:X,isRotating:D,toggle:Ee}),[j,X,D,Ee]),Ze=a.useMemo(()=>A(S({},_),{orientation:r,transition:s,controls:b,controlsFrom:d,edgeBehavior:R,hideControlsWhenFits:z,isPaged:Se,isScrollable:Q,viewportRef:be,previousButtonRef:ie,nextButtonRef:se,scrollPrev:te,scrollNext:oe,scrollTo:fe,scrollFromArrow:ve,syncFadeInert:Pe,autoplay:ze}),[_,r,s,b,d,R,z,Se,Q,be,te,oe,fe,ve,Pe,ze]);return a.useEffect(()=>{de.current=x,Ce.current=v,we.current=D,Re.current=C}),a.useEffect(()=>{l&&P&&P(l)},[l,P]),a.useEffect(()=>{if(!l)return;let n=!1;const i=(N,m)=>{const g=wt(l),$=m==="select"&&n;$&&(n=!1);const Ie=m!=="select"?void 0:$?"":At(l,Ke(Ce.current,g));ce.current=ue.current?Et(g,ie.current,se.current):null,Ue(pe=>{const Fe=A(S({},g),{announcement:Ie!=null?Ie:pe.announcement});return Rt(pe,Fe)?pe:Fe})},y=()=>{const N=Z.current,m=N!==null&&N<l.scrollSnapList().length;m&&(Z.current=null,T.current=N);const g=T.current;if(l.selectedScrollSnap()!==g){n=!m;try{l.scrollTo(g,!0)}finally{n=!1}}},I=()=>{var N;const m=l.selectedScrollSnap();m!==T.current&&(T.current=m,(N=de.current)==null||N.call(de,m))};return T.current=l.selectedScrollSnap(),i(),l.on("reInit",y).on("select",i).on("reInit",i).on("select",I).on("reInit",I),()=>{l.off("reInit",y).off("select",i).off("reInit",i).off("select",I).off("reInit",I)}},[l]),a.useEffect(()=>{var n;const i=ce.current;i&&(ce.current=null,(n=(i==="previous"?ie:se).current)==null||n.focus({preventScroll:!0}))},[_]),a.useEffect(()=>{const n=Ne.current;if(!l||n&&Pt(n,e))return;if(Ne.current=e,L===void 0){Z.current=null;return}const i=l.selectedScrollSnap(),y=L===me(n==null?void 0:n.index);if(i!==T.current&&y)return;const I=Math.max(0,l.scrollSnapList().length-1);Z.current=L>I?L:null;const N=Math.min(L,I);N!==i&&(T.current=N,fe(N))}),a.useEffect(()=>{if(!l||s!=="fade")return;const n=new Set,i=()=>{const y=l.slideNodes(),I=new Set($e(l)),N=y.some((g,$)=>!I.has($)&&g.contains(document.activeElement));y.forEach((g,$)=>{g.inert=!I.has($)||Be(g),g.inert&&n.has(g)&&(We(g),n.delete(g))});const m=N?y.find(g=>!g.inert):void 0;m&&(m.hasAttribute("tabindex")||(m.tabIndex=-1,n.add(m)),m.focus({preventScroll:!0}))};return ee.current=i,i(),l.on("select",i).on("reInit",i),()=>{ee.current=null,l.off("select",i).off("reInit",i);for(const y of l.slideNodes())y.inert=Be(y);n.forEach(We)}},[l,s]),a.useEffect(()=>{var n;const i=(n=l==null?void 0:l.plugins())==null?void 0:n.autoplay;i&&(D?i.play(C):i.stop())},[l,D,C]),a.useEffect(()=>{if(!l)return;const n=()=>{var i,y;we.current&&((y=(i=l.plugins())==null?void 0:i.autoplay)==null||y.play(Re.current))};return l.on("pointerUp",n).on("reInit",n),()=>{l.off("pointerUp",n).off("reInit",n)}},[l]),f.jsx(ge.Provider,{value:Ze,children:f.jsx("div",A(S({ref:t,role:"region","aria-roledescription":"carousel","data-slot":"carousel","data-orientation":r,"data-scrollable":Q,className:w.cn(mt({orientation:r,controls:b}),M),onKeyDown:Xe,onFocus:Ge,onPointerEnter:Je,onPointerLeave:Ye},re),{children:q}))})}),Tt=a.forwardRef(function(e,t){var o=e,{gap:r="md",fadeEdges:c=!1,fadeClassName:v,viewportClassName:u,className:p,children:s}=o,h=W(o,["gap","fadeEdges","fadeClassName","viewportClassName","className","children"]);const{viewportRef:b,orientation:d,controls:R,canScrollPrev:z,canScrollNext:F,announcement:k,autoplay:x}=J(),P=De(s),E=gt[r][d];return f.jsxs("div",{ref:b,"data-slot":"carousel-viewport",className:w.cn(ht({orientation:d,controls:R}),u),children:[f.jsx("div",A(S({ref:t,"data-slot":"carousel-content",className:w.cn("flex touch-pinch-zoom",d==="horizontal"?"touch-pan-y":"touch-pan-x flex-col",E.content,p)},h),{children:P.map((M,q)=>{var O;return f.jsx(Me.Provider,{value:{index:q,total:P.length,gapClassName:E.item,focusRingClassName:E.focusRing},children:M},(O=M.key)!=null?O:q)})})),f.jsx("div",{"data-slot":"carousel-live","aria-live":x.isRotating?"off":"polite","aria-atomic":"true",className:"sr-only",children:k}),c&&f.jsxs(f.Fragment,{children:[f.jsx("div",{"aria-hidden":"true","data-slot":"carousel-fade-start",className:w.cn(Te({orientation:d,edge:"start",visible:z}),v)}),f.jsx("div",{"aria-hidden":"true","data-slot":"carousel-fade-end",className:w.cn(Te({orientation:d,edge:"end",visible:F}),v)})]})]})}),Mt=a.forwardRef(function(e,t){var o=e,{className:r,inert:c}=o,v=W(o,["className","inert"]);const u=a.useContext(Me),p=a.useContext(ge),s=p==null?void 0:p.syncFadeInert,h=(p==null?void 0:p.transition)==="fade",b=!!c||c==="",d={[Le]:b||void 0};return a.useEffect(()=>{s==null||s()},[b,s]),f.jsx("div",S(A(S({ref:t,role:"group","aria-roledescription":"slide","aria-label":u?`${u.index+1} de ${u.total}`:void 0,"data-slot":"carousel-item"},d),{inert:c,className:w.cn("min-w-0 shrink-0 grow-0 basis-full",u==null?void 0:u.gapClassName,h&&yt,h&&(u==null?void 0:u.focusRingClassName),r)}),v))}),Ve=a.forwardRef(function(e,t){var o=e,{direction:r,variant:c="outlined",size:v="md",className:u,containerClassName:p,disabled:s,onClick:h}=o,b=W(o,["direction","variant","size","className","containerClassName","disabled","onClick"]);const{orientation:d,controls:R,controlsFrom:z,edgeBehavior:F,hideControlsWhenFits:k,isScrollable:x,canScrollPrev:P,canScrollNext:E,scrollFromArrow:M,previousButtonRef:q,nextButtonRef:O}=J(),V=r==="previous",H=V?P:E,Y=ot.useComposedRefs(t,V?q:O),re=F==="hide"&&!H||k&&!x,C=vt[d][r],j=U=>{h==null||h(U),!U.defaultPrevented&&M(r)};return f.jsx(ke.Button,S({ref:Y,"data-slot":`carousel-${r}`,variant:c,size:v,"aria-label":pt[r],iconLeft:f.jsx(C,{"aria-hidden":"true"}),disabled:s||!H,containerClassName:w.cn(bt({orientation:d,controls:R,direction:r,controlsFrom:z}),re&&"invisible",p),className:w.cn(xt({orientation:d,controls:R,direction:r,opaque:c==="outlined"}),u),onClick:j},b))}),qt=a.forwardRef(function(e,t){return f.jsx(Ve,S({ref:t,direction:"previous"},e))}),Dt=a.forwardRef(function(e,t){return f.jsx(Ve,S({ref:t,direction:"next"},e))}),$t=a.forwardRef(function(e,t){var o=e,{getDotLabel:r,dotClassName:c,indicatorClassName:v,className:u}=o,p=W(o,["getDotLabel","dotClassName","indicatorClassName","className"]);const{snapCount:s,snapFirstSlides:h,selectedIndex:b,isPaged:d,isScrollable:R,hideControlsWhenFits:z,scrollTo:F}=J();return f.jsx("div",A(S({ref:t,role:"group","aria-label":d?"Escolher p\xE1gina":"Escolher slide","data-slot":"carousel-dots",className:w.cn("mt-2 flex min-h-6 items-center justify-center",z&&!R&&"invisible",u)},p),{children:Array.from({length:s},(k,x)=>{var P;const E=x===b;return f.jsx("button",{type:"button","data-slot":"carousel-dot","data-active":E,"aria-label":r?r(x,s):Ot(d?x:(P=h[x])!=null?P:x,d),"aria-current":E||void 0,onClick:()=>F(x),className:w.cn(Ct,c),children:f.jsx("span",{"data-slot":"carousel-dot-indicator","data-active":E,className:w.cn(Nt,v)})},x)})}))}),Bt=a.forwardRef(function(e,t){var o=e,{variant:r="outlined",size:c="sm",containerClassName:v,onClick:u}=o,p=W(o,["variant","size","containerClassName","onClick"]);const{autoplay:s,isScrollable:h,hideControlsWhenFits:b}=J(),d=s.isPaused?B.Play:B.Pause,R=s.isPaused?"Iniciar rota\xE7\xE3o autom\xE1tica":"Pausar rota\xE7\xE3o autom\xE1tica",z=b&&!h,F=k=>{u==null||u(k),k.defaultPrevented||s.toggle()};return s.isEnabled?f.jsx(ke.Button,S({ref:t,"data-slot":"carousel-autoplay-toggle",variant:r,size:c,"aria-label":R,iconLeft:f.jsx(d,{"aria-hidden":"true"}),containerClassName:w.cn("relative z-10",z&&"invisible",v),onClick:F},p)):null});exports.Carousel=Lt,exports.CarouselAutoplayToggle=Bt,exports.CarouselContent=Tt,exports.CarouselDots=$t,exports.CarouselItem=Mt,exports.CarouselNext=Dt,exports.CarouselPrevious=qt,exports.useCarousel=St;
4
4
  //# sourceMappingURL=Carousel.js.map