@medway-ui/core 1.48.0 → 1.49.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 (37) hide show
  1. package/COMPONENTS.md +16 -3
  2. package/COMPONENTS_SUMMARY.md +4 -2
  3. package/dist/COMPONENTS.md +16 -3
  4. package/dist/COMPONENTS_SUMMARY.md +4 -2
  5. package/dist/components/AlertDialog.mjs +1 -1
  6. package/dist/components/Autocomplete.js +1 -1
  7. package/dist/components/Autocomplete.mjs +1 -1
  8. package/dist/components/CardLesson.mjs +1 -1
  9. package/dist/components/CardModule.mjs +1 -1
  10. package/dist/components/CardTopic.mjs +1 -1
  11. package/dist/components/CardWeek.mjs +1 -1
  12. package/dist/components/Collapsible.d.ts +1 -1
  13. package/dist/components/Collapsible.js +1 -1
  14. package/dist/components/Collapsible.mjs +1 -1
  15. package/dist/components/ConnectorNode.mjs +1 -1
  16. package/dist/components/Popover.d.ts +2 -1
  17. package/dist/components/Popover.js +1 -1
  18. package/dist/components/Popover.mjs +1 -1
  19. package/dist/components/Ranking.mjs +1 -1
  20. package/dist/components/Sidebar.d.ts +27 -3
  21. package/dist/components/Sidebar.js +1 -1
  22. package/dist/components/Sidebar.mjs +1 -1
  23. package/dist/components/Tag.d.ts +2 -2
  24. package/dist/components/Tag.js +1 -1
  25. package/dist/components/Tag.mjs +1 -1
  26. package/dist/components/TagPicker.js +1 -1
  27. package/dist/components/TagPicker.mjs +1 -1
  28. package/dist/index.d.ts +2 -1
  29. package/dist/index.js +1 -1
  30. package/dist/index.mjs +1 -1
  31. package/dist/lib/sidebar-search.d.ts +2 -0
  32. package/dist/lib/sidebar-search.js +3 -0
  33. package/dist/lib/sidebar-search.mjs +3 -0
  34. package/dist/lib/utils.d.ts +5 -0
  35. package/dist/lib/utils.js +1 -1
  36. package/dist/lib/utils.mjs +1 -1
  37. package/package.json +1 -1
package/COMPONENTS.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # @medway-ui/core — Component Reference
2
2
 
3
3
  > **Auto-generated — do not edit manually.**
4
- > Package `@medway-ui/core` · v1.48.0 · Generated 2026-11-18
4
+ > Package `@medway-ui/core` · v1.49.0 · Generated 2026-11-19
5
5
 
6
6
  All components require React 18+ and are client components (`"use client"`).
7
7
 
@@ -57,6 +57,7 @@ import type { ButtonProps } from "@medway-ui/core";
57
57
  - [Offcanvas](#offcanvas)
58
58
  - [CardOption](#cardoption)
59
59
  - [Pagination](#pagination)
60
+ - [Popover](#popover)
60
61
  - [Progress](#progress)
61
62
  - [ProgressCircle](#progresscircle)
62
63
  - [RadioGroup](#radiogroup)
@@ -1809,6 +1810,14 @@ type CardOptionGroupProps = | CardOptionGroupSingleProps
1809
1810
 
1810
1811
  ---
1811
1812
 
1813
+ ## Popover
1814
+
1815
+ **Sub-components:** `Popover`, `PopoverAnchor`, `PopoverContent`, `PopoverTrigger`
1816
+
1817
+ > **Radix UI base:** `Popover` — sub-components forward all Radix UI props.
1818
+
1819
+ ---
1820
+
1812
1821
  ## Progress
1813
1822
 
1814
1823
  **Sub-components:** `Progress`
@@ -2219,7 +2228,7 @@ type SelectSize = "md" | "lg"
2219
2228
 
2220
2229
  **Sub-components:** `Sidebar`, `SidebarContent`, `SidebarFooter`, `SidebarGroup`, `SidebarGroupAction`, `SidebarGroupContent`, `SidebarGroupLabel`, `SidebarHeader`, `SidebarInput`, `SidebarInset`, `SidebarMenu`, `SidebarMenuAction`, `SidebarMenuBadge`, `SidebarMenuButton`, `SidebarMenuItem`, `SidebarMenuItemCollapse`, `SidebarMenuItemTitle`, `SidebarMenuSkeleton`, `SidebarMenuSub`, `SidebarMenuSubButton`, `SidebarMenuSubItem`, `SidebarProvider`, `SidebarRail`, `SidebarSeparator`, `SidebarTrigger`
2221
2230
 
2222
- **Functions / variant helpers:** `useSidebar`
2231
+ **Functions / variant helpers:** `useSidebar`, `useSidebarSearch`
2223
2232
 
2224
2233
  ### `sidebarMenuButtonVariants` — CVA Variants
2225
2234
 
@@ -2469,7 +2478,7 @@ type TabsSize = "md" | "lg"
2469
2478
 
2470
2479
  **`variant`** *(default: `"regular"`)*:
2471
2480
 
2472
- `"regular"` \| `"regular-soft"` \| `"regular-basic"` \| `"emphasis"` \| `"emphasis-soft"` \| `"emphasis-basic"` \| `"gray"` \| `"gray-soft"` \| `"gray-basic"` \| `"success"` \| `"success-soft"` \| `"success-basic"` \| `"error"` \| `"error-soft"` \| `"error-basic"` \| `"warning"` \| `"warning-soft"` \| `"warning-basic"` \| `"cm"` \| `"cm-soft"` \| `"cm-basic"` \| `"go"` \| `"go-soft"` \| `"go-basic"` \| `"cir"` \| `"cir-soft"` \| `"cir-basic"` \| `"ped"` \| `"ped-soft"` \| `"ped-basic"` \| `"prev"` \| `"prev-soft"` \| `"prev-basic"` \| `"ia"` \| `"ia-soft"` \| `"ia-basic"`
2481
+ `"regular"` \| `"regular-soft"` \| `"regular-basic"` \| `"emphasis"` \| `"emphasis-soft"` \| `"emphasis-basic"` \| `"gray"` \| `"gray-soft"` \| `"gray-basic"` \| `"success"` \| `"success-soft"` \| `"success-basic"` \| `"error"` \| `"error-soft"` \| `"error-basic"` \| `"warning"` \| `"warning-soft"` \| `"warning-basic"` \| `"cm"` \| `"cm-soft"` \| `"cm-basic"` \| `"go"` \| `"go-soft"` \| `"go-basic"` \| `"cir"` \| `"cir-soft"` \| `"cir-basic"` \| `"ped"` \| `"ped-soft"` \| `"ped-basic"` \| `"prev"` \| `"prev-soft"` \| `"prev-basic"` \| `"ia"` \| `"ia-soft"` \| `"ia-basic"` \| `"new"` \| `"new-inverse"`
2473
2482
 
2474
2483
  ### `TagProps`
2475
2484
 
@@ -2984,6 +2993,10 @@ Returns `{ open, setOpen, openMobile, setOpenMobile, isMobile, toggleSidebar }`.
2984
2993
 
2985
2994
  Exported from `Carousel`. See component docs above for context.
2986
2995
 
2996
+ ### `useSidebarSearch()`
2997
+
2998
+ Exported from `Sidebar`. See component docs above for context.
2999
+
2987
3000
  ---
2988
3001
 
2989
3002
  ## Design Tokens
@@ -1,6 +1,6 @@
1
1
  # @medway-ui/core — Component Summary
2
2
 
3
- > v1.48.0 · For the full prop/variant reference see `COMPONENTS.md`.
3
+ > v1.49.0 · For the full prop/variant reference see `COMPONENTS.md`.
4
4
 
5
5
  ## Components
6
6
 
@@ -41,6 +41,7 @@
41
41
  - **Offcanvas** — Radix: Dialog | sub: OffcanvasBody, OffcanvasClose, OffcanvasContent, OffcanvasDescription, OffcanvasFooter, OffcanvasHeader, OffcanvasOverlay, OffcanvasPortal, OffcanvasTitle, OffcanvasTrigger
42
42
  - **CardOption** — sizes: md, lg | emphasis: true, false | interactive: true, false | disabled: true, false | Radix: RadioGroup | sub: CardOptionGroup
43
43
  - **Pagination** — sub: PaginationContent, PaginationEllipsis, PaginationInfo, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PaginationRoot
44
+ - **Popover** — Radix: Popover | sub: PopoverAnchor, PopoverContent, PopoverTrigger
44
45
  - **Progress** — Radix: Progress
45
46
  - **ProgressCircle**
46
47
  - **RadioGroup** — variants: regular | sizes: sm, md, lg | Radix: RadioGroup | sub: RadioGroupItem
@@ -57,7 +58,7 @@
57
58
  - **Switch** — variants: regular | sizes: sm, md, lg | Radix: Switch
58
59
  - **Switcher** — sub: SwitcherContent, SwitcherFooter, SwitcherGroup, SwitcherItem, SwitcherSeparator, SwitcherTrigger
59
60
  - **Tabs** — variants: standalone, header | sizes: md, lg | side: left, right | Radix: Tabs | sub: TabsContent, TabsList, TabsTrigger
60
- - **Tag** — sizes: sm, md | variants: regular, regular-soft, regular-basic, emphasis, emphasis-soft, emphasis-basic, gray, gray-soft, gray-basic, success, success-soft, success-basic, error, error-soft, error-basic, warning, warning-soft, warning-basic, cm, cm-soft, cm-basic, go, go-soft, go-basic, cir, cir-soft, cir-basic, ped, ped-soft, ped-basic, prev, prev-soft, prev-basic, ia, ia-soft, ia-basic
61
+ - **Tag** — sizes: sm, md | variants: regular, regular-soft, regular-basic, emphasis, emphasis-soft, emphasis-basic, gray, gray-soft, gray-basic, success, success-soft, success-basic, error, error-soft, error-basic, warning, warning-soft, warning-basic, cm, cm-soft, cm-basic, go, go-soft, go-basic, cir, cir-soft, cir-basic, ped, ped-soft, ped-basic, prev, prev-soft, prev-basic, ia, ia-soft, ia-basic, new, new-inverse
61
62
  - **TagPicker** — sub: TAG_PICKER_PALETTE
62
63
  - **CardTestimonial**
63
64
  - **TextMarker** — color: none | strikethrough: true, false | underline: true, false | Radix: Popover, Toolbar | sub: TEXT_MARKER_COLORS
@@ -74,6 +75,7 @@
74
75
  - `useIsMobile()` — returns boolean, breakpoint 768px
75
76
  - `useSidebar()` — sidebar context (requires `<SidebarProvider>`)
76
77
  - `useCarousel()` — from Carousel
78
+ - `useSidebarSearch()` — from Sidebar
77
79
 
78
80
  ## Tokens
79
81
 
@@ -1,7 +1,7 @@
1
1
  # @medway-ui/core — Component Reference
2
2
 
3
3
  > **Auto-generated — do not edit manually.**
4
- > Package `@medway-ui/core` · v1.48.0 · Generated 2026-11-18
4
+ > Package `@medway-ui/core` · v1.49.0 · Generated 2026-11-19
5
5
 
6
6
  All components require React 18+ and are client components (`"use client"`).
7
7
 
@@ -57,6 +57,7 @@ import type { ButtonProps } from "@medway-ui/core";
57
57
  - [Offcanvas](#offcanvas)
58
58
  - [CardOption](#cardoption)
59
59
  - [Pagination](#pagination)
60
+ - [Popover](#popover)
60
61
  - [Progress](#progress)
61
62
  - [ProgressCircle](#progresscircle)
62
63
  - [RadioGroup](#radiogroup)
@@ -1809,6 +1810,14 @@ type CardOptionGroupProps = | CardOptionGroupSingleProps
1809
1810
 
1810
1811
  ---
1811
1812
 
1813
+ ## Popover
1814
+
1815
+ **Sub-components:** `Popover`, `PopoverAnchor`, `PopoverContent`, `PopoverTrigger`
1816
+
1817
+ > **Radix UI base:** `Popover` — sub-components forward all Radix UI props.
1818
+
1819
+ ---
1820
+
1812
1821
  ## Progress
1813
1822
 
1814
1823
  **Sub-components:** `Progress`
@@ -2219,7 +2228,7 @@ type SelectSize = "md" | "lg"
2219
2228
 
2220
2229
  **Sub-components:** `Sidebar`, `SidebarContent`, `SidebarFooter`, `SidebarGroup`, `SidebarGroupAction`, `SidebarGroupContent`, `SidebarGroupLabel`, `SidebarHeader`, `SidebarInput`, `SidebarInset`, `SidebarMenu`, `SidebarMenuAction`, `SidebarMenuBadge`, `SidebarMenuButton`, `SidebarMenuItem`, `SidebarMenuItemCollapse`, `SidebarMenuItemTitle`, `SidebarMenuSkeleton`, `SidebarMenuSub`, `SidebarMenuSubButton`, `SidebarMenuSubItem`, `SidebarProvider`, `SidebarRail`, `SidebarSeparator`, `SidebarTrigger`
2221
2230
 
2222
- **Functions / variant helpers:** `useSidebar`
2231
+ **Functions / variant helpers:** `useSidebar`, `useSidebarSearch`
2223
2232
 
2224
2233
  ### `sidebarMenuButtonVariants` — CVA Variants
2225
2234
 
@@ -2469,7 +2478,7 @@ type TabsSize = "md" | "lg"
2469
2478
 
2470
2479
  **`variant`** *(default: `"regular"`)*:
2471
2480
 
2472
- `"regular"` \| `"regular-soft"` \| `"regular-basic"` \| `"emphasis"` \| `"emphasis-soft"` \| `"emphasis-basic"` \| `"gray"` \| `"gray-soft"` \| `"gray-basic"` \| `"success"` \| `"success-soft"` \| `"success-basic"` \| `"error"` \| `"error-soft"` \| `"error-basic"` \| `"warning"` \| `"warning-soft"` \| `"warning-basic"` \| `"cm"` \| `"cm-soft"` \| `"cm-basic"` \| `"go"` \| `"go-soft"` \| `"go-basic"` \| `"cir"` \| `"cir-soft"` \| `"cir-basic"` \| `"ped"` \| `"ped-soft"` \| `"ped-basic"` \| `"prev"` \| `"prev-soft"` \| `"prev-basic"` \| `"ia"` \| `"ia-soft"` \| `"ia-basic"`
2481
+ `"regular"` \| `"regular-soft"` \| `"regular-basic"` \| `"emphasis"` \| `"emphasis-soft"` \| `"emphasis-basic"` \| `"gray"` \| `"gray-soft"` \| `"gray-basic"` \| `"success"` \| `"success-soft"` \| `"success-basic"` \| `"error"` \| `"error-soft"` \| `"error-basic"` \| `"warning"` \| `"warning-soft"` \| `"warning-basic"` \| `"cm"` \| `"cm-soft"` \| `"cm-basic"` \| `"go"` \| `"go-soft"` \| `"go-basic"` \| `"cir"` \| `"cir-soft"` \| `"cir-basic"` \| `"ped"` \| `"ped-soft"` \| `"ped-basic"` \| `"prev"` \| `"prev-soft"` \| `"prev-basic"` \| `"ia"` \| `"ia-soft"` \| `"ia-basic"` \| `"new"` \| `"new-inverse"`
2473
2482
 
2474
2483
  ### `TagProps`
2475
2484
 
@@ -2984,6 +2993,10 @@ Returns `{ open, setOpen, openMobile, setOpenMobile, isMobile, toggleSidebar }`.
2984
2993
 
2985
2994
  Exported from `Carousel`. See component docs above for context.
2986
2995
 
2996
+ ### `useSidebarSearch()`
2997
+
2998
+ Exported from `Sidebar`. See component docs above for context.
2999
+
2987
3000
  ---
2988
3001
 
2989
3002
  ## Design Tokens
@@ -1,6 +1,6 @@
1
1
  # @medway-ui/core — Component Summary
2
2
 
3
- > v1.48.0 · For the full prop/variant reference see `COMPONENTS.md`.
3
+ > v1.49.0 · For the full prop/variant reference see `COMPONENTS.md`.
4
4
 
5
5
  ## Components
6
6
 
@@ -41,6 +41,7 @@
41
41
  - **Offcanvas** — Radix: Dialog | sub: OffcanvasBody, OffcanvasClose, OffcanvasContent, OffcanvasDescription, OffcanvasFooter, OffcanvasHeader, OffcanvasOverlay, OffcanvasPortal, OffcanvasTitle, OffcanvasTrigger
42
42
  - **CardOption** — sizes: md, lg | emphasis: true, false | interactive: true, false | disabled: true, false | Radix: RadioGroup | sub: CardOptionGroup
43
43
  - **Pagination** — sub: PaginationContent, PaginationEllipsis, PaginationInfo, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PaginationRoot
44
+ - **Popover** — Radix: Popover | sub: PopoverAnchor, PopoverContent, PopoverTrigger
44
45
  - **Progress** — Radix: Progress
45
46
  - **ProgressCircle**
46
47
  - **RadioGroup** — variants: regular | sizes: sm, md, lg | Radix: RadioGroup | sub: RadioGroupItem
@@ -57,7 +58,7 @@
57
58
  - **Switch** — variants: regular | sizes: sm, md, lg | Radix: Switch
58
59
  - **Switcher** — sub: SwitcherContent, SwitcherFooter, SwitcherGroup, SwitcherItem, SwitcherSeparator, SwitcherTrigger
59
60
  - **Tabs** — variants: standalone, header | sizes: md, lg | side: left, right | Radix: Tabs | sub: TabsContent, TabsList, TabsTrigger
60
- - **Tag** — sizes: sm, md | variants: regular, regular-soft, regular-basic, emphasis, emphasis-soft, emphasis-basic, gray, gray-soft, gray-basic, success, success-soft, success-basic, error, error-soft, error-basic, warning, warning-soft, warning-basic, cm, cm-soft, cm-basic, go, go-soft, go-basic, cir, cir-soft, cir-basic, ped, ped-soft, ped-basic, prev, prev-soft, prev-basic, ia, ia-soft, ia-basic
61
+ - **Tag** — sizes: sm, md | variants: regular, regular-soft, regular-basic, emphasis, emphasis-soft, emphasis-basic, gray, gray-soft, gray-basic, success, success-soft, success-basic, error, error-soft, error-basic, warning, warning-soft, warning-basic, cm, cm-soft, cm-basic, go, go-soft, go-basic, cir, cir-soft, cir-basic, ped, ped-soft, ped-basic, prev, prev-soft, prev-basic, ia, ia-soft, ia-basic, new, new-inverse
61
62
  - **TagPicker** — sub: TAG_PICKER_PALETTE
62
63
  - **CardTestimonial**
63
64
  - **TextMarker** — color: none | strikethrough: true, false | underline: true, false | Radix: Popover, Toolbar | sub: TEXT_MARKER_COLORS
@@ -74,6 +75,7 @@
74
75
  - `useIsMobile()` — returns boolean, breakpoint 768px
75
76
  - `useSidebar()` — sidebar context (requires `<SidebarProvider>`)
76
77
  - `useCarousel()` — from Carousel
78
+ - `useSidebarSearch()` — from Sidebar
77
79
 
78
80
  ## Tokens
79
81
 
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  "use client";
3
- import{jsx as o,jsxs as y}from"react/jsx-runtime";import{createContext as w,forwardRef as _,useContext as p,useMemo as D,useState as L,useCallback as B,useLayoutEffect as E}from"react";import{cva as A}from"class-variance-authority";import{AlertDialog as c}from"radix-ui";import{cn as u}from"../lib/utils.mjs";import{buttonVariants as C}from"./Button.mjs";import{Dismiss as V,DISMISS_PANEL_POSITION as $}from"./Dismiss.mjs";import{Tag as R}from"./Tag.mjs";var F=Object.defineProperty,M=Object.defineProperties,q=Object.getOwnPropertyDescriptors,x=Object.getOwnPropertySymbols,O=Object.prototype.hasOwnProperty,P=Object.prototype.propertyIsEnumerable,z=(e,a,t)=>a in e?F(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,n=(e,a)=>{for(var t in a||(a={}))O.call(a,t)&&z(e,t,a[t]);if(x)for(var t of x(a))P.call(a,t)&&z(e,t,a[t]);return e},j=(e,a)=>M(e,q(a)),i=(e,a)=>{var t={};for(var r in e)O.call(e,r)&&a.indexOf(r)<0&&(t[r]=e[r]);if(e!=null&&x)for(var r of x(e))a.indexOf(r)<0&&P.call(e,r)&&(t[r]=e[r]);return t};const v="regular",k=w(null),N=w(null),G=A("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:v}}),H=A("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-feedback-warning-background-fill text-feedback-warning-foreground-onfill",error:"bg-feedback-error-background-fill text-feedback-error-foreground-onfill",success:"bg-feedback-success-background-fill text-feedback-success-foreground-onfill"}},defaultVariants:{variant:v}}),J={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 Q(e){var a=e,{variant:t=v}=a,r=i(a,["variant"]);const l=D(()=>({variant:t}),[t]);return o(N.Provider,{value:l,children:o(c.Root,n({"data-slot":"alert-dialog"},r))})}const U=_(function(e,a){return o(c.Trigger,n({ref:a,"data-slot":"alert-dialog-trigger"},e))});function I(e){var a=i(e,[]);return o(c.Portal,n({"data-slot":"alert-dialog-portal"},a))}function S(e){var a=e,{className:t}=a,r=i(a,["className"]);return o(c.Overlay,n({"data-slot":"alert-dialog-overlay",className:u("fixed inset-0 z-50 bg-backdrop data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 motion-reduce:!animate-none",t)},r))}function X(e){var a=e,{className:t,overlayClassName:r,showCloseButton:l=!1,closeLabel:s="Fechar",children:f}=a,g=i(a,["className","overlayClassName","showCloseButton","closeLabel","children"]);const[d,m]=L(0),b=B(()=>(m(h=>h+1),()=>m(h=>h-1)),[]),T=D(()=>({hasCloseButton:l,hasIcon:d>0,registerIcon:b}),[l,d,b]);return y(I,{children:[o(S,{className:r}),y(c.Content,j(n({"data-slot":"alert-dialog-content",className:u("fixed left-1/2 top-1/2 z-50 flex w-[calc(100%-2rem)] max-w-[400px] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-lg bg-surface-elevated shadow-level-5 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 motion-reduce:!animate-none",t)},g),{children:[o(k.Provider,{value:T,children:f}),l&&o(c.Cancel,{"data-slot":"alert-dialog-close",asChild:!0,children:o(V,{label:s,className:$})})]}))]})}function Y(e){var a=e,{className:t}=a,r=i(a,["className"]);const l=p(k),s=(l==null?void 0:l.hasCloseButton)&&!l.hasIcon;return o("div",n({"data-slot":"alert-dialog-header",className:u("flex flex-col items-center gap-3 px-8 pt-8 text-center",s&&"px-14","[[data-slot=alert-dialog-content]:has([data-slot=alert-dialog-icon])_&]:pt-0","[&>[data-slot=alert-dialog-title]+[data-slot=alert-dialog-description]]:-mt-1.5",t)},r))}function Z(e){var a=e,{className:t,icon:r}=a,l=i(a,["className","icon"]),s,f;const g=p(N),d=(s=p(k))==null?void 0:s.registerIcon;E(()=>d==null?void 0:d(),[d]);const m=(f=g==null?void 0:g.variant)!=null?f:v;return o("div",j(n({"data-slot":"alert-dialog-icon",className:u(G({variant:m}),t)},l),{children:o("div",{className:H({variant:m}),children:r})}))}function W({className:e,variant:a,children:t}){var r;const l=p(N),s=(r=a!=null?a:l==null?void 0:l.variant)!=null?r:v;return o("div",{"data-slot":"alert-dialog-tag",className:"flex justify-center",children:o(R,{variant:J[s],className:e,children:t})})}function aa(e){var a=e,{className:t}=a,r=i(a,["className"]);return o(c.Title,n({"data-slot":"alert-dialog-title",className:u("text-title-sm font-semibold leading-title-sm text-content-title",t)},r))}function ea(e){var a=e,{className:t}=a,r=i(a,["className"]);return o(c.Description,n({"data-slot":"alert-dialog-description",className:u("text-md leading-md text-content-paragraph",t)},r))}function ta(e){var a=e,{className:t}=a,r=i(a,["className"]);return o("div",n({"data-slot":"alert-dialog-footer",className:u("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 ra=_(function(e,a){var t=e,{className:r,variant:l,size:s="lg",full:f}=t,g=i(t,["className","variant","size","full"]),d;const m=p(N),b=l!=null?l:K[(d=m==null?void 0:m.variant)!=null?d:v];return o(c.Action,n({ref:a,className:u(C({variant:b,size:s,full:f}),"max-[500px]:w-full",r)},g))}),la=_(function(e,a){var t=e,{className:r,variant:l="regular-soft",size:s="lg",full:f}=t,g=i(t,["className","variant","size","full"]);return o(c.Cancel,n({ref:a,className:u(C({variant:l,size:s,full:f}),"max-[500px]:w-full",r)},g))});export{Q as AlertDialog,ra as AlertDialogAction,la as AlertDialogCancel,X as AlertDialogContent,ea as AlertDialogDescription,ta as AlertDialogFooter,Y as AlertDialogHeader,Z as AlertDialogIcon,S as AlertDialogOverlay,I as AlertDialogPortal,W as AlertDialogTag,aa as AlertDialogTitle,U as AlertDialogTrigger};
3
+ import{jsx as o,jsxs as y}from"react/jsx-runtime";import{createContext as w,forwardRef as _,useContext as p,useMemo as D,useState as L,useCallback as B,useLayoutEffect as E}from"react";import{cva as A}from"class-variance-authority";import{AlertDialog as c}from"radix-ui";import{cn as u}from"../lib/utils.mjs";import{buttonVariants as C}from"./Button.mjs";import{Dismiss as V,DISMISS_PANEL_POSITION as $}from"./Dismiss.mjs";import{Tag as R}from"./Tag.mjs";var F=Object.defineProperty,M=Object.defineProperties,q=Object.getOwnPropertyDescriptors,x=Object.getOwnPropertySymbols,O=Object.prototype.hasOwnProperty,P=Object.prototype.propertyIsEnumerable,j=(e,a,t)=>a in e?F(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,n=(e,a)=>{for(var t in a||(a={}))O.call(a,t)&&j(e,t,a[t]);if(x)for(var t of x(a))P.call(a,t)&&j(e,t,a[t]);return e},z=(e,a)=>M(e,q(a)),i=(e,a)=>{var t={};for(var r in e)O.call(e,r)&&a.indexOf(r)<0&&(t[r]=e[r]);if(e!=null&&x)for(var r of x(e))a.indexOf(r)<0&&P.call(e,r)&&(t[r]=e[r]);return t};const v="regular",k=w(null),N=w(null),G=A("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:v}}),H=A("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-feedback-warning-background-fill text-feedback-warning-foreground-onfill",error:"bg-feedback-error-background-fill text-feedback-error-foreground-onfill",success:"bg-feedback-success-background-fill text-feedback-success-foreground-onfill"}},defaultVariants:{variant:v}}),J={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 Q(e){var a=e,{variant:t=v}=a,r=i(a,["variant"]);const l=D(()=>({variant:t}),[t]);return o(N.Provider,{value:l,children:o(c.Root,n({"data-slot":"alert-dialog"},r))})}const U=_(function(e,a){return o(c.Trigger,n({ref:a,"data-slot":"alert-dialog-trigger"},e))});function I(e){var a=i(e,[]);return o(c.Portal,n({"data-slot":"alert-dialog-portal"},a))}function S(e){var a=e,{className:t}=a,r=i(a,["className"]);return o(c.Overlay,n({"data-slot":"alert-dialog-overlay",className:u("fixed inset-0 z-50 bg-backdrop data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 motion-reduce:!animate-none",t)},r))}function X(e){var a=e,{className:t,overlayClassName:r,showCloseButton:l=!1,closeLabel:s="Fechar",children:f}=a,g=i(a,["className","overlayClassName","showCloseButton","closeLabel","children"]);const[d,m]=L(0),b=B(()=>(m(h=>h+1),()=>m(h=>h-1)),[]),T=D(()=>({hasCloseButton:l,hasIcon:d>0,registerIcon:b}),[l,d,b]);return y(I,{children:[o(S,{className:r}),y(c.Content,z(n({"data-slot":"alert-dialog-content",className:u("fixed left-1/2 top-1/2 z-50 flex w-[calc(100%-2rem)] max-w-[400px] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-lg bg-surface-elevated shadow-level-5 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 motion-reduce:!animate-none",t)},g),{children:[o(k.Provider,{value:T,children:f}),l&&o(c.Cancel,{"data-slot":"alert-dialog-close",asChild:!0,children:o(V,{label:s,className:$})})]}))]})}function Y(e){var a=e,{className:t}=a,r=i(a,["className"]);const l=p(k),s=(l==null?void 0:l.hasCloseButton)&&!l.hasIcon;return o("div",n({"data-slot":"alert-dialog-header",className:u("flex flex-col items-center gap-3 px-8 pt-8 text-center",s&&"px-14","[[data-slot=alert-dialog-content]:has([data-slot=alert-dialog-icon])_&]:pt-0","[&>[data-slot=alert-dialog-title]+[data-slot=alert-dialog-description]]:-mt-1.5",t)},r))}function Z(e){var a=e,{className:t,icon:r}=a,l=i(a,["className","icon"]),s,f;const g=p(N),d=(s=p(k))==null?void 0:s.registerIcon;E(()=>d==null?void 0:d(),[d]);const m=(f=g==null?void 0:g.variant)!=null?f:v;return o("div",z(n({"data-slot":"alert-dialog-icon",className:u(G({variant:m}),t)},l),{children:o("div",{className:H({variant:m}),children:r})}))}function W({className:e,variant:a,children:t}){var r;const l=p(N),s=(r=a!=null?a:l==null?void 0:l.variant)!=null?r:v;return o("div",{"data-slot":"alert-dialog-tag",className:"flex justify-center",children:o(R,{variant:J[s],className:e,children:t})})}function aa(e){var a=e,{className:t}=a,r=i(a,["className"]);return o(c.Title,n({"data-slot":"alert-dialog-title",className:u("text-title-sm font-semibold leading-title-sm text-content-title",t)},r))}function ea(e){var a=e,{className:t}=a,r=i(a,["className"]);return o(c.Description,n({"data-slot":"alert-dialog-description",className:u("text-md leading-md text-content-paragraph",t)},r))}function ta(e){var a=e,{className:t}=a,r=i(a,["className"]);return o("div",n({"data-slot":"alert-dialog-footer",className:u("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 ra=_(function(e,a){var t=e,{className:r,variant:l,size:s="lg",full:f}=t,g=i(t,["className","variant","size","full"]),d;const m=p(N),b=l!=null?l:K[(d=m==null?void 0:m.variant)!=null?d:v];return o(c.Action,n({ref:a,className:u(C({variant:b,size:s,full:f}),"max-[500px]:w-full",r)},g))}),la=_(function(e,a){var t=e,{className:r,variant:l="regular-soft",size:s="lg",full:f}=t,g=i(t,["className","variant","size","full"]);return o(c.Cancel,n({ref:a,className:u(C({variant:l,size:s,full:f}),"max-[500px]:w-full",r)},g))});export{Q as AlertDialog,ra as AlertDialogAction,la as AlertDialogCancel,X as AlertDialogContent,ea as AlertDialogDescription,ta as AlertDialogFooter,Y as AlertDialogHeader,Z as AlertDialogIcon,S as AlertDialogOverlay,I as AlertDialogPortal,W as AlertDialogTag,aa as AlertDialogTitle,U as AlertDialogTrigger};
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  "use client";
3
- "use strict";var s=require("react/jsx-runtime"),A=require("@medway-ui/icons"),o=require("react"),H=require("class-variance-authority"),B=require("../hooks/use-id.js"),K=require("../lib/floating-label.js"),p=require("../lib/utils.js"),h=require("./Command.js"),P=require("./Popover.js"),W=require("./Button.js"),Q=Object.defineProperty,U=Object.defineProperties,X=Object.getOwnPropertyDescriptors,y=Object.getOwnPropertySymbols,T=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable,R=(e,r,a)=>r in e?Q(e,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[r]=a,k=(e,r)=>{for(var a in r||(r={}))T.call(r,a)&&R(e,a,r[a]);if(y)for(var a of y(r))_.call(r,a)&&R(e,a,r[a]);return e},Z=(e,r)=>U(e,X(r)),C=(e,r)=>{var a={};for(var t in e)T.call(e,t)&&r.indexOf(t)<0&&(a[t]=e[t]);if(e!=null&&y)for(var t of y(e))r.indexOf(t)<0&&_.call(e,t)&&(a[t]=e[t]);return a};const J={md:20,lg:24},Y={lg:{item:"gap-2.5 px-3.5 py-2.5 text-sm leading-sm",box:"size-5",check:16},md:{item:"gap-2 px-3 py-2 text-xs leading-xs",box:"size-4",check:12}},ee=H.cva("flex w-full items-center justify-between rounded-md border-2 border-gray-stroke-muted bg-surface-card text-left text-gray-foreground outline-none transition-[color,box-shadow] hover:border-gray-stroke hover:ring-4 hover:ring-state-hover focus-visible:border-gray-stroke-emphasis focus-visible:ring-4 focus-visible:ring-state-focus disabled:cursor-default disabled:bg-gray-background-soft-muted disabled:hover:border-gray-stroke-muted disabled:hover:ring-0 aria-[invalid=true]:border-feedback-error-stroke aria-[invalid=true]:hover:ring-state-error aria-[invalid=true]:focus-visible:border-feedback-error-stroke aria-[invalid=true]:focus-visible:ring-state-error [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{size:{lg:"h-12 max-h-12 gap-3 px-3.5 py-2.5 text-md",md:"h-10 max-h-10 gap-2.5 px-3 py-2 text-sm leading-sm"}},defaultVariants:{size:"lg"}}),b=o.createContext({invalid:!1,disabled:!1,size:"lg",open:!1,setOpen:()=>{},values:[],toggleValue:()=>{},onCancelSelection:()=>{},listId:""});function re({children:e,invalid:r=!1,disabled:a=!1,size:t="lg",values:l,onValuesChange:n,open:c,onOpenChange:d,defaultValues:i=[]}){const[g,x]=o.useState(i),[j,N]=o.useState(!1),u=l!==void 0,O=c!==void 0,m=u?l:g,f=O?c:j,[w,F]=o.useState(m),[G,M]=o.useState(f);f!==G&&(M(f),f&&F(m));const q=o.useCallback(v=>{const L=m.includes(v)?m.filter($=>$!==v):[...m,v];u||x(L),n==null||n(L)},[m,u,n]),z=o.useCallback(v=>{a||(O||N(v),d==null||d(v))},[a,O,d]),V=o.useCallback(()=>{u||x(w),n==null||n(w)},[u,w,n]),E=B.useId(),D=o.useMemo(()=>({invalid:r,disabled:a,size:t,open:f,setOpen:z,values:m,toggleValue:q,onCancelSelection:V,listId:E}),[r,a,t,f,z,m,q,V,E]);return s.jsx(b.Provider,{value:D,children:s.jsx(P.Popover,{open:f,onOpenChange:z,children:e})})}function ae(e){var r=e,{className:a}=r,t=C(r,["className"]);return s.jsx("div",k({className:p.cn(K.FLOATING_LABEL_WRAPPER,a),"data-slot":"autocomplete-wrapper"},t))}function te(e){var r=e,{className:a,placeholder:t="Selecione uma op\xE7\xE3o",children:l}=r,n=C(r,["className","placeholder","children"]);const{invalid:c,disabled:d,size:i,open:g,values:x,listId:j}=o.useContext(b),N=B.useId(),u=x.length>0;return s.jsx(P.PopoverTrigger,{asChild:!0,children:s.jsxs("button",Z(k({"aria-controls":j,"aria-expanded":g,"aria-invalid":c||void 0,className:p.cn(ee({size:i}),u&&!c&&"border-gray-stroke-emphasis hover:border-gray-stroke-emphasis",a),"data-slot":"autocomplete-trigger","data-size":i,"data-placeholder":u?void 0:"",disabled:d,id:N,role:"combobox",type:"button"},n),{children:[s.jsx("span",{className:p.cn("min-w-0 truncate",l!=null?"text-gray-foreground-emphasis":d?"text-gray-foreground-muted":"text-gray-foreground-placeholder"),children:l!=null?l:t}),s.jsx(A.ChevronDown,{"aria-hidden":"true",className:"shrink-0 text-gray-foreground",size:J[i],strokeWidth:1.6})]}))})}function I({className:e,cancelLabel:r="Cancelar",confirmLabel:a="Concluir",onCancel:t,onConfirm:l}){const{setOpen:n,onCancelSelection:c,values:d}=o.useContext(b);return s.jsxs("div",{className:p.cn("flex items-center justify-between border-t border-gray-stroke-muted px-4 py-3",e),"data-slot":"autocomplete-content-footer",children:[s.jsx(W.Button,{size:"sm",variant:"regular-soft",onClick:()=>{c(),t==null||t(),n(!1)},children:r}),s.jsx(W.Button,{size:"sm",variant:"emphasis",iconLeft:s.jsx(A.Check,{strokeWidth:2.6}),onClick:()=>{l==null||l(d),n(!1)},children:a})]})}function S(e){return typeof e=="string"||typeof e=="number"?String(e):Array.isArray(e)?e.map(S).join(""):o.isValidElement(e)?S(e.props.children):""}function se({children:e,className:r,searchPlaceholder:a="Buscar...",emptyMessage:t="Nenhum resultado encontrado"}){const{listId:l}=o.useContext(b),n=o.Children.toArray(e),c=n.filter(i=>o.isValidElement(i)&&i.type===I),d=n.filter(i=>!(o.isValidElement(i)&&i.type===I));return s.jsxs(P.PopoverContent,{id:l,align:"start",className:p.cn("w-full min-w-[var(--radix-popper-anchor-width)] bg-surface-elevated p-0",r),children:[s.jsxs(h.Command,{className:"bg-surface-elevated",children:[s.jsx(h.CommandInput,{placeholder:a}),s.jsxs(h.CommandList,{children:[s.jsx(h.CommandEmpty,{children:t}),d]})]}),c]})}function oe({children:e,value:r,name:a,className:t,disabled:l=!1}){const{values:n,toggleValue:c,size:d}=o.useContext(b),i=Y[d],g=n.includes(r);return s.jsxs(h.CommandItem,{className:p.cn("relative flex w-full cursor-default select-none items-center rounded-md font-medium text-gray-foreground outline-none hover:cursor-pointer hover:bg-primary-background-soft-muted hover:text-gray-foreground-emphasis data-[selected=true]:bg-primary-background-soft-muted data-[selected=true]:text-gray-foreground-emphasis",i.item,t),disabled:l,"aria-checked":g,onSelect:()=>{c(r)},value:r,keywords:[a!=null?a:S(e)].filter(Boolean),children:[s.jsx("span",{"aria-hidden":"true",className:p.cn("inline-flex shrink-0 items-center justify-center rounded-sm border-2 transition-colors",i.box,g?"border-primary-background-fill bg-primary-background-fill":"border-gray-stroke-muted bg-surface-card"),children:g&&s.jsx(A.Check,{size:i.check,strokeWidth:2.6,className:"text-primary-foreground-onfill"})}),e]})}function ne(e){var r=e,{className:a}=r,t=C(r,["className"]);return s.jsx(h.CommandGroup,k({className:a},t))}function le(e){var r=e,{className:a}=r,t=C(r,["className"]);const{invalid:l}=o.useContext(b);return s.jsx("span",k({className:p.cn("-mt-1 text-xs",l?"text-feedback-error-foreground":"text-gray-foreground",a),"data-slot":"autocomplete-text"},t))}exports.Autocomplete=re,exports.AutocompleteContent=se,exports.AutocompleteContentFooter=I,exports.AutocompleteGroup=ne,exports.AutocompleteItem=oe,exports.AutocompleteText=le,exports.AutocompleteTrigger=te,exports.AutocompleteWrapper=ae;
3
+ "use strict";var s=require("react/jsx-runtime"),A=require("@medway-ui/icons"),o=require("react"),H=require("class-variance-authority"),B=require("../hooks/use-id.js"),K=require("../lib/floating-label.js"),p=require("../lib/utils.js"),h=require("./Command.js"),P=require("./Popover.js"),W=require("./Button.js"),Q=Object.defineProperty,U=Object.defineProperties,X=Object.getOwnPropertyDescriptors,y=Object.getOwnPropertySymbols,T=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable,R=(e,r,a)=>r in e?Q(e,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[r]=a,k=(e,r)=>{for(var a in r||(r={}))T.call(r,a)&&R(e,a,r[a]);if(y)for(var a of y(r))_.call(r,a)&&R(e,a,r[a]);return e},Z=(e,r)=>U(e,X(r)),C=(e,r)=>{var a={};for(var t in e)T.call(e,t)&&r.indexOf(t)<0&&(a[t]=e[t]);if(e!=null&&y)for(var t of y(e))r.indexOf(t)<0&&_.call(e,t)&&(a[t]=e[t]);return a};const J={md:20,lg:24},Y={lg:{item:"gap-2.5 px-3.5 py-2.5 text-sm leading-sm",box:"size-5",check:16},md:{item:"gap-2 px-3 py-2 text-xs leading-xs",box:"size-4",check:12}},ee=H.cva("flex w-full items-center justify-between rounded-md border-2 border-gray-stroke-muted bg-surface-card text-left text-gray-foreground outline-none transition-[color,box-shadow] hover:border-gray-stroke hover:ring-4 hover:ring-state-hover focus-visible:border-gray-stroke-emphasis focus-visible:ring-4 focus-visible:ring-state-focus disabled:cursor-default disabled:bg-gray-background-soft-muted disabled:hover:border-gray-stroke-muted disabled:hover:ring-0 aria-[invalid=true]:border-feedback-error-stroke aria-[invalid=true]:hover:ring-state-error aria-[invalid=true]:focus-visible:border-feedback-error-stroke aria-[invalid=true]:focus-visible:ring-state-error [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{size:{lg:"h-12 max-h-12 gap-3 px-3.5 py-2.5 text-md",md:"h-10 max-h-10 gap-2.5 px-3 py-2 text-sm leading-sm"}},defaultVariants:{size:"lg"}}),b=o.createContext({invalid:!1,disabled:!1,size:"lg",open:!1,setOpen:()=>{},values:[],toggleValue:()=>{},onCancelSelection:()=>{},listId:""});function re({children:e,invalid:r=!1,disabled:a=!1,size:t="lg",values:l,onValuesChange:n,open:c,onOpenChange:d,defaultValues:i=[]}){const[g,x]=o.useState(i),[j,N]=o.useState(!1),u=l!==void 0,O=c!==void 0,m=u?l:g,f=O?c:j,[w,F]=o.useState(m),[G,M]=o.useState(f);f!==G&&(M(f),f&&F(m));const q=o.useCallback(v=>{const L=m.includes(v)?m.filter($=>$!==v):[...m,v];u||x(L),n==null||n(L)},[m,u,n]),z=o.useCallback(v=>{a||(O||N(v),d==null||d(v))},[a,O,d]),V=o.useCallback(()=>{u||x(w),n==null||n(w)},[u,w,n]),E=B.useId(),D=o.useMemo(()=>({invalid:r,disabled:a,size:t,open:f,setOpen:z,values:m,toggleValue:q,onCancelSelection:V,listId:E}),[r,a,t,f,z,m,q,V,E]);return s.jsx(b.Provider,{value:D,children:s.jsx(P.Popover,{open:f,onOpenChange:z,children:e})})}function ae(e){var r=e,{className:a}=r,t=C(r,["className"]);return s.jsx("div",k({className:p.cn(K.FLOATING_LABEL_WRAPPER,a),"data-slot":"autocomplete-wrapper"},t))}function te(e){var r=e,{className:a,placeholder:t="Selecione uma op\xE7\xE3o",children:l}=r,n=C(r,["className","placeholder","children"]);const{invalid:c,disabled:d,size:i,open:g,values:x,listId:j}=o.useContext(b),N=B.useId(),u=x.length>0;return s.jsx(P.PopoverTrigger,{asChild:!0,children:s.jsxs("button",Z(k({"aria-controls":j,"aria-expanded":g,"aria-invalid":c||void 0,className:p.cn(ee({size:i}),u&&!c&&"border-gray-stroke-emphasis hover:border-gray-stroke-emphasis",a),"data-slot":"autocomplete-trigger","data-size":i,"data-placeholder":u?void 0:"",disabled:d,id:N,role:"combobox",type:"button"},n),{children:[s.jsx("span",{className:p.cn("min-w-0 truncate",l!=null?"text-gray-foreground-emphasis":d?"text-gray-foreground-muted":"text-gray-foreground-placeholder"),children:l!=null?l:t}),s.jsx(A.ChevronDown,{"aria-hidden":"true",className:"shrink-0 text-gray-foreground",size:J[i],strokeWidth:1.6})]}))})}function I({className:e,cancelLabel:r="Cancelar",confirmLabel:a="Concluir",onCancel:t,onConfirm:l}){const{setOpen:n,onCancelSelection:c,values:d}=o.useContext(b);return s.jsxs("div",{className:p.cn("flex items-center justify-between border-t border-gray-stroke-muted px-4 py-3",e),"data-slot":"autocomplete-content-footer",children:[s.jsx(W.Button,{size:"sm",variant:"regular-soft",onClick:()=>{c(),t==null||t(),n(!1)},children:r}),s.jsx(W.Button,{size:"sm",variant:"emphasis",iconLeft:s.jsx(A.Check,{strokeWidth:2.6}),onClick:()=>{l==null||l(d),n(!1)},children:a})]})}function S(e){return typeof e=="string"||typeof e=="number"?String(e):Array.isArray(e)?e.map(S).join(""):o.isValidElement(e)?S(e.props.children):""}function se({children:e,className:r,searchPlaceholder:a="Buscar...",emptyMessage:t="Nenhum resultado encontrado"}){const{listId:l}=o.useContext(b),n=o.Children.toArray(e),c=n.filter(i=>o.isValidElement(i)&&i.type===I),d=n.filter(i=>!(o.isValidElement(i)&&i.type===I));return s.jsxs(P.PopoverContent,{id:l,align:"start",sideOffset:4,className:p.cn("w-full min-w-[var(--radix-popper-anchor-width)] border border-gray-stroke-muted bg-surface-elevated p-0",r),children:[s.jsxs(h.Command,{className:"bg-surface-elevated",children:[s.jsx(h.CommandInput,{placeholder:a}),s.jsxs(h.CommandList,{children:[s.jsx(h.CommandEmpty,{children:t}),d]})]}),c]})}function oe({children:e,value:r,name:a,className:t,disabled:l=!1}){const{values:n,toggleValue:c,size:d}=o.useContext(b),i=Y[d],g=n.includes(r);return s.jsxs(h.CommandItem,{className:p.cn("relative flex w-full cursor-default select-none items-center rounded-md font-medium text-gray-foreground outline-none hover:cursor-pointer hover:bg-primary-background-soft-muted hover:text-gray-foreground-emphasis data-[selected=true]:bg-primary-background-soft-muted data-[selected=true]:text-gray-foreground-emphasis",i.item,t),disabled:l,"aria-checked":g,onSelect:()=>{c(r)},value:r,keywords:[a!=null?a:S(e)].filter(Boolean),children:[s.jsx("span",{"aria-hidden":"true",className:p.cn("inline-flex shrink-0 items-center justify-center rounded-sm border-2 transition-colors",i.box,g?"border-primary-background-fill bg-primary-background-fill":"border-gray-stroke-muted bg-surface-card"),children:g&&s.jsx(A.Check,{size:i.check,strokeWidth:2.6,className:"text-primary-foreground-onfill"})}),e]})}function ne(e){var r=e,{className:a}=r,t=C(r,["className"]);return s.jsx(h.CommandGroup,k({className:a},t))}function le(e){var r=e,{className:a}=r,t=C(r,["className"]);const{invalid:l}=o.useContext(b);return s.jsx("span",k({className:p.cn("-mt-1 text-xs",l?"text-feedback-error-foreground":"text-gray-foreground",a),"data-slot":"autocomplete-text"},t))}exports.Autocomplete=re,exports.AutocompleteContent=se,exports.AutocompleteContentFooter=I,exports.AutocompleteGroup=ne,exports.AutocompleteItem=oe,exports.AutocompleteText=le,exports.AutocompleteTrigger=te,exports.AutocompleteWrapper=ae;
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  "use client";
3
- import{jsx as l,jsxs as h}from"react/jsx-runtime";import{Check as R,ChevronDown as Q}from"@medway-ui/icons";import{createContext as U,useState as y,useCallback as j,useMemo as X,useContext as b,Children as Z,isValidElement as I}from"react";import{cva as J}from"class-variance-authority";import{useId as T}from"../hooks/use-id.mjs";import{FLOATING_LABEL_WRAPPER as Y}from"../lib/floating-label.mjs";import{cn as m}from"../lib/utils.mjs";import{Command as ee,CommandInput as re,CommandList as ae,CommandEmpty as te,CommandGroup as oe,CommandItem as se}from"./Command.mjs";import{Popover as ne,PopoverContent as le,PopoverTrigger as ie}from"./Popover.mjs";import{Button as _}from"./Button.mjs";var de=Object.defineProperty,ce=Object.defineProperties,ue=Object.getOwnPropertyDescriptors,k=Object.getOwnPropertySymbols,G=Object.prototype.hasOwnProperty,$=Object.prototype.propertyIsEnumerable,F=(e,r,a)=>r in e?de(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)&&F(e,a,r[a]);if(k)for(var a of k(r))$.call(r,a)&&F(e,a,r[a]);return e},me=(e,r)=>ce(e,ue(r)),N=(e,r)=>{var a={};for(var t in e)G.call(e,t)&&r.indexOf(t)<0&&(a[t]=e[t]);if(e!=null&&k)for(var t of k(e))r.indexOf(t)<0&&$.call(e,t)&&(a[t]=e[t]);return a};const pe={md:20,lg:24},fe={lg:{item:"gap-2.5 px-3.5 py-2.5 text-sm leading-sm",box:"size-5",check:16},md:{item:"gap-2 px-3 py-2 text-xs leading-xs",box:"size-4",check:12}},ge=J("flex w-full items-center justify-between rounded-md border-2 border-gray-stroke-muted bg-surface-card text-left text-gray-foreground outline-none transition-[color,box-shadow] hover:border-gray-stroke hover:ring-4 hover:ring-state-hover focus-visible:border-gray-stroke-emphasis focus-visible:ring-4 focus-visible:ring-state-focus disabled:cursor-default disabled:bg-gray-background-soft-muted disabled:hover:border-gray-stroke-muted disabled:hover:ring-0 aria-[invalid=true]:border-feedback-error-stroke aria-[invalid=true]:hover:ring-state-error aria-[invalid=true]:focus-visible:border-feedback-error-stroke aria-[invalid=true]:focus-visible:ring-state-error [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{size:{lg:"h-12 max-h-12 gap-3 px-3.5 py-2.5 text-md",md:"h-10 max-h-10 gap-2.5 px-3 py-2 text-sm leading-sm"}},defaultVariants:{size:"lg"}}),v=U({invalid:!1,disabled:!1,size:"lg",open:!1,setOpen:()=>{},values:[],toggleValue:()=>{},onCancelSelection:()=>{},listId:""});function he({children:e,invalid:r=!1,disabled:a=!1,size:t="lg",values:s,onValuesChange:o,open:d,onOpenChange:i,defaultValues:n=[]}){const[p,x]=y(n),[w,O]=y(!1),c=s!==void 0,z=d!==void 0,u=c?s:p,f=z?d:w,[A,M]=y(u),[D,q]=y(f);f!==D&&(q(f),f&&M(u));const V=j(g=>{const B=u.includes(g)?u.filter(K=>K!==g):[...u,g];c||x(B),o==null||o(B)},[u,c,o]),P=j(g=>{a||(z||O(g),i==null||i(g))},[a,z,i]),L=j(()=>{c||x(A),o==null||o(A)},[c,A,o]),W=T(),H=X(()=>({invalid:r,disabled:a,size:t,open:f,setOpen:P,values:u,toggleValue:V,onCancelSelection:L,listId:W}),[r,a,t,f,P,u,V,L,W]);return l(v.Provider,{value:H,children:l(ne,{open:f,onOpenChange:P,children:e})})}function ve(e){var r=e,{className:a}=r,t=N(r,["className"]);return l("div",C({className:m(Y,a),"data-slot":"autocomplete-wrapper"},t))}function be(e){var r=e,{className:a,placeholder:t="Selecione uma op\xE7\xE3o",children:s}=r,o=N(r,["className","placeholder","children"]);const{invalid:d,disabled:i,size:n,open:p,values:x,listId:w}=b(v),O=T(),c=x.length>0;return l(ie,{asChild:!0,children:h("button",me(C({"aria-controls":w,"aria-expanded":p,"aria-invalid":d||void 0,className:m(ge({size:n}),c&&!d&&"border-gray-stroke-emphasis hover:border-gray-stroke-emphasis",a),"data-slot":"autocomplete-trigger","data-size":n,"data-placeholder":c?void 0:"",disabled:i,id:O,role:"combobox",type:"button"},o),{children:[l("span",{className:m("min-w-0 truncate",s!=null?"text-gray-foreground-emphasis":i?"text-gray-foreground-muted":"text-gray-foreground-placeholder"),children:s!=null?s:t}),l(Q,{"aria-hidden":"true",className:"shrink-0 text-gray-foreground",size:pe[n],strokeWidth:1.6})]}))})}function S({className:e,cancelLabel:r="Cancelar",confirmLabel:a="Concluir",onCancel:t,onConfirm:s}){const{setOpen:o,onCancelSelection:d,values:i}=b(v);return h("div",{className:m("flex items-center justify-between border-t border-gray-stroke-muted px-4 py-3",e),"data-slot":"autocomplete-content-footer",children:[l(_,{size:"sm",variant:"regular-soft",onClick:()=>{d(),t==null||t(),o(!1)},children:r}),l(_,{size:"sm",variant:"emphasis",iconLeft:l(R,{strokeWidth:2.6}),onClick:()=>{s==null||s(i),o(!1)},children:a})]})}function E(e){return typeof e=="string"||typeof e=="number"?String(e):Array.isArray(e)?e.map(E).join(""):I(e)?E(e.props.children):""}function xe({children:e,className:r,searchPlaceholder:a="Buscar...",emptyMessage:t="Nenhum resultado encontrado"}){const{listId:s}=b(v),o=Z.toArray(e),d=o.filter(n=>I(n)&&n.type===S),i=o.filter(n=>!(I(n)&&n.type===S));return h(le,{id:s,align:"start",className:m("w-full min-w-[var(--radix-popper-anchor-width)] bg-surface-elevated p-0",r),children:[h(ee,{className:"bg-surface-elevated",children:[l(re,{placeholder:a}),h(ae,{children:[l(te,{children:t}),i]})]}),d]})}function ye({children:e,value:r,name:a,className:t,disabled:s=!1}){const{values:o,toggleValue:d,size:i}=b(v),n=fe[i],p=o.includes(r);return h(se,{className:m("relative flex w-full cursor-default select-none items-center rounded-md font-medium text-gray-foreground outline-none hover:cursor-pointer hover:bg-primary-background-soft-muted hover:text-gray-foreground-emphasis data-[selected=true]:bg-primary-background-soft-muted data-[selected=true]:text-gray-foreground-emphasis",n.item,t),disabled:s,"aria-checked":p,onSelect:()=>{d(r)},value:r,keywords:[a!=null?a:E(e)].filter(Boolean),children:[l("span",{"aria-hidden":"true",className:m("inline-flex shrink-0 items-center justify-center rounded-sm border-2 transition-colors",n.box,p?"border-primary-background-fill bg-primary-background-fill":"border-gray-stroke-muted bg-surface-card"),children:p&&l(R,{size:n.check,strokeWidth:2.6,className:"text-primary-foreground-onfill"})}),e]})}function ke(e){var r=e,{className:a}=r,t=N(r,["className"]);return l(oe,C({className:a},t))}function Ce(e){var r=e,{className:a}=r,t=N(r,["className"]);const{invalid:s}=b(v);return l("span",C({className:m("-mt-1 text-xs",s?"text-feedback-error-foreground":"text-gray-foreground",a),"data-slot":"autocomplete-text"},t))}export{he as Autocomplete,xe as AutocompleteContent,S as AutocompleteContentFooter,ke as AutocompleteGroup,ye as AutocompleteItem,Ce as AutocompleteText,be as AutocompleteTrigger,ve as AutocompleteWrapper};
3
+ import{jsx as l,jsxs as h}from"react/jsx-runtime";import{Check as T,ChevronDown as Q}from"@medway-ui/icons";import{createContext as U,useState as x,useCallback as j,useMemo as X,useContext as v,Children as Z,isValidElement as E}from"react";import{cva as J}from"class-variance-authority";import{useId as _}from"../hooks/use-id.mjs";import{FLOATING_LABEL_WRAPPER as Y}from"../lib/floating-label.mjs";import{cn as m}from"../lib/utils.mjs";import{Command as ee,CommandInput as re,CommandList as ae,CommandEmpty as te,CommandGroup as oe,CommandItem as se}from"./Command.mjs";import{Popover as ne,PopoverContent as le,PopoverTrigger as ie}from"./Popover.mjs";import{Button as $}from"./Button.mjs";var de=Object.defineProperty,ce=Object.defineProperties,ue=Object.getOwnPropertyDescriptors,k=Object.getOwnPropertySymbols,G=Object.prototype.hasOwnProperty,R=Object.prototype.propertyIsEnumerable,F=(e,r,a)=>r in e?de(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)&&F(e,a,r[a]);if(k)for(var a of k(r))R.call(r,a)&&F(e,a,r[a]);return e},me=(e,r)=>ce(e,ue(r)),N=(e,r)=>{var a={};for(var t in e)G.call(e,t)&&r.indexOf(t)<0&&(a[t]=e[t]);if(e!=null&&k)for(var t of k(e))r.indexOf(t)<0&&R.call(e,t)&&(a[t]=e[t]);return a};const pe={md:20,lg:24},fe={lg:{item:"gap-2.5 px-3.5 py-2.5 text-sm leading-sm",box:"size-5",check:16},md:{item:"gap-2 px-3 py-2 text-xs leading-xs",box:"size-4",check:12}},ge=J("flex w-full items-center justify-between rounded-md border-2 border-gray-stroke-muted bg-surface-card text-left text-gray-foreground outline-none transition-[color,box-shadow] hover:border-gray-stroke hover:ring-4 hover:ring-state-hover focus-visible:border-gray-stroke-emphasis focus-visible:ring-4 focus-visible:ring-state-focus disabled:cursor-default disabled:bg-gray-background-soft-muted disabled:hover:border-gray-stroke-muted disabled:hover:ring-0 aria-[invalid=true]:border-feedback-error-stroke aria-[invalid=true]:hover:ring-state-error aria-[invalid=true]:focus-visible:border-feedback-error-stroke aria-[invalid=true]:focus-visible:ring-state-error [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{size:{lg:"h-12 max-h-12 gap-3 px-3.5 py-2.5 text-md",md:"h-10 max-h-10 gap-2.5 px-3 py-2 text-sm leading-sm"}},defaultVariants:{size:"lg"}}),b=U({invalid:!1,disabled:!1,size:"lg",open:!1,setOpen:()=>{},values:[],toggleValue:()=>{},onCancelSelection:()=>{},listId:""});function he({children:e,invalid:r=!1,disabled:a=!1,size:t="lg",values:s,onValuesChange:o,open:d,onOpenChange:i,defaultValues:n=[]}){const[p,y]=x(n),[O,w]=x(!1),c=s!==void 0,z=d!==void 0,u=c?s:p,f=z?d:O,[A,M]=x(u),[D,q]=x(f);f!==D&&(q(f),f&&M(u));const V=j(g=>{const B=u.includes(g)?u.filter(K=>K!==g):[...u,g];c||y(B),o==null||o(B)},[u,c,o]),P=j(g=>{a||(z||w(g),i==null||i(g))},[a,z,i]),L=j(()=>{c||y(A),o==null||o(A)},[c,A,o]),W=_(),H=X(()=>({invalid:r,disabled:a,size:t,open:f,setOpen:P,values:u,toggleValue:V,onCancelSelection:L,listId:W}),[r,a,t,f,P,u,V,L,W]);return l(b.Provider,{value:H,children:l(ne,{open:f,onOpenChange:P,children:e})})}function be(e){var r=e,{className:a}=r,t=N(r,["className"]);return l("div",C({className:m(Y,a),"data-slot":"autocomplete-wrapper"},t))}function ve(e){var r=e,{className:a,placeholder:t="Selecione uma op\xE7\xE3o",children:s}=r,o=N(r,["className","placeholder","children"]);const{invalid:d,disabled:i,size:n,open:p,values:y,listId:O}=v(b),w=_(),c=y.length>0;return l(ie,{asChild:!0,children:h("button",me(C({"aria-controls":O,"aria-expanded":p,"aria-invalid":d||void 0,className:m(ge({size:n}),c&&!d&&"border-gray-stroke-emphasis hover:border-gray-stroke-emphasis",a),"data-slot":"autocomplete-trigger","data-size":n,"data-placeholder":c?void 0:"",disabled:i,id:w,role:"combobox",type:"button"},o),{children:[l("span",{className:m("min-w-0 truncate",s!=null?"text-gray-foreground-emphasis":i?"text-gray-foreground-muted":"text-gray-foreground-placeholder"),children:s!=null?s:t}),l(Q,{"aria-hidden":"true",className:"shrink-0 text-gray-foreground",size:pe[n],strokeWidth:1.6})]}))})}function I({className:e,cancelLabel:r="Cancelar",confirmLabel:a="Concluir",onCancel:t,onConfirm:s}){const{setOpen:o,onCancelSelection:d,values:i}=v(b);return h("div",{className:m("flex items-center justify-between border-t border-gray-stroke-muted px-4 py-3",e),"data-slot":"autocomplete-content-footer",children:[l($,{size:"sm",variant:"regular-soft",onClick:()=>{d(),t==null||t(),o(!1)},children:r}),l($,{size:"sm",variant:"emphasis",iconLeft:l(T,{strokeWidth:2.6}),onClick:()=>{s==null||s(i),o(!1)},children:a})]})}function S(e){return typeof e=="string"||typeof e=="number"?String(e):Array.isArray(e)?e.map(S).join(""):E(e)?S(e.props.children):""}function ye({children:e,className:r,searchPlaceholder:a="Buscar...",emptyMessage:t="Nenhum resultado encontrado"}){const{listId:s}=v(b),o=Z.toArray(e),d=o.filter(n=>E(n)&&n.type===I),i=o.filter(n=>!(E(n)&&n.type===I));return h(le,{id:s,align:"start",sideOffset:4,className:m("w-full min-w-[var(--radix-popper-anchor-width)] border border-gray-stroke-muted bg-surface-elevated p-0",r),children:[h(ee,{className:"bg-surface-elevated",children:[l(re,{placeholder:a}),h(ae,{children:[l(te,{children:t}),i]})]}),d]})}function xe({children:e,value:r,name:a,className:t,disabled:s=!1}){const{values:o,toggleValue:d,size:i}=v(b),n=fe[i],p=o.includes(r);return h(se,{className:m("relative flex w-full cursor-default select-none items-center rounded-md font-medium text-gray-foreground outline-none hover:cursor-pointer hover:bg-primary-background-soft-muted hover:text-gray-foreground-emphasis data-[selected=true]:bg-primary-background-soft-muted data-[selected=true]:text-gray-foreground-emphasis",n.item,t),disabled:s,"aria-checked":p,onSelect:()=>{d(r)},value:r,keywords:[a!=null?a:S(e)].filter(Boolean),children:[l("span",{"aria-hidden":"true",className:m("inline-flex shrink-0 items-center justify-center rounded-sm border-2 transition-colors",n.box,p?"border-primary-background-fill bg-primary-background-fill":"border-gray-stroke-muted bg-surface-card"),children:p&&l(T,{size:n.check,strokeWidth:2.6,className:"text-primary-foreground-onfill"})}),e]})}function ke(e){var r=e,{className:a}=r,t=N(r,["className"]);return l(oe,C({className:a},t))}function Ce(e){var r=e,{className:a}=r,t=N(r,["className"]);const{invalid:s}=v(b);return l("span",C({className:m("-mt-1 text-xs",s?"text-feedback-error-foreground":"text-gray-foreground",a),"data-slot":"autocomplete-text"},t))}export{he as Autocomplete,ye as AutocompleteContent,I as AutocompleteContentFooter,ke as AutocompleteGroup,xe as AutocompleteItem,Ce as AutocompleteText,ve as AutocompleteTrigger,be as AutocompleteWrapper};
@@ -1,3 +1,3 @@
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 T=Object.defineProperty,W=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)=>W(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-lg 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,label:s,"aria-hidden":s===""||void 0}),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 U(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,U 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};
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 $}from"./Button.mjs";import{FallbackImage as B}from"./FallbackImage.mjs";import{Tag as h}from"./Tag.mjs";import{cn as l}from"../lib/utils.mjs";import{Lock as V,Check as F}from"@medway-ui/icons";var T=Object.defineProperty,W=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)=>W(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-lg 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(B,{className:b,label:s,"aria-hidden":s===""||void 0}),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 U(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(V,{}),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($,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,U 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};
@@ -1,3 +1,3 @@
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 O,useMemo as j,useContext as P}from"react";import{Button as D}from"./Button.mjs";import{Progress as E}from"./Progress.mjs";import{Separator as S}from"./Separator.mjs";import{cn as d,clampPercentage as z}from"../lib/utils.mjs";import{ArrowRightMd as L,Lock as V}from"@medway-ui/icons";import{Tag as I}from"./Tag.mjs";var A=Object.defineProperty,B=Object.defineProperties,F=Object.getOwnPropertyDescriptors,f=Object.getOwnPropertySymbols,y=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable,w=(e,a,r)=>a in e?A(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)=>B(e,F(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 C=N("relative z-0 flex flex-col gap-4 overflow-hidden rounded-lg 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"),M=O(null);function p(){var e;return(e=P(M))!=null?e:{}}function T(e){var a=e,{className:r,variant:t,availableDate:s,showStack:n=!0,children:l}=a,g=m(a,["className","variant","availableDate","showStack","children"]);const b=j(()=>({variant:t,availableDate:s}),[t,s]),x=d("pointer-events-none absolute bottom-0 z-0 max-h-[20%] rounded-lg 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(C({variant:t}),r)},g),{children:l}));return o(M.Provider,{value:b,children:n?i("div",{"data-slot":"card-module-stack",className:"relative pt-[17px]",children:[o("div",{"aria-hidden":!0,className:d(x,"inset-x-[34px] top-0")}),o("div",{"aria-hidden":!0,className:d(x,"inset-x-4 top-2")}),h]}):h})}function $(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 q(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 G(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 leading-lg",s==="blocked"?"text-primary-foreground-muted":"text-primary-foreground",r)},t))}function H(e){var a=e,{className:r,progress:t}=a,s=m(a,["className","progress"]);const{variant:n}=p(),l=typeof t=="number"&&Number.isFinite(t)?z(t):0,g=Math.round(l),b=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:[g,"%"]})," ","de progresso"]});return i("div",u(c({"data-slot":"card-module-progress",className:d("flex flex-col gap-2",r)},s),{children:[b,n!=="blocked"&&o(E,{"aria-hidden":"true",value:l,indicatorClassName:l===100?"bg-secondary-stroke-emphasis":"bg-primary-stroke"})]}))}function J(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(S,{}),i("div",{className:"flex items-center justify-between",children:[i(I,{variant:"gray-soft",icon:o(V,{}),children:["Dispon\xEDvel em ",l]}),t]})]}))}function K(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{T as CardModule,Q as CardModuleAction,K as CardModuleButton,J as CardModuleFooter,$ as CardModuleHeader,q as CardModuleLabel,H as CardModuleProgress,G as CardModuleTitle,v as cardModuleStatusVariants,C 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 O,useMemo as j,useContext as P}from"react";import{Button as D}from"./Button.mjs";import{Progress as S}from"./Progress.mjs";import{Separator as E}from"./Separator.mjs";import{cn as d,clampPercentage as L}from"../lib/utils.mjs";import{ArrowRightMd as V,Lock as z}from"@medway-ui/icons";import{Tag as I}from"./Tag.mjs";var A=Object.defineProperty,B=Object.defineProperties,F=Object.getOwnPropertyDescriptors,f=Object.getOwnPropertySymbols,y=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable,w=(e,a,r)=>a in e?A(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)=>B(e,F(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 C=N("relative z-0 flex flex-col gap-4 overflow-hidden rounded-lg 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"),M=O(null);function p(){var e;return(e=P(M))!=null?e:{}}function T(e){var a=e,{className:r,variant:t,availableDate:s,showStack:n=!0,children:l}=a,g=m(a,["className","variant","availableDate","showStack","children"]);const b=j(()=>({variant:t,availableDate:s}),[t,s]),x=d("pointer-events-none absolute bottom-0 z-0 max-h-[20%] rounded-lg 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(C({variant:t}),r)},g),{children:l}));return o(M.Provider,{value:b,children:n?i("div",{"data-slot":"card-module-stack",className:"relative pt-[17px]",children:[o("div",{"aria-hidden":!0,className:d(x,"inset-x-[34px] top-0")}),o("div",{"aria-hidden":!0,className:d(x,"inset-x-4 top-2")}),h]}):h})}function $(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 q(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 G(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 leading-lg",s==="blocked"?"text-primary-foreground-muted":"text-primary-foreground",r)},t))}function H(e){var a=e,{className:r,progress:t}=a,s=m(a,["className","progress"]);const{variant:n}=p(),l=typeof t=="number"&&Number.isFinite(t)?L(t):0,g=Math.round(l),b=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:[g,"%"]})," ","de progresso"]});return i("div",u(c({"data-slot":"card-module-progress",className:d("flex flex-col gap-2",r)},s),{children:[b,n!=="blocked"&&o(S,{"aria-hidden":"true",value:l,indicatorClassName:l===100?"bg-secondary-stroke-emphasis":"bg-primary-stroke"})]}))}function J(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(E,{}),i("div",{className:"flex items-center justify-between",children:[i(I,{variant:"gray-soft",icon:o(z,{}),children:["Dispon\xEDvel em ",l]}),t]})]}))}function K(e){var a=e,{className:r}=a,t=m(a,["className"]);return o(D,c({"data-slot":"card-module-button",size:"sm",iconLeft:o(V,{}),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{T as CardModule,Q as CardModuleAction,K as CardModuleButton,J as CardModuleFooter,$ as CardModuleHeader,q as CardModuleLabel,H as CardModuleProgress,G as CardModuleTitle,v as cardModuleStatusVariants,C as cardModuleVariants};
@@ -1,3 +1,3 @@
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 z}from"./Collapsible.mjs";import{Progress as E}from"./Progress.mjs";import{Tag as I}from"./Tag.mjs";import{cn as i,clampPercentage as $}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,l=(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-lg 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:s}=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(l({"data-slot":"card-topic",animation:"accordion",className:i(N({variant:t}),e)},d),{children:s}))})}function K(a){var r=a,{className:e,children:t}=r,n=c(r,["className","children"]);const{variant:s}=p(),d=s==="blocked";return o(z,m(l({"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",l({"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:s}=p();return o("div",m(l({"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",s==="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",l({"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:s,availableDate:d}=p();if(s==="blocked")return d?o("div",m(l({"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=$(t),C=Math.round(u),g=u>=100;return f("div",m(l({"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:s}=p();return f("div",m(l({"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",s!=="blocked"&&"transition-transform duration-200 group-data-[state=open]:rotate-180 motion-reduce:transition-none")})]}))}function q(a){var r=a,{className:e,children:t}=r,n=c(r,["className","children"]);return o(D,m(l({"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 M}from"./Tag.mjs";import{cn as i,clampPercentage as z}from"../lib/utils.mjs";import{ChevronDown as F,Lock as S}from"@medway-ui/icons";var V=Object.defineProperty,W=Object.defineProperties,$=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,l=(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)=>W(a,$(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-lg 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 G(a){var r=a,{className:e,variant:t,availableDate:n,children:s}=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(l({"data-slot":"card-topic",animation:"accordion",className:i(N({variant:t}),e)},d),{children:s}))})}function H(a){var r=a,{className:e,children:t}=r,n=c(r,["className","children"]);const{variant:s}=p(),d=s==="blocked";return o(E,m(l({"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 J(a){var r=a,{className:e}=r,t=c(r,["className"]);return o("div",l({"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 K(a){var r=a,{className:e,children:t}=r,n=c(r,["className","children"]);const{variant:s}=p();return o("div",m(l({"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",s==="blocked"?"bg-primary-foreground-muted":"bg-primary-foreground",e)},n),{children:t}))}function L(a){var r=a,{className:e}=r,t=c(r,["className"]);const{variant:n}=p();return o("div",l({"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 Q(a){var r=a,{className:e,progress:t}=r,n=c(r,["className","progress"]);const{variant:s,availableDate:d}=p();if(s==="blocked")return d?o("div",m(l({"data-slot":"card-topic-progress",className:i("flex min-w-0",e)},n),{children:f(M,{variant:"gray-soft",icon:o(S,{"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(l({"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 q(a){var r=a,{className:e,children:t}=r,n=c(r,["className","children"]);const{variant:s}=p();return f("div",m(l({"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",s!=="blocked"&&"transition-transform duration-200 group-data-[state=open]:rotate-180 motion-reduce:transition-none")})]}))}function A(a){var r=a,{className:e,children:t}=r,n=c(r,["className","children"]);return o(D,m(l({"data-slot":"card-topic-content"},n),{children:o("div",{className:i("px-4 pb-4",e),children:t})}))}export{G as CardTopic,J as CardTopicColumn,A as CardTopicContent,q as CardTopicCount,K as CardTopicNumber,Q as CardTopicProgress,L as CardTopicTitle,H as CardTopicTrigger,N as cardTopicVariants};
@@ -1,3 +1,3 @@
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{BreadcrumbList as I}from"./Breadcrumb.mjs";import{Progress as B}from"./Progress.mjs";import{ProgressCircle as D}from"./ProgressCircle.mjs";import{Tag as S}from"./Tag.mjs";import{TooltipProvider as A,Tooltip as E,TooltipTrigger as F,TooltipContent as L}from"./Tooltip.mjs";import{useComposedRefs as M}from"../hooks/use-composed-refs.mjs";import{cn as n}from"../lib/utils.mjs";import{Check as w,TimeRemaining as Q}from"@medway-ui/icons";var U=Object.defineProperty,X=Object.defineProperties,Y=Object.getOwnPropertyDescriptors,v=Object.getOwnPropertySymbols,h=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable,b=(a,e,r)=>e in a?U(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)=>X(a,Y(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 Z(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-lg border border-gray-stroke-muted text-gray-foreground-muted",r)},l))})}function _(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("div",{className:"min-w-0 flex-1 overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:o(I,{className:"w-max flex-nowrap gap-1.5 whitespace-nowrap text-xs",children:s})}),t&&o(S,{variant:"regular-soft",icon:i,children:t})]}))}function q(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 G(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 J=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,k=$(null),W=M(e,k),[O,j]=R(!1);return o(A,{children:f(E,{open:O,onOpenChange:T=>{const g=k.current;j(T&&!!g&&g.scrollHeight>g.clientHeight+1)},children:[o(F,{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(L,{side:"top",className:"max-w-xs break-words",children:t})]})})});function K(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 V(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 ee(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 ae(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 re(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 se(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 te(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(Q,{size:16}),o("span",{className:"min-w-0 break-words",children:s})]}))}function oe(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-feedback-warning-background-soft text-feedback-warning-foreground",children:o(w,{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(w,{size:12,strokeWidth:1.67})}),o("div",{className:"min-w-0 break-words font-semibold text-secondary-foreground",children:"Conclu\xEDdo"})]}))}function le(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{Z as CardWeek,le as CardWeekActions,_ as CardWeekBreadcrumb,q as CardWeekContainer,se as CardWeekContent,K as CardWeekDescription,re as CardWeekFooter,G as CardWeekHeader,ae as CardWeekProgress,ee as CardWeekProgressCircle,oe as CardWeekStatus,V as CardWeekTags,te as CardWeekText,J 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{BreadcrumbList as I}from"./Breadcrumb.mjs";import{Progress as S}from"./Progress.mjs";import{ProgressCircle as B}from"./ProgressCircle.mjs";import{Tag as D}from"./Tag.mjs";import{TooltipProvider as A,Tooltip as E,TooltipTrigger as F,TooltipContent as L}from"./Tooltip.mjs";import{useComposedRefs as M}from"../hooks/use-composed-refs.mjs";import{cn as n}from"../lib/utils.mjs";import{Check as w,TimeRemaining as Q}from"@medway-ui/icons";var U=Object.defineProperty,X=Object.defineProperties,Y=Object.getOwnPropertyDescriptors,v=Object.getOwnPropertySymbols,h=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable,b=(a,e,r)=>e in a?U(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)=>X(a,Y(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 Z(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-lg border border-gray-stroke-muted text-gray-foreground-muted",r)},l))})}function _(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("div",{className:"min-w-0 flex-1 overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:o(I,{className:"w-max flex-nowrap gap-1.5 whitespace-nowrap text-xs",children:s})}),t&&o(D,{variant:"regular-soft",icon:i,children:t})]}))}function q(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 G(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 J=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,k=$(null),W=M(e,k),[O,j]=R(!1);return o(A,{children:f(E,{open:O,onOpenChange:T=>{const g=k.current;j(T&&!!g&&g.scrollHeight>g.clientHeight+1)},children:[o(F,{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(L,{side:"top",className:"max-w-xs break-words",children:t})]})})});function K(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 V(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 ee(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(B,d({size:104,value:s},t))})}function ae(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(S,u(d({},i),{value:m?100:s,indicatorClassName:n(m&&"bg-secondary-stroke-emphasis",t)}))})}function re(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 se(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 te(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(Q,{size:16}),o("span",{className:"min-w-0 break-words",children:s})]}))}function oe(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-feedback-warning-background-soft text-feedback-warning-foreground",children:o(w,{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(w,{size:12,strokeWidth:1.67})}),o("div",{className:"min-w-0 break-words font-semibold text-secondary-foreground",children:"Conclu\xEDdo"})]}))}function le(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{Z as CardWeek,le as CardWeekActions,_ as CardWeekBreadcrumb,q as CardWeekContainer,se as CardWeekContent,K as CardWeekDescription,re as CardWeekFooter,G as CardWeekHeader,ae as CardWeekProgress,ee as CardWeekProgressCircle,oe as CardWeekStatus,V as CardWeekTags,te as CardWeekText,J as CardWeekTitle};
@@ -7,7 +7,7 @@ interface CollapsibleContentProps extends ComponentProps<typeof CollapsiblePrimi
7
7
  interface CollapsibleProps extends ComponentProps<typeof CollapsiblePrimitive.Root> {
8
8
  animation?: AnimationType;
9
9
  }
10
- declare function Collapsible({ animation, ...props }: CollapsibleProps): import("react/jsx-runtime").JSX.Element;
10
+ declare function Collapsible({ animation, open: openProp, defaultOpen, onOpenChange, ...props }: CollapsibleProps): import("react/jsx-runtime").JSX.Element;
11
11
  declare const CollapsibleTrigger: import("react").ForwardRefExoticComponent<Omit<CollapsiblePrimitive.CollapsibleTriggerProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
12
12
  declare function CollapsibleContent({ className, ...props }: CollapsibleContentProps): import("react/jsx-runtime").JSX.Element;
13
13
  export { Collapsible, CollapsibleTrigger, CollapsibleContent };
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  "use client";
3
- "use strict";var l=require("react/jsx-runtime"),n=require("react"),o=require("radix-ui"),m=require("../lib/utils.js"),x=Object.defineProperty,i=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable,p=(e,a,r)=>a in e?x(e,a,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[a]=r,s=(e,a)=>{for(var r in a||(a={}))u.call(a,r)&&p(e,r,a[r]);if(i)for(var r of i(a))d.call(a,r)&&p(e,r,a[r]);return e},f=(e,a)=>{var r={};for(var t in e)u.call(e,t)&&a.indexOf(t)<0&&(r[t]=e[t]);if(e!=null&&i)for(var t of i(e))a.indexOf(t)<0&&d.call(e,t)&&(r[t]=e[t]);return r};const v=n.createContext({animation:void 0});function C(e){var a=e,{animation:r}=a,t=f(a,["animation"]);return l.jsx(v.Provider,{value:n.useMemo(()=>({animation:r}),[r]),children:l.jsx(o.Collapsible.Root,s({"data-slot":"collapsible"},t))})}const j=n.forwardRef(function(e,a){return l.jsx(o.Collapsible.Trigger,s({ref:a,"data-slot":"collapsible-trigger"},e))});function g(e){var a=e,{className:r}=a,t=f(a,["className"]);const{animation:c}=n.useContext(v),b={accordion:"overflow-hidden data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down motion-reduce:!animate-none",fade:"data-[state=closed]:animate-fade-out data-[state=open]:animate-fade-in"};return l.jsx(o.Collapsible.Content,s({"data-slot":"collapsible-content",className:m.cn(c&&b[c],r)},t))}exports.Collapsible=C,exports.CollapsibleContent=g,exports.CollapsibleTrigger=j;
3
+ "use strict";var i=require("react/jsx-runtime"),t=require("react"),c=require("radix-ui"),y=require("../lib/sidebar-search.js"),w=require("../lib/utils.js"),q=Object.defineProperty,s=Object.getOwnPropertySymbols,p=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,v=(a,e,n)=>e in a?q(a,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):a[e]=n,u=(a,e)=>{for(var n in e||(e={}))p.call(e,n)&&v(a,n,e[n]);if(s)for(var n of s(e))f.call(e,n)&&v(a,n,e[n]);return a},b=(a,e)=>{var n={};for(var r in a)p.call(a,r)&&e.indexOf(r)<0&&(n[r]=a[r]);if(a!=null&&s)for(var r of s(a))e.indexOf(r)<0&&f.call(a,r)&&(n[r]=a[r]);return n};const m=t.createContext({animation:void 0});function P(a){var e=a,{animation:n,open:r,defaultOpen:l=!1,onOpenChange:o}=e,C=b(e,["animation","open","defaultOpen","onOpenChange"]);const x=t.useContext(y.SidebarSearchActiveContext),[O,g]=t.useState(l),j=r!=null?r:O,h=t.useCallback(d=>{r===void 0&&g(d),o==null||o(d)},[r,o]);return i.jsx(m.Provider,{value:t.useMemo(()=>({animation:n}),[n]),children:i.jsx(c.Collapsible.Root,u({"data-slot":"collapsible",open:j||x,onOpenChange:h},C))})}const S=t.forwardRef(function(a,e){return i.jsx(c.Collapsible.Trigger,u({ref:e,"data-slot":"collapsible-trigger"},a))});function R(a){var e=a,{className:n}=e,r=b(e,["className"]);const{animation:l}=t.useContext(m),o={accordion:"overflow-hidden data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down motion-reduce:!animate-none",fade:"data-[state=closed]:animate-fade-out data-[state=open]:animate-fade-in"};return i.jsx(c.Collapsible.Content,u({"data-slot":"collapsible-content",className:w.cn(l&&o[l],n)},r))}exports.Collapsible=P,exports.CollapsibleContent=R,exports.CollapsibleTrigger=S;
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  "use client";
3
- import{jsx as o}from"react/jsx-runtime";import{createContext as b,forwardRef as v,useContext as C,useMemo as g}from"react";import{Collapsible as l}from"radix-ui";import{cn as O}from"../lib/utils.mjs";var x=Object.defineProperty,n=Object.getOwnPropertySymbols,c=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,m=(e,a,t)=>a in e?x(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,i=(e,a)=>{for(var t in a||(a={}))c.call(a,t)&&m(e,t,a[t]);if(n)for(var t of n(a))f.call(a,t)&&m(e,t,a[t]);return e},p=(e,a)=>{var t={};for(var r in e)c.call(e,r)&&a.indexOf(r)<0&&(t[r]=e[r]);if(e!=null&&n)for(var r of n(e))a.indexOf(r)<0&&f.call(e,r)&&(t[r]=e[r]);return t};const d=b({animation:void 0});function y(e){var a=e,{animation:t}=a,r=p(a,["animation"]);return o(d.Provider,{value:g(()=>({animation:t}),[t]),children:o(l.Root,i({"data-slot":"collapsible"},r))})}const w=v(function(e,a){return o(l.Trigger,i({ref:a,"data-slot":"collapsible-trigger"},e))});function j(e){var a=e,{className:t}=a,r=p(a,["className"]);const{animation:s}=C(d),u={accordion:"overflow-hidden data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down motion-reduce:!animate-none",fade:"data-[state=closed]:animate-fade-out data-[state=open]:animate-fade-in"};return o(l.Content,i({"data-slot":"collapsible-content",className:O(s&&u[s],t)},r))}export{y as Collapsible,j as CollapsibleContent,w as CollapsibleTrigger};
3
+ import{jsx as l}from"react/jsx-runtime";import{createContext as w,forwardRef as j,useContext as f,useState as P,useCallback as S,useMemo as N}from"react";import{Collapsible as s}from"radix-ui";import{SidebarSearchActiveContext as R}from"../lib/sidebar-search.mjs";import{cn as T}from"../lib/utils.mjs";var k=Object.defineProperty,i=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,m=Object.prototype.propertyIsEnumerable,u=(e,a,o)=>a in e?k(e,a,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[a]=o,c=(e,a)=>{for(var o in a||(a={}))d.call(a,o)&&u(e,o,a[o]);if(i)for(var o of i(a))m.call(a,o)&&u(e,o,a[o]);return e},b=(e,a)=>{var o={};for(var n in e)d.call(e,n)&&a.indexOf(n)<0&&(o[n]=e[n]);if(e!=null&&i)for(var n of i(e))a.indexOf(n)<0&&m.call(e,n)&&(o[n]=e[n]);return o};const v=w({animation:void 0});function M(e){var a=e,{animation:o,open:n,defaultOpen:r=!1,onOpenChange:t}=a,O=b(a,["animation","open","defaultOpen","onOpenChange"]);const g=f(R),[C,x]=P(r),y=n!=null?n:C,h=S(p=>{n===void 0&&x(p),t==null||t(p)},[n,t]);return l(v.Provider,{value:N(()=>({animation:o}),[o]),children:l(s.Root,c({"data-slot":"collapsible",open:y||g,onOpenChange:h},O))})}const A=j(function(e,a){return l(s.Trigger,c({ref:a,"data-slot":"collapsible-trigger"},e))});function E(e){var a=e,{className:o}=a,n=b(a,["className"]);const{animation:r}=f(v),t={accordion:"overflow-hidden data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down motion-reduce:!animate-none",fade:"data-[state=closed]:animate-fade-out data-[state=open]:animate-fade-in"};return l(s.Content,c({"data-slot":"collapsible-content",className:T(r&&t[r],o)},n))}export{M as Collapsible,E as CollapsibleContent,A as CollapsibleTrigger};
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  "use client";
3
- import{jsxs as l,Fragment as O,jsx as t}from"react/jsx-runtime";import{cva as i}from"class-variance-authority";import{forwardRef as F}from"react";import{Badge as H}from"./Badge.mjs";import{CollapsibleTrigger as L,CollapsibleContent as T,Collapsible as V}from"./Collapsible.mjs";import{CONNECTOR_ANCHOR_CLASS as j,Connector as K}from"./Connector.mjs";import{useId as M}from"../hooks/use-id.mjs";import{cn as u}from"../lib/utils.mjs";var Q=Object.defineProperty,X=Object.defineProperties,Y=Object.getOwnPropertyDescriptors,m=Object.getOwnPropertySymbols,P=Object.prototype.hasOwnProperty,$=Object.prototype.propertyIsEnumerable,z=(e,o,n)=>o in e?Q(e,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[o]=n,p=(e,o)=>{for(var n in o||(o={}))P.call(o,n)&&z(e,n,o[n]);if(m)for(var n of m(o))$.call(o,n)&&z(e,n,o[n]);return e},R=(e,o)=>X(e,Y(o)),_=(e,o)=>{var n={};for(var r in e)P.call(e,r)&&o.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&m)for(var r of m(e))o.indexOf(r)<0&&$.call(e,r)&&(n[r]=e[r]);return n};const Z={done:"Conclu\xEDdo",current:"Atual",upcoming:"Pr\xF3ximo"},q=i("pointer-events-none absolute inset-0 block origin-center rounded-lg border-2 group-disabled/connector-node:border-gray-stroke-muted group-disabled/connector-node:animate-none",{variants:{status:{done:"border-solid border-secondary-stroke-emphasis",current:"border-solid border-secondary-stroke-emphasis animate-connector-node-pulse motion-reduce:animate-none",upcoming:"border-dashed border-gray-stroke-muted"}}}),G=i("absolute inset-2 flex flex-col overflow-hidden rounded-[10px] px-0.5 pb-1.5 pt-0.5 transition-colors motion-reduce:transition-none group-disabled/connector-node:bg-gray-stroke-muted",{variants:{status:{done:"bg-secondary-stroke-emphasis",current:"bg-gray-stroke-muted [@media(hover:hover)]:group-hover/connector-node:bg-gray-stroke",upcoming:"bg-gray-stroke-muted [@media(hover:hover)]:group-hover/connector-node:bg-gray-stroke"}}}),J=i("flex w-full flex-1 items-center justify-center rounded-md [&_svg]:size-6 [&_svg]:shrink-0 group-disabled/connector-node:text-gray-foreground-muted group-disabled/connector-node:[background:var(--color-surface-card)]",{variants:{status:{done:"text-secondary-foreground-muted [background:linear-gradient(0deg,var(--color-secondary-background-soft-muted),var(--color-secondary-background-soft-muted)),var(--color-surface-card)]",current:"bg-surface-card text-gray-stroke-emphasis",upcoming:"bg-surface-card text-gray-stroke-emphasis"}}}),U=i("w-full text-center text-sm font-semibold leading-sm group-disabled/connector-node:text-gray-foreground-muted",{variants:{status:{done:"text-gray-stroke-emphasis line-through",current:"text-primary-foreground",upcoming:"text-gray-stroke-emphasis"}}}),W={left:"left-[calc(16.75%-6px)]",center:"left-[calc(50%-6px)]",right:"left-[calc(83.25%-6px)]"},ee=F(function(e,o){var n;const r=(n=e.status)!=null?n:"current",{label:x,className:A,icon:E,connector:c,position:d,card:a}=e,y=M(),g=typeof e.onClick=="function"||a!=null,f=g&&r==="current"?void 0:Z[r],k=l(O,{children:[l("span",{"data-slot":"connector-node-shape",className:"relative block size-[72px] shrink-0",children:[t("span",{"data-slot":"connector-node-ring",className:q({status:r})}),t("span",{"data-slot":"connector-node-base",className:G({status:r}),children:t("span",{"data-slot":"connector-node-face",className:J({status:r}),children:E})})]}),t("span",{"data-slot":"connector-node-label","aria-hidden":f?!0:void 0,className:U({status:r}),children:x}),f?t("span",{className:"sr-only",children:`${x}, ${f}`}):null]}),I=u("inline-flex w-[72px] shrink-0 flex-col items-center gap-1.5 border-0 bg-transparent p-0",g&&"group/connector-node rounded-lg hover:cursor-pointer disabled:pointer-events-none focus:outline-0 focus-visible:ring-4 focus-visible:ring-state-focus",A),N={"data-slot":"connector-node","data-status":r,"aria-current":r==="current"?"step":void 0,className:I};if(g){const s=e,{status:b,label:v,className:h,icon:de,connector:ie,position:ue,card:me,onClick:S}=s,B=_(s,["status","label","className","icon","connector","position","card","onClick"]);return w(t("button",R(p(p({ref:o},B),N),{type:"button",onClick:S,children:k})))}const C=e,{status:re,label:oe,className:te,icon:ne,connector:ae,position:se,card:ce,onClick:le}=C,D=_(C,["status","label","className","icon","connector","position","card","onClick"]);return w(t("div",R(p(p({ref:o},D),N),{children:k})));function w(s){if(!c&&!a)return d?t("div",{"data-slot":"connector-node-anchor",className:u("w-fit",j[d]),children:s}):s;const b=c?c.split("-to-")[0]:d!=null?d:"center",v="flex w-[400px] min-w-0 max-w-full flex-col",h=l(O,{children:[t("div",{className:u("w-fit",j[b]),children:a?t(L,{asChild:!0,children:s}):s}),a?t(T,{role:"region","aria-labelledby":y,"data-slot":"connector-node-card",className:"w-full",children:l("div",{className:"relative pb-2 pt-2",children:[l("div",{className:"flex flex-col items-start gap-2 rounded-lg border border-gray-stroke-muted bg-surface-card p-5",children:[a.badge?t(H,{size:"lg",variant:r==="upcoming"?"primary-soft":"secondary-soft",className:"mb-1 uppercase",children:a.badge}):null,t("p",{id:y,className:"m-0 text-md font-bold leading-md text-primary-foreground",children:a.title}),t("div",{className:"text-sm leading-sm text-gray-foreground",children:a.description})]}),t("span",{"aria-hidden":"true","data-slot":"connector-node-card-arrow",className:u("absolute top-0.5 size-3 rotate-45 border-l border-t border-gray-stroke-muted bg-surface-card",W[b])})]})}):null,c?t(K,{position:c,done:r==="done"}):null]});return a?t(V,{animation:"accordion","data-slot":"connector-node-item",className:v,children:h}):t("div",{"data-slot":"connector-node-item",className:v,children:h})}});export{ee as ConnectorNode};
3
+ import{jsxs as l,Fragment as O,jsx as t}from"react/jsx-runtime";import{cva as i}from"class-variance-authority";import{forwardRef as F}from"react";import{Badge as H}from"./Badge.mjs";import{CollapsibleTrigger as L,CollapsibleContent as M,Collapsible as T}from"./Collapsible.mjs";import{CONNECTOR_ANCHOR_CLASS as j,Connector as V}from"./Connector.mjs";import{useId as K}from"../hooks/use-id.mjs";import{cn as u}from"../lib/utils.mjs";var Q=Object.defineProperty,W=Object.defineProperties,X=Object.getOwnPropertyDescriptors,m=Object.getOwnPropertySymbols,P=Object.prototype.hasOwnProperty,$=Object.prototype.propertyIsEnumerable,z=(e,o,n)=>o in e?Q(e,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[o]=n,p=(e,o)=>{for(var n in o||(o={}))P.call(o,n)&&z(e,n,o[n]);if(m)for(var n of m(o))$.call(o,n)&&z(e,n,o[n]);return e},_=(e,o)=>W(e,X(o)),A=(e,o)=>{var n={};for(var r in e)P.call(e,r)&&o.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&m)for(var r of m(e))o.indexOf(r)<0&&$.call(e,r)&&(n[r]=e[r]);return n};const Y={done:"Conclu\xEDdo",current:"Atual",upcoming:"Pr\xF3ximo"},Z=i("pointer-events-none absolute inset-0 block origin-center rounded-lg border-2 group-disabled/connector-node:border-gray-stroke-muted group-disabled/connector-node:animate-none",{variants:{status:{done:"border-solid border-secondary-stroke-emphasis",current:"border-solid border-secondary-stroke-emphasis animate-connector-node-pulse motion-reduce:animate-none",upcoming:"border-dashed border-gray-stroke-muted"}}}),q=i("absolute inset-2 flex flex-col overflow-hidden rounded-[10px] px-0.5 pb-1.5 pt-0.5 transition-colors motion-reduce:transition-none group-disabled/connector-node:bg-gray-stroke-muted",{variants:{status:{done:"bg-secondary-stroke-emphasis",current:"bg-gray-stroke-muted [@media(hover:hover)]:group-hover/connector-node:bg-gray-stroke",upcoming:"bg-gray-stroke-muted [@media(hover:hover)]:group-hover/connector-node:bg-gray-stroke"}}}),G=i("flex w-full flex-1 items-center justify-center rounded-md [&_svg]:size-6 [&_svg]:shrink-0 group-disabled/connector-node:text-gray-foreground-muted group-disabled/connector-node:[background:var(--color-surface-card)]",{variants:{status:{done:"text-secondary-foreground-muted [background:linear-gradient(0deg,var(--color-secondary-background-soft-muted),var(--color-secondary-background-soft-muted)),var(--color-surface-card)]",current:"bg-surface-card text-gray-stroke-emphasis",upcoming:"bg-surface-card text-gray-stroke-emphasis"}}}),J=i("w-full text-center text-sm font-semibold leading-sm group-disabled/connector-node:text-gray-foreground-muted",{variants:{status:{done:"text-gray-stroke-emphasis line-through",current:"text-primary-foreground",upcoming:"text-gray-stroke-emphasis"}}}),U={left:"left-[calc(16.75%-6px)]",center:"left-[calc(50%-6px)]",right:"left-[calc(83.25%-6px)]"},ee=F(function(e,o){var n;const r=(n=e.status)!=null?n:"current",{label:x,className:E,icon:I,connector:c,position:d,card:a}=e,y=K(),g=typeof e.onClick=="function"||a!=null,f=g&&r==="current"?void 0:Y[r],k=l(O,{children:[l("span",{"data-slot":"connector-node-shape",className:"relative block size-[72px] shrink-0",children:[t("span",{"data-slot":"connector-node-ring",className:Z({status:r})}),t("span",{"data-slot":"connector-node-base",className:q({status:r}),children:t("span",{"data-slot":"connector-node-face",className:G({status:r}),children:I})})]}),t("span",{"data-slot":"connector-node-label","aria-hidden":f?!0:void 0,className:J({status:r}),children:x}),f?t("span",{className:"sr-only",children:`${x}, ${f}`}):null]}),R=u("inline-flex w-[72px] shrink-0 flex-col items-center gap-1.5 border-0 bg-transparent p-0",g&&"group/connector-node rounded-lg hover:cursor-pointer disabled:pointer-events-none focus:outline-0 focus-visible:ring-4 focus-visible:ring-state-focus",E),N={"data-slot":"connector-node","data-status":r,"aria-current":r==="current"?"step":void 0,className:R};if(g){const s=e,{status:b,label:v,className:h,icon:de,connector:ie,position:ue,card:me,onClick:S}=s,B=A(s,["status","label","className","icon","connector","position","card","onClick"]);return w(t("button",_(p(p({ref:o},B),N),{type:"button",onClick:S,children:k})))}const C=e,{status:re,label:oe,className:te,icon:ne,connector:ae,position:se,card:ce,onClick:le}=C,D=A(C,["status","label","className","icon","connector","position","card","onClick"]);return w(t("div",_(p(p({ref:o},D),N),{children:k})));function w(s){if(!c&&!a)return d?t("div",{"data-slot":"connector-node-anchor",className:u("w-fit",j[d]),children:s}):s;const b=c?c.split("-to-")[0]:d!=null?d:"center",v="flex w-[400px] min-w-0 max-w-full flex-col",h=l(O,{children:[t("div",{className:u("w-fit",j[b]),children:a?t(L,{asChild:!0,children:s}):s}),a?t(M,{role:"region","aria-labelledby":y,"data-slot":"connector-node-card",className:"w-full",children:l("div",{className:"relative pb-2 pt-2",children:[l("div",{className:"flex flex-col items-start gap-2 rounded-lg border border-gray-stroke-muted bg-surface-card p-5",children:[a.badge?t(H,{size:"lg",variant:r==="upcoming"?"primary-soft":"secondary-soft",className:"mb-1 uppercase",children:a.badge}):null,t("p",{id:y,className:"m-0 text-md font-bold leading-md text-primary-foreground",children:a.title}),t("div",{className:"text-sm leading-sm text-gray-foreground",children:a.description})]}),t("span",{"aria-hidden":"true","data-slot":"connector-node-card-arrow",className:u("absolute top-0.5 size-3 rotate-45 border-l border-t border-gray-stroke-muted bg-surface-card",U[b])})]})}):null,c?t(V,{position:c,done:r==="done"}):null]});return a?t(T,{animation:"accordion","data-slot":"connector-node-item",className:v,children:h}):t("div",{"data-slot":"connector-node-item",className:v,children:h})}});export{ee as ConnectorNode};
@@ -2,8 +2,9 @@ import { Popover as PopoverPrimitive } from "radix-ui";
2
2
  import { type ComponentProps } from "react";
3
3
  declare function Popover({ ...props }: ComponentProps<typeof PopoverPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
4
  declare const PopoverTrigger: import("react").ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverTriggerProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
5
- declare function PopoverContent({ className, align, sideOffset, showArrow, ...props }: ComponentProps<typeof PopoverPrimitive.Content> & {
5
+ declare function PopoverContent({ className, align, sideOffset, showArrow, showDismiss, children, ...props }: ComponentProps<typeof PopoverPrimitive.Content> & {
6
6
  showArrow?: boolean;
7
+ showDismiss?: boolean;
7
8
  }): import("react/jsx-runtime").JSX.Element;
8
9
  declare const PopoverAnchor: import("react").ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverAnchorProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
9
10
  export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger };
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  "use client";
3
- "use strict";var a=require("react/jsx-runtime"),n=require("radix-ui"),g=require("../lib/utils.js"),l=require("react"),b=Object.defineProperty,P=Object.defineProperties,w=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,f=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable,p=(r,e,t)=>e in r?b(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,i=(r,e)=>{for(var t in e||(e={}))f.call(e,t)&&p(r,t,e[t]);if(s)for(var t of s(e))c.call(e,t)&&p(r,t,e[t]);return r},O=(r,e)=>P(r,w(e)),u=(r,e)=>{var t={};for(var o in r)f.call(r,o)&&e.indexOf(o)<0&&(t[o]=r[o]);if(r!=null&&s)for(var o of s(r))e.indexOf(o)<0&&c.call(r,o)&&(t[o]=r[o]);return t};function h(r){var e=u(r,[]);return a.jsx(n.Popover.Root,i({"data-slot":"popover"},e))}const j=l.forwardRef(function(r,e){return a.jsx(n.Popover.Trigger,i({ref:e,"data-slot":"popover-trigger"},r))});function x(r){var e=r,{className:t,align:o="center",sideOffset:v=4,showArrow:m=!1}=e,d=u(e,["className","align","sideOffset","showArrow"]);return a.jsx(n.Popover.Portal,{children:a.jsxs(n.Popover.Content,O(i({align:o,className:g.cn("z-50 w-72 rounded-md border border-gray-stroke-muted bg-surface-card p-4 text-gray-foreground shadow-level-3 outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 motion-reduce:!animate-none",t),"data-slot":"popover-content",sideOffset:v},d),{children:[d.children,m&&a.jsx(n.Popover.Arrow,{className:"-my-px fill-surface-card drop-shadow-[0_1px_0_var(--color-gray-stroke-muted)]"})]}))})}l.forwardRef(function(r,e){return a.jsx(n.Popover.Anchor,i({ref:e,"data-slot":"popover-anchor"},r))}),exports.Popover=h,exports.PopoverContent=x,exports.PopoverTrigger=j;
3
+ "use strict";var a=require("react/jsx-runtime"),s=require("radix-ui"),b=require("./Dismiss.js"),j=require("../lib/utils.js"),v=require("react"),P=Object.defineProperty,y=Object.defineProperties,O=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable,m=(e,r,o)=>r in e?P(e,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[r]=o,d=(e,r)=>{for(var o in r||(r={}))u.call(r,o)&&m(e,o,r[o]);if(n)for(var o of n(r))h.call(r,o)&&m(e,o,r[o]);return e},$=(e,r)=>y(e,O(r)),x=(e,r)=>{var o={};for(var t in e)u.call(e,t)&&r.indexOf(t)<0&&(o[t]=e[t]);if(e!=null&&n)for(var t of n(e))r.indexOf(t)<0&&h.call(e,t)&&(o[t]=e[t]);return o};function _(e){var r=x(e,[]);return a.jsx(s.Popover.Root,d({"data-slot":"popover"},r))}const N=v.forwardRef(function(e,r){return a.jsx(s.Popover.Trigger,d({ref:r,"data-slot":"popover-trigger"},e))}),i=16,l=10,A=16,C=8;function k(e){var r=e,{className:o,align:t="center",sideOffset:c,showArrow:p=!1,showDismiss:f=!1,children:w}=r,g=x(r,["className","align","sideOffset","showArrow","showDismiss","children"]);return a.jsx(s.Popover.Portal,{children:a.jsxs(s.Popover.Content,$(d({align:t,className:j.cn("relative z-50 rounded-md border border-gray-stroke-muted bg-surface-elevated px-3.5 py-2.5 text-gray-foreground outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 motion-reduce:!animate-none",p?"[filter:drop-shadow(0_2px_8px_var(--color-drop-shadow-layer-a))_drop-shadow(0_8px_16px_var(--color-drop-shadow-layer-b))]":"shadow-level-3",f&&"pr-11",o),"data-slot":"popover-content",sideOffset:c!=null?c:p?A-l:C},g),{children:[w,p&&a.jsx(s.Popover.Arrow,{asChild:!0,width:i,height:l,children:a.jsxs("svg",{viewBox:`0 0 ${i} ${l}`,className:"overflow-visible","aria-hidden":!0,children:[a.jsx("path",{"data-slot":"popover-arrow-fill",d:`M0 0H${i}L${i/2} ${l}Z`,className:"fill-surface-elevated"}),a.jsx("path",{"data-slot":"popover-arrow-stroke",d:`M0 0L${i/2} ${l}L${i} 0`,className:"fill-none stroke-gray-stroke-muted",strokeWidth:1})]})}),f&&a.jsx(s.Popover.Close,{asChild:!0,children:a.jsx(b.Dismiss,{className:"absolute right-[7px] top-[7px]"})})]}))})}const q=v.forwardRef(function(e,r){return a.jsx(s.Popover.Anchor,d({ref:r,"data-slot":"popover-anchor"},e))});exports.Popover=_,exports.PopoverAnchor=q,exports.PopoverContent=k,exports.PopoverTrigger=N;