@ginia/ui 0.1.1 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/domain/resume/resume-editor/resume-editor.cjs +13 -5
- package/dist/components/domain/resume/resume-editor/resume-editor.cjs.map +1 -1
- package/dist/components/domain/resume/resume-editor/resume-editor.d.cts +1 -1
- package/dist/components/domain/resume/resume-editor/resume-editor.d.ts +1 -1
- package/dist/components/domain/resume/resume-editor/resume-editor.js +19 -6
- package/dist/components/domain/resume/resume-editor/resume-editor.js.map +1 -1
- package/dist/components/domain/resume/resume-editor/sections/academic-info.cjs +1 -1
- package/dist/components/domain/resume/resume-editor/sections/academic-info.cjs.map +1 -1
- package/dist/components/domain/resume/resume-editor/sections/academic-info.js +1 -1
- package/dist/components/domain/resume/resume-editor/sections/academic-info.js.map +1 -1
- package/dist/components/domain/resume/resume-editor/sections/activities.cjs +25 -11
- package/dist/components/domain/resume/resume-editor/sections/activities.cjs.map +1 -1
- package/dist/components/domain/resume/resume-editor/sections/activities.js +25 -11
- package/dist/components/domain/resume/resume-editor/sections/activities.js.map +1 -1
- package/dist/components/domain/resume/resume-editor/sections/certifications.cjs +27 -12
- package/dist/components/domain/resume/resume-editor/sections/certifications.cjs.map +1 -1
- package/dist/components/domain/resume/resume-editor/sections/certifications.js +27 -12
- package/dist/components/domain/resume/resume-editor/sections/certifications.js.map +1 -1
- package/dist/components/domain/resume/resume-editor/sections/education.cjs +25 -11
- package/dist/components/domain/resume/resume-editor/sections/education.cjs.map +1 -1
- package/dist/components/domain/resume/resume-editor/sections/education.js +25 -11
- package/dist/components/domain/resume/resume-editor/sections/education.js.map +1 -1
- package/dist/components/domain/resume/resume-editor/sections/experience.cjs +25 -11
- package/dist/components/domain/resume/resume-editor/sections/experience.cjs.map +1 -1
- package/dist/components/domain/resume/resume-editor/sections/experience.js +25 -11
- package/dist/components/domain/resume/resume-editor/sections/experience.js.map +1 -1
- package/dist/components/domain/resume/resume-editor/sections/personal-info.cjs +1 -1
- package/dist/components/domain/resume/resume-editor/sections/personal-info.cjs.map +1 -1
- package/dist/components/domain/resume/resume-editor/sections/personal-info.js +1 -1
- package/dist/components/domain/resume/resume-editor/sections/personal-info.js.map +1 -1
- package/dist/components/domain/resume/resume-editor/sections/preferences.cjs +2 -2
- package/dist/components/domain/resume/resume-editor/sections/preferences.cjs.map +1 -1
- package/dist/components/domain/resume/resume-editor/sections/preferences.js +2 -2
- package/dist/components/domain/resume/resume-editor/sections/preferences.js.map +1 -1
- package/dist/components/domain/resume/resume-editor/sections/requirements.cjs +19 -11
- package/dist/components/domain/resume/resume-editor/sections/requirements.cjs.map +1 -1
- package/dist/components/domain/resume/resume-editor/sections/requirements.js +29 -12
- package/dist/components/domain/resume/resume-editor/sections/requirements.js.map +1 -1
- package/dist/components/domain/resume/resume-editor/sections/skills.cjs +30 -10
- package/dist/components/domain/resume/resume-editor/sections/skills.cjs.map +1 -1
- package/dist/components/domain/resume/resume-editor/sections/skills.js +30 -10
- package/dist/components/domain/resume/resume-editor/sections/skills.js.map +1 -1
- package/dist/components/domain/resume/resume-preview/resume-preview.cjs +27 -11
- package/dist/components/domain/resume/resume-preview/resume-preview.cjs.map +1 -1
- package/dist/components/domain/resume/resume-preview/resume-preview.js +27 -11
- package/dist/components/domain/resume/resume-preview/resume-preview.js.map +1 -1
- package/dist/components/domain/resume/resume-preview/sections/contact-skills.cjs +31 -15
- package/dist/components/domain/resume/resume-preview/sections/contact-skills.cjs.map +1 -1
- package/dist/components/domain/resume/resume-preview/sections/contact-skills.js +31 -15
- package/dist/components/domain/resume/resume-preview/sections/contact-skills.js.map +1 -1
- package/dist/components/domain/resume/resume-preview/sections/experience-education.cjs +131 -73
- package/dist/components/domain/resume/resume-preview/sections/experience-education.cjs.map +1 -1
- package/dist/components/domain/resume/resume-preview/sections/experience-education.d.cts +1 -1
- package/dist/components/domain/resume/resume-preview/sections/experience-education.d.ts +1 -1
- package/dist/components/domain/resume/resume-preview/sections/experience-education.js +131 -73
- package/dist/components/domain/resume/resume-preview/sections/experience-education.js.map +1 -1
- package/dist/components/domain/resume/resume-preview/sections/footer-preview.cjs +2 -2
- package/dist/components/domain/resume/resume-preview/sections/footer-preview.cjs.map +1 -1
- package/dist/components/domain/resume/resume-preview/sections/footer-preview.js +2 -2
- package/dist/components/domain/resume/resume-preview/sections/footer-preview.js.map +1 -1
- package/dist/components/domain/resume/resume-preview/sections/header-preview.cjs +7 -7
- package/dist/components/domain/resume/resume-preview/sections/header-preview.cjs.map +1 -1
- package/dist/components/domain/resume/resume-preview/sections/header-preview.js +7 -7
- package/dist/components/domain/resume/resume-preview/sections/header-preview.js.map +1 -1
- package/dist/components/domain/resume/resume.cjs +46 -29
- package/dist/components/domain/resume/resume.cjs.map +1 -1
- package/dist/components/domain/resume/resume.js +46 -29
- package/dist/components/domain/resume/resume.js.map +1 -1
- package/dist/components/ui/accordion/accordion.cjs +1 -3
- package/dist/components/ui/accordion/accordion.cjs.map +1 -1
- package/dist/components/ui/accordion/accordion.js +1 -3
- package/dist/components/ui/accordion/accordion.js.map +1 -1
- package/dist/components/ui/alert/alert.cjs +12 -25
- package/dist/components/ui/alert/alert.cjs.map +1 -1
- package/dist/components/ui/alert/alert.js +12 -25
- package/dist/components/ui/alert/alert.js.map +1 -1
- package/dist/components/ui/alert-dialog/alert-dialog.cjs +12 -46
- package/dist/components/ui/alert-dialog/alert-dialog.cjs.map +1 -1
- package/dist/components/ui/alert-dialog/alert-dialog.js +12 -46
- package/dist/components/ui/alert-dialog/alert-dialog.js.map +1 -1
- package/dist/components/ui/autocomplete/autocomplete.cjs +12 -12
- package/dist/components/ui/autocomplete/autocomplete.cjs.map +1 -1
- package/dist/components/ui/autocomplete/autocomplete.js +12 -12
- package/dist/components/ui/autocomplete/autocomplete.js.map +1 -1
- package/dist/components/ui/avatar/avatar.cjs +1 -4
- package/dist/components/ui/avatar/avatar.cjs.map +1 -1
- package/dist/components/ui/avatar/avatar.js +1 -4
- package/dist/components/ui/avatar/avatar.js.map +1 -1
- package/dist/components/ui/badge/badge.cjs +1 -8
- package/dist/components/ui/badge/badge.cjs.map +1 -1
- package/dist/components/ui/badge/badge.js +1 -8
- package/dist/components/ui/badge/badge.js.map +1 -1
- package/dist/components/ui/breadcrumb/breadcrumb.cjs +6 -19
- package/dist/components/ui/breadcrumb/breadcrumb.cjs.map +1 -1
- package/dist/components/ui/breadcrumb/breadcrumb.js +6 -19
- package/dist/components/ui/breadcrumb/breadcrumb.js.map +1 -1
- package/dist/components/ui/button/button.cjs.map +1 -1
- package/dist/components/ui/button/button.js.map +1 -1
- package/dist/components/ui/calendar/calendar.cjs +1 -6
- package/dist/components/ui/calendar/calendar.cjs.map +1 -1
- package/dist/components/ui/calendar/calendar.js +1 -6
- package/dist/components/ui/calendar/calendar.js.map +1 -1
- package/dist/components/ui/card/card.cjs +7 -17
- package/dist/components/ui/card/card.cjs.map +1 -1
- package/dist/components/ui/card/card.js +7 -17
- package/dist/components/ui/card/card.js.map +1 -1
- package/dist/components/ui/carousel/carousel.cjs +4 -11
- package/dist/components/ui/carousel/carousel.cjs.map +1 -1
- package/dist/components/ui/carousel/carousel.js +4 -11
- package/dist/components/ui/carousel/carousel.js.map +1 -1
- package/dist/components/ui/checkbox/checkbox.cjs +1 -7
- package/dist/components/ui/checkbox/checkbox.cjs.map +1 -1
- package/dist/components/ui/checkbox/checkbox.js +1 -7
- package/dist/components/ui/checkbox/checkbox.js.map +1 -1
- package/dist/components/ui/collapsible/collapsible.cjs.map +1 -1
- package/dist/components/ui/collapsible/collapsible.js.map +1 -1
- package/dist/components/ui/combobox/combobox.cjs +1 -3
- package/dist/components/ui/combobox/combobox.cjs.map +1 -1
- package/dist/components/ui/combobox/combobox.js +1 -3
- package/dist/components/ui/combobox/combobox.js.map +1 -1
- package/dist/components/ui/command/command.cjs +7 -24
- package/dist/components/ui/command/command.cjs.map +1 -1
- package/dist/components/ui/command/command.js +7 -24
- package/dist/components/ui/command/command.js.map +1 -1
- package/dist/components/ui/context-menu/context-menu.cjs +4 -18
- package/dist/components/ui/context-menu/context-menu.cjs.map +1 -1
- package/dist/components/ui/context-menu/context-menu.js +4 -18
- package/dist/components/ui/context-menu/context-menu.js.map +1 -1
- package/dist/components/ui/date-picker/date-picker.cjs +21 -57
- package/dist/components/ui/date-picker/date-picker.cjs.map +1 -1
- package/dist/components/ui/date-picker/date-picker.js +22 -62
- package/dist/components/ui/date-picker/date-picker.js.map +1 -1
- package/dist/components/ui/dialog/dialog.cjs +12 -29
- package/dist/components/ui/dialog/dialog.cjs.map +1 -1
- package/dist/components/ui/dialog/dialog.js +12 -29
- package/dist/components/ui/dialog/dialog.js.map +1 -1
- package/dist/components/ui/drawer/drawer.cjs +9 -23
- package/dist/components/ui/drawer/drawer.cjs.map +1 -1
- package/dist/components/ui/drawer/drawer.js +9 -23
- package/dist/components/ui/drawer/drawer.js.map +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu.cjs +3 -16
- package/dist/components/ui/dropdown-menu/dropdown-menu.cjs.map +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu.js +3 -16
- package/dist/components/ui/dropdown-menu/dropdown-menu.js.map +1 -1
- package/dist/components/ui/form/form.cjs +7 -24
- package/dist/components/ui/form/form.cjs.map +1 -1
- package/dist/components/ui/form/form.js +7 -24
- package/dist/components/ui/form/form.js.map +1 -1
- package/dist/components/ui/hover-card/hover-card.cjs +2 -6
- package/dist/components/ui/hover-card/hover-card.cjs.map +1 -1
- package/dist/components/ui/hover-card/hover-card.js +2 -6
- package/dist/components/ui/hover-card/hover-card.js.map +1 -1
- package/dist/components/ui/icon/icon.cjs +1 -1
- package/dist/components/ui/icon/icon.cjs.map +1 -1
- package/dist/components/ui/icon/icon.js +1 -1
- package/dist/components/ui/icon/icon.js.map +1 -1
- package/dist/components/ui/input/input.cjs +1 -1
- package/dist/components/ui/input/input.cjs.map +1 -1
- package/dist/components/ui/input/input.js +1 -1
- package/dist/components/ui/input/input.js.map +1 -1
- package/dist/components/ui/input-field/input-field.cjs +1 -1
- package/dist/components/ui/input-field/input-field.cjs.map +1 -1
- package/dist/components/ui/input-field/input-field.js +1 -1
- package/dist/components/ui/input-field/input-field.js.map +1 -1
- package/dist/components/ui/input-otp/input-otp.cjs +5 -15
- package/dist/components/ui/input-otp/input-otp.cjs.map +1 -1
- package/dist/components/ui/input-otp/input-otp.js +5 -15
- package/dist/components/ui/input-otp/input-otp.js.map +1 -1
- package/dist/components/ui/label/label.cjs +2 -5
- package/dist/components/ui/label/label.cjs.map +1 -1
- package/dist/components/ui/label/label.js +2 -5
- package/dist/components/ui/label/label.js.map +1 -1
- package/dist/components/ui/loading-state/loading-state.cjs +3 -8
- package/dist/components/ui/loading-state/loading-state.cjs.map +1 -1
- package/dist/components/ui/loading-state/loading-state.d.cts +1 -1
- package/dist/components/ui/loading-state/loading-state.d.ts +1 -1
- package/dist/components/ui/loading-state/loading-state.js +3 -8
- package/dist/components/ui/loading-state/loading-state.js.map +1 -1
- package/dist/components/ui/menubar/menubar.cjs +5 -21
- package/dist/components/ui/menubar/menubar.cjs.map +1 -1
- package/dist/components/ui/menubar/menubar.js +5 -21
- package/dist/components/ui/menubar/menubar.js.map +1 -1
- package/dist/components/ui/month-year-picker/month-year-picker.cjs +5 -23
- package/dist/components/ui/month-year-picker/month-year-picker.cjs.map +1 -1
- package/dist/components/ui/month-year-picker/month-year-picker.js +6 -28
- package/dist/components/ui/month-year-picker/month-year-picker.js.map +1 -1
- package/dist/components/ui/multi-select/multi-select.cjs +12 -29
- package/dist/components/ui/multi-select/multi-select.cjs.map +1 -1
- package/dist/components/ui/multi-select/multi-select.js +12 -29
- package/dist/components/ui/multi-select/multi-select.js.map +1 -1
- package/dist/components/ui/navigation-menu/navigation-menu.cjs +7 -13
- package/dist/components/ui/navigation-menu/navigation-menu.cjs.map +1 -1
- package/dist/components/ui/navigation-menu/navigation-menu.js +7 -13
- package/dist/components/ui/navigation-menu/navigation-menu.js.map +1 -1
- package/dist/components/ui/pagination/pagination.cjs +4 -18
- package/dist/components/ui/pagination/pagination.cjs.map +1 -1
- package/dist/components/ui/pagination/pagination.js +4 -18
- package/dist/components/ui/pagination/pagination.js.map +1 -1
- package/dist/components/ui/popover/popover.cjs.map +1 -1
- package/dist/components/ui/popover/popover.js.map +1 -1
- package/dist/components/ui/progress/progress.cjs +2 -2
- package/dist/components/ui/progress/progress.cjs.map +1 -1
- package/dist/components/ui/progress/progress.js +2 -2
- package/dist/components/ui/progress/progress.js.map +1 -1
- package/dist/components/ui/radio-group/radio-group.cjs +1 -8
- package/dist/components/ui/radio-group/radio-group.cjs.map +1 -1
- package/dist/components/ui/radio-group/radio-group.js +1 -8
- package/dist/components/ui/radio-group/radio-group.js.map +1 -1
- package/dist/components/ui/resizable/resizable.cjs +3 -6
- package/dist/components/ui/resizable/resizable.cjs.map +1 -1
- package/dist/components/ui/resizable/resizable.js +4 -11
- package/dist/components/ui/resizable/resizable.js.map +1 -1
- package/dist/components/ui/rich-text-editor/rich-text-editor.cjs +25 -37
- package/dist/components/ui/rich-text-editor/rich-text-editor.cjs.map +1 -1
- package/dist/components/ui/rich-text-editor/rich-text-editor.js +25 -37
- package/dist/components/ui/rich-text-editor/rich-text-editor.js.map +1 -1
- package/dist/components/ui/scroll-area/scroll-area.cjs.map +1 -1
- package/dist/components/ui/scroll-area/scroll-area.js.map +1 -1
- package/dist/components/ui/section-loader/section-loader.cjs +4 -15
- package/dist/components/ui/section-loader/section-loader.cjs.map +1 -1
- package/dist/components/ui/section-loader/section-loader.js +4 -15
- package/dist/components/ui/section-loader/section-loader.js.map +1 -1
- package/dist/components/ui/select/select.cjs +11 -29
- package/dist/components/ui/select/select.cjs.map +1 -1
- package/dist/components/ui/select/select.js +11 -29
- package/dist/components/ui/select/select.js.map +1 -1
- package/dist/components/ui/separator/separator.cjs +14 -16
- package/dist/components/ui/separator/separator.cjs.map +1 -1
- package/dist/components/ui/separator/separator.js +14 -16
- package/dist/components/ui/separator/separator.js.map +1 -1
- package/dist/components/ui/sheet/sheet.cjs +10 -24
- package/dist/components/ui/sheet/sheet.cjs.map +1 -1
- package/dist/components/ui/sheet/sheet.js +10 -24
- package/dist/components/ui/sheet/sheet.js.map +1 -1
- package/dist/components/ui/skeleton/skeleton.cjs +2 -11
- package/dist/components/ui/skeleton/skeleton.cjs.map +1 -1
- package/dist/components/ui/skeleton/skeleton.js +2 -11
- package/dist/components/ui/skeleton/skeleton.js.map +1 -1
- package/dist/components/ui/slider/slider.cjs +1 -4
- package/dist/components/ui/slider/slider.cjs.map +1 -1
- package/dist/components/ui/slider/slider.js +1 -4
- package/dist/components/ui/slider/slider.js.map +1 -1
- package/dist/components/ui/sonner/sonner.cjs.map +1 -1
- package/dist/components/ui/sonner/sonner.js.map +1 -1
- package/dist/components/ui/spinner/spinner.cjs +1 -1
- package/dist/components/ui/spinner/spinner.cjs.map +1 -1
- package/dist/components/ui/spinner/spinner.js +1 -1
- package/dist/components/ui/spinner/spinner.js.map +1 -1
- package/dist/components/ui/switch/switch.cjs.map +1 -1
- package/dist/components/ui/switch/switch.js.map +1 -1
- package/dist/components/ui/table/table.cjs +6 -28
- package/dist/components/ui/table/table.cjs.map +1 -1
- package/dist/components/ui/table/table.js +6 -28
- package/dist/components/ui/table/table.js.map +1 -1
- package/dist/components/ui/tabs/tabs.cjs.map +1 -1
- package/dist/components/ui/tabs/tabs.js.map +1 -1
- package/dist/components/ui/textarea/textarea.cjs +1 -4
- package/dist/components/ui/textarea/textarea.cjs.map +1 -1
- package/dist/components/ui/textarea/textarea.js +1 -4
- package/dist/components/ui/textarea/textarea.js.map +1 -1
- package/dist/components/ui/toast/toast.cjs +3 -12
- package/dist/components/ui/toast/toast.cjs.map +1 -1
- package/dist/components/ui/toast/toast.js +3 -12
- package/dist/components/ui/toast/toast.js.map +1 -1
- package/dist/components/ui/toggle/toggle.cjs.map +1 -1
- package/dist/components/ui/toggle/toggle.js.map +1 -1
- package/dist/components/ui/toggle-group/toggle-group.cjs +1 -4
- package/dist/components/ui/toggle-group/toggle-group.cjs.map +1 -1
- package/dist/components/ui/toggle-group/toggle-group.js +1 -4
- package/dist/components/ui/toggle-group/toggle-group.js.map +1 -1
- package/dist/components/ui/tooltip/tooltip.cjs.map +1 -1
- package/dist/components/ui/tooltip/tooltip.js.map +1 -1
- package/package.json +1 -1
|
@@ -34,7 +34,7 @@ function Card({ className, ...props }) {
|
|
|
34
34
|
"div",
|
|
35
35
|
{
|
|
36
36
|
"data-slot": "card",
|
|
37
|
-
className: (0, import_utils.cn)("flex flex-col gap-4 rounded-lg border bg-card
|
|
37
|
+
className: (0, import_utils.cn)("flex flex-col gap-4 rounded-lg border bg-card px-4 py-4 shadow-sm", className),
|
|
38
38
|
...props
|
|
39
39
|
}
|
|
40
40
|
);
|
|
@@ -45,7 +45,7 @@ function CardHeader({ className, ...props }) {
|
|
|
45
45
|
{
|
|
46
46
|
"data-slot": "card-header",
|
|
47
47
|
className: (0, import_utils.cn)(
|
|
48
|
-
"@container/card-header
|
|
48
|
+
"@container/card-header has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-4 grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-4",
|
|
49
49
|
className
|
|
50
50
|
),
|
|
51
51
|
...props
|
|
@@ -57,7 +57,7 @@ function CardTitle({ className, ...props }) {
|
|
|
57
57
|
"div",
|
|
58
58
|
{
|
|
59
59
|
"data-slot": "card-title",
|
|
60
|
-
className: (0, import_utils.cn)("leading-none
|
|
60
|
+
className: (0, import_utils.cn)("font-semibold leading-none", className),
|
|
61
61
|
...props
|
|
62
62
|
}
|
|
63
63
|
);
|
|
@@ -67,7 +67,7 @@ function CardDescription({ className, ...props }) {
|
|
|
67
67
|
"div",
|
|
68
68
|
{
|
|
69
69
|
"data-slot": "card-description",
|
|
70
|
-
className: (0, import_utils.cn)("text-muted-foreground
|
|
70
|
+
className: (0, import_utils.cn)("text-sm text-muted-foreground", className),
|
|
71
71
|
...props
|
|
72
72
|
}
|
|
73
73
|
);
|
|
@@ -77,30 +77,20 @@ function CardAction({ className, ...props }) {
|
|
|
77
77
|
"div",
|
|
78
78
|
{
|
|
79
79
|
"data-slot": "card-action",
|
|
80
|
-
className: (0, import_utils.cn)(
|
|
81
|
-
"col-start-2 row-span-2 row-start-1 self-start justify-self-end",
|
|
82
|
-
className
|
|
83
|
-
),
|
|
80
|
+
className: (0, import_utils.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end", className),
|
|
84
81
|
...props
|
|
85
82
|
}
|
|
86
83
|
);
|
|
87
84
|
}
|
|
88
85
|
function CardContent({ className, ...props }) {
|
|
89
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
90
|
-
"div",
|
|
91
|
-
{
|
|
92
|
-
"data-slot": "card-content",
|
|
93
|
-
className: (0, import_utils.cn)("px-4", className),
|
|
94
|
-
...props
|
|
95
|
-
}
|
|
96
|
-
);
|
|
86
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { "data-slot": "card-content", className: (0, import_utils.cn)("px-4", className), ...props });
|
|
97
87
|
}
|
|
98
88
|
function CardFooter({ className, ...props }) {
|
|
99
89
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
100
90
|
"div",
|
|
101
91
|
{
|
|
102
92
|
"data-slot": "card-footer",
|
|
103
|
-
className: (0, import_utils.cn)("
|
|
93
|
+
className: (0, import_utils.cn)("[.border-t]:pt-4 flex items-center px-4", className),
|
|
104
94
|
...props
|
|
105
95
|
}
|
|
106
96
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/ui/card/card.tsx"],"sourcesContent":["import * as React from \"react\";\n\nimport { cn } from \"../../../lib/utils\";\n\nfunction Card({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card\"\n className={cn(\"flex flex-col gap-4 rounded-lg border bg-card
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/ui/card/card.tsx"],"sourcesContent":["import * as React from \"react\";\n\nimport { cn } from \"../../../lib/utils\";\n\nfunction Card({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card\"\n className={cn(\"flex flex-col gap-4 rounded-lg border bg-card px-4 py-4 shadow-sm\", className)}\n {...props}\n />\n );\n}\n\nfunction CardHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-header\"\n className={cn(\n \"@container/card-header has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-4 grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CardTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-title\"\n className={cn(\"font-semibold leading-none\", className)}\n {...props}\n />\n );\n}\n\nfunction CardDescription({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-description\"\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n );\n}\n\nfunction CardAction({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-action\"\n className={cn(\"col-start-2 row-span-2 row-start-1 self-start justify-self-end\", className)}\n {...props}\n />\n );\n}\n\nfunction CardContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return <div data-slot=\"card-content\" className={cn(\"px-4\", className)} {...props} />;\n}\n\nfunction CardFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-footer\"\n className={cn(\"[.border-t]:pt-4 flex items-center px-4\", className)}\n {...props}\n />\n );\n}\n\nexport { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent };\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAMI;AAJJ,mBAAmB;AAEnB,SAAS,KAAK,EAAE,WAAW,GAAG,MAAM,GAAgC;AAClE,SACE;AAAA,IAA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"data-slot": "card",
|
|
8
|
-
className: cn("flex flex-col gap-4 rounded-lg border bg-card
|
|
8
|
+
className: cn("flex flex-col gap-4 rounded-lg border bg-card px-4 py-4 shadow-sm", className),
|
|
9
9
|
...props
|
|
10
10
|
}
|
|
11
11
|
);
|
|
@@ -16,7 +16,7 @@ function CardHeader({ className, ...props }) {
|
|
|
16
16
|
{
|
|
17
17
|
"data-slot": "card-header",
|
|
18
18
|
className: cn(
|
|
19
|
-
"@container/card-header
|
|
19
|
+
"@container/card-header has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-4 grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-4",
|
|
20
20
|
className
|
|
21
21
|
),
|
|
22
22
|
...props
|
|
@@ -28,7 +28,7 @@ function CardTitle({ className, ...props }) {
|
|
|
28
28
|
"div",
|
|
29
29
|
{
|
|
30
30
|
"data-slot": "card-title",
|
|
31
|
-
className: cn("leading-none
|
|
31
|
+
className: cn("font-semibold leading-none", className),
|
|
32
32
|
...props
|
|
33
33
|
}
|
|
34
34
|
);
|
|
@@ -38,7 +38,7 @@ function CardDescription({ className, ...props }) {
|
|
|
38
38
|
"div",
|
|
39
39
|
{
|
|
40
40
|
"data-slot": "card-description",
|
|
41
|
-
className: cn("text-muted-foreground
|
|
41
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
42
42
|
...props
|
|
43
43
|
}
|
|
44
44
|
);
|
|
@@ -48,30 +48,20 @@ function CardAction({ className, ...props }) {
|
|
|
48
48
|
"div",
|
|
49
49
|
{
|
|
50
50
|
"data-slot": "card-action",
|
|
51
|
-
className: cn(
|
|
52
|
-
"col-start-2 row-span-2 row-start-1 self-start justify-self-end",
|
|
53
|
-
className
|
|
54
|
-
),
|
|
51
|
+
className: cn("col-start-2 row-span-2 row-start-1 self-start justify-self-end", className),
|
|
55
52
|
...props
|
|
56
53
|
}
|
|
57
54
|
);
|
|
58
55
|
}
|
|
59
56
|
function CardContent({ className, ...props }) {
|
|
60
|
-
return /* @__PURE__ */ jsx(
|
|
61
|
-
"div",
|
|
62
|
-
{
|
|
63
|
-
"data-slot": "card-content",
|
|
64
|
-
className: cn("px-4", className),
|
|
65
|
-
...props
|
|
66
|
-
}
|
|
67
|
-
);
|
|
57
|
+
return /* @__PURE__ */ jsx("div", { "data-slot": "card-content", className: cn("px-4", className), ...props });
|
|
68
58
|
}
|
|
69
59
|
function CardFooter({ className, ...props }) {
|
|
70
60
|
return /* @__PURE__ */ jsx(
|
|
71
61
|
"div",
|
|
72
62
|
{
|
|
73
63
|
"data-slot": "card-footer",
|
|
74
|
-
className: cn("
|
|
64
|
+
className: cn("[.border-t]:pt-4 flex items-center px-4", className),
|
|
75
65
|
...props
|
|
76
66
|
}
|
|
77
67
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/ui/card/card.tsx"],"sourcesContent":["import * as React from \"react\";\n\nimport { cn } from \"../../../lib/utils\";\n\nfunction Card({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card\"\n className={cn(\"flex flex-col gap-4 rounded-lg border bg-card
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/ui/card/card.tsx"],"sourcesContent":["import * as React from \"react\";\n\nimport { cn } from \"../../../lib/utils\";\n\nfunction Card({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card\"\n className={cn(\"flex flex-col gap-4 rounded-lg border bg-card px-4 py-4 shadow-sm\", className)}\n {...props}\n />\n );\n}\n\nfunction CardHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-header\"\n className={cn(\n \"@container/card-header has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-4 grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CardTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-title\"\n className={cn(\"font-semibold leading-none\", className)}\n {...props}\n />\n );\n}\n\nfunction CardDescription({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-description\"\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n );\n}\n\nfunction CardAction({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-action\"\n className={cn(\"col-start-2 row-span-2 row-start-1 self-start justify-self-end\", className)}\n {...props}\n />\n );\n}\n\nfunction CardContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return <div data-slot=\"card-content\" className={cn(\"px-4\", className)} {...props} />;\n}\n\nfunction CardFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-footer\"\n className={cn(\"[.border-t]:pt-4 flex items-center px-4\", className)}\n {...props}\n />\n );\n}\n\nexport { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent };\n"],"mappings":"AAMI;AAJJ,SAAS,UAAU;AAEnB,SAAS,KAAK,EAAE,WAAW,GAAG,MAAM,GAAgC;AAClE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW,GAAG,qEAAqE,SAAS;AAAA,MAC3F,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,SAAS,WAAW,EAAE,WAAW,GAAG,MAAM,GAAgC;AACxE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,SAAS,UAAU,EAAE,WAAW,GAAG,MAAM,GAAgC;AACvE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW,GAAG,8BAA8B,SAAS;AAAA,MACpD,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,SAAS,gBAAgB,EAAE,WAAW,GAAG,MAAM,GAAgC;AAC7E,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW,GAAG,iCAAiC,SAAS;AAAA,MACvD,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,SAAS,WAAW,EAAE,WAAW,GAAG,MAAM,GAAgC;AACxE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW,GAAG,kEAAkE,SAAS;AAAA,MACxF,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,SAAS,YAAY,EAAE,WAAW,GAAG,MAAM,GAAgC;AACzE,SAAO,oBAAC,SAAI,aAAU,gBAAe,WAAW,GAAG,QAAQ,SAAS,GAAI,GAAG,OAAO;AACpF;AAEA,SAAS,WAAW,EAAE,WAAW,GAAG,MAAM,GAAgC;AACxE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW,GAAG,2CAA2C,SAAS;AAAA,MACjE,GAAG;AAAA;AAAA,EACN;AAEJ;","names":[]}
|
|
@@ -132,20 +132,13 @@ function Carousel({
|
|
|
132
132
|
}
|
|
133
133
|
);
|
|
134
134
|
}
|
|
135
|
-
function CarouselContent({
|
|
136
|
-
className,
|
|
137
|
-
...props
|
|
138
|
-
}) {
|
|
135
|
+
function CarouselContent({ className, ...props }) {
|
|
139
136
|
const { carouselRef, orientation } = useCarousel();
|
|
140
137
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ref: carouselRef, className: "overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
141
138
|
"div",
|
|
142
139
|
{
|
|
143
140
|
"data-slot": "carousel-content",
|
|
144
|
-
className: (0, import_utils.cn)(
|
|
145
|
-
"flex",
|
|
146
|
-
orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col",
|
|
147
|
-
className
|
|
148
|
-
),
|
|
141
|
+
className: (0, import_utils.cn)("flex", orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col", className),
|
|
149
142
|
...props
|
|
150
143
|
}
|
|
151
144
|
) });
|
|
@@ -182,7 +175,7 @@ function CarouselPrevious({
|
|
|
182
175
|
size,
|
|
183
176
|
className: (0, import_utils.cn)(
|
|
184
177
|
"absolute size-8 rounded-full",
|
|
185
|
-
orientation === "horizontal" ? "top-1/2 -
|
|
178
|
+
orientation === "horizontal" ? "-left-12 top-1/2 -translate-y-1/2" : "-top-12 left-1/2 -translate-x-1/2 rotate-90",
|
|
186
179
|
className
|
|
187
180
|
),
|
|
188
181
|
disabled: !canScrollPrev,
|
|
@@ -210,7 +203,7 @@ function CarouselNext({
|
|
|
210
203
|
size,
|
|
211
204
|
className: (0, import_utils.cn)(
|
|
212
205
|
"absolute size-8 rounded-full",
|
|
213
|
-
orientation === "horizontal" ? "top-1/2 -
|
|
206
|
+
orientation === "horizontal" ? "-right-12 top-1/2 -translate-y-1/2" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90",
|
|
214
207
|
className
|
|
215
208
|
),
|
|
216
209
|
disabled: !canScrollNext,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/ui/carousel/carousel.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport useEmblaCarousel, {\n type UseEmblaCarouselType,\n} from \"embla-carousel-react\";\nimport { ArrowLeftIcon, ArrowRightIcon } from \"lucide-react\";\n\nimport { cn } from \"../../../lib/utils\";\nimport { Button } from \"../button\";\n\ntype CarouselApi = UseEmblaCarouselType[1];\ntype UseCarouselParameters = Parameters<typeof useEmblaCarousel>;\ntype CarouselOptions = UseCarouselParameters[0];\ntype CarouselPlugin = UseCarouselParameters[1];\n\ntype CarouselProps = {\n opts?: CarouselOptions;\n plugins?: CarouselPlugin;\n orientation?: \"horizontal\" | \"vertical\";\n setApi?: (api: CarouselApi) => void;\n};\n\ntype CarouselContextProps = {\n carouselRef: ReturnType<typeof useEmblaCarousel>[0];\n api: ReturnType<typeof useEmblaCarousel>[1];\n scrollPrev: () => void;\n scrollNext: () => void;\n canScrollPrev: boolean;\n canScrollNext: boolean;\n} & CarouselProps;\n\nconst CarouselContext = React.createContext<CarouselContextProps | null>(null);\n\nfunction useCarousel() {\n const context = React.useContext(CarouselContext);\n\n if (!context) {\n throw new Error(\"useCarousel must be used within a <Carousel />\");\n }\n\n return context;\n}\n\nfunction Carousel({\n orientation = \"horizontal\",\n opts,\n setApi,\n plugins,\n className,\n children,\n ...props\n}: React.ComponentProps<\"div\"> & CarouselProps) {\n const [carouselRef, api] = useEmblaCarousel(\n {\n ...opts,\n axis: orientation === \"horizontal\" ? \"x\" : \"y\",\n },\n plugins\n );\n const [canScrollPrev, setCanScrollPrev] = React.useState(false);\n const [canScrollNext, setCanScrollNext] = React.useState(false);\n\n const onSelect = React.useCallback((api: CarouselApi) => {\n if (!api) return;\n setCanScrollPrev(api.canScrollPrev());\n setCanScrollNext(api.canScrollNext());\n }, []);\n\n const scrollPrev = React.useCallback(() => {\n api?.scrollPrev();\n }, [api]);\n\n const scrollNext = React.useCallback(() => {\n api?.scrollNext();\n }, [api]);\n\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (event.key === \"ArrowLeft\") {\n event.preventDefault();\n scrollPrev();\n } else if (event.key === \"ArrowRight\") {\n event.preventDefault();\n scrollNext();\n }\n },\n [scrollPrev, scrollNext]\n );\n\n React.useEffect(() => {\n if (!api || !setApi) return;\n setApi(api);\n }, [api, setApi]);\n\n React.useEffect(() => {\n if (!api) return;\n onSelect(api);\n api.on(\"reInit\", onSelect);\n api.on(\"select\", onSelect);\n\n return () => {\n api?.off(\"select\", onSelect);\n };\n }, [api, onSelect]);\n\n return (\n <CarouselContext.Provider\n value={{\n carouselRef,\n api,\n opts,\n orientation:\n orientation ||\n (opts?.axis === \"y\" ? \"vertical\" : \"horizontal\"),\n scrollPrev,\n scrollNext,\n canScrollPrev,\n canScrollNext,\n }}\n >\n <div\n data-slot=\"carousel\"\n onKeyDownCapture={handleKeyDown}\n className={cn(\"relative\", className)}\n role=\"region\"\n aria-roledescription=\"carousel\"\n {...props}\n >\n {children}\n </div>\n </CarouselContext.Provider>\n );\n}\n\nfunction CarouselContent({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n const { carouselRef, orientation } = useCarousel();\n\n return (\n <div ref={carouselRef} className=\"overflow-hidden\">\n <div\n data-slot=\"carousel-content\"\n className={cn(\n \"flex\",\n orientation === \"horizontal\" ? \"-ml-4\" : \"-mt-4 flex-col\",\n className\n )}\n {...props}\n />\n </div>\n );\n}\n\nfunction CarouselItem({ className, ...props }: React.ComponentProps<\"div\">) {\n const { orientation } = useCarousel();\n\n return (\n <div\n data-slot=\"carousel-item\"\n role=\"group\"\n aria-roledescription=\"slide\"\n className={cn(\n \"min-w-0 shrink-0 grow-0 basis-full\",\n orientation === \"horizontal\" ? \"pl-4\" : \"pt-4\",\n className\n )}\n {...props}\n />\n );\n}\n\nfunction CarouselPrevious({\n className,\n variant = \"outline\",\n size = \"icon\",\n ...props\n}: React.ComponentProps<typeof Button>) {\n const { orientation, scrollPrev, canScrollPrev } = useCarousel();\n\n return (\n <Button\n data-slot=\"carousel-previous\"\n variant={variant}\n size={size}\n className={cn(\n \"absolute size-8 rounded-full\",\n orientation === \"horizontal\"\n ? \"top-1/2 -left-12 -translate-y-1/2\"\n : \"left-1/2 -top-12 -translate-x-1/2 rotate-90\",\n className\n )}\n disabled={!canScrollPrev}\n onClick={scrollPrev}\n {...props}\n >\n <ArrowLeftIcon className=\"size-4\" />\n <span className=\"sr-only\">Previous slide</span>\n </Button>\n );\n}\n\nfunction CarouselNext({\n className,\n variant = \"outline\",\n size = \"icon\",\n ...props\n}: React.ComponentProps<typeof Button>) {\n const { orientation, scrollNext, canScrollNext } = useCarousel();\n\n return (\n <Button\n data-slot=\"carousel-next\"\n variant={variant}\n size={size}\n className={cn(\n \"absolute size-8 rounded-full\",\n orientation === \"horizontal\"\n ? \"top-1/2 -right-12 -translate-y-1/2\"\n : \"left-1/2 -bottom-12 -translate-x-1/2 rotate-90\",\n className\n )}\n disabled={!canScrollNext}\n onClick={scrollNext}\n {...props}\n >\n <ArrowRightIcon className=\"size-4\" />\n <span className=\"sr-only\">Next slide</span>\n </Button>\n );\n}\n\nexport {\n type CarouselApi,\n Carousel,\n CarouselContent,\n CarouselItem,\n CarouselPrevious,\n CarouselNext,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAyHY;AAvHZ,YAAuB;AACvB,kCAEO;AACP,0BAA8C;AAE9C,mBAAmB;AACnB,oBAAuB;AAuBvB,MAAM,kBAAkB,MAAM,cAA2C,IAAI;AAE7E,SAAS,cAAc;AACnB,QAAM,UAAU,MAAM,WAAW,eAAe;AAEhD,MAAI,CAAC,SAAS;AACV,UAAM,IAAI,MAAM,gDAAgD;AAAA,EACpE;AAEA,SAAO;AACX;AAEA,SAAS,SAAS;AAAA,EACd,cAAc;AAAA,EACd;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACP,GAAgD;AAC5C,QAAM,CAAC,aAAa,GAAG,QAAI,4BAAAA;AAAA,IACvB;AAAA,MACI,GAAG;AAAA,MACH,MAAM,gBAAgB,eAAe,MAAM;AAAA,IAC/C;AAAA,IACA;AAAA,EACJ;AACA,QAAM,CAAC,eAAe,gBAAgB,IAAI,MAAM,SAAS,KAAK;AAC9D,QAAM,CAAC,eAAe,gBAAgB,IAAI,MAAM,SAAS,KAAK;AAE9D,QAAM,WAAW,MAAM,YAAY,CAACC,SAAqB;AACrD,QAAI,CAACA,KAAK;AACV,qBAAiBA,KAAI,cAAc,CAAC;AACpC,qBAAiBA,KAAI,cAAc,CAAC;AAAA,EACxC,GAAG,CAAC,CAAC;AAEL,QAAM,aAAa,MAAM,YAAY,MAAM;AACvC,SAAK,WAAW;AAAA,EACpB,GAAG,CAAC,GAAG,CAAC;AAER,QAAM,aAAa,MAAM,YAAY,MAAM;AACvC,SAAK,WAAW;AAAA,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;AAAA,MAEJ;AAAA,oDAAC,sCAAe,WAAU,UAAS;AAAA,QACnC,4CAAC,UAAK,WAAU,WAAU,wBAAU;AAAA;AAAA;AAAA,EACxC;AAER;","names":["useEmblaCarousel","api"]}
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/ui/carousel/carousel.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport useEmblaCarousel, { type UseEmblaCarouselType } from \"embla-carousel-react\";\nimport { ArrowLeftIcon, ArrowRightIcon } from \"lucide-react\";\n\nimport { cn } from \"../../../lib/utils\";\nimport { Button } from \"../button\";\n\ntype CarouselApi = UseEmblaCarouselType[1];\ntype UseCarouselParameters = Parameters<typeof useEmblaCarousel>;\ntype CarouselOptions = UseCarouselParameters[0];\ntype CarouselPlugin = UseCarouselParameters[1];\n\ntype CarouselProps = {\n opts?: CarouselOptions;\n plugins?: CarouselPlugin;\n orientation?: \"horizontal\" | \"vertical\";\n setApi?: (api: CarouselApi) => void;\n};\n\ntype CarouselContextProps = {\n carouselRef: ReturnType<typeof useEmblaCarousel>[0];\n api: ReturnType<typeof useEmblaCarousel>[1];\n scrollPrev: () => void;\n scrollNext: () => void;\n canScrollPrev: boolean;\n canScrollNext: boolean;\n} & CarouselProps;\n\nconst CarouselContext = React.createContext<CarouselContextProps | null>(null);\n\nfunction useCarousel() {\n const context = React.useContext(CarouselContext);\n\n if (!context) {\n throw new Error(\"useCarousel must be used within a <Carousel />\");\n }\n\n return context;\n}\n\nfunction Carousel({\n orientation = \"horizontal\",\n opts,\n setApi,\n plugins,\n className,\n children,\n ...props\n}: React.ComponentProps<\"div\"> & CarouselProps) {\n const [carouselRef, api] = useEmblaCarousel(\n {\n ...opts,\n axis: orientation === \"horizontal\" ? \"x\" : \"y\",\n },\n plugins,\n );\n const [canScrollPrev, setCanScrollPrev] = React.useState(false);\n const [canScrollNext, setCanScrollNext] = React.useState(false);\n\n const onSelect = React.useCallback((api: CarouselApi) => {\n if (!api) return;\n setCanScrollPrev(api.canScrollPrev());\n setCanScrollNext(api.canScrollNext());\n }, []);\n\n const scrollPrev = React.useCallback(() => {\n api?.scrollPrev();\n }, [api]);\n\n const scrollNext = React.useCallback(() => {\n api?.scrollNext();\n }, [api]);\n\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (event.key === \"ArrowLeft\") {\n event.preventDefault();\n scrollPrev();\n } else if (event.key === \"ArrowRight\") {\n event.preventDefault();\n scrollNext();\n }\n },\n [scrollPrev, scrollNext],\n );\n\n React.useEffect(() => {\n if (!api || !setApi) return;\n setApi(api);\n }, [api, setApi]);\n\n React.useEffect(() => {\n if (!api) return;\n onSelect(api);\n api.on(\"reInit\", onSelect);\n api.on(\"select\", onSelect);\n\n return () => {\n api?.off(\"select\", onSelect);\n };\n }, [api, onSelect]);\n\n return (\n <CarouselContext.Provider\n value={{\n carouselRef,\n api,\n opts,\n orientation: orientation || (opts?.axis === \"y\" ? \"vertical\" : \"horizontal\"),\n scrollPrev,\n scrollNext,\n canScrollPrev,\n canScrollNext,\n }}\n >\n <div\n data-slot=\"carousel\"\n onKeyDownCapture={handleKeyDown}\n className={cn(\"relative\", className)}\n role=\"region\"\n aria-roledescription=\"carousel\"\n {...props}\n >\n {children}\n </div>\n </CarouselContext.Provider>\n );\n}\n\nfunction CarouselContent({ className, ...props }: React.ComponentProps<\"div\">) {\n const { carouselRef, orientation } = useCarousel();\n\n return (\n <div ref={carouselRef} className=\"overflow-hidden\">\n <div\n data-slot=\"carousel-content\"\n className={cn(\"flex\", orientation === \"horizontal\" ? \"-ml-4\" : \"-mt-4 flex-col\", className)}\n {...props}\n />\n </div>\n );\n}\n\nfunction CarouselItem({ className, ...props }: React.ComponentProps<\"div\">) {\n const { orientation } = useCarousel();\n\n return (\n <div\n data-slot=\"carousel-item\"\n role=\"group\"\n aria-roledescription=\"slide\"\n className={cn(\n \"min-w-0 shrink-0 grow-0 basis-full\",\n orientation === \"horizontal\" ? \"pl-4\" : \"pt-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CarouselPrevious({\n className,\n variant = \"outline\",\n size = \"icon\",\n ...props\n}: React.ComponentProps<typeof Button>) {\n const { orientation, scrollPrev, canScrollPrev } = useCarousel();\n\n return (\n <Button\n data-slot=\"carousel-previous\"\n variant={variant}\n size={size}\n className={cn(\n \"absolute size-8 rounded-full\",\n orientation === \"horizontal\"\n ? \"-left-12 top-1/2 -translate-y-1/2\"\n : \"-top-12 left-1/2 -translate-x-1/2 rotate-90\",\n className,\n )}\n disabled={!canScrollPrev}\n onClick={scrollPrev}\n {...props}\n >\n <ArrowLeftIcon className=\"size-4\" />\n <span className=\"sr-only\">Previous slide</span>\n </Button>\n );\n}\n\nfunction CarouselNext({\n className,\n variant = \"outline\",\n size = \"icon\",\n ...props\n}: React.ComponentProps<typeof Button>) {\n const { orientation, scrollNext, canScrollNext } = useCarousel();\n\n return (\n <Button\n data-slot=\"carousel-next\"\n variant={variant}\n size={size}\n className={cn(\n \"absolute size-8 rounded-full\",\n orientation === \"horizontal\"\n ? \"-right-12 top-1/2 -translate-y-1/2\"\n : \"-bottom-12 left-1/2 -translate-x-1/2 rotate-90\",\n className,\n )}\n disabled={!canScrollNext}\n onClick={scrollNext}\n {...props}\n >\n <ArrowRightIcon className=\"size-4\" />\n <span className=\"sr-only\">Next slide</span>\n </Button>\n );\n}\n\nexport {\n type CarouselApi,\n Carousel,\n CarouselContent,\n CarouselItem,\n CarouselPrevious,\n CarouselNext,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAqHM;AAnHN,YAAuB;AACvB,kCAA4D;AAC5D,0BAA8C;AAE9C,mBAAmB;AACnB,oBAAuB;AAuBvB,MAAM,kBAAkB,MAAM,cAA2C,IAAI;AAE7E,SAAS,cAAc;AACrB,QAAM,UAAU,MAAM,WAAW,eAAe;AAEhD,MAAI,CAAC,SAAS;AACZ,U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L,GAAwC;AACtC,QAAM,EAAE,aAAa,YAAY,cAAc,IAAI,YAAY;AAE/D,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV;AAAA,MACA;AAAA,MACA,eAAW;AAAA,QACT;AAAA,QACA,gBAAgB,eACZ,sCACA;AAAA,QACJ;AAAA,MACF;AAAA,MACA,UAAU,CAAC;AAAA,MACX,SAAS;AAAA,MACR,GAAG;AAAA,MAEJ;AAAA,oDAAC,qCAAc,WAAU,UAAS;AAAA,QAClC,4CAAC,UAAK,WAAU,WAAU,4BAAc;AAAA;AAAA;AAAA,EAC1C;AAEJ;AAEA,SAAS,aAAa;AAAA,EACpB;AAAA,EACA,UAAU;AAAA,EACV,OAAO;AAAA,EACP,GAAG;AACL,GAAwC;AACtC,QAAM,EAAE,aAAa,YAAY,cAAc,IAAI,YAAY;AAE/D,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV;AAAA,MACA;AAAA,MACA,eAAW;AAAA,QACT;AAAA,QACA,gBAAgB,eACZ,uCACA;AAAA,QACJ;AAAA,MACF;AAAA,MACA,UAAU,CAAC;AAAA,MACX,SAAS;AAAA,MACR,GAAG;AAAA,MAEJ;AAAA,oDAAC,sCAAe,WAAU,UAAS;AAAA,QACnC,4CAAC,UAAK,WAAU,WAAU,wBAAU;AAAA;AAAA;AAAA,EACtC;AAEJ;","names":["useEmblaCarousel","api"]}
|
|
@@ -95,20 +95,13 @@ function Carousel({
|
|
|
95
95
|
}
|
|
96
96
|
);
|
|
97
97
|
}
|
|
98
|
-
function CarouselContent({
|
|
99
|
-
className,
|
|
100
|
-
...props
|
|
101
|
-
}) {
|
|
98
|
+
function CarouselContent({ className, ...props }) {
|
|
102
99
|
const { carouselRef, orientation } = useCarousel();
|
|
103
100
|
return /* @__PURE__ */ jsx("div", { ref: carouselRef, className: "overflow-hidden", children: /* @__PURE__ */ jsx(
|
|
104
101
|
"div",
|
|
105
102
|
{
|
|
106
103
|
"data-slot": "carousel-content",
|
|
107
|
-
className: cn(
|
|
108
|
-
"flex",
|
|
109
|
-
orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col",
|
|
110
|
-
className
|
|
111
|
-
),
|
|
104
|
+
className: cn("flex", orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col", className),
|
|
112
105
|
...props
|
|
113
106
|
}
|
|
114
107
|
) });
|
|
@@ -145,7 +138,7 @@ function CarouselPrevious({
|
|
|
145
138
|
size,
|
|
146
139
|
className: cn(
|
|
147
140
|
"absolute size-8 rounded-full",
|
|
148
|
-
orientation === "horizontal" ? "top-1/2 -
|
|
141
|
+
orientation === "horizontal" ? "-left-12 top-1/2 -translate-y-1/2" : "-top-12 left-1/2 -translate-x-1/2 rotate-90",
|
|
149
142
|
className
|
|
150
143
|
),
|
|
151
144
|
disabled: !canScrollPrev,
|
|
@@ -173,7 +166,7 @@ function CarouselNext({
|
|
|
173
166
|
size,
|
|
174
167
|
className: cn(
|
|
175
168
|
"absolute size-8 rounded-full",
|
|
176
|
-
orientation === "horizontal" ? "top-1/2 -
|
|
169
|
+
orientation === "horizontal" ? "-right-12 top-1/2 -translate-y-1/2" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90",
|
|
177
170
|
className
|
|
178
171
|
),
|
|
179
172
|
disabled: !canScrollNext,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/ui/carousel/carousel.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport useEmblaCarousel, {\n type UseEmblaCarouselType,\n} from \"embla-carousel-react\";\nimport { ArrowLeftIcon, ArrowRightIcon } from \"lucide-react\";\n\nimport { cn } from \"../../../lib/utils\";\nimport { Button } from \"../button\";\n\ntype CarouselApi = UseEmblaCarouselType[1];\ntype UseCarouselParameters = Parameters<typeof useEmblaCarousel>;\ntype CarouselOptions = UseCarouselParameters[0];\ntype CarouselPlugin = UseCarouselParameters[1];\n\ntype CarouselProps = {\n opts?: CarouselOptions;\n plugins?: CarouselPlugin;\n orientation?: \"horizontal\" | \"vertical\";\n setApi?: (api: CarouselApi) => void;\n};\n\ntype CarouselContextProps = {\n carouselRef: ReturnType<typeof useEmblaCarousel>[0];\n api: ReturnType<typeof useEmblaCarousel>[1];\n scrollPrev: () => void;\n scrollNext: () => void;\n canScrollPrev: boolean;\n canScrollNext: boolean;\n} & CarouselProps;\n\nconst CarouselContext = React.createContext<CarouselContextProps | null>(null);\n\nfunction useCarousel() {\n const context = React.useContext(CarouselContext);\n\n if (!context) {\n throw new Error(\"useCarousel must be used within a <Carousel />\");\n }\n\n return context;\n}\n\nfunction Carousel({\n orientation = \"horizontal\",\n opts,\n setApi,\n plugins,\n className,\n children,\n ...props\n}: React.ComponentProps<\"div\"> & CarouselProps) {\n const [carouselRef, api] = useEmblaCarousel(\n {\n ...opts,\n axis: orientation === \"horizontal\" ? \"x\" : \"y\",\n },\n plugins\n );\n const [canScrollPrev, setCanScrollPrev] = React.useState(false);\n const [canScrollNext, setCanScrollNext] = React.useState(false);\n\n const onSelect = React.useCallback((api: CarouselApi) => {\n if (!api) return;\n setCanScrollPrev(api.canScrollPrev());\n setCanScrollNext(api.canScrollNext());\n }, []);\n\n const scrollPrev = React.useCallback(() => {\n api?.scrollPrev();\n }, [api]);\n\n const scrollNext = React.useCallback(() => {\n api?.scrollNext();\n }, [api]);\n\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (event.key === \"ArrowLeft\") {\n event.preventDefault();\n scrollPrev();\n } else if (event.key === \"ArrowRight\") {\n event.preventDefault();\n scrollNext();\n }\n },\n [scrollPrev, scrollNext]\n );\n\n React.useEffect(() => {\n if (!api || !setApi) return;\n setApi(api);\n }, [api, setApi]);\n\n React.useEffect(() => {\n if (!api) return;\n onSelect(api);\n api.on(\"reInit\", onSelect);\n api.on(\"select\", onSelect);\n\n return () => {\n api?.off(\"select\", onSelect);\n };\n }, [api, onSelect]);\n\n return (\n <CarouselContext.Provider\n value={{\n carouselRef,\n api,\n opts,\n orientation:\n orientation ||\n (opts?.axis === \"y\" ? \"vertical\" : \"horizontal\"),\n scrollPrev,\n scrollNext,\n canScrollPrev,\n canScrollNext,\n }}\n >\n <div\n data-slot=\"carousel\"\n onKeyDownCapture={handleKeyDown}\n className={cn(\"relative\", className)}\n role=\"region\"\n aria-roledescription=\"carousel\"\n {...props}\n >\n {children}\n </div>\n </CarouselContext.Provider>\n );\n}\n\nfunction CarouselContent({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n const { carouselRef, orientation } = useCarousel();\n\n return (\n <div ref={carouselRef} className=\"overflow-hidden\">\n <div\n data-slot=\"carousel-content\"\n className={cn(\n \"flex\",\n orientation === \"horizontal\" ? \"-ml-4\" : \"-mt-4 flex-col\",\n className\n )}\n {...props}\n />\n </div>\n );\n}\n\nfunction CarouselItem({ className, ...props }: React.ComponentProps<\"div\">) {\n const { orientation } = useCarousel();\n\n return (\n <div\n data-slot=\"carousel-item\"\n role=\"group\"\n aria-roledescription=\"slide\"\n className={cn(\n \"min-w-0 shrink-0 grow-0 basis-full\",\n orientation === \"horizontal\" ? \"pl-4\" : \"pt-4\",\n className\n )}\n {...props}\n />\n );\n}\n\nfunction CarouselPrevious({\n className,\n variant = \"outline\",\n size = \"icon\",\n ...props\n}: React.ComponentProps<typeof Button>) {\n const { orientation, scrollPrev, canScrollPrev } = useCarousel();\n\n return (\n <Button\n data-slot=\"carousel-previous\"\n variant={variant}\n size={size}\n className={cn(\n \"absolute size-8 rounded-full\",\n orientation === \"horizontal\"\n ? \"top-1/2 -left-12 -translate-y-1/2\"\n : \"left-1/2 -top-12 -translate-x-1/2 rotate-90\",\n className\n )}\n disabled={!canScrollPrev}\n onClick={scrollPrev}\n {...props}\n >\n <ArrowLeftIcon className=\"size-4\" />\n <span className=\"sr-only\">Previous slide</span>\n </Button>\n );\n}\n\nfunction CarouselNext({\n className,\n variant = \"outline\",\n size = \"icon\",\n ...props\n}: React.ComponentProps<typeof Button>) {\n const { orientation, scrollNext, canScrollNext } = useCarousel();\n\n return (\n <Button\n data-slot=\"carousel-next\"\n variant={variant}\n size={size}\n className={cn(\n \"absolute size-8 rounded-full\",\n orientation === \"horizontal\"\n ? \"top-1/2 -right-12 -translate-y-1/2\"\n : \"left-1/2 -bottom-12 -translate-x-1/2 rotate-90\",\n className\n )}\n disabled={!canScrollNext}\n onClick={scrollNext}\n {...props}\n >\n <ArrowRightIcon className=\"size-4\" />\n <span className=\"sr-only\">Next slide</span>\n </Button>\n );\n}\n\nexport {\n type CarouselApi,\n Carousel,\n CarouselContent,\n CarouselItem,\n CarouselPrevious,\n CarouselNext,\n};\n"],"mappings":";AAyHY,cA8DJ,YA9DI;AAvHZ,YAAY,WAAW;AACvB,OAAO,sBAEA;AACP,SAAS,eAAe,sBAAsB;AAE9C,SAAS,UAAU;AACnB,SAAS,cAAc;AAuBvB,MAAM,kBAAkB,MAAM,cAA2C,IAAI;AAE7E,SAAS,cAAc;AACnB,QAAM,UAAU,MAAM,WAAW,eAAe;AAEhD,MAAI,CAAC,SAAS;AACV,UAAM,IAAI,MAAM,gDAAgD;AAAA,EACpE;AAEA,SAAO;AACX;AAEA,SAAS,SAAS;AAAA,EACd,cAAc;AAAA,EACd;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACP,GAAgD;AAC5C,QAAM,CAAC,aAAa,GAAG,IAAI;AAAA,IACvB;AAAA,MACI,GAAG;AAAA,MACH,MAAM,gBAAgB,eAAe,MAAM;AAAA,IAC/C;AAAA,IACA;AAAA,EACJ;AACA,QAAM,CAAC,eAAe,gBAAgB,IAAI,MAAM,SAAS,KAAK;AAC9D,QAAM,CAAC,eAAe,gBAAgB,IAAI,MAAM,SAAS,KAAK;AAE9D,QAAM,WAAW,MAAM,YAAY,CAACA,SAAqB;AACrD,QAAI,CAACA,KAAK;AACV,qBAAiBA,KAAI,cAAc,CAAC;AACpC,qBAAiBA,KAAI,cAAc,CAAC;AAAA,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AA,MACG,aAAU;AAAA,MACV;AAAA,MACA;AAAA,MACA,WAAW;AAAA,QACP;AAAA,QACA,gBAAgB,eACV,uCACA;AAAA,QACN;AAAA,MACJ;AAAA,MACA,UAAU,CAAC;AAAA,MACX,SAAS;AAAA,MACR,GAAG;AAAA,MAEJ;AAAA,4BAAC,kBAAe,WAAU,UAAS;AAAA,QACnC,oBAAC,UAAK,WAAU,WAAU,wBAAU;AAAA;AAAA;AAAA,EACxC;AAER;","names":["api"]}
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/ui/carousel/carousel.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport useEmblaCarousel, { type UseEmblaCarouselType } from \"embla-carousel-react\";\nimport { ArrowLeftIcon, ArrowRightIcon } from \"lucide-react\";\n\nimport { cn } from \"../../../lib/utils\";\nimport { Button } from \"../button\";\n\ntype CarouselApi = UseEmblaCarouselType[1];\ntype UseCarouselParameters = Parameters<typeof useEmblaCarousel>;\ntype CarouselOptions = UseCarouselParameters[0];\ntype CarouselPlugin = UseCarouselParameters[1];\n\ntype CarouselProps = {\n opts?: CarouselOptions;\n plugins?: CarouselPlugin;\n orientation?: \"horizontal\" | \"vertical\";\n setApi?: (api: CarouselApi) => void;\n};\n\ntype CarouselContextProps = {\n carouselRef: ReturnType<typeof useEmblaCarousel>[0];\n api: ReturnType<typeof useEmblaCarousel>[1];\n scrollPrev: () => void;\n scrollNext: () => void;\n canScrollPrev: boolean;\n canScrollNext: boolean;\n} & CarouselProps;\n\nconst CarouselContext = React.createContext<CarouselContextProps | null>(null);\n\nfunction useCarousel() {\n const context = React.useContext(CarouselContext);\n\n if (!context) {\n throw new Error(\"useCarousel must be used within a <Carousel />\");\n }\n\n return context;\n}\n\nfunction Carousel({\n orientation = \"horizontal\",\n opts,\n setApi,\n plugins,\n className,\n children,\n ...props\n}: React.ComponentProps<\"div\"> & CarouselProps) {\n const [carouselRef, api] = useEmblaCarousel(\n {\n ...opts,\n axis: orientation === \"horizontal\" ? \"x\" : \"y\",\n },\n plugins,\n );\n const [canScrollPrev, setCanScrollPrev] = React.useState(false);\n const [canScrollNext, setCanScrollNext] = React.useState(false);\n\n const onSelect = React.useCallback((api: CarouselApi) => {\n if (!api) return;\n setCanScrollPrev(api.canScrollPrev());\n setCanScrollNext(api.canScrollNext());\n }, []);\n\n const scrollPrev = React.useCallback(() => {\n api?.scrollPrev();\n }, [api]);\n\n const scrollNext = React.useCallback(() => {\n api?.scrollNext();\n }, [api]);\n\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (event.key === \"ArrowLeft\") {\n event.preventDefault();\n scrollPrev();\n } else if (event.key === \"ArrowRight\") {\n event.preventDefault();\n scrollNext();\n }\n },\n [scrollPrev, scrollNext],\n );\n\n React.useEffect(() => {\n if (!api || !setApi) return;\n setApi(api);\n }, [api, setApi]);\n\n React.useEffect(() => {\n if (!api) return;\n onSelect(api);\n api.on(\"reInit\", onSelect);\n api.on(\"select\", onSelect);\n\n return () => {\n api?.off(\"select\", onSelect);\n };\n }, [api, onSelect]);\n\n return (\n <CarouselContext.Provider\n value={{\n carouselRef,\n api,\n opts,\n orientation: orientation || (opts?.axis === \"y\" ? \"vertical\" : \"horizontal\"),\n scrollPrev,\n scrollNext,\n canScrollPrev,\n canScrollNext,\n }}\n >\n <div\n data-slot=\"carousel\"\n onKeyDownCapture={handleKeyDown}\n className={cn(\"relative\", className)}\n role=\"region\"\n aria-roledescription=\"carousel\"\n {...props}\n >\n {children}\n </div>\n </CarouselContext.Provider>\n );\n}\n\nfunction CarouselContent({ className, ...props }: React.ComponentProps<\"div\">) {\n const { carouselRef, orientation } = useCarousel();\n\n return (\n <div ref={carouselRef} className=\"overflow-hidden\">\n <div\n data-slot=\"carousel-content\"\n className={cn(\"flex\", orientation === \"horizontal\" ? \"-ml-4\" : \"-mt-4 flex-col\", className)}\n {...props}\n />\n </div>\n );\n}\n\nfunction CarouselItem({ className, ...props }: React.ComponentProps<\"div\">) {\n const { orientation } = useCarousel();\n\n return (\n <div\n data-slot=\"carousel-item\"\n role=\"group\"\n aria-roledescription=\"slide\"\n className={cn(\n \"min-w-0 shrink-0 grow-0 basis-full\",\n orientation === \"horizontal\" ? \"pl-4\" : \"pt-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CarouselPrevious({\n className,\n variant = \"outline\",\n size = \"icon\",\n ...props\n}: React.ComponentProps<typeof Button>) {\n const { orientation, scrollPrev, canScrollPrev } = useCarousel();\n\n return (\n <Button\n data-slot=\"carousel-previous\"\n variant={variant}\n size={size}\n className={cn(\n \"absolute size-8 rounded-full\",\n orientation === \"horizontal\"\n ? \"-left-12 top-1/2 -translate-y-1/2\"\n : \"-top-12 left-1/2 -translate-x-1/2 rotate-90\",\n className,\n )}\n disabled={!canScrollPrev}\n onClick={scrollPrev}\n {...props}\n >\n <ArrowLeftIcon className=\"size-4\" />\n <span className=\"sr-only\">Previous slide</span>\n </Button>\n );\n}\n\nfunction CarouselNext({\n className,\n variant = \"outline\",\n size = \"icon\",\n ...props\n}: React.ComponentProps<typeof Button>) {\n const { orientation, scrollNext, canScrollNext } = useCarousel();\n\n return (\n <Button\n data-slot=\"carousel-next\"\n variant={variant}\n size={size}\n className={cn(\n \"absolute size-8 rounded-full\",\n orientation === \"horizontal\"\n ? \"-right-12 top-1/2 -translate-y-1/2\"\n : \"-bottom-12 left-1/2 -translate-x-1/2 rotate-90\",\n className,\n )}\n disabled={!canScrollNext}\n onClick={scrollNext}\n {...props}\n >\n <ArrowRightIcon className=\"size-4\" />\n <span className=\"sr-only\">Next slide</span>\n </Button>\n );\n}\n\nexport {\n type CarouselApi,\n Carousel,\n CarouselContent,\n CarouselItem,\n CarouselPrevious,\n CarouselNext,\n};\n"],"mappings":";AAqHM,cAuDF,YAvDE;AAnHN,YAAY,WAAW;AACvB,OAAO,sBAAqD;AAC5D,SAAS,eAAe,sBAAsB;AAE9C,SAAS,UAAU;AACnB,SAAS,cAAc;AAuBvB,MAAM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A;AAAA,EACN;AAEJ;AAEA,SAAS,iBAAiB;AAAA,EACxB;AAAA,EACA,UAAU;AAAA,EACV,OAAO;AAAA,EACP,GAAG;AACL,GAAwC;AACtC,QAAM,EAAE,aAAa,YAAY,cAAc,IAAI,YAAY;AAE/D,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV;AAAA,MACA;AAAA,MACA,WAAW;AAAA,QACT;AAAA,QACA,gBAAgB,eACZ,sCACA;AAAA,QACJ;AAAA,MACF;AAAA,MACA,UAAU,CAAC;AAAA,MACX,SAAS;AAAA,MACR,GAAG;AAAA,MAEJ;AAAA,4BAAC,iBAAc,WAAU,UAAS;AAAA,QAClC,oBAAC,UAAK,WAAU,WAAU,4BAAc;AAAA;AAAA;AAAA,EAC1C;AAEJ;AAEA,SAAS,aAAa;AAAA,EACpB;AAAA,EACA,UAAU;AAAA,EACV,OAAO;AAAA,EACP,GAAG;AACL,GAAwC;AACtC,QAAM,EAAE,aAAa,YAAY,cAAc,IAAI,YAAY;AAE/D,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV;AAAA,MACA;AAAA,MACA,WAAW;AAAA,QACT;AAAA,QACA,gBAAgB,eACZ,uCACA;AAAA,QACJ;AAAA,MACF;AAAA,MACA,UAAU,CAAC;AAAA,MACX,SAAS;AAAA,MACR,GAAG;AAAA,MAEJ;AAAA,4BAAC,kBAAe,WAAU,UAAS;AAAA,QACnC,oBAAC,UAAK,WAAU,WAAU,wBAAU;AAAA;AAAA;AAAA,EACtC;AAEJ;","names":["api"]}
|
|
@@ -46,13 +46,7 @@ const Checkbox = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
46
46
|
className
|
|
47
47
|
),
|
|
48
48
|
...props,
|
|
49
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
50
|
-
CheckboxPrimitive.Indicator,
|
|
51
|
-
{
|
|
52
|
-
className: (0, import_utils.cn)("flex items-center justify-center text-current"),
|
|
53
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Check, { className: "h-4 w-4" })
|
|
54
|
-
}
|
|
55
|
-
)
|
|
49
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CheckboxPrimitive.Indicator, { className: (0, import_utils.cn)("flex items-center justify-center text-current"), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Check, { className: "h-4 w-4" }) })
|
|
56
50
|
}
|
|
57
51
|
));
|
|
58
52
|
Checkbox.displayName = CheckboxPrimitive.Root.displayName;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/ui/checkbox/checkbox.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as CheckboxPrimitive from \"@radix-ui/react-checkbox\";\nimport { Check } from \"lucide-react\";\n\nimport { cn } from \"../../../lib/utils\";\n\nconst Checkbox = React.forwardRef<\n
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/ui/checkbox/checkbox.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as CheckboxPrimitive from \"@radix-ui/react-checkbox\";\nimport { Check } from \"lucide-react\";\n\nimport { cn } from \"../../../lib/utils\";\n\nconst Checkbox = React.forwardRef<\n React.ElementRef<typeof CheckboxPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <CheckboxPrimitive.Root\n ref={ref}\n className={cn(\n \"peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground\",\n className,\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator className={cn(\"flex items-center justify-center text-current\")}>\n <Check className=\"h-4 w-4\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n));\nCheckbox.displayName = CheckboxPrimitive.Root.displayName;\n\nexport { Checkbox };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAqBM;AAnBN,YAAuB;AACvB,wBAAmC;AACnC,0BAAsB;AAEtB,mBAAmB;AAEnB,MAAM,WAAW,MAAM,WAGrB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAC,kBAAkB;AAAA,EAAlB;AAAA,IACC;AAAA,IACA,eAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA,IAEJ,sDAAC,kBAAkB,WAAlB,EAA4B,eAAW,iBAAG,+CAA+C,GACxF,sDAAC,6BAAM,WAAU,WAAU,GAC7B;AAAA;AACF,CACD;AACD,SAAS,cAAc,kBAAkB,KAAK;","names":[]}
|
|
@@ -13,13 +13,7 @@ const Checkbox = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
13
13
|
className
|
|
14
14
|
),
|
|
15
15
|
...props,
|
|
16
|
-
children: /* @__PURE__ */ jsx(
|
|
17
|
-
CheckboxPrimitive.Indicator,
|
|
18
|
-
{
|
|
19
|
-
className: cn("flex items-center justify-center text-current"),
|
|
20
|
-
children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" })
|
|
21
|
-
}
|
|
22
|
-
)
|
|
16
|
+
children: /* @__PURE__ */ jsx(CheckboxPrimitive.Indicator, { className: cn("flex items-center justify-center text-current"), children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" }) })
|
|
23
17
|
}
|
|
24
18
|
));
|
|
25
19
|
Checkbox.displayName = CheckboxPrimitive.Root.displayName;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/ui/checkbox/checkbox.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as CheckboxPrimitive from \"@radix-ui/react-checkbox\";\nimport { Check } from \"lucide-react\";\n\nimport { cn } from \"../../../lib/utils\";\n\nconst Checkbox = React.forwardRef<\n
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/ui/checkbox/checkbox.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as CheckboxPrimitive from \"@radix-ui/react-checkbox\";\nimport { Check } from \"lucide-react\";\n\nimport { cn } from \"../../../lib/utils\";\n\nconst Checkbox = React.forwardRef<\n React.ElementRef<typeof CheckboxPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <CheckboxPrimitive.Root\n ref={ref}\n className={cn(\n \"peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground\",\n className,\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator className={cn(\"flex items-center justify-center text-current\")}>\n <Check className=\"h-4 w-4\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n));\nCheckbox.displayName = CheckboxPrimitive.Root.displayName;\n\nexport { Checkbox };\n"],"mappings":";AAqBM;AAnBN,YAAY,WAAW;AACvB,YAAY,uBAAuB;AACnC,SAAS,aAAa;AAEtB,SAAS,UAAU;AAEnB,MAAM,WAAW,MAAM,WAGrB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAC,kBAAkB;AAAA,EAAlB;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA,IAEJ,8BAAC,kBAAkB,WAAlB,EAA4B,WAAW,GAAG,+CAA+C,GACxF,8BAAC,SAAM,WAAU,WAAU,GAC7B;AAAA;AACF,CACD;AACD,SAAS,cAAc,kBAAkB,KAAK;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/ui/collapsible/collapsible.tsx"],"sourcesContent":["\"use client\";\n\nimport * as CollapsiblePrimitive from \"@radix-ui/react-collapsible\";\n\nconst Collapsible: typeof CollapsiblePrimitive.Root = CollapsiblePrimitive.Root;\n\nconst CollapsibleTrigger: typeof CollapsiblePrimitive.CollapsibleTrigger
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/ui/collapsible/collapsible.tsx"],"sourcesContent":["\"use client\";\n\nimport * as CollapsiblePrimitive from \"@radix-ui/react-collapsible\";\n\nconst Collapsible: typeof CollapsiblePrimitive.Root = CollapsiblePrimitive.Root;\n\nconst CollapsibleTrigger: typeof CollapsiblePrimitive.CollapsibleTrigger =\n CollapsiblePrimitive.CollapsibleTrigger;\n\nconst CollapsibleContent: typeof CollapsiblePrimitive.CollapsibleContent =\n CollapsiblePrimitive.CollapsibleContent;\n\nexport { Collapsible, CollapsibleTrigger, CollapsibleContent };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,2BAAsC;AAEtC,MAAM,cAAgD,qBAAqB;AAE3E,MAAM,qBACJ,qBAAqB;AAEvB,MAAM,qBACJ,qBAAqB;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/ui/collapsible/collapsible.tsx"],"sourcesContent":["\"use client\";\n\nimport * as CollapsiblePrimitive from \"@radix-ui/react-collapsible\";\n\nconst Collapsible: typeof CollapsiblePrimitive.Root = CollapsiblePrimitive.Root;\n\nconst CollapsibleTrigger: typeof CollapsiblePrimitive.CollapsibleTrigger
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/ui/collapsible/collapsible.tsx"],"sourcesContent":["\"use client\";\n\nimport * as CollapsiblePrimitive from \"@radix-ui/react-collapsible\";\n\nconst Collapsible: typeof CollapsiblePrimitive.Root = CollapsiblePrimitive.Root;\n\nconst CollapsibleTrigger: typeof CollapsiblePrimitive.CollapsibleTrigger =\n CollapsiblePrimitive.CollapsibleTrigger;\n\nconst CollapsibleContent: typeof CollapsiblePrimitive.CollapsibleContent =\n CollapsiblePrimitive.CollapsibleContent;\n\nexport { Collapsible, CollapsibleTrigger, CollapsibleContent };\n"],"mappings":";AAEA,YAAY,0BAA0B;AAEtC,MAAM,cAAgD,qBAAqB;AAE3E,MAAM,qBACJ,qBAAqB;AAEvB,MAAM,qBACJ,qBAAqB;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/ui/combobox/combobox.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { Check, ChevronsUpDown } from \"lucide-react\";\n\nimport { cn } from \"../../../lib/utils\";\nimport { Button } from \"../button\";\nimport {\n Command,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n} from \"../command\";\nimport { Popover, PopoverContent, PopoverTrigger } from \"../popover\";\n\nexport interface ComboboxOption {\n value: string;\n label: string;\n}\n\ninterface ComboboxProps {\n options: ComboboxOption[];\n value?: string;\n onValueChange?: (value: string) => void;\n placeholder?: string;\n searchPlaceholder?: string;\n emptyText?: string;\n className?: string;\n disabled?: boolean;\n}\n\nfunction Combobox({\n options,\n value,\n onValueChange,\n placeholder = \"Select option...\",\n searchPlaceholder = \"Search...\",\n emptyText = \"No option found.\",\n className,\n disabled = false,\n}: ComboboxProps) {\n const [open, setOpen] = React.useState(false);\n const inputRef = React.useRef<HTMLInputElement | null>(null);\n\n const selectedOption = options.find((option) => option.value === value);\n\n const normalizeForSearch = (raw: string) =>\n raw\n .normalize(\"NFD\")\n .replace(/[\\u0300-\\u036f]/g, \"\")\n .toLowerCase()\n .trim();\n\n React.useEffect(() => {\n if (!open) return;\n setTimeout(() => {\n inputRef.current?.focus();\n }, 0);\n }, [open]);\n\n return (\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild>\n <Button\n variant=\"outline\"\n role=\"combobox\"\n aria-expanded={open}\n data-slot=\"combobox\"\n className={cn(\n \"w-full justify-between\",\n !selectedOption && \"text-muted-foreground\",\n className
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/ui/combobox/combobox.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { Check, ChevronsUpDown } from \"lucide-react\";\n\nimport { cn } from \"../../../lib/utils\";\nimport { Button } from \"../button\";\nimport {\n Command,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n} from \"../command\";\nimport { Popover, PopoverContent, PopoverTrigger } from \"../popover\";\n\nexport interface ComboboxOption {\n value: string;\n label: string;\n}\n\ninterface ComboboxProps {\n options: ComboboxOption[];\n value?: string;\n onValueChange?: (value: string) => void;\n placeholder?: string;\n searchPlaceholder?: string;\n emptyText?: string;\n className?: string;\n disabled?: boolean;\n}\n\nfunction Combobox({\n options,\n value,\n onValueChange,\n placeholder = \"Select option...\",\n searchPlaceholder = \"Search...\",\n emptyText = \"No option found.\",\n className,\n disabled = false,\n}: ComboboxProps) {\n const [open, setOpen] = React.useState(false);\n const inputRef = React.useRef<HTMLInputElement | null>(null);\n\n const selectedOption = options.find((option) => option.value === value);\n\n const normalizeForSearch = (raw: string) =>\n raw\n .normalize(\"NFD\")\n .replace(/[\\u0300-\\u036f]/g, \"\")\n .toLowerCase()\n .trim();\n\n React.useEffect(() => {\n if (!open) return;\n setTimeout(() => {\n inputRef.current?.focus();\n }, 0);\n }, [open]);\n\n return (\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild>\n <Button\n variant=\"outline\"\n role=\"combobox\"\n aria-expanded={open}\n data-slot=\"combobox\"\n className={cn(\n \"w-full justify-between\",\n !selectedOption && \"text-muted-foreground\",\n className,\n )}\n disabled={disabled}\n >\n {selectedOption ? selectedOption.label : placeholder}\n <ChevronsUpDown className=\"ml-2 h-4 w-4 shrink-0 opacity-50\" />\n </Button>\n </PopoverTrigger>\n <PopoverContent className=\"w-full p-0\" align=\"start\">\n <Command\n filter={(itemValue, search) => {\n const normalizedSearch = normalizeForSearch(search);\n if (normalizedSearch.length === 0) return 1;\n return normalizeForSearch(itemValue).includes(normalizedSearch) ? 1 : 0;\n }}\n >\n <CommandInput ref={inputRef} placeholder={searchPlaceholder} />\n <CommandList>\n <CommandEmpty>{emptyText}</CommandEmpty>\n <CommandGroup>\n {options.map((option) => (\n <CommandItem\n key={option.value}\n value={option.value}\n onSelect={() => {\n onValueChange?.(option.value === value ? \"\" : option.value);\n setOpen(false);\n }}\n >\n <Check\n className={cn(\n \"mr-2 h-4 w-4\",\n value === option.value ? \"opacity-100\" : \"opacity-0\",\n )}\n />\n {option.label}\n </CommandItem>\n ))}\n </CommandGroup>\n </CommandList>\n </Command>\n </PopoverContent>\n </Popover>\n );\n}\n\nexport { Combobox };\nexport type { ComboboxProps };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAiEQ;AA/DR,YAAuB;AACvB,0BAAsC;AAEtC,mBAAmB;AACnB,oBAAuB;AACvB,qBAOO;AACP,qBAAwD;AAkBxD,SAAS,SAAS;AAAA,EAChB;AAAA,EACA;AAAA,EACA;AAAA,EACA,cAAc;AAAA,EACd,oBAAoB;AAAA,EACpB,YAAY;AAAA,EACZ;AAAA,EACA,WAAW;AACb,GAAkB;AAChB,QAAM,CAAC,MAAM,OAAO,IAAI,MAAM,SAAS,KAAK;AAC5C,QAAM,WAAW,MAAM,OAAgC,IAAI;AAE3D,QAAM,iBAAiB,QAAQ,KAAK,CAAC,WAAW,OAAO,UAAU,KAAK;AAEtE,QAAM,qBAAqB,CAAC,QAC1B,IACG,UAAU,KAAK,EACf,QAAQ,oBAAoB,EAAE,EAC9B,YAAY,EACZ,KAAK;AAEV,QAAM,UAAU,MAAM;AACpB,QAAI,CAAC,KAAM;AACX,eAAW,MAAM;AACf,eAAS,SAAS,MAAM;AAAA,IAC1B,GAAG,CAAC;AAAA,EACN,GAA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@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/ui/combobox/combobox.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { Check, ChevronsUpDown } from \"lucide-react\";\n\nimport { cn } from \"../../../lib/utils\";\nimport { Button } from \"../button\";\nimport {\n Command,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n} from \"../command\";\nimport { Popover, PopoverContent, PopoverTrigger } from \"../popover\";\n\nexport interface ComboboxOption {\n value: string;\n label: string;\n}\n\ninterface ComboboxProps {\n options: ComboboxOption[];\n value?: string;\n onValueChange?: (value: string) => void;\n placeholder?: string;\n searchPlaceholder?: string;\n emptyText?: string;\n className?: string;\n disabled?: boolean;\n}\n\nfunction Combobox({\n options,\n value,\n onValueChange,\n placeholder = \"Select option...\",\n searchPlaceholder = \"Search...\",\n emptyText = \"No option found.\",\n className,\n disabled = false,\n}: ComboboxProps) {\n const [open, setOpen] = React.useState(false);\n const inputRef = React.useRef<HTMLInputElement | null>(null);\n\n const selectedOption = options.find((option) => option.value === value);\n\n const normalizeForSearch = (raw: string) =>\n raw\n .normalize(\"NFD\")\n .replace(/[\\u0300-\\u036f]/g, \"\")\n .toLowerCase()\n .trim();\n\n React.useEffect(() => {\n if (!open) return;\n setTimeout(() => {\n inputRef.current?.focus();\n }, 0);\n }, [open]);\n\n return (\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild>\n <Button\n variant=\"outline\"\n role=\"combobox\"\n aria-expanded={open}\n data-slot=\"combobox\"\n className={cn(\n \"w-full justify-between\",\n !selectedOption && \"text-muted-foreground\",\n className
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/ui/combobox/combobox.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { Check, ChevronsUpDown } from \"lucide-react\";\n\nimport { cn } from \"../../../lib/utils\";\nimport { Button } from \"../button\";\nimport {\n Command,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n} from \"../command\";\nimport { Popover, PopoverContent, PopoverTrigger } from \"../popover\";\n\nexport interface ComboboxOption {\n value: string;\n label: string;\n}\n\ninterface ComboboxProps {\n options: ComboboxOption[];\n value?: string;\n onValueChange?: (value: string) => void;\n placeholder?: string;\n searchPlaceholder?: string;\n emptyText?: string;\n className?: string;\n disabled?: boolean;\n}\n\nfunction Combobox({\n options,\n value,\n onValueChange,\n placeholder = \"Select option...\",\n searchPlaceholder = \"Search...\",\n emptyText = \"No option found.\",\n className,\n disabled = false,\n}: ComboboxProps) {\n const [open, setOpen] = React.useState(false);\n const inputRef = React.useRef<HTMLInputElement | null>(null);\n\n const selectedOption = options.find((option) => option.value === value);\n\n const normalizeForSearch = (raw: string) =>\n raw\n .normalize(\"NFD\")\n .replace(/[\\u0300-\\u036f]/g, \"\")\n .toLowerCase()\n .trim();\n\n React.useEffect(() => {\n if (!open) return;\n setTimeout(() => {\n inputRef.current?.focus();\n }, 0);\n }, [open]);\n\n return (\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild>\n <Button\n variant=\"outline\"\n role=\"combobox\"\n aria-expanded={open}\n data-slot=\"combobox\"\n className={cn(\n \"w-full justify-between\",\n !selectedOption && \"text-muted-foreground\",\n className,\n )}\n disabled={disabled}\n >\n {selectedOption ? selectedOption.label : placeholder}\n <ChevronsUpDown className=\"ml-2 h-4 w-4 shrink-0 opacity-50\" />\n </Button>\n </PopoverTrigger>\n <PopoverContent className=\"w-full p-0\" align=\"start\">\n <Command\n filter={(itemValue, search) => {\n const normalizedSearch = normalizeForSearch(search);\n if (normalizedSearch.length === 0) return 1;\n return normalizeForSearch(itemValue).includes(normalizedSearch) ? 1 : 0;\n }}\n >\n <CommandInput ref={inputRef} placeholder={searchPlaceholder} />\n <CommandList>\n <CommandEmpty>{emptyText}</CommandEmpty>\n <CommandGroup>\n {options.map((option) => (\n <CommandItem\n key={option.value}\n value={option.value}\n onSelect={() => {\n onValueChange?.(option.value === value ? \"\" : option.value);\n setOpen(false);\n }}\n >\n <Check\n className={cn(\n \"mr-2 h-4 w-4\",\n value === option.value ? \"opacity-100\" : \"opacity-0\",\n )}\n />\n {option.label}\n </CommandItem>\n ))}\n </CommandGroup>\n </CommandList>\n </Command>\n </PopoverContent>\n </Popover>\n );\n}\n\nexport { Combobox };\nexport type { ComboboxProps };\n"],"mappings":";AAiEQ,SAaE,KAbF;AA/DR,YAAY,WAAW;AACvB,SAAS,OAAO,sBAAsB;AAEtC,SAAS,UAAU;AACnB,SAAS,cAAc;AACvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,SAAS,gBAAgB,sBAAsB;AAkBxD,SAAS,SAAS;AAAA,EAChB;AAAA,EACA;AAAA,EACA;AAAA,EACA,cAAc;AAAA,EACd,oBAAoB;AAAA,EACpB,YAAY;AAAA,EACZ;AAAA,EACA,WAAW;AACb,GAAkB;AAChB,QAAM,CAAC,MAAM,OAAO,IAAI,MAAM,SAAS,KAAK;AAC5C,QAAM,WAAW,MAAM,OAAgC,IAAI;AAE3D,QAAM,iBAAiB,QAAQ,KAAK,CAAC,WAAW,OAAO,UAAU,KAAK;AAEtE,QAAM,qBAAqB,CAAC,QAC1B,IACG,UAAU,KAAK,EACf,QAAQ,oBAAoB,EAAE,EAC9B,YAAY,EACZ,KAAK;AAEV,QAAM,UAAU,MAAM;AACpB,QAAI,CAAC,KAAM;AACX,eAAW,MAAM;AACf,eAAS,SAAS,MAAM;AAAA,IAC1B,GAAG,CAAC;AAAA,EACN,GAAG,CAAC,IAAI,CAAC;AAET,SACE,qBAAC,WAAQ,MAAY,cAAc,SACjC;AAAA,wBAAC,kBAAe,SAAO,MACrB;AAAA,MAAC;AAAA;AAAA,QACC,SAAQ;AAAA,QACR,MAAK;AAAA,QACL,iBAAe;AAAA,QACf,aAAU;AAAA,QACV,WAAW;AAAA,UACT;AAAA,UACA,CAAC,kBAAkB;AAAA,UACnB;AAAA,QACF;AAAA,QACA;AAAA,QAEC;AAAA,2BAAiB,eAAe,QAAQ;AAAA,UACzC,oBAAC,kBAAe,WAAU,oCAAmC;AAAA;AAAA;AAAA,IAC/D,GACF;AAAA,IACA,oBAAC,kBAAe,WAAU,cAAa,OAAM,SAC3C;AAAA,MAAC;AAAA;AAAA,QACC,QAAQ,CAAC,WAAW,WAAW;AAC7B,gBAAM,mBAAmB,mBAAmB,MAAM;AAClD,cAAI,iBAAiB,WAAW,EAAG,QAAO;AAC1C,iBAAO,mBAAmB,SAAS,EAAE,SAAS,gBAAgB,IAAI,IAAI;AAAA,QACxE;AAAA,QAEA;AAAA,8BAAC,gBAAa,KAAK,UAAU,aAAa,mBAAmB;AAAA,UAC7D,qBAAC,eACC;AAAA,gCAAC,gBAAc,qBAAU;AAAA,YACzB,oBAAC,gBACE,kBAAQ,IAAI,CAAC,WACZ;AAAA,cAAC;AAAA;AAAA,gBAEC,OAAO,OAAO;AAAA,gBACd,UAAU,MAAM;AACd,kCAAgB,OAAO,UAAU,QAAQ,KAAK,OAAO,KAAK;AAC1D,0BAAQ,KAAK;AAAA,gBACf;AAAA,gBAEA;AAAA;AAAA,oBAAC;AAAA;AAAA,sBACC,WAAW;AAAA,wBACT;AAAA,wBACA,UAAU,OAAO,QAAQ,gBAAgB;AAAA,sBAC3C;AAAA;AAAA,kBACF;AAAA,kBACC,OAAO;AAAA;AAAA;AAAA,cAbH,OAAO;AAAA,YAcd,CACD,GACH;AAAA,aACF;AAAA;AAAA;AAAA,IACF,GACF;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -35,10 +35,7 @@ var import_cmdk = require("cmdk");
|
|
|
35
35
|
var import_lucide_react = require("lucide-react");
|
|
36
36
|
var import_utils = require("../../../lib/utils");
|
|
37
37
|
var import_dialog = require("../dialog");
|
|
38
|
-
function Command({
|
|
39
|
-
className,
|
|
40
|
-
...props
|
|
41
|
-
}) {
|
|
38
|
+
function Command({ className, ...props }) {
|
|
42
39
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
43
40
|
import_cmdk.Command,
|
|
44
41
|
{
|
|
@@ -73,10 +70,7 @@ function CommandInput({
|
|
|
73
70
|
)
|
|
74
71
|
] });
|
|
75
72
|
}
|
|
76
|
-
function CommandList({
|
|
77
|
-
className,
|
|
78
|
-
...props
|
|
79
|
-
}) {
|
|
73
|
+
function CommandList({ className, ...props }) {
|
|
80
74
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
81
75
|
import_cmdk.Command.List,
|
|
82
76
|
{
|
|
@@ -86,9 +80,7 @@ function CommandList({
|
|
|
86
80
|
}
|
|
87
81
|
);
|
|
88
82
|
}
|
|
89
|
-
function CommandEmpty({
|
|
90
|
-
...props
|
|
91
|
-
}) {
|
|
83
|
+
function CommandEmpty({ ...props }) {
|
|
92
84
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
93
85
|
import_cmdk.Command.Empty,
|
|
94
86
|
{
|
|
@@ -127,34 +119,25 @@ function CommandSeparator({
|
|
|
127
119
|
}
|
|
128
120
|
);
|
|
129
121
|
}
|
|
130
|
-
function CommandItem({
|
|
131
|
-
className,
|
|
132
|
-
...props
|
|
133
|
-
}) {
|
|
122
|
+
function CommandItem({ className, ...props }) {
|
|
134
123
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
135
124
|
import_cmdk.Command.Item,
|
|
136
125
|
{
|
|
137
126
|
"data-slot": "command-item",
|
|
138
127
|
className: (0, import_utils.cn)(
|
|
139
|
-
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[
|
|
128
|
+
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50",
|
|
140
129
|
className
|
|
141
130
|
),
|
|
142
131
|
...props
|
|
143
132
|
}
|
|
144
133
|
);
|
|
145
134
|
}
|
|
146
|
-
function CommandShortcut({
|
|
147
|
-
className,
|
|
148
|
-
...props
|
|
149
|
-
}) {
|
|
135
|
+
function CommandShortcut({ className, ...props }) {
|
|
150
136
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
151
137
|
"span",
|
|
152
138
|
{
|
|
153
139
|
"data-slot": "command-shortcut",
|
|
154
|
-
className: (0, import_utils.cn)(
|
|
155
|
-
"ml-auto text-xs tracking-widest text-muted-foreground",
|
|
156
|
-
className
|
|
157
|
-
),
|
|
140
|
+
className: (0, import_utils.cn)("ml-auto text-xs tracking-widest text-muted-foreground", className),
|
|
158
141
|
...props
|
|
159
142
|
}
|
|
160
143
|
);
|