@lssm/lib.design-system 0.0.0-canary-20251217060804 → 0.0.0-canary-20251217062139
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/_virtual/rolldown_runtime.js +1 -12
- package/dist/components/agent/AgentMonitor.js +3 -3
- package/dist/components/agent/ApprovalQueue.d.ts +2 -2
- package/dist/components/agent/ApprovalQueue.js +4 -5
- package/dist/components/atoms/ActionButtons.d.ts +3 -3
- package/dist/components/atoms/ActionButtons.js +3 -3
- package/dist/components/atoms/Button.d.ts +6 -6
- package/dist/components/atoms/Button.js +2 -2
- package/dist/components/atoms/ButtonLink.js +2 -2
- package/dist/components/atoms/Cta.d.ts +7 -7
- package/dist/components/atoms/Cta.js +2 -2
- package/dist/components/atoms/DataChips.d.ts +2 -2
- package/dist/components/atoms/DataChips.js +1 -1
- package/dist/components/atoms/EmptyState.d.ts +2 -2
- package/dist/components/atoms/EmptyState.js +1 -1
- package/dist/components/atoms/ErrorState.d.ts +8 -8
- package/dist/components/atoms/ErrorState.js +1 -1
- package/dist/components/atoms/Input.d.ts +2 -2
- package/dist/components/atoms/Input.js +1 -1
- package/dist/components/atoms/Link.web.d.ts +3 -3
- package/dist/components/atoms/Link.web.js +4 -6
- package/dist/components/atoms/LoaderCircular.d.ts +7 -7
- package/dist/components/atoms/LoaderCircular.js +2 -2
- package/dist/components/atoms/NavBrand.d.ts +5 -5
- package/dist/components/atoms/NavBrand.js +1 -1
- package/dist/components/atoms/Stepper.d.ts +2 -2
- package/dist/components/atoms/Stepper.js +1 -1
- package/dist/components/atoms/Textarea.d.ts +2 -2
- package/dist/components/atoms/Textarea.js +4 -4
- package/dist/components/data-view/DataViewDetail.d.ts +5 -5
- package/dist/components/data-view/DataViewList.d.ts +5 -5
- package/dist/components/data-view/DataViewRenderer.d.ts +7 -7
- package/dist/components/data-view/DataViewRenderer.js +3 -3
- package/dist/components/data-view/DataViewTable.d.ts +6 -6
- package/dist/components/forms/ActionForm.d.ts +5 -5
- package/dist/components/forms/ActionForm.js +1 -1
- package/dist/components/forms/FormCardLayout.d.ts +7 -7
- package/dist/components/forms/FormCardLayout.js +2 -2
- package/dist/components/forms/FormDialog.d.ts +7 -7
- package/dist/components/forms/FormDialog.js +1 -1
- package/dist/components/forms/FormLayout.d.ts +8 -8
- package/dist/components/forms/FormLayout.js +1 -1
- package/dist/components/forms/FormOneByOneLayout.d.ts +6 -6
- package/dist/components/forms/FormOneByOneLayout.js +4 -4
- package/dist/components/forms/FormStepsLayout.d.ts +6 -6
- package/dist/components/forms/FormStepsLayout.js +5 -5
- package/dist/components/forms/ZodForm.d.ts +6 -6
- package/dist/components/forms/ZodForm.js +1 -1
- package/dist/components/legal/atoms/DefinitionList.d.ts +5 -5
- package/dist/components/legal/atoms/DefinitionList.js +1 -1
- package/dist/components/legal/atoms/KeyValueList.d.ts +5 -5
- package/dist/components/legal/atoms/KeyValueList.js +1 -1
- package/dist/components/legal/atoms/LegalCallout.d.ts +6 -6
- package/dist/components/legal/atoms/LegalCallout.js +1 -1
- package/dist/components/legal/atoms/LegalHeading.d.ts +6 -6
- package/dist/components/legal/atoms/LegalHeading.js +1 -1
- package/dist/components/legal/atoms/LegalList.d.ts +6 -6
- package/dist/components/legal/atoms/LegalList.js +1 -1
- package/dist/components/legal/atoms/LegalSection.d.ts +6 -6
- package/dist/components/legal/atoms/LegalSection.js +1 -1
- package/dist/components/legal/atoms/LegalText.d.ts +6 -6
- package/dist/components/legal/atoms/LegalText.js +1 -1
- package/dist/components/legal/molecules/Consent.d.ts +8 -8
- package/dist/components/legal/molecules/Consent.js +2 -2
- package/dist/components/legal/molecules/ContactFields.d.ts +2 -2
- package/dist/components/legal/molecules/ContactFields.js +1 -1
- package/dist/components/legal/molecules/LegalMeta.d.ts +2 -2
- package/dist/components/legal/molecules/LegalMeta.js +1 -1
- package/dist/components/legal/molecules/LegalTOC.d.ts +7 -7
- package/dist/components/legal/molecules/LegalTOC.js +1 -1
- package/dist/components/legal/organisms/ContactForm.d.ts +4 -4
- package/dist/components/legal/organisms/ContactForm.js +3 -3
- package/dist/components/legal/organisms/GDPRDataRequest.d.ts +5 -5
- package/dist/components/legal/organisms/GDPRDataRequest.js +2 -2
- package/dist/components/legal/organisms/GDPRRights.d.ts +5 -5
- package/dist/components/legal/organisms/LegalPageLayout.d.ts +5 -5
- package/dist/components/legal/organisms/LegalPageLayout.js +1 -1
- package/dist/components/legal/templates/ContactTemplate.d.ts +4 -4
- package/dist/components/legal/templates/ContactTemplate.js +3 -3
- package/dist/components/legal/templates/CookiesTemplate.d.ts +9 -9
- package/dist/components/legal/templates/PrivacyTemplate.d.ts +9 -9
- package/dist/components/legal/templates/SalesTermsTemplate.d.ts +7 -7
- package/dist/components/legal/templates/TermsTemplate.d.ts +7 -7
- package/dist/components/marketing/MarketingCard.d.ts +4 -4
- package/dist/components/marketing/MarketingCard.js +3 -3
- package/dist/components/marketing/MarketingCardsSection.d.ts +2 -2
- package/dist/components/marketing/MarketingCardsSection.js +1 -1
- package/dist/components/marketing/MarketingComparisonSection.d.ts +5 -5
- package/dist/components/marketing/MarketingComparisonSection.js +3 -3
- package/dist/components/marketing/MarketingIconCard.d.ts +5 -5
- package/dist/components/marketing/MarketingIconCard.js +4 -3
- package/dist/components/marketing/MarketingSection.d.ts +5 -5
- package/dist/components/marketing/MarketingSection.js +3 -3
- package/dist/components/marketing/MarketingStepCard.d.ts +3 -3
- package/dist/components/marketing/MarketingStepCard.js +4 -3
- package/dist/components/molecules/AiLinkButton.d.ts +2 -2
- package/dist/components/molecules/AiLinkButton.js +5 -5
- package/dist/components/molecules/Breadcrumbs.d.ts +4 -4
- package/dist/components/molecules/Breadcrumbs.js +3 -3
- package/dist/components/molecules/CommandPalette.js +4 -4
- package/dist/components/molecules/CommandSearchTrigger.d.ts +2 -2
- package/dist/components/molecules/CommandSearchTrigger.js +5 -5
- package/dist/components/molecules/EntityCard.d.ts +11 -11
- package/dist/components/molecules/EntityCard.js +2 -2
- package/dist/components/molecules/FiltersToolbar.d.ts +6 -6
- package/dist/components/molecules/FiltersToolbar.js +6 -6
- package/dist/components/molecules/HoverPreview.d.ts +5 -5
- package/dist/components/molecules/HoverPreview.js +4 -2
- package/dist/components/molecules/LangSwitch.d.ts +4 -4
- package/dist/components/molecules/LangSwitchDropdown.js +4 -4
- package/dist/components/molecules/LoaderBlock.d.ts +5 -5
- package/dist/components/molecules/LoaderBlock.js +1 -1
- package/dist/components/molecules/MobileNavMenu.js +1 -1
- package/dist/components/molecules/NavItemCard.js +1 -1
- package/dist/components/molecules/NavMain.d.ts +2 -2
- package/dist/components/molecules/NavMain.js +4 -4
- package/dist/components/molecules/NavUser.js +2 -2
- package/dist/components/molecules/OverviewCard.d.ts +4 -4
- package/dist/components/molecules/OverviewCard.js +3 -5
- package/dist/components/molecules/SkeletonBlock/index.web.d.ts +2 -2
- package/dist/components/molecules/SkeletonBlock/index.web.js +2 -2
- package/dist/components/molecules/SkeletonCircle/index.web.js +1 -1
- package/dist/components/molecules/SkeletonList/index.web.d.ts +2 -2
- package/dist/components/molecules/SkeletonList/index.web.js +1 -1
- package/dist/components/molecules/StatCard.d.ts +11 -11
- package/dist/components/molecules/StatCard.js +2 -2
- package/dist/components/molecules/StatusChip.d.ts +7 -7
- package/dist/components/molecules/StatusChip.js +1 -1
- package/dist/components/molecules/hover-previews/Doc.d.ts +6 -6
- package/dist/components/molecules/hover-previews/Media.d.ts +7 -7
- package/dist/components/molecules/hover-previews/Simple.d.ts +9 -9
- package/dist/components/molecules/hover-previews/Stats.d.ts +8 -8
- package/dist/components/molecules/hover-previews/User.d.ts +9 -9
- package/dist/components/organisms/AcademyLayout.d.ts +9 -9
- package/dist/components/organisms/AcademyLayout.js +4 -4
- package/dist/components/organisms/AppHeader.d.ts +5 -5
- package/dist/components/organisms/AppHeader.js +2 -2
- package/dist/components/organisms/AppLayout.d.ts +6 -6
- package/dist/components/organisms/AppLayout.js +5 -5
- package/dist/components/organisms/AppSidebar.d.ts +3 -3
- package/dist/components/organisms/AppSidebar.js +2 -2
- package/dist/components/organisms/EmptyDataList.d.ts +2 -2
- package/dist/components/organisms/EmptyDataList.js +1 -1
- package/dist/components/organisms/EmptyDataList.types.d.ts +8 -8
- package/dist/components/organisms/EmptySearchResult.d.ts +7 -7
- package/dist/components/organisms/EmptySearchResult.js +3 -3
- package/dist/components/organisms/FAQSection.d.ts +8 -8
- package/dist/components/organisms/FAQSection.js +4 -4
- package/dist/components/organisms/FeatureCarousel.d.ts +4 -4
- package/dist/components/organisms/FeatureCarousel.js +2 -2
- package/dist/components/organisms/FeaturesSection.d.ts +6 -6
- package/dist/components/organisms/FeaturesSection.js +1 -1
- package/dist/components/organisms/Footer.d.ts +5 -5
- package/dist/components/organisms/Footer.js +2 -2
- package/dist/components/organisms/Header.d.ts +5 -5
- package/dist/components/organisms/Header.js +4 -4
- package/dist/components/organisms/HeroResponsive.d.ts +3 -3
- package/dist/components/organisms/HeroSection.d.ts +5 -5
- package/dist/components/organisms/HeroSection.js +1 -1
- package/dist/components/organisms/ListCardPage.d.ts +9 -9
- package/dist/components/organisms/ListCardPage.js +2 -2
- package/dist/components/organisms/ListGridPage.d.ts +9 -9
- package/dist/components/organisms/ListGridPage.js +1 -1
- package/dist/components/organisms/ListPageResponsive.d.ts +2 -2
- package/dist/components/organisms/ListPageResponsive.js +1 -1
- package/dist/components/organisms/ListTablePage.d.ts +10 -10
- package/dist/components/organisms/ListTablePage.js +2 -2
- package/dist/components/organisms/MarketingHeader.d.ts +4 -4
- package/dist/components/organisms/MarketingHeader.js +9 -9
- package/dist/components/organisms/MarketingHeaderDesktop.js +3 -3
- package/dist/components/organisms/MarketingHeaderMobile.js +6 -6
- package/dist/components/organisms/MarketingLayout.d.ts +4 -4
- package/dist/components/organisms/MarketingLayout.js +2 -2
- package/dist/components/organisms/PageHeaderResponsive.d.ts +2 -2
- package/dist/components/organisms/PageHeaderResponsive.js +1 -1
- package/dist/components/organisms/PricingCarousel.d.ts +2 -2
- package/dist/components/organisms/PricingCarousel.js +2 -2
- package/dist/components/organisms/PricingSection.d.ts +5 -5
- package/dist/components/organisms/PricingSection.js +1 -1
- package/dist/components/organisms/TestimonialCarousel.d.ts +7 -7
- package/dist/components/organisms/TestimonialCarousel.js +2 -2
- package/dist/components/templates/lists/ListPageTemplate/index.web.d.ts +2 -2
- package/dist/components/templates/lists/ListPageTemplate/index.web.js +5 -5
- package/dist/components/templates/lists/ListPageTemplate/types.d.ts +7 -7
- package/dist/contracts/dist/client/react/drivers/shadcn.js +7 -0
- package/dist/contracts/dist/client/react/form-render.js +261 -0
- package/dist/contracts/dist/forms.js +78 -0
- package/dist/hooks/useListUrlState.js +7 -7
- package/dist/index.js +2 -1
- package/dist/platform/useColorScheme.js +3 -3
- package/dist/platform/useReducedMotion.js +3 -3
- package/dist/platform/useResponsive.js +4 -4
- package/dist/renderers/form-contract.d.ts +3 -3
- package/dist/renderers/form-contract.js +13 -13
- package/dist/theme/variants.d.ts +2 -2
- package/dist/types/navigation.d.ts +10 -10
- package/dist/ui-kit-web/dist/ui/accordion.js +48 -0
- package/dist/ui-kit-web/dist/ui/atoms/FilterSelect/FilterSelect.js +52 -0
- package/dist/ui-kit-web/dist/ui/atoms/Pagination/Pagination.js +156 -0
- package/dist/ui-kit-web/dist/ui/atoms/SearchInput/SearchInput.js +49 -0
- package/dist/ui-kit-web/dist/ui/avatar.js +32 -0
- package/dist/ui-kit-web/dist/ui/badge.js +27 -0
- package/dist/ui-kit-web/dist/ui/breadcrumb.js +59 -0
- package/dist/ui-kit-web/dist/ui/button.js +55 -0
- package/dist/ui-kit-web/dist/ui/card.js +44 -0
- package/dist/ui-kit-web/dist/ui/carousel.js +135 -0
- package/dist/ui-kit-web/dist/ui/checkbox.js +25 -0
- package/dist/ui-kit-web/dist/ui/collapsible.js +27 -0
- package/dist/ui-kit-web/dist/ui/command.js +90 -0
- package/dist/ui-kit-web/dist/ui/dialog.js +84 -0
- package/dist/ui-kit-web/dist/ui/dropdown-menu.js +57 -0
- package/dist/ui-kit-web/dist/ui/empty-state.js +43 -0
- package/dist/ui-kit-web/dist/ui/empty.js +62 -0
- package/dist/ui-kit-web/dist/ui/field.js +78 -0
- package/dist/ui-kit-web/dist/ui/form.js +16 -0
- package/dist/ui-kit-web/dist/ui/hover-card.js +40 -0
- package/dist/ui-kit-web/dist/ui/input.js +17 -0
- package/dist/ui-kit-web/dist/ui/label.js +19 -0
- package/dist/ui-kit-web/dist/ui/marketing/Hero.js +52 -0
- package/dist/ui-kit-web/dist/ui/marketing/PricingTable.js +59 -0
- package/dist/ui-kit-web/dist/ui/molecules/SearchAndFilter/SearchAndFilter.js +102 -0
- package/dist/ui-kit-web/dist/ui/molecules/SkeletonList.js +14 -0
- package/dist/ui-kit-web/dist/ui/navigation-menu.js +75 -0
- package/dist/ui-kit-web/dist/ui/organisms/ListPage/ListPage.js +197 -0
- package/dist/ui-kit-web/dist/ui/page-header.js +40 -0
- package/dist/ui-kit-web/dist/ui/pagination.js +65 -0
- package/dist/ui-kit-web/dist/ui/radio-group.js +32 -0
- package/dist/ui-kit-web/dist/ui/select.js +86 -0
- package/dist/ui-kit-web/dist/ui/separator.js +21 -0
- package/dist/ui-kit-web/dist/ui/sheet.js +80 -0
- package/dist/ui-kit-web/dist/ui/sidebar.js +281 -0
- package/dist/ui-kit-web/dist/ui/skeleton.js +14 -0
- package/dist/ui-kit-web/dist/ui/stack.js +158 -0
- package/dist/ui-kit-web/dist/ui/stepper.js +37 -0
- package/dist/ui-kit-web/dist/ui/switch.js +24 -0
- package/dist/ui-kit-web/dist/ui/table.js +57 -0
- package/dist/ui-kit-web/dist/ui/text.js +16 -0
- package/dist/ui-kit-web/dist/ui/textarea.js +16 -0
- package/dist/ui-kit-web/dist/ui/tooltip.js +40 -0
- package/dist/ui-kit-web/dist/ui/typography.js +23 -0
- package/dist/ui-kit-web/dist/ui/use-mobile.js +20 -0
- package/dist/ui-kit-web/dist/ui/utils.js +10 -0
- package/dist/ui-kit-web/dist/ui-kit-core/dist/utils.js +13 -0
- package/package.json +7 -7
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { Label } from "../../label.js";
|
|
2
|
+
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "../../select.js";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region ../ui-kit-web/dist/ui/atoms/FilterSelect/FilterSelect.js
|
|
7
|
+
const FilterSelect = ({ value, options, onChange, placeholder = "Sélectionner...", label, disabled = false, className = "", showCounts = false }) => {
|
|
8
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
9
|
+
className: `space-y-2 ${className}`,
|
|
10
|
+
children: [label && /* @__PURE__ */ jsx(Label, {
|
|
11
|
+
className: "text-foreground text-base font-medium",
|
|
12
|
+
children: label
|
|
13
|
+
}), /* @__PURE__ */ jsxs(Select, {
|
|
14
|
+
value,
|
|
15
|
+
onValueChange: onChange,
|
|
16
|
+
disabled,
|
|
17
|
+
children: [/* @__PURE__ */ jsx(SelectTrigger, {
|
|
18
|
+
className: "w-full",
|
|
19
|
+
children: /* @__PURE__ */ jsx(SelectValue, { placeholder })
|
|
20
|
+
}), /* @__PURE__ */ jsxs(SelectContent, {
|
|
21
|
+
className: "bg-background",
|
|
22
|
+
children: [/* @__PURE__ */ jsxs(SelectItem, {
|
|
23
|
+
value: "all",
|
|
24
|
+
children: ["Tous", showCounts && /* @__PURE__ */ jsxs("span", {
|
|
25
|
+
className: "text-muted-foreground ml-2 text-sm",
|
|
26
|
+
children: [
|
|
27
|
+
"(",
|
|
28
|
+
options.reduce((sum, option) => sum + (option.count || 0), 0),
|
|
29
|
+
")"
|
|
30
|
+
]
|
|
31
|
+
})]
|
|
32
|
+
}), options.map((option) => /* @__PURE__ */ jsx(SelectItem, {
|
|
33
|
+
value: option.value,
|
|
34
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
35
|
+
className: "flex w-full items-center justify-between",
|
|
36
|
+
children: [/* @__PURE__ */ jsx("span", { children: option.label }), showCounts && option.count !== void 0 && /* @__PURE__ */ jsxs("span", {
|
|
37
|
+
className: "text-muted-foreground ml-2 text-sm",
|
|
38
|
+
children: [
|
|
39
|
+
"(",
|
|
40
|
+
option.count,
|
|
41
|
+
")"
|
|
42
|
+
]
|
|
43
|
+
})]
|
|
44
|
+
})
|
|
45
|
+
}, option.value))]
|
|
46
|
+
})]
|
|
47
|
+
})]
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
//#endregion
|
|
52
|
+
export { FilterSelect };
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { Button } from "../../button.js";
|
|
2
|
+
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "../../select.js";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { ChevronLeft, ChevronRight, ChevronsLeft, ChevronsRight } from "lucide-react";
|
|
6
|
+
|
|
7
|
+
//#region ../ui-kit-web/dist/ui/atoms/Pagination/Pagination.js
|
|
8
|
+
const Pagination = ({ currentPage, totalPages, totalItems, itemsPerPage, onPageChange, onItemsPerPageChange, disabled = false, className = "", showItemsPerPage = true, itemsPerPageOptions = [
|
|
9
|
+
10,
|
|
10
|
+
25,
|
|
11
|
+
50,
|
|
12
|
+
100
|
|
13
|
+
] }) => {
|
|
14
|
+
const startItem = (currentPage - 1) * itemsPerPage + 1;
|
|
15
|
+
const endItem = Math.min(currentPage * itemsPerPage, totalItems);
|
|
16
|
+
const canGoPrevious = currentPage > 1 && !disabled;
|
|
17
|
+
const canGoNext = currentPage < totalPages && !disabled;
|
|
18
|
+
const getVisiblePageNumbers = () => {
|
|
19
|
+
if (totalPages <= 7) return Array.from({ length: totalPages }, (_, i) => i + 1);
|
|
20
|
+
if (currentPage <= 3) return [
|
|
21
|
+
1,
|
|
22
|
+
2,
|
|
23
|
+
3,
|
|
24
|
+
4,
|
|
25
|
+
5,
|
|
26
|
+
-1,
|
|
27
|
+
totalPages
|
|
28
|
+
];
|
|
29
|
+
if (currentPage >= totalPages - 2) return [
|
|
30
|
+
1,
|
|
31
|
+
-1,
|
|
32
|
+
totalPages - 4,
|
|
33
|
+
totalPages - 3,
|
|
34
|
+
totalPages - 2,
|
|
35
|
+
totalPages - 1,
|
|
36
|
+
totalPages
|
|
37
|
+
];
|
|
38
|
+
return [
|
|
39
|
+
1,
|
|
40
|
+
-1,
|
|
41
|
+
currentPage - 1,
|
|
42
|
+
currentPage,
|
|
43
|
+
currentPage + 1,
|
|
44
|
+
-1,
|
|
45
|
+
totalPages
|
|
46
|
+
];
|
|
47
|
+
};
|
|
48
|
+
if (totalPages === 0) return null;
|
|
49
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
50
|
+
className: `flex flex-col items-center justify-between gap-4 sm:flex-row ${className}`,
|
|
51
|
+
children: [
|
|
52
|
+
/* @__PURE__ */ jsxs("div", {
|
|
53
|
+
className: "text-muted-foreground order-2 text-base sm:order-1",
|
|
54
|
+
children: [
|
|
55
|
+
"Affichage de ",
|
|
56
|
+
startItem,
|
|
57
|
+
" à ",
|
|
58
|
+
endItem,
|
|
59
|
+
" sur ",
|
|
60
|
+
totalItems,
|
|
61
|
+
" résultats"
|
|
62
|
+
]
|
|
63
|
+
}),
|
|
64
|
+
/* @__PURE__ */ jsxs("div", {
|
|
65
|
+
className: "order-1 flex items-center gap-2 sm:order-2",
|
|
66
|
+
children: [
|
|
67
|
+
/* @__PURE__ */ jsxs(Button, {
|
|
68
|
+
variant: "outline",
|
|
69
|
+
size: "sm",
|
|
70
|
+
onClick: () => onPageChange(1),
|
|
71
|
+
disabled: !canGoPrevious,
|
|
72
|
+
className: "hidden h-8 w-8 p-0 sm:flex",
|
|
73
|
+
children: [/* @__PURE__ */ jsx(ChevronsLeft, { className: "h-4 w-4" }), /* @__PURE__ */ jsx("span", {
|
|
74
|
+
className: "sr-only",
|
|
75
|
+
children: "Première page"
|
|
76
|
+
})]
|
|
77
|
+
}),
|
|
78
|
+
/* @__PURE__ */ jsxs(Button, {
|
|
79
|
+
variant: "outline",
|
|
80
|
+
size: "sm",
|
|
81
|
+
onClick: () => onPageChange(currentPage - 1),
|
|
82
|
+
disabled: !canGoPrevious,
|
|
83
|
+
className: "h-8 w-8 p-0",
|
|
84
|
+
children: [/* @__PURE__ */ jsx(ChevronLeft, { className: "h-4 w-4" }), /* @__PURE__ */ jsx("span", {
|
|
85
|
+
className: "sr-only",
|
|
86
|
+
children: "Page précédente"
|
|
87
|
+
})]
|
|
88
|
+
}),
|
|
89
|
+
/* @__PURE__ */ jsx("div", {
|
|
90
|
+
className: "flex items-center gap-1",
|
|
91
|
+
children: getVisiblePageNumbers().map((page, index) => {
|
|
92
|
+
if (page === -1) return /* @__PURE__ */ jsx("span", {
|
|
93
|
+
className: "text-muted-foreground px-2 py-1",
|
|
94
|
+
children: "..."
|
|
95
|
+
}, `ellipsis-${index}`);
|
|
96
|
+
return /* @__PURE__ */ jsx(Button, {
|
|
97
|
+
variant: page === currentPage ? "default" : "outline",
|
|
98
|
+
size: "sm",
|
|
99
|
+
onClick: () => onPageChange(page),
|
|
100
|
+
disabled,
|
|
101
|
+
className: "h-8 min-w-8 px-2",
|
|
102
|
+
children: page
|
|
103
|
+
}, page);
|
|
104
|
+
})
|
|
105
|
+
}),
|
|
106
|
+
/* @__PURE__ */ jsxs(Button, {
|
|
107
|
+
variant: "outline",
|
|
108
|
+
size: "sm",
|
|
109
|
+
onClick: () => onPageChange(currentPage + 1),
|
|
110
|
+
disabled: !canGoNext,
|
|
111
|
+
className: "h-8 w-8 p-0",
|
|
112
|
+
children: [/* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4" }), /* @__PURE__ */ jsx("span", {
|
|
113
|
+
className: "sr-only",
|
|
114
|
+
children: "Page suivante"
|
|
115
|
+
})]
|
|
116
|
+
}),
|
|
117
|
+
/* @__PURE__ */ jsxs(Button, {
|
|
118
|
+
variant: "outline",
|
|
119
|
+
size: "sm",
|
|
120
|
+
onClick: () => onPageChange(totalPages),
|
|
121
|
+
disabled: !canGoNext,
|
|
122
|
+
className: "hidden h-8 w-8 p-0 sm:flex",
|
|
123
|
+
children: [/* @__PURE__ */ jsx(ChevronsRight, { className: "h-4 w-4" }), /* @__PURE__ */ jsx("span", {
|
|
124
|
+
className: "sr-only",
|
|
125
|
+
children: "Dernière page"
|
|
126
|
+
})]
|
|
127
|
+
})
|
|
128
|
+
]
|
|
129
|
+
}),
|
|
130
|
+
showItemsPerPage && onItemsPerPageChange && /* @__PURE__ */ jsxs("div", {
|
|
131
|
+
className: "order-3 flex items-center gap-2 text-base",
|
|
132
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
133
|
+
className: "text-muted-foreground",
|
|
134
|
+
children: "Afficher:"
|
|
135
|
+
}), /* @__PURE__ */ jsxs(Select, {
|
|
136
|
+
value: itemsPerPage.toString(),
|
|
137
|
+
onValueChange: (value) => onItemsPerPageChange(parseInt(value)),
|
|
138
|
+
disabled,
|
|
139
|
+
children: [/* @__PURE__ */ jsx(SelectTrigger, {
|
|
140
|
+
className: "h-8 w-16",
|
|
141
|
+
children: /* @__PURE__ */ jsx(SelectValue, {})
|
|
142
|
+
}), /* @__PURE__ */ jsx(SelectContent, {
|
|
143
|
+
className: "bg-background",
|
|
144
|
+
children: itemsPerPageOptions.map((option) => /* @__PURE__ */ jsx(SelectItem, {
|
|
145
|
+
value: option.toString(),
|
|
146
|
+
children: option
|
|
147
|
+
}, option))
|
|
148
|
+
})]
|
|
149
|
+
})]
|
|
150
|
+
})
|
|
151
|
+
]
|
|
152
|
+
});
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
//#endregion
|
|
156
|
+
export { Pagination };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Button } from "../../button.js";
|
|
2
|
+
import { Input } from "../../input.js";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { Search, X } from "lucide-react";
|
|
6
|
+
|
|
7
|
+
//#region ../ui-kit-web/dist/ui/atoms/SearchInput/SearchInput.js
|
|
8
|
+
const SearchInput = ({ value, onChange, placeholder = "Rechercher...", onClear, disabled = false, className = "", autoFocus = false }) => {
|
|
9
|
+
const handleClear = () => {
|
|
10
|
+
onChange("");
|
|
11
|
+
onClear?.();
|
|
12
|
+
};
|
|
13
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
14
|
+
className: `relative w-full ${className}`,
|
|
15
|
+
children: [
|
|
16
|
+
/* @__PURE__ */ jsx("div", {
|
|
17
|
+
className: "pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3",
|
|
18
|
+
children: /* @__PURE__ */ jsx(Search, { className: "text-muted-foreground h-4 w-4" })
|
|
19
|
+
}),
|
|
20
|
+
/* @__PURE__ */ jsx(Input, {
|
|
21
|
+
type: "text",
|
|
22
|
+
value,
|
|
23
|
+
onChange: (e) => onChange(e.target.value),
|
|
24
|
+
placeholder,
|
|
25
|
+
disabled,
|
|
26
|
+
autoFocus,
|
|
27
|
+
className: "pr-10 pl-10"
|
|
28
|
+
}),
|
|
29
|
+
value && /* @__PURE__ */ jsx("div", {
|
|
30
|
+
className: "absolute inset-y-0 right-0 flex items-center pr-3",
|
|
31
|
+
children: /* @__PURE__ */ jsxs(Button, {
|
|
32
|
+
type: "button",
|
|
33
|
+
variant: "ghost",
|
|
34
|
+
size: "sm",
|
|
35
|
+
onClick: handleClear,
|
|
36
|
+
disabled,
|
|
37
|
+
className: "h-6 w-6 p-0 hover:bg-transparent",
|
|
38
|
+
children: [/* @__PURE__ */ jsx(X, { className: "text-muted-foreground hover:text-foreground h-4 w-4" }), /* @__PURE__ */ jsx("span", {
|
|
39
|
+
className: "sr-only",
|
|
40
|
+
children: "Effacer la recherche"
|
|
41
|
+
})]
|
|
42
|
+
})
|
|
43
|
+
})
|
|
44
|
+
]
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
//#endregion
|
|
49
|
+
export { SearchInput };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { cn } from "./utils.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
import * as AvatarPrimitive from "@radix-ui/react-avatar";
|
|
7
|
+
|
|
8
|
+
//#region ../ui-kit-web/dist/ui/avatar.js
|
|
9
|
+
function Avatar({ className, ...props }) {
|
|
10
|
+
return /* @__PURE__ */ jsx(AvatarPrimitive.Root, {
|
|
11
|
+
"data-slot": "avatar",
|
|
12
|
+
className: cn("relative flex size-8 shrink-0 overflow-hidden rounded-full", className),
|
|
13
|
+
...props
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
function AvatarImage({ className, ...props }) {
|
|
17
|
+
return /* @__PURE__ */ jsx(AvatarPrimitive.Image, {
|
|
18
|
+
"data-slot": "avatar-image",
|
|
19
|
+
className: cn("aspect-square size-full", className),
|
|
20
|
+
...props
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
function AvatarFallback({ className, ...props }) {
|
|
24
|
+
return /* @__PURE__ */ jsx(AvatarPrimitive.Fallback, {
|
|
25
|
+
"data-slot": "avatar-fallback",
|
|
26
|
+
className: cn("bg-muted flex size-full items-center justify-center rounded-full", className),
|
|
27
|
+
...props
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
//#endregion
|
|
32
|
+
export { Avatar, AvatarFallback, AvatarImage };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { cn, init_utils } from "../ui-kit-core/dist/utils.js";
|
|
2
|
+
import "react";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { cva } from "class-variance-authority";
|
|
5
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
6
|
+
|
|
7
|
+
//#region ../ui-kit-web/dist/ui/badge.js
|
|
8
|
+
init_utils();
|
|
9
|
+
const badgeVariants = cva("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden", {
|
|
10
|
+
variants: { variant: {
|
|
11
|
+
default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
|
|
12
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
|
|
13
|
+
destructive: "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
14
|
+
outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"
|
|
15
|
+
} },
|
|
16
|
+
defaultVariants: { variant: "default" }
|
|
17
|
+
});
|
|
18
|
+
function Badge({ className, variant, asChild = false, ...props }) {
|
|
19
|
+
return /* @__PURE__ */ jsx(asChild ? Slot : "span", {
|
|
20
|
+
"data-slot": "badge",
|
|
21
|
+
className: cn(badgeVariants({ variant }), className),
|
|
22
|
+
...props
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
//#endregion
|
|
27
|
+
export { Badge };
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { cn, init_utils } from "../ui-kit-core/dist/utils.js";
|
|
2
|
+
import "react";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
5
|
+
import { ChevronRight, MoreHorizontal } from "lucide-react";
|
|
6
|
+
|
|
7
|
+
//#region ../ui-kit-web/dist/ui/breadcrumb.js
|
|
8
|
+
init_utils();
|
|
9
|
+
function Breadcrumb({ ...props }) {
|
|
10
|
+
return /* @__PURE__ */ jsx("nav", {
|
|
11
|
+
"aria-label": "breadcrumb",
|
|
12
|
+
"data-slot": "breadcrumb",
|
|
13
|
+
...props
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
function BreadcrumbList({ className, ...props }) {
|
|
17
|
+
return /* @__PURE__ */ jsx("ol", {
|
|
18
|
+
"data-slot": "breadcrumb-list",
|
|
19
|
+
className: cn("text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5", className),
|
|
20
|
+
...props
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
function BreadcrumbItem({ className, ...props }) {
|
|
24
|
+
return /* @__PURE__ */ jsx("li", {
|
|
25
|
+
"data-slot": "breadcrumb-item",
|
|
26
|
+
className: cn("inline-flex items-center gap-1.5", className),
|
|
27
|
+
...props
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
function BreadcrumbLink({ asChild, className, ...props }) {
|
|
31
|
+
return /* @__PURE__ */ jsx(asChild ? Slot : "a", {
|
|
32
|
+
"data-slot": "breadcrumb-link",
|
|
33
|
+
className: cn("hover:text-foreground transition-colors", className),
|
|
34
|
+
...props
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
function BreadcrumbPage({ className, ...props }) {
|
|
38
|
+
return /* @__PURE__ */ jsx("span", {
|
|
39
|
+
"data-slot": "breadcrumb-page",
|
|
40
|
+
role: "link",
|
|
41
|
+
"aria-disabled": "true",
|
|
42
|
+
"aria-current": "page",
|
|
43
|
+
className: cn("text-foreground font-normal", className),
|
|
44
|
+
...props
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
function BreadcrumbSeparator({ children, className, ...props }) {
|
|
48
|
+
return /* @__PURE__ */ jsx("li", {
|
|
49
|
+
"data-slot": "breadcrumb-separator",
|
|
50
|
+
role: "presentation",
|
|
51
|
+
"aria-hidden": "true",
|
|
52
|
+
className: cn("[&>svg]:size-3.5", className),
|
|
53
|
+
...props,
|
|
54
|
+
children: children ?? /* @__PURE__ */ jsx(ChevronRight, {})
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
//#endregion
|
|
59
|
+
export { Breadcrumb, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { cn, init_utils } from "../ui-kit-core/dist/utils.js";
|
|
2
|
+
import * as React$1 from "react";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { cva } from "class-variance-authority";
|
|
5
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
6
|
+
|
|
7
|
+
//#region ../ui-kit-web/dist/ui/button.js
|
|
8
|
+
init_utils();
|
|
9
|
+
const buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-hidden focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", {
|
|
10
|
+
variants: {
|
|
11
|
+
variant: {
|
|
12
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
13
|
+
destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
14
|
+
outline: "border bg-background shadow-2xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
|
|
15
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
16
|
+
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
17
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
18
|
+
},
|
|
19
|
+
size: {
|
|
20
|
+
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
21
|
+
sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
|
|
22
|
+
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
|
23
|
+
icon: "size-9"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
defaultVariants: {
|
|
27
|
+
variant: "default",
|
|
28
|
+
size: "default"
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
const Button = React$1.forwardRef(({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
32
|
+
if (asChild) return /* @__PURE__ */ jsx(Slot, {
|
|
33
|
+
"data-slot": "button",
|
|
34
|
+
className: cn(buttonVariants({
|
|
35
|
+
variant,
|
|
36
|
+
size,
|
|
37
|
+
className
|
|
38
|
+
})),
|
|
39
|
+
...props
|
|
40
|
+
});
|
|
41
|
+
return /* @__PURE__ */ jsx("button", {
|
|
42
|
+
ref,
|
|
43
|
+
"data-slot": "button",
|
|
44
|
+
className: cn(buttonVariants({
|
|
45
|
+
variant,
|
|
46
|
+
size,
|
|
47
|
+
className
|
|
48
|
+
})),
|
|
49
|
+
...props
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
Button.displayName = "Button";
|
|
53
|
+
|
|
54
|
+
//#endregion
|
|
55
|
+
export { Button, buttonVariants };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { cn, init_utils } from "../ui-kit-core/dist/utils.js";
|
|
2
|
+
import "react";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region ../ui-kit-web/dist/ui/card.js
|
|
6
|
+
init_utils();
|
|
7
|
+
function Card({ className, ...props }) {
|
|
8
|
+
return /* @__PURE__ */ jsx("div", {
|
|
9
|
+
"data-slot": "card",
|
|
10
|
+
className: cn("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-2xs", className),
|
|
11
|
+
...props
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
function CardHeader({ className, ...props }) {
|
|
15
|
+
return /* @__PURE__ */ jsx("div", {
|
|
16
|
+
"data-slot": "card-header",
|
|
17
|
+
className: cn("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6", className),
|
|
18
|
+
...props
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
function CardTitle({ className, ...props }) {
|
|
22
|
+
return /* @__PURE__ */ jsx("div", {
|
|
23
|
+
"data-slot": "card-title",
|
|
24
|
+
className: cn("leading-none font-semibold", className),
|
|
25
|
+
...props
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
function CardDescription({ className, ...props }) {
|
|
29
|
+
return /* @__PURE__ */ jsx("div", {
|
|
30
|
+
"data-slot": "card-description",
|
|
31
|
+
className: cn("text-muted-foreground text-sm", className),
|
|
32
|
+
...props
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
function CardContent({ className, ...props }) {
|
|
36
|
+
return /* @__PURE__ */ jsx("div", {
|
|
37
|
+
"data-slot": "card-content",
|
|
38
|
+
className: cn("px-6", className),
|
|
39
|
+
...props
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
//#endregion
|
|
44
|
+
export { Card, CardContent, CardDescription, CardHeader, CardTitle };
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { Button } from "./button.js";
|
|
4
|
+
import { cn } from "./utils.js";
|
|
5
|
+
import * as React$1 from "react";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { ArrowLeft, ArrowRight } from "lucide-react";
|
|
8
|
+
import useEmblaCarousel from "embla-carousel-react";
|
|
9
|
+
|
|
10
|
+
//#region ../ui-kit-web/dist/ui/carousel.js
|
|
11
|
+
const CarouselContext = React$1.createContext(null);
|
|
12
|
+
function useCarousel() {
|
|
13
|
+
const context = React$1.useContext(CarouselContext);
|
|
14
|
+
if (!context) throw new Error("useCarousel must be used within a <Carousel />");
|
|
15
|
+
return context;
|
|
16
|
+
}
|
|
17
|
+
function Carousel({ orientation = "horizontal", opts, setApi, plugins, className, children, ...props }) {
|
|
18
|
+
const [carouselRef, api] = useEmblaCarousel({
|
|
19
|
+
...opts,
|
|
20
|
+
axis: orientation === "horizontal" ? "x" : "y"
|
|
21
|
+
}, plugins);
|
|
22
|
+
const [canScrollPrev, setCanScrollPrev] = React$1.useState(false);
|
|
23
|
+
const [canScrollNext, setCanScrollNext] = React$1.useState(false);
|
|
24
|
+
const onSelect = React$1.useCallback((api$1) => {
|
|
25
|
+
if (!api$1) return;
|
|
26
|
+
setCanScrollPrev(api$1.canScrollPrev());
|
|
27
|
+
setCanScrollNext(api$1.canScrollNext());
|
|
28
|
+
}, []);
|
|
29
|
+
const scrollPrev = React$1.useCallback(() => {
|
|
30
|
+
api?.scrollPrev();
|
|
31
|
+
}, [api]);
|
|
32
|
+
const scrollNext = React$1.useCallback(() => {
|
|
33
|
+
api?.scrollNext();
|
|
34
|
+
}, [api]);
|
|
35
|
+
const handleKeyDown = React$1.useCallback((event) => {
|
|
36
|
+
if (event.key === "ArrowLeft") {
|
|
37
|
+
event.preventDefault();
|
|
38
|
+
scrollPrev();
|
|
39
|
+
} else if (event.key === "ArrowRight") {
|
|
40
|
+
event.preventDefault();
|
|
41
|
+
scrollNext();
|
|
42
|
+
}
|
|
43
|
+
}, [scrollPrev, scrollNext]);
|
|
44
|
+
React$1.useEffect(() => {
|
|
45
|
+
if (!api || !setApi) return;
|
|
46
|
+
setApi(api);
|
|
47
|
+
}, [api, setApi]);
|
|
48
|
+
React$1.useEffect(() => {
|
|
49
|
+
if (!api) return;
|
|
50
|
+
onSelect(api);
|
|
51
|
+
api.on("reInit", onSelect);
|
|
52
|
+
api.on("select", onSelect);
|
|
53
|
+
return () => {
|
|
54
|
+
api?.off("select", onSelect);
|
|
55
|
+
};
|
|
56
|
+
}, [api, onSelect]);
|
|
57
|
+
return /* @__PURE__ */ jsx(CarouselContext.Provider, {
|
|
58
|
+
value: {
|
|
59
|
+
carouselRef,
|
|
60
|
+
api,
|
|
61
|
+
opts,
|
|
62
|
+
orientation: orientation || (opts?.axis === "y" ? "vertical" : "horizontal"),
|
|
63
|
+
scrollPrev,
|
|
64
|
+
scrollNext,
|
|
65
|
+
canScrollPrev,
|
|
66
|
+
canScrollNext
|
|
67
|
+
},
|
|
68
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
69
|
+
onKeyDownCapture: handleKeyDown,
|
|
70
|
+
className: cn("relative", className),
|
|
71
|
+
role: "region",
|
|
72
|
+
"aria-roledescription": "carousel",
|
|
73
|
+
"data-slot": "carousel",
|
|
74
|
+
...props,
|
|
75
|
+
children
|
|
76
|
+
})
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
function CarouselContent({ className, ...props }) {
|
|
80
|
+
const { carouselRef, orientation } = useCarousel();
|
|
81
|
+
return /* @__PURE__ */ jsx("div", {
|
|
82
|
+
ref: carouselRef,
|
|
83
|
+
className: "overflow-hidden",
|
|
84
|
+
"data-slot": "carousel-content",
|
|
85
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
86
|
+
className: cn("flex", orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col", className),
|
|
87
|
+
...props
|
|
88
|
+
})
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
function CarouselItem({ className, ...props }) {
|
|
92
|
+
const { orientation } = useCarousel();
|
|
93
|
+
return /* @__PURE__ */ jsx("div", {
|
|
94
|
+
role: "group",
|
|
95
|
+
"aria-roledescription": "slide",
|
|
96
|
+
"data-slot": "carousel-item",
|
|
97
|
+
className: cn("min-w-0 shrink-0 grow-0 basis-full", orientation === "horizontal" ? "pl-4" : "pt-4", className),
|
|
98
|
+
...props
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
function CarouselPrevious({ className, variant = "outline", size = "icon", ...props }) {
|
|
102
|
+
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
103
|
+
return /* @__PURE__ */ jsxs(Button, {
|
|
104
|
+
"data-slot": "carousel-previous",
|
|
105
|
+
variant,
|
|
106
|
+
size,
|
|
107
|
+
className: cn("absolute size-8 rounded-full", orientation === "horizontal" ? "top-1/2 -left-12 -translate-y-1/2" : "-top-12 left-1/2 -translate-x-1/2 rotate-90", className),
|
|
108
|
+
disabled: !canScrollPrev,
|
|
109
|
+
onClick: scrollPrev,
|
|
110
|
+
...props,
|
|
111
|
+
children: [/* @__PURE__ */ jsx(ArrowLeft, {}), /* @__PURE__ */ jsx("span", {
|
|
112
|
+
className: "sr-only",
|
|
113
|
+
children: "Previous slide"
|
|
114
|
+
})]
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
function CarouselNext({ className, variant = "outline", size = "icon", ...props }) {
|
|
118
|
+
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
119
|
+
return /* @__PURE__ */ jsxs(Button, {
|
|
120
|
+
"data-slot": "carousel-next",
|
|
121
|
+
variant,
|
|
122
|
+
size,
|
|
123
|
+
className: cn("absolute size-8 rounded-full", orientation === "horizontal" ? "top-1/2 -right-12 -translate-y-1/2" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90", className),
|
|
124
|
+
disabled: !canScrollNext,
|
|
125
|
+
onClick: scrollNext,
|
|
126
|
+
...props,
|
|
127
|
+
children: [/* @__PURE__ */ jsx(ArrowRight, {}), /* @__PURE__ */ jsx("span", {
|
|
128
|
+
className: "sr-only",
|
|
129
|
+
children: "Next slide"
|
|
130
|
+
})]
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
//#endregion
|
|
135
|
+
export { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { cn, init_utils } from "../ui-kit-core/dist/utils.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
import { CheckIcon } from "lucide-react";
|
|
7
|
+
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
8
|
+
|
|
9
|
+
//#region ../ui-kit-web/dist/ui/checkbox.js
|
|
10
|
+
init_utils();
|
|
11
|
+
function Checkbox({ className, ...props }) {
|
|
12
|
+
return /* @__PURE__ */ jsx(CheckboxPrimitive.Root, {
|
|
13
|
+
"data-slot": "checkbox",
|
|
14
|
+
className: cn("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50", className),
|
|
15
|
+
...props,
|
|
16
|
+
children: /* @__PURE__ */ jsx(CheckboxPrimitive.Indicator, {
|
|
17
|
+
"data-slot": "checkbox-indicator",
|
|
18
|
+
className: "grid place-content-center text-current transition-none",
|
|
19
|
+
children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-3.5" })
|
|
20
|
+
})
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
//#endregion
|
|
25
|
+
export { Checkbox };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
|
|
5
|
+
|
|
6
|
+
//#region ../ui-kit-web/dist/ui/collapsible.js
|
|
7
|
+
function Collapsible({ ...props }) {
|
|
8
|
+
return /* @__PURE__ */ jsx(CollapsiblePrimitive.Root, {
|
|
9
|
+
"data-slot": "collapsible",
|
|
10
|
+
...props
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
function CollapsibleTrigger({ ...props }) {
|
|
14
|
+
return /* @__PURE__ */ jsx(CollapsiblePrimitive.CollapsibleTrigger, {
|
|
15
|
+
"data-slot": "collapsible-trigger",
|
|
16
|
+
...props
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
function CollapsibleContent({ ...props }) {
|
|
20
|
+
return /* @__PURE__ */ jsx(CollapsiblePrimitive.CollapsibleContent, {
|
|
21
|
+
"data-slot": "collapsible-content",
|
|
22
|
+
...props
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
//#endregion
|
|
27
|
+
export { Collapsible, CollapsibleContent, CollapsibleTrigger };
|