@medway-ui/core 1.48.0 → 1.50.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 (40) hide show
  1. package/COMPONENTS.md +68 -3
  2. package/COMPONENTS_SUMMARY.md +5 -2
  3. package/dist/COMPONENTS.md +68 -3
  4. package/dist/COMPONENTS_SUMMARY.md +5 -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/CardLearn.d.ts +49 -0
  9. package/dist/components/CardLearn.js +3 -0
  10. package/dist/components/CardLearn.mjs +3 -0
  11. package/dist/components/CardLesson.mjs +1 -1
  12. package/dist/components/CardModule.mjs +1 -1
  13. package/dist/components/CardTopic.mjs +1 -1
  14. package/dist/components/CardWeek.mjs +1 -1
  15. package/dist/components/Collapsible.d.ts +1 -1
  16. package/dist/components/Collapsible.js +1 -1
  17. package/dist/components/Collapsible.mjs +1 -1
  18. package/dist/components/ConnectorNode.mjs +1 -1
  19. package/dist/components/Popover.d.ts +2 -1
  20. package/dist/components/Popover.js +1 -1
  21. package/dist/components/Popover.mjs +1 -1
  22. package/dist/components/Ranking.mjs +1 -1
  23. package/dist/components/Sidebar.d.ts +27 -3
  24. package/dist/components/Sidebar.js +1 -1
  25. package/dist/components/Sidebar.mjs +1 -1
  26. package/dist/components/Tag.d.ts +2 -2
  27. package/dist/components/Tag.js +1 -1
  28. package/dist/components/Tag.mjs +1 -1
  29. package/dist/components/TagPicker.js +1 -1
  30. package/dist/components/TagPicker.mjs +1 -1
  31. package/dist/index.d.ts +4 -1
  32. package/dist/index.js +1 -1
  33. package/dist/index.mjs +1 -1
  34. package/dist/lib/sidebar-search.d.ts +2 -0
  35. package/dist/lib/sidebar-search.js +3 -0
  36. package/dist/lib/sidebar-search.mjs +3 -0
  37. package/dist/lib/utils.d.ts +5 -0
  38. package/dist/lib/utils.js +1 -1
  39. package/dist/lib/utils.mjs +1 -1
  40. package/package.json +3 -3
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.50.0 · Generated 2026-11-24
5
5
 
6
6
  All components require React 18+ and are client components (`"use client"`).
7
7
 
@@ -32,6 +32,7 @@ import type { ButtonProps } from "@medway-ui/core";
32
32
  - [CardTopic](#cardtopic)
33
33
  - [CardContinue](#cardcontinue)
34
34
  - [CardMission](#cardmission)
35
+ - [CardMission](#cardmission)
35
36
  - [CardLesson](#cardlesson)
36
37
  - [CardNews](#cardnews)
37
38
  - [Carousel](#carousel)
@@ -57,6 +58,7 @@ import type { ButtonProps } from "@medway-ui/core";
57
58
  - [Offcanvas](#offcanvas)
58
59
  - [CardOption](#cardoption)
59
60
  - [Pagination](#pagination)
61
+ - [Popover](#popover)
60
62
  - [Progress](#progress)
61
63
  - [ProgressCircle](#progresscircle)
62
64
  - [RadioGroup](#radiogroup)
@@ -594,6 +596,57 @@ type CardTopicProps = | (CollapsibleProps & {
594
596
 
595
597
  ---
596
598
 
599
+ ## CardMission
600
+
601
+ **Sub-components:** `CardLearn`, `CardLearnActions`, `CardLearnBadge`, `CardLearnCategory`, `CardLearnContent`, `CardLearnDescription`, `CardLearnFooter`, `CardLearnHeader`, `CardLearnHeading`, `CardLearnIndicators`, `CardLearnLesson`, `CardLearnMeta`, `CardLearnMore`, `CardLearnPlayButton`, `CardLearnProgress`, `CardLearnProgressLabel`, `CardLearnSchedule`, `CardLearnStatus`, `CardLearnThumbnail`, `CardLearnTimeRemaining`, `CardLearnTitle`
602
+
603
+ **Exported types:** `CardLearnHeadingProps`, `CardLearnPillProps`, `CardLearnProps`, `CardLearnScheduleProps`, `CardLearnSpecialty`, `CardLearnThumbnailProps`
604
+
605
+ ### `CardLearnProps`
606
+
607
+ | Prop | Type | Required |
608
+ |------|------|:--------:|
609
+ | `specialty` | `CardLearnSpecialty` | |
610
+ | `done` | `boolean` | |
611
+
612
+ ### `CardLearnPillProps`
613
+
614
+ | Prop | Type | Required |
615
+ |------|------|:--------:|
616
+ | `icon` | `ReactElement` | |
617
+ | `specialty` | `CardLearnSpecialty` | |
618
+
619
+ ### `CardLearnHeadingProps`
620
+
621
+ | Prop | Type | Required |
622
+ |------|------|:--------:|
623
+ | `icon` | `ReactNode` | |
624
+
625
+ ### `CardLearnThumbnailProps`
626
+
627
+ | Prop | Type | Required |
628
+ |------|------|:--------:|
629
+ | `src` | `string` | ✓ |
630
+ | `alt` | `string` | |
631
+ | `loading` | `"lazy" \| "eager"` | |
632
+ | `imageClassName` | `string` | |
633
+
634
+ ### `CardLearnScheduleProps`
635
+
636
+ | Prop | Type | Required |
637
+ |------|------|:--------:|
638
+ | `start` | `ReactNode` | ✓ |
639
+ | `end` | `ReactNode` | ✓ |
640
+ | `label` | `ReactNode` | |
641
+
642
+ ### `CardLearnSpecialty` *(type)*
643
+
644
+ ```typescript
645
+ type CardLearnSpecialty = "default" | "cm" | "go" | "cir" | "ped" | "prev"
646
+ ```
647
+
648
+ ---
649
+
597
650
  ## CardLesson
598
651
 
599
652
  **Sub-components:** `CardLesson`, `CardLessonButton`, `CardLessonContent`, `CardLessonDuration`, `CardLessonFooter`, `CardLessonHeader`, `CardLessonIcon`, `CardLessonIcons`, `CardLessonImage`, `CardLessonLabel`, `CardLessonStatus`, `CardLessonTitle`
@@ -1809,6 +1862,14 @@ type CardOptionGroupProps = | CardOptionGroupSingleProps
1809
1862
 
1810
1863
  ---
1811
1864
 
1865
+ ## Popover
1866
+
1867
+ **Sub-components:** `Popover`, `PopoverAnchor`, `PopoverContent`, `PopoverTrigger`
1868
+
1869
+ > **Radix UI base:** `Popover` — sub-components forward all Radix UI props.
1870
+
1871
+ ---
1872
+
1812
1873
  ## Progress
1813
1874
 
1814
1875
  **Sub-components:** `Progress`
@@ -2219,7 +2280,7 @@ type SelectSize = "md" | "lg"
2219
2280
 
2220
2281
  **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
2282
 
2222
- **Functions / variant helpers:** `useSidebar`
2283
+ **Functions / variant helpers:** `useSidebar`, `useSidebarSearch`
2223
2284
 
2224
2285
  ### `sidebarMenuButtonVariants` — CVA Variants
2225
2286
 
@@ -2469,7 +2530,7 @@ type TabsSize = "md" | "lg"
2469
2530
 
2470
2531
  **`variant`** *(default: `"regular"`)*:
2471
2532
 
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"`
2533
+ `"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
2534
 
2474
2535
  ### `TagProps`
2475
2536
 
@@ -2984,6 +3045,10 @@ Returns `{ open, setOpen, openMobile, setOpenMobile, isMobile, toggleSidebar }`.
2984
3045
 
2985
3046
  Exported from `Carousel`. See component docs above for context.
2986
3047
 
3048
+ ### `useSidebarSearch()`
3049
+
3050
+ Exported from `Sidebar`. See component docs above for context.
3051
+
2987
3052
  ---
2988
3053
 
2989
3054
  ## 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.50.0 · For the full prop/variant reference see `COMPONENTS.md`.
4
4
 
5
5
  ## Components
6
6
 
@@ -16,6 +16,7 @@
16
16
  - **CardTopic** — variants: default, blocked | sub: CardTopicColumn, CardTopicContent, CardTopicCount, CardTopicNumber, CardTopicProgress, CardTopicTitle, CardTopicTrigger
17
17
  - **CardContinue** — sub: CardContinueButton, CardContinueBreadcrumb, CardContinueContent, CardContinueHeader, CardContinueImage, CardContinueTitle
18
18
  - **CardMission** — sub: CardMissionContent, CardMissionDescription, CardMissionHeader, CardMissionOverline, CardMissionPhase, CardMissionTitle
19
+ - **CardMission** — sub: CardLearn, CardLearnActions, CardLearnBadge, CardLearnCategory, CardLearnContent, CardLearnDescription, CardLearnFooter, CardLearnHeader, CardLearnHeading, CardLearnIndicators, CardLearnLesson, CardLearnMeta, CardLearnMore, CardLearnPlayButton, CardLearnProgress, CardLearnProgressLabel, CardLearnSchedule, CardLearnStatus, CardLearnThumbnail, CardLearnTimeRemaining, CardLearnTitle
19
20
  - **CardLesson** — variants: default, blocked | orientation: vertical, horizontal | sub: CardLessonButton, CardLessonContent, CardLessonDuration, CardLessonFooter, CardLessonHeader, CardLessonIcon, CardLessonIcons, CardLessonImage, CardLessonLabel, CardLessonStatus, CardLessonTitle
20
21
  - **CardNews** — variants: default, read, compact | orientation: vertical, horizontal | sub: CardNewsAuthor, CardNewsBody, CardNewsContent, CardNewsDate, CardNewsDescription, CardNewsFooter, CardNewsHeader, CardNewsImage, CardNewsResourceItem, CardNewsResources, CardNewsTags, CardNewsTitle
21
22
  - **Carousel** — orientation: horizontal, vertical | controls: side, floating, outside, inline | direction: previous, next | controlsFrom: always, md, lg | opaque: true, false | edge: start, end | visible: true, false | sub: CarouselAutoplayToggle, CarouselContent, CarouselDots, CarouselItem, CarouselNext, CarouselPrevious
@@ -41,6 +42,7 @@
41
42
  - **Offcanvas** — Radix: Dialog | sub: OffcanvasBody, OffcanvasClose, OffcanvasContent, OffcanvasDescription, OffcanvasFooter, OffcanvasHeader, OffcanvasOverlay, OffcanvasPortal, OffcanvasTitle, OffcanvasTrigger
42
43
  - **CardOption** — sizes: md, lg | emphasis: true, false | interactive: true, false | disabled: true, false | Radix: RadioGroup | sub: CardOptionGroup
43
44
  - **Pagination** — sub: PaginationContent, PaginationEllipsis, PaginationInfo, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PaginationRoot
45
+ - **Popover** — Radix: Popover | sub: PopoverAnchor, PopoverContent, PopoverTrigger
44
46
  - **Progress** — Radix: Progress
45
47
  - **ProgressCircle**
46
48
  - **RadioGroup** — variants: regular | sizes: sm, md, lg | Radix: RadioGroup | sub: RadioGroupItem
@@ -57,7 +59,7 @@
57
59
  - **Switch** — variants: regular | sizes: sm, md, lg | Radix: Switch
58
60
  - **Switcher** — sub: SwitcherContent, SwitcherFooter, SwitcherGroup, SwitcherItem, SwitcherSeparator, SwitcherTrigger
59
61
  - **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
62
+ - **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
63
  - **TagPicker** — sub: TAG_PICKER_PALETTE
62
64
  - **CardTestimonial**
63
65
  - **TextMarker** — color: none | strikethrough: true, false | underline: true, false | Radix: Popover, Toolbar | sub: TEXT_MARKER_COLORS
@@ -74,6 +76,7 @@
74
76
  - `useIsMobile()` — returns boolean, breakpoint 768px
75
77
  - `useSidebar()` — sidebar context (requires `<SidebarProvider>`)
76
78
  - `useCarousel()` — from Carousel
79
+ - `useSidebarSearch()` — from Sidebar
77
80
 
78
81
  ## Tokens
79
82
 
@@ -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.50.0 · Generated 2026-11-24
5
5
 
6
6
  All components require React 18+ and are client components (`"use client"`).
7
7
 
@@ -32,6 +32,7 @@ import type { ButtonProps } from "@medway-ui/core";
32
32
  - [CardTopic](#cardtopic)
33
33
  - [CardContinue](#cardcontinue)
34
34
  - [CardMission](#cardmission)
35
+ - [CardMission](#cardmission)
35
36
  - [CardLesson](#cardlesson)
36
37
  - [CardNews](#cardnews)
37
38
  - [Carousel](#carousel)
@@ -57,6 +58,7 @@ import type { ButtonProps } from "@medway-ui/core";
57
58
  - [Offcanvas](#offcanvas)
58
59
  - [CardOption](#cardoption)
59
60
  - [Pagination](#pagination)
61
+ - [Popover](#popover)
60
62
  - [Progress](#progress)
61
63
  - [ProgressCircle](#progresscircle)
62
64
  - [RadioGroup](#radiogroup)
@@ -594,6 +596,57 @@ type CardTopicProps = | (CollapsibleProps & {
594
596
 
595
597
  ---
596
598
 
599
+ ## CardMission
600
+
601
+ **Sub-components:** `CardLearn`, `CardLearnActions`, `CardLearnBadge`, `CardLearnCategory`, `CardLearnContent`, `CardLearnDescription`, `CardLearnFooter`, `CardLearnHeader`, `CardLearnHeading`, `CardLearnIndicators`, `CardLearnLesson`, `CardLearnMeta`, `CardLearnMore`, `CardLearnPlayButton`, `CardLearnProgress`, `CardLearnProgressLabel`, `CardLearnSchedule`, `CardLearnStatus`, `CardLearnThumbnail`, `CardLearnTimeRemaining`, `CardLearnTitle`
602
+
603
+ **Exported types:** `CardLearnHeadingProps`, `CardLearnPillProps`, `CardLearnProps`, `CardLearnScheduleProps`, `CardLearnSpecialty`, `CardLearnThumbnailProps`
604
+
605
+ ### `CardLearnProps`
606
+
607
+ | Prop | Type | Required |
608
+ |------|------|:--------:|
609
+ | `specialty` | `CardLearnSpecialty` | |
610
+ | `done` | `boolean` | |
611
+
612
+ ### `CardLearnPillProps`
613
+
614
+ | Prop | Type | Required |
615
+ |------|------|:--------:|
616
+ | `icon` | `ReactElement` | |
617
+ | `specialty` | `CardLearnSpecialty` | |
618
+
619
+ ### `CardLearnHeadingProps`
620
+
621
+ | Prop | Type | Required |
622
+ |------|------|:--------:|
623
+ | `icon` | `ReactNode` | |
624
+
625
+ ### `CardLearnThumbnailProps`
626
+
627
+ | Prop | Type | Required |
628
+ |------|------|:--------:|
629
+ | `src` | `string` | ✓ |
630
+ | `alt` | `string` | |
631
+ | `loading` | `"lazy" \| "eager"` | |
632
+ | `imageClassName` | `string` | |
633
+
634
+ ### `CardLearnScheduleProps`
635
+
636
+ | Prop | Type | Required |
637
+ |------|------|:--------:|
638
+ | `start` | `ReactNode` | ✓ |
639
+ | `end` | `ReactNode` | ✓ |
640
+ | `label` | `ReactNode` | |
641
+
642
+ ### `CardLearnSpecialty` *(type)*
643
+
644
+ ```typescript
645
+ type CardLearnSpecialty = "default" | "cm" | "go" | "cir" | "ped" | "prev"
646
+ ```
647
+
648
+ ---
649
+
597
650
  ## CardLesson
598
651
 
599
652
  **Sub-components:** `CardLesson`, `CardLessonButton`, `CardLessonContent`, `CardLessonDuration`, `CardLessonFooter`, `CardLessonHeader`, `CardLessonIcon`, `CardLessonIcons`, `CardLessonImage`, `CardLessonLabel`, `CardLessonStatus`, `CardLessonTitle`
@@ -1809,6 +1862,14 @@ type CardOptionGroupProps = | CardOptionGroupSingleProps
1809
1862
 
1810
1863
  ---
1811
1864
 
1865
+ ## Popover
1866
+
1867
+ **Sub-components:** `Popover`, `PopoverAnchor`, `PopoverContent`, `PopoverTrigger`
1868
+
1869
+ > **Radix UI base:** `Popover` — sub-components forward all Radix UI props.
1870
+
1871
+ ---
1872
+
1812
1873
  ## Progress
1813
1874
 
1814
1875
  **Sub-components:** `Progress`
@@ -2219,7 +2280,7 @@ type SelectSize = "md" | "lg"
2219
2280
 
2220
2281
  **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
2282
 
2222
- **Functions / variant helpers:** `useSidebar`
2283
+ **Functions / variant helpers:** `useSidebar`, `useSidebarSearch`
2223
2284
 
2224
2285
  ### `sidebarMenuButtonVariants` — CVA Variants
2225
2286
 
@@ -2469,7 +2530,7 @@ type TabsSize = "md" | "lg"
2469
2530
 
2470
2531
  **`variant`** *(default: `"regular"`)*:
2471
2532
 
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"`
2533
+ `"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
2534
 
2474
2535
  ### `TagProps`
2475
2536
 
@@ -2984,6 +3045,10 @@ Returns `{ open, setOpen, openMobile, setOpenMobile, isMobile, toggleSidebar }`.
2984
3045
 
2985
3046
  Exported from `Carousel`. See component docs above for context.
2986
3047
 
3048
+ ### `useSidebarSearch()`
3049
+
3050
+ Exported from `Sidebar`. See component docs above for context.
3051
+
2987
3052
  ---
2988
3053
 
2989
3054
  ## 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.50.0 · For the full prop/variant reference see `COMPONENTS.md`.
4
4
 
5
5
  ## Components
6
6
 
@@ -16,6 +16,7 @@
16
16
  - **CardTopic** — variants: default, blocked | sub: CardTopicColumn, CardTopicContent, CardTopicCount, CardTopicNumber, CardTopicProgress, CardTopicTitle, CardTopicTrigger
17
17
  - **CardContinue** — sub: CardContinueButton, CardContinueBreadcrumb, CardContinueContent, CardContinueHeader, CardContinueImage, CardContinueTitle
18
18
  - **CardMission** — sub: CardMissionContent, CardMissionDescription, CardMissionHeader, CardMissionOverline, CardMissionPhase, CardMissionTitle
19
+ - **CardMission** — sub: CardLearn, CardLearnActions, CardLearnBadge, CardLearnCategory, CardLearnContent, CardLearnDescription, CardLearnFooter, CardLearnHeader, CardLearnHeading, CardLearnIndicators, CardLearnLesson, CardLearnMeta, CardLearnMore, CardLearnPlayButton, CardLearnProgress, CardLearnProgressLabel, CardLearnSchedule, CardLearnStatus, CardLearnThumbnail, CardLearnTimeRemaining, CardLearnTitle
19
20
  - **CardLesson** — variants: default, blocked | orientation: vertical, horizontal | sub: CardLessonButton, CardLessonContent, CardLessonDuration, CardLessonFooter, CardLessonHeader, CardLessonIcon, CardLessonIcons, CardLessonImage, CardLessonLabel, CardLessonStatus, CardLessonTitle
20
21
  - **CardNews** — variants: default, read, compact | orientation: vertical, horizontal | sub: CardNewsAuthor, CardNewsBody, CardNewsContent, CardNewsDate, CardNewsDescription, CardNewsFooter, CardNewsHeader, CardNewsImage, CardNewsResourceItem, CardNewsResources, CardNewsTags, CardNewsTitle
21
22
  - **Carousel** — orientation: horizontal, vertical | controls: side, floating, outside, inline | direction: previous, next | controlsFrom: always, md, lg | opaque: true, false | edge: start, end | visible: true, false | sub: CarouselAutoplayToggle, CarouselContent, CarouselDots, CarouselItem, CarouselNext, CarouselPrevious
@@ -41,6 +42,7 @@
41
42
  - **Offcanvas** — Radix: Dialog | sub: OffcanvasBody, OffcanvasClose, OffcanvasContent, OffcanvasDescription, OffcanvasFooter, OffcanvasHeader, OffcanvasOverlay, OffcanvasPortal, OffcanvasTitle, OffcanvasTrigger
42
43
  - **CardOption** — sizes: md, lg | emphasis: true, false | interactive: true, false | disabled: true, false | Radix: RadioGroup | sub: CardOptionGroup
43
44
  - **Pagination** — sub: PaginationContent, PaginationEllipsis, PaginationInfo, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PaginationRoot
45
+ - **Popover** — Radix: Popover | sub: PopoverAnchor, PopoverContent, PopoverTrigger
44
46
  - **Progress** — Radix: Progress
45
47
  - **ProgressCircle**
46
48
  - **RadioGroup** — variants: regular | sizes: sm, md, lg | Radix: RadioGroup | sub: RadioGroupItem
@@ -57,7 +59,7 @@
57
59
  - **Switch** — variants: regular | sizes: sm, md, lg | Radix: Switch
58
60
  - **Switcher** — sub: SwitcherContent, SwitcherFooter, SwitcherGroup, SwitcherItem, SwitcherSeparator, SwitcherTrigger
59
61
  - **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
62
+ - **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
63
  - **TagPicker** — sub: TAG_PICKER_PALETTE
62
64
  - **CardTestimonial**
63
65
  - **TextMarker** — color: none | strikethrough: true, false | underline: true, false | Radix: Popover, Toolbar | sub: TEXT_MARKER_COLORS
@@ -74,6 +76,7 @@
74
76
  - `useIsMobile()` — returns boolean, breakpoint 768px
75
77
  - `useSidebar()` — sidebar context (requires `<SidebarProvider>`)
76
78
  - `useCarousel()` — from Carousel
79
+ - `useSidebarSearch()` — from Sidebar
77
80
 
78
81
  ## Tokens
79
82
 
@@ -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};
@@ -0,0 +1,49 @@
1
+ import { type ComponentProps, type ReactElement, type ReactNode } from "react";
2
+ import { type ButtonProps } from "./Button.js";
3
+ import { type ProgressProps } from "./Progress.js";
4
+ type CardLearnSpecialty = "default" | "cm" | "go" | "cir" | "ped" | "prev";
5
+ interface CardLearnProps extends ComponentProps<"div"> {
6
+ specialty?: CardLearnSpecialty;
7
+ done?: boolean;
8
+ }
9
+ interface CardLearnPillProps extends ComponentProps<"span"> {
10
+ icon?: ReactElement;
11
+ specialty?: CardLearnSpecialty;
12
+ }
13
+ interface CardLearnHeadingProps extends ComponentProps<"div"> {
14
+ icon?: ReactNode;
15
+ }
16
+ interface CardLearnThumbnailProps extends ComponentProps<"div"> {
17
+ src: string;
18
+ alt?: string;
19
+ loading?: "lazy" | "eager";
20
+ imageClassName?: string;
21
+ }
22
+ interface CardLearnScheduleProps extends ComponentProps<"div"> {
23
+ start: ReactNode;
24
+ end: ReactNode;
25
+ label?: ReactNode;
26
+ }
27
+ declare function CardLearn({ className, specialty, done, ...props }: CardLearnProps): import("react/jsx-runtime").JSX.Element;
28
+ declare function CardLearnHeader({ className, ...props }: ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
29
+ declare function CardLearnCategory({ className, icon, specialty, children, ...props }: CardLearnPillProps): import("react/jsx-runtime").JSX.Element;
30
+ declare function CardLearnMeta({ className, ...props }: ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
31
+ declare function CardLearnBadge({ className, icon, specialty, children, ...props }: CardLearnPillProps): import("react/jsx-runtime").JSX.Element;
32
+ declare function CardLearnIndicators({ className, ...props }: ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
33
+ declare function CardLearnContent({ className, ...props }: ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
34
+ declare function CardLearnThumbnail({ className, imageClassName, src, alt, loading, children, ...props }: CardLearnThumbnailProps): import("react/jsx-runtime").JSX.Element;
35
+ declare const CardLearnPlayButton: import("react").ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
36
+ declare function CardLearnLesson({ className, ...props }: ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
37
+ declare function CardLearnHeading({ className, icon, children, ...props }: CardLearnHeadingProps): import("react/jsx-runtime").JSX.Element;
38
+ declare const CardLearnTitle: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
39
+ declare function CardLearnDescription({ className, ...props }: ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
40
+ declare function CardLearnSchedule({ className, start, end, label, ...props }: CardLearnScheduleProps): import("react/jsx-runtime").JSX.Element;
41
+ declare function CardLearnFooter({ className, ...props }: ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
42
+ declare function CardLearnProgress({ className, value, indicatorClassName, children, ...props }: Omit<ProgressProps, "label">): import("react/jsx-runtime").JSX.Element;
43
+ declare function CardLearnProgressLabel({ className, ...props }: ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
44
+ declare function CardLearnTimeRemaining({ className, children, ...props }: ComponentProps<"span">): import("react/jsx-runtime").JSX.Element | null;
45
+ declare function CardLearnStatus({ className, children, ...props }: ComponentProps<"span">): import("react/jsx-runtime").JSX.Element | null;
46
+ declare function CardLearnActions({ className, ...props }: ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
47
+ declare const CardLearnMore: import("react").ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
48
+ export { CardLearn, CardLearnActions, CardLearnBadge, CardLearnCategory, CardLearnContent, CardLearnDescription, CardLearnFooter, CardLearnHeader, CardLearnHeading, CardLearnIndicators, CardLearnLesson, CardLearnMeta, CardLearnMore, CardLearnPlayButton, CardLearnProgress, CardLearnProgressLabel, CardLearnSchedule, CardLearnStatus, CardLearnThumbnail, CardLearnTimeRemaining, CardLearnTitle, };
49
+ export type { CardLearnHeadingProps, CardLearnPillProps, CardLearnProps, CardLearnScheduleProps, CardLearnSpecialty, CardLearnThumbnailProps, };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ "use client";
3
+ "use strict";var n=require("react/jsx-runtime"),m=require("react"),y=require("./Button.js"),T=require("./FallbackImage.js"),O=require("./Progress.js"),q=require("./Separator.js"),C=require("./Tag.js"),p=require("./Tooltip.js"),R=require("../hooks/use-composed-refs.js"),c=require("../lib/utils.js"),g=require("@medway-ui/icons"),S=Object.defineProperty,E=Object.defineProperties,B=Object.getOwnPropertyDescriptors,v=Object.getOwnPropertySymbols,w=Object.prototype.hasOwnProperty,L=Object.prototype.propertyIsEnumerable,k=(a,e,r)=>e in a?S(a,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):a[e]=r,i=(a,e)=>{for(var r in e||(e={}))w.call(e,r)&&k(a,r,e[r]);if(v)for(var r of v(e))L.call(e,r)&&k(a,r,e[r]);return a},f=(a,e)=>E(a,B(e)),o=(a,e)=>{var r={};for(var s in a)w.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&&L.call(a,s)&&(r[s]=a[s]);return r};const _=m.createContext({specialty:"default",done:!1}),H={default:"[--card-learn-blur-1:var(--color-gray-stroke-emphasis)] [--card-learn-blur-2:var(--color-gray-stroke-emphasis)] [--card-learn-blur-3:var(--color-gray-stroke-emphasis)]",cm:"[--card-learn-blur-1:var(--color-gradient-cm-blur-1)] [--card-learn-blur-2:var(--color-gradient-cm-blur-2)] [--card-learn-blur-3:var(--color-gradient-cm-blur-3)]",go:"[--card-learn-blur-1:var(--color-gradient-go-blur-1)] [--card-learn-blur-2:var(--color-gradient-go-blur-2)] [--card-learn-blur-3:var(--color-gradient-go-blur-3)]",cir:"[--card-learn-blur-1:var(--color-gradient-cir-blur-1)] [--card-learn-blur-2:var(--color-gradient-cir-blur-2)] [--card-learn-blur-3:var(--color-gradient-cir-blur-3)]",ped:"[--card-learn-blur-1:var(--color-gradient-ped-blur-1)] [--card-learn-blur-2:var(--color-gradient-ped-blur-2)] [--card-learn-blur-3:var(--color-gradient-ped-blur-3)]",prev:"[--card-learn-blur-1:var(--color-gradient-prev-blur-1)] [--card-learn-blur-2:var(--color-gradient-prev-blur-2)] [--card-learn-blur-3:var(--color-gradient-prev-blur-3)]"},P={default:"regular-soft",cm:"cm-soft",go:"go-soft",cir:"cir-soft",ped:"ped-soft",prev:"prev-soft"},M="bg-surface-card [background-image:linear-gradient(-73.5deg,transparent_50%,color-mix(in_srgb,var(--card-learn-blur-3)_4%,transparent)_100%),linear-gradient(73.5deg,transparent_50%,color-mix(in_srgb,var(--card-learn-blur-2)_8%,transparent)_100%),linear-gradient(0deg,transparent_50%,color-mix(in_srgb,var(--card-learn-blur-1)_32%,transparent)_100%)]",z="h-6 rounded-lg p-2 text-xxs leading-xxs [&_[data-slot=tag-icon]>svg]:size-3.5";function x(){return m.useContext(_)}function A(a){var e=a,{className:r,specialty:s="default",done:l=!1}=e,t=o(e,["className","specialty","done"]);const d=m.useMemo(()=>({specialty:s,done:l}),[s,l]);return n.jsx(_.Provider,{value:d,children:n.jsx("div",i({"data-slot":"card-learn","data-specialty":s,"data-done":l||void 0,className:c.cn("flex flex-col rounded-lg ring-1 ring-inset ring-gray-stroke-muted",H[s],M,r)},t))})}function F(a){var e=a,{className:r}=e,s=o(e,["className"]);return n.jsx("div",i({"data-slot":"card-learn-header",className:c.cn("flex min-w-0 items-center justify-between gap-2 px-4 pt-4",r)},s))}function I(a){var e=a,{className:r,icon:s,specialty:l,children:t}=e,d=o(e,["className","icon","specialty","children"]);const u=x();return n.jsx(C.Tag,f(i({"data-slot":"card-learn-category",variant:P[l!=null?l:u.specialty],icon:s,className:c.cn(z,"gap-1",r)},d),{children:t}))}function D(a){var e=a,{className:r}=e,s=o(e,["className"]);return n.jsx("div",i({"data-slot":"card-learn-meta",className:c.cn("flex shrink-0 items-center gap-2 self-stretch",r)},s))}function $(a){var e=a,{className:r,icon:s,specialty:l,children:t}=e,d=o(e,["className","icon","specialty","children"]);const u=x();return n.jsx(C.Tag,f(i({"data-slot":"card-learn-badge",variant:P[l!=null?l:u.specialty],icon:s,className:c.cn(z,"shrink-0",r)},d),{children:t}))}function V(a){var e=a,{className:r}=e,s=o(e,["className"]);return n.jsx("div",i({"data-slot":"card-learn-indicators",className:c.cn("flex items-center gap-0.5 self-stretch",r)},s))}function X(a){var e=a,{className:r}=e,s=o(e,["className"]);return n.jsx("div",i({"data-slot":"card-learn-content",className:c.cn("flex flex-col gap-4 px-4 pt-4",r)},s))}function G(a){var e=a,{className:r,imageClassName:s,src:l,alt:t="",loading:d="lazy",children:u}=e,b=o(e,["className","imageClassName","src","alt","loading","children"]);const[N,h]=m.useState();return n.jsxs("div",f(i({"data-slot":"card-learn-thumbnail",className:c.cn("relative isolate flex aspect-video w-full items-center justify-center overflow-hidden rounded-lg",r)},b),{children:[l&&N!==l?n.jsx("img",{src:l,alt:t,loading:d,onError:()=>h(l),className:c.cn("absolute inset-0 -z-10 size-full object-cover",s)}):n.jsx(T.FallbackImage,{className:"absolute inset-0 -z-10 size-full",label:t,"aria-hidden":t===""||void 0}),n.jsx("div",{"aria-hidden":!0,className:"absolute inset-0 -z-10 bg-black-24"}),u]}))}const J=m.forwardRef(function(a,e){var r=a,{"aria-label":s="Assistir",containerClassName:l}=r,t=o(r,["aria-label","containerClassName"]);return n.jsx(y.Button,i({ref:e,variant:"regular",iconLeft:n.jsx(g.Play,{}),"aria-label":s,containerClassName:c.cn("dark",l)},t))});function K(a){var e=a,{className:r}=e,s=o(e,["className"]);return n.jsx("div",i({"data-slot":"card-learn-lesson",className:c.cn("flex items-start justify-between gap-4",r)},s))}function Q(a){var e=a,{className:r,icon:s,children:l}=e,t=o(e,["className","icon","children"]);return n.jsxs("div",f(i({"data-slot":"card-learn-heading",className:c.cn("flex min-w-0 flex-1 items-start",r)},t),{children:[s&&n.jsx("span",{className:"flex shrink-0 items-center pr-2.5 text-primary-foreground [&_svg]:size-5",children:s}),n.jsx("div",{className:"flex min-w-0 flex-1 flex-col gap-1 break-words",children:l})]}))}const U=m.forwardRef(function(a,e){var r=a,{className:s,children:l}=r,t=o(r,["className","children"]);const d=m.useRef(null),u=R.useComposedRefs(e,d),[b,N]=m.useState(!1);return n.jsx(p.TooltipProvider,{children:n.jsxs(p.Tooltip,{open:b,onOpenChange:h=>{const j=d.current;N(h&&!!j&&j.scrollHeight>j.clientHeight+1)},children:[n.jsx(p.TooltipTrigger,{asChild:!0,children:n.jsx("div",f(i({ref:u,"data-slot":"card-learn-title",className:c.cn("line-clamp-2 text-sm font-semibold leading-sm text-primary-foreground",s)},t),{children:l}))}),n.jsx(p.TooltipContent,{side:"top",className:"max-w-xs break-words",children:l})]})})});function W(a){var e=a,{className:r}=e,s=o(e,["className"]);return n.jsx("div",i({"data-slot":"card-learn-description",className:c.cn("text-xs font-medium leading-xs text-primary-foreground-muted",r)},s))}function Y(a){var e=a,{className:r,start:s,end:l,label:t="Hor\xE1rios"}=e,d=o(e,["className","start","end","label"]);return n.jsxs("div",f(i({"data-slot":"card-learn-schedule",className:c.cn("flex items-center justify-between gap-2 text-xs leading-xs",r)},d),{children:[n.jsx("span",{className:"font-medium text-primary-foreground",children:t}),n.jsxs("div",{className:"flex shrink-0 items-center gap-2 rounded-md bg-primary-background-soft px-2 py-1 font-semibold",children:[n.jsx(g.Cloudy,{size:16,"aria-hidden":!0,className:"text-primary-foreground"}),n.jsx("span",{className:"text-primary-foreground",children:s}),n.jsx(q.Separator,{className:"bg-primary-foreground-muted data-[orientation=horizontal]:w-[19px]"}),n.jsx("span",{className:"sr-only",children:"at\xE9"}),n.jsx("span",{className:"text-primary-foreground-muted",children:l})]})]}))}function Z(a){var e=a,{className:r}=e,s=o(e,["className"]);return n.jsx("div",i({"data-slot":"card-learn-footer",className:c.cn("mt-auto flex flex-col gap-4 p-4",r)},s))}function ee(a){var e=a,{className:r,value:s,indicatorClassName:l,children:t}=e,d=o(e,["className","value","indicatorClassName","children"]);const{done:u}=x();return n.jsxs("div",{"data-slot":"card-learn-progress",className:c.cn("flex flex-col gap-2",r),children:[m.Children.toArray(t).length>0&&n.jsx("div",{className:"flex min-w-0 items-center gap-2",children:t}),n.jsx(O.Progress,f(i({},d),{className:"my-[0.5px]",value:u?100:s,indicatorClassName:c.cn("rounded-pill",u&&"bg-feedback-success-stroke-emphasis",l)}))]})}function ae(a){var e=a,{className:r}=e,s=o(e,["className"]);return n.jsx("span",i({"data-slot":"card-learn-progress-label",className:c.cn("min-w-0 flex-1 text-xs font-medium leading-xs text-gray-foreground-muted [&_strong]:font-semibold [&_strong]:text-gray-foreground",r)},s))}function re(a){var e=a,{className:r,children:s}=e,l=o(e,["className","children"]);const{done:t}=x();return t?null:n.jsxs("span",f(i({"data-slot":"card-learn-time-remaining",className:c.cn("ml-auto flex shrink-0 items-center gap-1.5 whitespace-nowrap text-xs font-medium leading-xs text-primary-foreground-muted [&_strong]:font-semibold",r)},l),{children:[n.jsx(g.TimeRemaining,{size:16,"aria-hidden":!0}),n.jsx("span",{children:s})]}))}function se(a){var e=a,{className:r,children:s="Conclu\xEDdo"}=e,l=o(e,["className","children"]);const{done:t}=x();return t?n.jsxs("span",f(i({"data-slot":"card-learn-status",className:c.cn("ml-auto flex shrink-0 items-center gap-1.5 whitespace-nowrap text-xs font-semibold leading-xs text-feedback-success-stroke-emphasis",r)},l),{children:[n.jsx(g.CircleCheck,{size:16,"aria-hidden":!0}),s]})):null}function ne(a){var e=a,{className:r}=e,s=o(e,["className"]);return n.jsx("div",i({"data-slot":"card-learn-actions",className:c.cn("flex items-center gap-2 [&>*:has(>[data-card-learn-more])]:flex-none [&>*>[data-slot=button]]:w-full [&>*]:min-w-0 [&>*]:flex-1",r)},s))}const le=m.forwardRef(function(a,e){var r=a,{"aria-label":s="Mais op\xE7\xF5es"}=r,l=o(r,["aria-label"]);return n.jsx(y.Button,i({ref:e,variant:"regular-basic",iconLeft:n.jsx(g.MoreVertical,{}),"aria-label":s,"data-card-learn-more":""},l))});exports.CardLearn=A,exports.CardLearnActions=ne,exports.CardLearnBadge=$,exports.CardLearnCategory=I,exports.CardLearnContent=X,exports.CardLearnDescription=W,exports.CardLearnFooter=Z,exports.CardLearnHeader=F,exports.CardLearnHeading=Q,exports.CardLearnIndicators=V,exports.CardLearnLesson=K,exports.CardLearnMeta=D,exports.CardLearnMore=le,exports.CardLearnPlayButton=J,exports.CardLearnProgress=ee,exports.CardLearnProgressLabel=ae,exports.CardLearnSchedule=Y,exports.CardLearnStatus=se,exports.CardLearnThumbnail=G,exports.CardLearnTimeRemaining=re,exports.CardLearnTitle=U;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ "use client";
3
+ import{jsx as n,jsxs as f}from"react/jsx-runtime";import{createContext as O,forwardRef as h,useRef as T,useState as y,useMemo as E,Children as S,useContext as R}from"react";import{Button as C}from"./Button.mjs";import{FallbackImage as H}from"./FallbackImage.mjs";import{Progress as M}from"./Progress.mjs";import{Separator as $}from"./Separator.mjs";import{Tag as L}from"./Tag.mjs";import{TooltipProvider as A,Tooltip as I,TooltipTrigger as B,TooltipContent as D}from"./Tooltip.mjs";import{useComposedRefs as F}from"../hooks/use-composed-refs.mjs";import{cn as i}from"../lib/utils.mjs";import{Play as V,MoreVertical as W,Cloudy as X,CircleCheck as Z,TimeRemaining as q}from"@medway-ui/icons";var G=Object.defineProperty,J=Object.defineProperties,K=Object.getOwnPropertyDescriptors,g=Object.getOwnPropertySymbols,w=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable,_=(e,a,r)=>a in e?G(e,a,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[a]=r,o=(e,a)=>{for(var r in a||(a={}))w.call(a,r)&&_(e,r,a[r]);if(g)for(var r of g(a))k.call(a,r)&&_(e,r,a[r]);return e},u=(e,a)=>J(e,K(a)),c=(e,a)=>{var r={};for(var l in e)w.call(e,l)&&a.indexOf(l)<0&&(r[l]=e[l]);if(e!=null&&g)for(var l of g(e))a.indexOf(l)<0&&k.call(e,l)&&(r[l]=e[l]);return r};const j=O({specialty:"default",done:!1}),Q={default:"[--card-learn-blur-1:var(--color-gray-stroke-emphasis)] [--card-learn-blur-2:var(--color-gray-stroke-emphasis)] [--card-learn-blur-3:var(--color-gray-stroke-emphasis)]",cm:"[--card-learn-blur-1:var(--color-gradient-cm-blur-1)] [--card-learn-blur-2:var(--color-gradient-cm-blur-2)] [--card-learn-blur-3:var(--color-gradient-cm-blur-3)]",go:"[--card-learn-blur-1:var(--color-gradient-go-blur-1)] [--card-learn-blur-2:var(--color-gradient-go-blur-2)] [--card-learn-blur-3:var(--color-gradient-go-blur-3)]",cir:"[--card-learn-blur-1:var(--color-gradient-cir-blur-1)] [--card-learn-blur-2:var(--color-gradient-cir-blur-2)] [--card-learn-blur-3:var(--color-gradient-cir-blur-3)]",ped:"[--card-learn-blur-1:var(--color-gradient-ped-blur-1)] [--card-learn-blur-2:var(--color-gradient-ped-blur-2)] [--card-learn-blur-3:var(--color-gradient-ped-blur-3)]",prev:"[--card-learn-blur-1:var(--color-gradient-prev-blur-1)] [--card-learn-blur-2:var(--color-gradient-prev-blur-2)] [--card-learn-blur-3:var(--color-gradient-prev-blur-3)]"},z={default:"regular-soft",cm:"cm-soft",go:"go-soft",cir:"cir-soft",ped:"ped-soft",prev:"prev-soft"},U="bg-surface-card [background-image:linear-gradient(-73.5deg,transparent_50%,color-mix(in_srgb,var(--card-learn-blur-3)_4%,transparent)_100%),linear-gradient(73.5deg,transparent_50%,color-mix(in_srgb,var(--card-learn-blur-2)_8%,transparent)_100%),linear-gradient(0deg,transparent_50%,color-mix(in_srgb,var(--card-learn-blur-1)_32%,transparent)_100%)]",P="h-6 rounded-lg p-2 text-xxs leading-xxs [&_[data-slot=tag-icon]>svg]:size-3.5";function p(){return R(j)}function Y(e){var a=e,{className:r,specialty:l="default",done:s=!1}=a,t=c(a,["className","specialty","done"]);const d=E(()=>({specialty:l,done:s}),[l,s]);return n(j.Provider,{value:d,children:n("div",o({"data-slot":"card-learn","data-specialty":l,"data-done":s||void 0,className:i("flex flex-col rounded-lg ring-1 ring-inset ring-gray-stroke-muted",Q[l],U,r)},t))})}function aa(e){var a=e,{className:r}=a,l=c(a,["className"]);return n("div",o({"data-slot":"card-learn-header",className:i("flex min-w-0 items-center justify-between gap-2 px-4 pt-4",r)},l))}function ea(e){var a=e,{className:r,icon:l,specialty:s,children:t}=a,d=c(a,["className","icon","specialty","children"]);const m=p();return n(L,u(o({"data-slot":"card-learn-category",variant:z[s!=null?s:m.specialty],icon:l,className:i(P,"gap-1",r)},d),{children:t}))}function ra(e){var a=e,{className:r}=a,l=c(a,["className"]);return n("div",o({"data-slot":"card-learn-meta",className:i("flex shrink-0 items-center gap-2 self-stretch",r)},l))}function la(e){var a=e,{className:r,icon:l,specialty:s,children:t}=a,d=c(a,["className","icon","specialty","children"]);const m=p();return n(L,u(o({"data-slot":"card-learn-badge",variant:z[s!=null?s:m.specialty],icon:l,className:i(P,"shrink-0",r)},d),{children:t}))}function na(e){var a=e,{className:r}=a,l=c(a,["className"]);return n("div",o({"data-slot":"card-learn-indicators",className:i("flex items-center gap-0.5 self-stretch",r)},l))}function sa(e){var a=e,{className:r}=a,l=c(a,["className"]);return n("div",o({"data-slot":"card-learn-content",className:i("flex flex-col gap-4 px-4 pt-4",r)},l))}function ta(e){var a=e,{className:r,imageClassName:l,src:s,alt:t="",loading:d="lazy",children:m}=a,v=c(a,["className","imageClassName","src","alt","loading","children"]);const[b,x]=y();return f("div",u(o({"data-slot":"card-learn-thumbnail",className:i("relative isolate flex aspect-video w-full items-center justify-center overflow-hidden rounded-lg",r)},v),{children:[s&&b!==s?n("img",{src:s,alt:t,loading:d,onError:()=>x(s),className:i("absolute inset-0 -z-10 size-full object-cover",l)}):n(H,{className:"absolute inset-0 -z-10 size-full",label:t,"aria-hidden":t===""||void 0}),n("div",{"aria-hidden":!0,className:"absolute inset-0 -z-10 bg-black-24"}),m]}))}const ia=h(function(e,a){var r=e,{"aria-label":l="Assistir",containerClassName:s}=r,t=c(r,["aria-label","containerClassName"]);return n(C,o({ref:a,variant:"regular",iconLeft:n(V,{}),"aria-label":l,containerClassName:i("dark",s)},t))});function oa(e){var a=e,{className:r}=a,l=c(a,["className"]);return n("div",o({"data-slot":"card-learn-lesson",className:i("flex items-start justify-between gap-4",r)},l))}function ca(e){var a=e,{className:r,icon:l,children:s}=a,t=c(a,["className","icon","children"]);return f("div",u(o({"data-slot":"card-learn-heading",className:i("flex min-w-0 flex-1 items-start",r)},t),{children:[l&&n("span",{className:"flex shrink-0 items-center pr-2.5 text-primary-foreground [&_svg]:size-5",children:l}),n("div",{className:"flex min-w-0 flex-1 flex-col gap-1 break-words",children:s})]}))}const da=h(function(e,a){var r=e,{className:l,children:s}=r,t=c(r,["className","children"]);const d=T(null),m=F(a,d),[v,b]=y(!1);return n(A,{children:f(I,{open:v,onOpenChange:x=>{const N=d.current;b(x&&!!N&&N.scrollHeight>N.clientHeight+1)},children:[n(B,{asChild:!0,children:n("div",u(o({ref:m,"data-slot":"card-learn-title",className:i("line-clamp-2 text-sm font-semibold leading-sm text-primary-foreground",l)},t),{children:s}))}),n(D,{side:"top",className:"max-w-xs break-words",children:s})]})})});function ma(e){var a=e,{className:r}=a,l=c(a,["className"]);return n("div",o({"data-slot":"card-learn-description",className:i("text-xs font-medium leading-xs text-primary-foreground-muted",r)},l))}function ua(e){var a=e,{className:r,start:l,end:s,label:t="Hor\xE1rios"}=a,d=c(a,["className","start","end","label"]);return f("div",u(o({"data-slot":"card-learn-schedule",className:i("flex items-center justify-between gap-2 text-xs leading-xs",r)},d),{children:[n("span",{className:"font-medium text-primary-foreground",children:t}),f("div",{className:"flex shrink-0 items-center gap-2 rounded-md bg-primary-background-soft px-2 py-1 font-semibold",children:[n(X,{size:16,"aria-hidden":!0,className:"text-primary-foreground"}),n("span",{className:"text-primary-foreground",children:l}),n($,{className:"bg-primary-foreground-muted data-[orientation=horizontal]:w-[19px]"}),n("span",{className:"sr-only",children:"at\xE9"}),n("span",{className:"text-primary-foreground-muted",children:s})]})]}))}function fa(e){var a=e,{className:r}=a,l=c(a,["className"]);return n("div",o({"data-slot":"card-learn-footer",className:i("mt-auto flex flex-col gap-4 p-4",r)},l))}function pa(e){var a=e,{className:r,value:l,indicatorClassName:s,children:t}=a,d=c(a,["className","value","indicatorClassName","children"]);const{done:m}=p();return f("div",{"data-slot":"card-learn-progress",className:i("flex flex-col gap-2",r),children:[S.toArray(t).length>0&&n("div",{className:"flex min-w-0 items-center gap-2",children:t}),n(M,u(o({},d),{className:"my-[0.5px]",value:m?100:l,indicatorClassName:i("rounded-pill",m&&"bg-feedback-success-stroke-emphasis",s)}))]})}function ga(e){var a=e,{className:r}=a,l=c(a,["className"]);return n("span",o({"data-slot":"card-learn-progress-label",className:i("min-w-0 flex-1 text-xs font-medium leading-xs text-gray-foreground-muted [&_strong]:font-semibold [&_strong]:text-gray-foreground",r)},l))}function va(e){var a=e,{className:r,children:l}=a,s=c(a,["className","children"]);const{done:t}=p();return t?null:f("span",u(o({"data-slot":"card-learn-time-remaining",className:i("ml-auto flex shrink-0 items-center gap-1.5 whitespace-nowrap text-xs font-medium leading-xs text-primary-foreground-muted [&_strong]:font-semibold",r)},s),{children:[n(q,{size:16,"aria-hidden":!0}),n("span",{children:l})]}))}function ba(e){var a=e,{className:r,children:l="Conclu\xEDdo"}=a,s=c(a,["className","children"]);const{done:t}=p();return t?f("span",u(o({"data-slot":"card-learn-status",className:i("ml-auto flex shrink-0 items-center gap-1.5 whitespace-nowrap text-xs font-semibold leading-xs text-feedback-success-stroke-emphasis",r)},s),{children:[n(Z,{size:16,"aria-hidden":!0}),l]})):null}function xa(e){var a=e,{className:r}=a,l=c(a,["className"]);return n("div",o({"data-slot":"card-learn-actions",className:i("flex items-center gap-2 [&>*:has(>[data-card-learn-more])]:flex-none [&>*>[data-slot=button]]:w-full [&>*]:min-w-0 [&>*]:flex-1",r)},l))}const Na=h(function(e,a){var r=e,{"aria-label":l="Mais op\xE7\xF5es"}=r,s=c(r,["aria-label"]);return n(C,o({ref:a,variant:"regular-basic",iconLeft:n(W,{}),"aria-label":l,"data-card-learn-more":""},s))});export{Y as CardLearn,xa as CardLearnActions,la as CardLearnBadge,ea as CardLearnCategory,sa as CardLearnContent,ma as CardLearnDescription,fa as CardLearnFooter,aa as CardLearnHeader,ca as CardLearnHeading,na as CardLearnIndicators,oa as CardLearnLesson,ra as CardLearnMeta,Na as CardLearnMore,ia as CardLearnPlayButton,pa as CardLearnProgress,ga as CardLearnProgressLabel,ua as CardLearnSchedule,ba as CardLearnStatus,ta as CardLearnThumbnail,va as CardLearnTimeRemaining,da as CardLearnTitle};
@@ -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};