@lssm/lib.design-system 0.0.0-canary-20251217062139 → 0.0.0-canary-20251217060834
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 +12 -1
- package/dist/components/agent/AgentMonitor.js +3 -3
- package/dist/components/agent/ApprovalQueue.d.ts +2 -2
- package/dist/components/agent/ApprovalQueue.js +5 -4
- 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 +6 -6
- 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 +6 -4
- package/dist/components/atoms/LoaderCircular.d.ts +3 -3
- package/dist/components/atoms/LoaderCircular.js +2 -2
- package/dist/components/atoms/NavBrand.d.ts +3 -3
- 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 +5 -5
- 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 +3 -3
- package/dist/components/forms/ActionForm.js +1 -1
- package/dist/components/forms/FormCardLayout.d.ts +5 -5
- package/dist/components/forms/FormCardLayout.js +2 -2
- package/dist/components/forms/FormDialog.d.ts +5 -5
- package/dist/components/forms/FormDialog.js +1 -1
- package/dist/components/forms/FormLayout.d.ts +4 -4
- 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 +4 -4
- 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 +3 -3
- package/dist/components/legal/atoms/DefinitionList.js +1 -1
- package/dist/components/legal/atoms/KeyValueList.d.ts +3 -3
- package/dist/components/legal/atoms/KeyValueList.js +1 -1
- package/dist/components/legal/atoms/LegalCallout.d.ts +2 -2
- package/dist/components/legal/atoms/LegalCallout.js +1 -1
- package/dist/components/legal/atoms/LegalHeading.d.ts +2 -2
- package/dist/components/legal/atoms/LegalHeading.js +1 -1
- package/dist/components/legal/atoms/LegalList.d.ts +2 -2
- package/dist/components/legal/atoms/LegalList.js +1 -1
- package/dist/components/legal/atoms/LegalSection.d.ts +2 -2
- package/dist/components/legal/atoms/LegalSection.js +1 -1
- package/dist/components/legal/atoms/LegalText.d.ts +2 -2
- package/dist/components/legal/atoms/LegalText.js +1 -1
- package/dist/components/legal/molecules/Consent.d.ts +5 -5
- package/dist/components/legal/molecules/Consent.js +2 -2
- package/dist/components/legal/molecules/ContactFields.js +1 -1
- package/dist/components/legal/molecules/LegalMeta.js +1 -1
- package/dist/components/legal/molecules/LegalTOC.d.ts +3 -3
- package/dist/components/legal/molecules/LegalTOC.js +1 -1
- package/dist/components/legal/organisms/ContactForm.d.ts +2 -2
- package/dist/components/legal/organisms/ContactForm.js +3 -3
- package/dist/components/legal/organisms/GDPRDataRequest.d.ts +3 -3
- package/dist/components/legal/organisms/GDPRDataRequest.js +2 -2
- package/dist/components/legal/organisms/GDPRRights.d.ts +3 -3
- package/dist/components/legal/organisms/LegalPageLayout.d.ts +3 -3
- 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 +7 -7
- package/dist/components/legal/templates/PrivacyTemplate.d.ts +7 -7
- package/dist/components/legal/templates/SalesTermsTemplate.d.ts +5 -5
- package/dist/components/legal/templates/TermsTemplate.d.ts +5 -5
- 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 +3 -4
- 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 +3 -4
- 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 +4 -4
- package/dist/components/molecules/CommandSearchTrigger.js +5 -5
- package/dist/components/molecules/EntityCard.d.ts +9 -9
- package/dist/components/molecules/EntityCard.js +2 -2
- package/dist/components/molecules/FiltersToolbar.d.ts +4 -4
- package/dist/components/molecules/FiltersToolbar.js +6 -6
- package/dist/components/molecules/HoverPreview.d.ts +3 -3
- package/dist/components/molecules/HoverPreview.js +2 -4
- package/dist/components/molecules/LangSwitch.d.ts +2 -2
- package/dist/components/molecules/LangSwitchDropdown.js +4 -4
- package/dist/components/molecules/LoaderBlock.d.ts +3 -3
- 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.js +4 -4
- package/dist/components/molecules/NavUser.js +2 -2
- package/dist/components/molecules/OverviewCard.d.ts +2 -2
- package/dist/components/molecules/OverviewCard.js +5 -3
- 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 +8 -8
- package/dist/components/molecules/StatCard.js +2 -2
- package/dist/components/molecules/StatusChip.d.ts +5 -5
- 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 +5 -5
- package/dist/components/molecules/hover-previews/Simple.d.ts +7 -7
- package/dist/components/molecules/hover-previews/Stats.d.ts +6 -6
- package/dist/components/molecules/hover-previews/User.d.ts +7 -7
- package/dist/components/organisms/AcademyLayout.d.ts +7 -7
- package/dist/components/organisms/AcademyLayout.js +4 -4
- package/dist/components/organisms/AppHeader.d.ts +3 -3
- 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.js +1 -1
- package/dist/components/organisms/EmptyDataList.types.d.ts +8 -8
- package/dist/components/organisms/EmptySearchResult.d.ts +5 -5
- package/dist/components/organisms/EmptySearchResult.js +3 -3
- package/dist/components/organisms/FAQSection.d.ts +6 -6
- 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 +4 -4
- 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 +2 -2
- package/dist/components/organisms/HeroSection.d.ts +3 -3
- package/dist/components/organisms/HeroSection.js +1 -1
- package/dist/components/organisms/ListCardPage.d.ts +4 -4
- package/dist/components/organisms/ListCardPage.js +2 -2
- package/dist/components/organisms/ListGridPage.d.ts +4 -4
- package/dist/components/organisms/ListGridPage.js +1 -1
- package/dist/components/organisms/ListPageResponsive.js +1 -1
- package/dist/components/organisms/ListTablePage.d.ts +6 -6
- 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.js +1 -1
- package/dist/components/organisms/PricingCarousel.js +2 -2
- package/dist/components/organisms/PricingSection.d.ts +3 -3
- package/dist/components/organisms/PricingSection.js +1 -1
- package/dist/components/organisms/TestimonialCarousel.d.ts +5 -5
- package/dist/components/organisms/TestimonialCarousel.js +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/hooks/useListUrlState.js +7 -7
- package/dist/index.js +1 -2
- 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 +1 -1
- package/dist/renderers/form-contract.js +13 -13
- package/dist/types/navigation.d.ts +10 -10
- package/package.json +7 -7
- package/dist/contracts/dist/client/react/drivers/shadcn.js +0 -7
- package/dist/contracts/dist/client/react/form-render.js +0 -261
- package/dist/contracts/dist/forms.js +0 -78
- package/dist/ui-kit-web/dist/ui/accordion.js +0 -48
- package/dist/ui-kit-web/dist/ui/atoms/FilterSelect/FilterSelect.js +0 -52
- package/dist/ui-kit-web/dist/ui/atoms/Pagination/Pagination.js +0 -156
- package/dist/ui-kit-web/dist/ui/atoms/SearchInput/SearchInput.js +0 -49
- package/dist/ui-kit-web/dist/ui/avatar.js +0 -32
- package/dist/ui-kit-web/dist/ui/badge.js +0 -27
- package/dist/ui-kit-web/dist/ui/breadcrumb.js +0 -59
- package/dist/ui-kit-web/dist/ui/button.js +0 -55
- package/dist/ui-kit-web/dist/ui/card.js +0 -44
- package/dist/ui-kit-web/dist/ui/carousel.js +0 -135
- package/dist/ui-kit-web/dist/ui/checkbox.js +0 -25
- package/dist/ui-kit-web/dist/ui/collapsible.js +0 -27
- package/dist/ui-kit-web/dist/ui/command.js +0 -90
- package/dist/ui-kit-web/dist/ui/dialog.js +0 -84
- package/dist/ui-kit-web/dist/ui/dropdown-menu.js +0 -57
- package/dist/ui-kit-web/dist/ui/empty-state.js +0 -43
- package/dist/ui-kit-web/dist/ui/empty.js +0 -62
- package/dist/ui-kit-web/dist/ui/field.js +0 -78
- package/dist/ui-kit-web/dist/ui/form.js +0 -16
- package/dist/ui-kit-web/dist/ui/hover-card.js +0 -40
- package/dist/ui-kit-web/dist/ui/input.js +0 -17
- package/dist/ui-kit-web/dist/ui/label.js +0 -19
- package/dist/ui-kit-web/dist/ui/marketing/Hero.js +0 -52
- package/dist/ui-kit-web/dist/ui/marketing/PricingTable.js +0 -59
- package/dist/ui-kit-web/dist/ui/molecules/SearchAndFilter/SearchAndFilter.js +0 -102
- package/dist/ui-kit-web/dist/ui/molecules/SkeletonList.js +0 -14
- package/dist/ui-kit-web/dist/ui/navigation-menu.js +0 -75
- package/dist/ui-kit-web/dist/ui/organisms/ListPage/ListPage.js +0 -197
- package/dist/ui-kit-web/dist/ui/page-header.js +0 -40
- package/dist/ui-kit-web/dist/ui/pagination.js +0 -65
- package/dist/ui-kit-web/dist/ui/radio-group.js +0 -32
- package/dist/ui-kit-web/dist/ui/select.js +0 -86
- package/dist/ui-kit-web/dist/ui/separator.js +0 -21
- package/dist/ui-kit-web/dist/ui/sheet.js +0 -80
- package/dist/ui-kit-web/dist/ui/sidebar.js +0 -281
- package/dist/ui-kit-web/dist/ui/skeleton.js +0 -14
- package/dist/ui-kit-web/dist/ui/stack.js +0 -158
- package/dist/ui-kit-web/dist/ui/stepper.js +0 -37
- package/dist/ui-kit-web/dist/ui/switch.js +0 -24
- package/dist/ui-kit-web/dist/ui/table.js +0 -57
- package/dist/ui-kit-web/dist/ui/text.js +0 -16
- package/dist/ui-kit-web/dist/ui/textarea.js +0 -16
- package/dist/ui-kit-web/dist/ui/tooltip.js +0 -40
- package/dist/ui-kit-web/dist/ui/typography.js +0 -23
- package/dist/ui-kit-web/dist/ui/use-mobile.js +0 -20
- package/dist/ui-kit-web/dist/ui/utils.js +0 -10
- package/dist/ui-kit-web/dist/ui-kit-core/dist/utils.js +0 -13
|
@@ -1,17 +0,0 @@
|
|
|
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/input.js
|
|
6
|
-
init_utils();
|
|
7
|
-
function Input({ className, type, ...props }) {
|
|
8
|
-
return /* @__PURE__ */ jsx("input", {
|
|
9
|
-
type,
|
|
10
|
-
"data-slot": "input",
|
|
11
|
-
className: cn("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", "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", className),
|
|
12
|
-
...props
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
//#endregion
|
|
17
|
-
export { Input };
|
|
@@ -1,19 +0,0 @@
|
|
|
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 * as LabelPrimitive from "@radix-ui/react-label";
|
|
7
|
-
|
|
8
|
-
//#region ../ui-kit-web/dist/ui/label.js
|
|
9
|
-
init_utils();
|
|
10
|
-
function Label({ className, ...props }) {
|
|
11
|
-
return /* @__PURE__ */ jsx(LabelPrimitive.Root, {
|
|
12
|
-
"data-slot": "label",
|
|
13
|
-
className: cn("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", className),
|
|
14
|
-
...props
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
//#endregion
|
|
19
|
-
export { Label };
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { Button } from "../button.js";
|
|
2
|
-
import { cn } from "../utils.js";
|
|
3
|
-
import "react";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
-
|
|
6
|
-
//#region ../ui-kit-web/dist/ui/marketing/Hero.js
|
|
7
|
-
function Hero({ title, subtitle, primaryCta, secondaryCta, className }) {
|
|
8
|
-
return /* @__PURE__ */ jsxs("section", {
|
|
9
|
-
className: cn("mx-auto max-w-4xl py-16 text-center", className),
|
|
10
|
-
children: [
|
|
11
|
-
/* @__PURE__ */ jsx("h1", {
|
|
12
|
-
className: "text-4xl font-bold tracking-tight md:text-5xl",
|
|
13
|
-
children: title
|
|
14
|
-
}),
|
|
15
|
-
subtitle && /* @__PURE__ */ jsx("p", {
|
|
16
|
-
className: "text-muted-foreground mt-4 text-lg md:text-xl",
|
|
17
|
-
children: subtitle
|
|
18
|
-
}),
|
|
19
|
-
(primaryCta || secondaryCta) && /* @__PURE__ */ jsxs("div", {
|
|
20
|
-
className: "mt-8 flex items-center justify-center gap-3",
|
|
21
|
-
children: [primaryCta && (primaryCta.href ? /* @__PURE__ */ jsx(Button, {
|
|
22
|
-
asChild: true,
|
|
23
|
-
size: "lg",
|
|
24
|
-
children: /* @__PURE__ */ jsx("a", {
|
|
25
|
-
href: primaryCta.href,
|
|
26
|
-
children: primaryCta.label
|
|
27
|
-
})
|
|
28
|
-
}) : /* @__PURE__ */ jsx(Button, {
|
|
29
|
-
size: "lg",
|
|
30
|
-
onClick: primaryCta.onClick,
|
|
31
|
-
children: primaryCta.label
|
|
32
|
-
})), secondaryCta && (secondaryCta.href ? /* @__PURE__ */ jsx(Button, {
|
|
33
|
-
variant: "outline",
|
|
34
|
-
asChild: true,
|
|
35
|
-
size: "lg",
|
|
36
|
-
children: /* @__PURE__ */ jsx("a", {
|
|
37
|
-
href: secondaryCta.href,
|
|
38
|
-
children: secondaryCta.label
|
|
39
|
-
})
|
|
40
|
-
}) : /* @__PURE__ */ jsx(Button, {
|
|
41
|
-
variant: "outline",
|
|
42
|
-
size: "lg",
|
|
43
|
-
onClick: secondaryCta.onClick,
|
|
44
|
-
children: secondaryCta.label
|
|
45
|
-
}))]
|
|
46
|
-
})
|
|
47
|
-
]
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
//#endregion
|
|
52
|
-
export { Hero };
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { Button } from "../button.js";
|
|
2
|
-
import { cn } from "../utils.js";
|
|
3
|
-
import "react";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
-
|
|
6
|
-
//#region ../ui-kit-web/dist/ui/marketing/PricingTable.js
|
|
7
|
-
function PricingTable({ tiers, className }) {
|
|
8
|
-
return /* @__PURE__ */ jsxs("section", {
|
|
9
|
-
className: cn("mx-auto max-w-6xl py-12", className),
|
|
10
|
-
children: [/* @__PURE__ */ jsx("div", {
|
|
11
|
-
className: "grid grid-cols-1 gap-6 md:grid-cols-3",
|
|
12
|
-
children: tiers.map((t, idx) => /* @__PURE__ */ jsxs("div", {
|
|
13
|
-
className: cn("flex flex-col rounded-lg border p-6", t.highlighted && "border-primary shadow-lg"),
|
|
14
|
-
children: [
|
|
15
|
-
/* @__PURE__ */ jsx("div", {
|
|
16
|
-
className: "text-muted-foreground mb-2 text-base font-medium",
|
|
17
|
-
children: t.name
|
|
18
|
-
}),
|
|
19
|
-
/* @__PURE__ */ jsx("div", {
|
|
20
|
-
className: "text-3xl font-semibold",
|
|
21
|
-
children: t.price
|
|
22
|
-
}),
|
|
23
|
-
t.tagline && /* @__PURE__ */ jsx("div", {
|
|
24
|
-
className: "text-muted-foreground mt-1 text-base",
|
|
25
|
-
children: t.tagline
|
|
26
|
-
}),
|
|
27
|
-
/* @__PURE__ */ jsx("ul", {
|
|
28
|
-
className: "mt-4 space-y-2 text-base",
|
|
29
|
-
children: t.features.map((f, i) => /* @__PURE__ */ jsxs("li", {
|
|
30
|
-
className: "flex items-start gap-2",
|
|
31
|
-
children: [/* @__PURE__ */ jsx("span", { className: "bg-primary mt-1 h-1.5 w-1.5 rounded-full" }), /* @__PURE__ */ jsx("span", { children: f })]
|
|
32
|
-
}, i))
|
|
33
|
-
}),
|
|
34
|
-
t.cta && /* @__PURE__ */ jsx("div", {
|
|
35
|
-
className: "mt-6",
|
|
36
|
-
children: t.cta.href ? /* @__PURE__ */ jsx(Button, {
|
|
37
|
-
asChild: true,
|
|
38
|
-
className: "w-full",
|
|
39
|
-
children: /* @__PURE__ */ jsx("a", {
|
|
40
|
-
href: t.cta.href,
|
|
41
|
-
children: t.cta.label
|
|
42
|
-
})
|
|
43
|
-
}) : /* @__PURE__ */ jsx(Button, {
|
|
44
|
-
className: "w-full",
|
|
45
|
-
onClick: t.cta.onClick,
|
|
46
|
-
children: t.cta.label
|
|
47
|
-
})
|
|
48
|
-
})
|
|
49
|
-
]
|
|
50
|
-
}, idx))
|
|
51
|
-
}), /* @__PURE__ */ jsx("p", {
|
|
52
|
-
className: "text-muted-foreground mt-6 text-center text-base",
|
|
53
|
-
children: "Usage-based tiers inspired by generous free allowances and per-unit pricing."
|
|
54
|
-
})]
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
//#endregion
|
|
59
|
-
export { PricingTable };
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { Button } from "../../button.js";
|
|
2
|
-
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "../../collapsible.js";
|
|
3
|
-
import { FilterSelect } from "../../atoms/FilterSelect/FilterSelect.js";
|
|
4
|
-
import { SearchInput } from "../../atoms/SearchInput/SearchInput.js";
|
|
5
|
-
import React, { useState } from "react";
|
|
6
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
-
import { ChevronDown, ChevronUp, Filter } from "lucide-react";
|
|
8
|
-
|
|
9
|
-
//#region ../ui-kit-web/dist/ui/molecules/SearchAndFilter/SearchAndFilter.js
|
|
10
|
-
const SearchAndFilter = ({ searchValue, onSearchChange, searchPlaceholder, filters = [], isLoading = false, disabled = false, className = "", collapsible = true, defaultCollapsed = false }) => {
|
|
11
|
-
const [isCollapsed, setIsCollapsed] = useState(defaultCollapsed);
|
|
12
|
-
const hasFilters = filters.length > 0;
|
|
13
|
-
const activeFiltersCount = filters.filter((f) => f.value).length;
|
|
14
|
-
const shouldUseCollapsible = collapsible && hasFilters;
|
|
15
|
-
console.log("SearchAndFilter", { filters });
|
|
16
|
-
const FilterComponents = () => /* @__PURE__ */ jsx("div", {
|
|
17
|
-
className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",
|
|
18
|
-
children: filters.map((filter) => /* @__PURE__ */ jsx(FilterSelect, {
|
|
19
|
-
value: filter.value,
|
|
20
|
-
options: filter.options,
|
|
21
|
-
onChange: filter.onChange,
|
|
22
|
-
label: filter.label,
|
|
23
|
-
disabled: disabled || isLoading,
|
|
24
|
-
showCounts: filter.showCounts,
|
|
25
|
-
className: "min-w-0"
|
|
26
|
-
}, filter.key))
|
|
27
|
-
});
|
|
28
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
29
|
-
className: `space-y-4 ${className}`,
|
|
30
|
-
children: [
|
|
31
|
-
/* @__PURE__ */ jsxs("div", {
|
|
32
|
-
className: "flex flex-col gap-4 sm:flex-row",
|
|
33
|
-
children: [/* @__PURE__ */ jsx("div", {
|
|
34
|
-
className: "flex-1",
|
|
35
|
-
children: /* @__PURE__ */ jsx(SearchInput, {
|
|
36
|
-
value: searchValue,
|
|
37
|
-
onChange: onSearchChange,
|
|
38
|
-
placeholder: searchPlaceholder,
|
|
39
|
-
disabled: disabled || isLoading,
|
|
40
|
-
className: "w-full"
|
|
41
|
-
})
|
|
42
|
-
}), shouldUseCollapsible && /* @__PURE__ */ jsxs(Collapsible, {
|
|
43
|
-
open: !isCollapsed,
|
|
44
|
-
onOpenChange: setIsCollapsed,
|
|
45
|
-
className: "sm:hidden",
|
|
46
|
-
children: [/* @__PURE__ */ jsx(CollapsibleTrigger, {
|
|
47
|
-
asChild: true,
|
|
48
|
-
children: /* @__PURE__ */ jsxs(Button, {
|
|
49
|
-
variant: "outline",
|
|
50
|
-
className: "sm:hidden",
|
|
51
|
-
disabled: disabled || isLoading,
|
|
52
|
-
children: [
|
|
53
|
-
/* @__PURE__ */ jsx(Filter, { className: "mr-2 h-4 w-4" }),
|
|
54
|
-
"Filtres",
|
|
55
|
-
activeFiltersCount > 0 && /* @__PURE__ */ jsx("span", {
|
|
56
|
-
className: "bg-primary text-primary-foreground ml-2 flex h-5 w-5 items-center justify-center rounded-full text-sm",
|
|
57
|
-
children: activeFiltersCount
|
|
58
|
-
}),
|
|
59
|
-
isCollapsed ? /* @__PURE__ */ jsx(ChevronDown, { className: "ml-2 h-4 w-4" }) : /* @__PURE__ */ jsx(ChevronUp, { className: "ml-2 h-4 w-4" })
|
|
60
|
-
]
|
|
61
|
-
})
|
|
62
|
-
}), /* @__PURE__ */ jsx(CollapsibleContent, {
|
|
63
|
-
className: "mt-4 space-y-4",
|
|
64
|
-
children: /* @__PURE__ */ jsx(FilterComponents, {})
|
|
65
|
-
})]
|
|
66
|
-
})]
|
|
67
|
-
}),
|
|
68
|
-
hasFilters && /* @__PURE__ */ jsx("div", {
|
|
69
|
-
className: "hidden sm:block",
|
|
70
|
-
children: /* @__PURE__ */ jsx(FilterComponents, {})
|
|
71
|
-
}),
|
|
72
|
-
activeFiltersCount > 0 && /* @__PURE__ */ jsxs("div", {
|
|
73
|
-
className: "flex flex-wrap items-center gap-2",
|
|
74
|
-
children: [/* @__PURE__ */ jsx("span", {
|
|
75
|
-
className: "text-muted-foreground text-base",
|
|
76
|
-
children: "Filtres actifs:"
|
|
77
|
-
}), filters.filter((f) => f.value).map((filter) => {
|
|
78
|
-
const selectedOption = filter.options.find((opt) => opt.value === filter.value);
|
|
79
|
-
return /* @__PURE__ */ jsxs(Button, {
|
|
80
|
-
variant: "secondary",
|
|
81
|
-
size: "sm",
|
|
82
|
-
onClick: () => filter.onChange(""),
|
|
83
|
-
disabled: disabled || isLoading,
|
|
84
|
-
className: "h-7 px-2 text-sm",
|
|
85
|
-
children: [
|
|
86
|
-
filter.label,
|
|
87
|
-
": ",
|
|
88
|
-
selectedOption?.label,
|
|
89
|
-
/* @__PURE__ */ jsx("span", {
|
|
90
|
-
className: "ml-1",
|
|
91
|
-
children: "×"
|
|
92
|
-
})
|
|
93
|
-
]
|
|
94
|
-
}, filter.key);
|
|
95
|
-
})]
|
|
96
|
-
})
|
|
97
|
-
]
|
|
98
|
-
});
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
//#endregion
|
|
102
|
-
export { SearchAndFilter };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Skeleton } from "../skeleton.js";
|
|
2
|
-
import "react";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
|
|
5
|
-
//#region ../ui-kit-web/dist/ui/molecules/SkeletonList.js
|
|
6
|
-
function SkeletonList({ count = 6, className = "", itemClassName = "" }) {
|
|
7
|
-
return /* @__PURE__ */ jsx("div", {
|
|
8
|
-
className: `space-y-3 ${className}`,
|
|
9
|
-
children: Array.from({ length: count }).map((_, i) => /* @__PURE__ */ jsx(Skeleton, { className: `h-20 rounded-md ${itemClassName}` }, i))
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
//#endregion
|
|
14
|
-
export { SkeletonList };
|
|
@@ -1,75 +0,0 @@
|
|
|
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 { cva } from "class-variance-authority";
|
|
5
|
-
import { ChevronDownIcon } from "lucide-react";
|
|
6
|
-
import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
|
|
7
|
-
|
|
8
|
-
//#region ../ui-kit-web/dist/ui/navigation-menu.js
|
|
9
|
-
init_utils();
|
|
10
|
-
function NavigationMenu({ className, children, viewport = true, ...props }) {
|
|
11
|
-
return /* @__PURE__ */ jsxs(NavigationMenuPrimitive.Root, {
|
|
12
|
-
"data-slot": "navigation-menu",
|
|
13
|
-
"data-viewport": viewport,
|
|
14
|
-
className: cn("group/navigation-menu relative flex max-w-max flex-1 items-center justify-center", className),
|
|
15
|
-
...props,
|
|
16
|
-
children: [children, viewport && /* @__PURE__ */ jsx(NavigationMenuViewport, {})]
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
function NavigationMenuList({ className, ...props }) {
|
|
20
|
-
return /* @__PURE__ */ jsx(NavigationMenuPrimitive.List, {
|
|
21
|
-
"data-slot": "navigation-menu-list",
|
|
22
|
-
className: cn("group flex flex-1 list-none items-center justify-center gap-1", className),
|
|
23
|
-
...props
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
function NavigationMenuItem({ className, ...props }) {
|
|
27
|
-
return /* @__PURE__ */ jsx(NavigationMenuPrimitive.Item, {
|
|
28
|
-
"data-slot": "navigation-menu-item",
|
|
29
|
-
className: cn("relative", className),
|
|
30
|
-
...props
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
const navigationMenuTriggerStyle = cva("group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=open]:hover:bg-accent data-[state=open]:text-accent-foreground data-[state=open]:focus:bg-accent data-[state=open]:bg-accent/50 focus-visible:ring-ring/50 outline-hidden transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1");
|
|
34
|
-
function NavigationMenuTrigger({ className, children, ...props }) {
|
|
35
|
-
return /* @__PURE__ */ jsxs(NavigationMenuPrimitive.Trigger, {
|
|
36
|
-
"data-slot": "navigation-menu-trigger",
|
|
37
|
-
className: cn(navigationMenuTriggerStyle(), "group", className),
|
|
38
|
-
...props,
|
|
39
|
-
children: [
|
|
40
|
-
children,
|
|
41
|
-
" ",
|
|
42
|
-
/* @__PURE__ */ jsx(ChevronDownIcon, {
|
|
43
|
-
className: "relative top-px ml-1 size-3 transition duration-300 group-data-[state=open]:rotate-180",
|
|
44
|
-
"aria-hidden": "true"
|
|
45
|
-
})
|
|
46
|
-
]
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
function NavigationMenuContent({ className, ...props }) {
|
|
50
|
-
return /* @__PURE__ */ jsx(NavigationMenuPrimitive.Content, {
|
|
51
|
-
"data-slot": "navigation-menu-content",
|
|
52
|
-
className: cn("data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 top-0 left-0 w-full p-2 pr-2.5 md:absolute md:w-auto", "bg-background group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground data-[state=open]:group-data-[viewport=false]/navigation-menu:animate-in data-[state=closed]:group-data-[viewport=false]/navigation-menu:animate-out data-[state=closed]:group-data-[viewport=false]/navigation-menu:fade-out-0 data-[state=open]:group-data-[viewport=false]/navigation-menu:fade-in-0 data-[state=closed]:group-data-[viewport=false]/navigation-menu:zoom-out-95 data-[state=open]:group-data-[viewport=false]/navigation-menu:zoom-in-95 group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-md group-data-[viewport=false]/navigation-menu:border group-data-[viewport=false]/navigation-menu:shadow-2xs group-data-[viewport=false]/navigation-menu:duration-200 **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-hidden", className),
|
|
53
|
-
...props
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
function NavigationMenuViewport({ className, ...props }) {
|
|
57
|
-
return /* @__PURE__ */ jsx("div", {
|
|
58
|
-
className: cn("absolute top-full left-0 isolate z-50 flex justify-center"),
|
|
59
|
-
children: /* @__PURE__ */ jsx(NavigationMenuPrimitive.Viewport, {
|
|
60
|
-
"data-slot": "navigation-menu-viewport",
|
|
61
|
-
className: cn("origin-top-center bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 relative mt-1.5 h-(--radix-navigation-menu-viewport-height) w-full overflow-hidden rounded-md border shadow-2xs md:w-(--radix-navigation-menu-viewport-width)", className),
|
|
62
|
-
...props
|
|
63
|
-
})
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
function NavigationMenuLink({ className, ...props }) {
|
|
67
|
-
return /* @__PURE__ */ jsx(NavigationMenuPrimitive.Link, {
|
|
68
|
-
"data-slot": "navigation-menu-link",
|
|
69
|
-
className: cn("hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus-visible:ring-ring/50 data-[active=true]:bg-accent/50 data-[active=true]:text-accent-foreground data-[active=true]:hover:bg-accent data-[active=true]:focus:bg-accent [&_svg:not([class*='text-'])]:text-muted-foreground flex flex-col gap-1 rounded-xs p-2 text-sm outline-hidden transition-all focus-visible:ring-[3px] focus-visible:outline-1 [&_svg:not([class*='size-'])]:size-4", className),
|
|
70
|
-
...props
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
//#endregion
|
|
75
|
-
export { NavigationMenu, NavigationMenuContent, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger };
|
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
import { Separator } from "../../separator.js";
|
|
2
|
-
import { Button } from "../../button.js";
|
|
3
|
-
import { HStack, VStack } from "../../stack.js";
|
|
4
|
-
import { Card, CardContent } from "../../card.js";
|
|
5
|
-
import { Pagination } from "../../atoms/Pagination/Pagination.js";
|
|
6
|
-
import { SearchAndFilter } from "../../molecules/SearchAndFilter/SearchAndFilter.js";
|
|
7
|
-
import React from "react";
|
|
8
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
-
import { AlertTriangle, Loader2, Plus, RefreshCcw } from "lucide-react";
|
|
10
|
-
import Link from "next/link";
|
|
11
|
-
|
|
12
|
-
//#region ../ui-kit-web/dist/ui/organisms/ListPage/ListPage.js
|
|
13
|
-
function ListPage({ title, description, header, items, totalItems, totalPages, isLoading, isFetching, error, listState, searchPlaceholder, filters = [], onRefresh, primaryAction, toolbar, renderItem, renderEmpty, renderStats, className = "", itemClassName = "" }) {
|
|
14
|
-
const { searchQuery, setSearchQuery, filters: filterValues, setFilter, currentPage, itemsPerPage, setCurrentPage, setItemsPerPage } = listState;
|
|
15
|
-
if (isLoading && !items.length) return /* @__PURE__ */ jsxs(VStack, {
|
|
16
|
-
className: `space-y-4 md:space-y-6 ${className}`,
|
|
17
|
-
children: [header ? header : /* @__PURE__ */ jsxs(VStack, {
|
|
18
|
-
className: "gap-1",
|
|
19
|
-
children: [/* @__PURE__ */ jsx("h1", {
|
|
20
|
-
className: "text-2xl font-bold md:text-3xl",
|
|
21
|
-
children: title
|
|
22
|
-
}), description && /* @__PURE__ */ jsx("p", {
|
|
23
|
-
className: "text-muted-foreground text-base",
|
|
24
|
-
children: description
|
|
25
|
-
})]
|
|
26
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
27
|
-
className: "flex min-h-[400px] items-center justify-center",
|
|
28
|
-
children: /* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsxs(CardContent, {
|
|
29
|
-
className: "flex items-center gap-4 p-6",
|
|
30
|
-
children: [/* @__PURE__ */ jsx(Loader2, { className: "text-primary h-8 w-8 animate-spin" }), /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("h3", {
|
|
31
|
-
className: "font-medium",
|
|
32
|
-
children: "Chargement..."
|
|
33
|
-
}), /* @__PURE__ */ jsx("p", {
|
|
34
|
-
className: "text-muted-foreground text-base",
|
|
35
|
-
children: "Récupération des données en cours"
|
|
36
|
-
})] })]
|
|
37
|
-
}) })
|
|
38
|
-
})]
|
|
39
|
-
});
|
|
40
|
-
if (error && !items.length) return /* @__PURE__ */ jsxs(VStack, {
|
|
41
|
-
className: `space-y-4 md:space-y-6 ${className}`,
|
|
42
|
-
children: [header ? header : /* @__PURE__ */ jsxs(VStack, {
|
|
43
|
-
className: "gap-1",
|
|
44
|
-
children: [/* @__PURE__ */ jsx("h1", {
|
|
45
|
-
className: "text-2xl font-bold md:text-3xl",
|
|
46
|
-
children: title
|
|
47
|
-
}), description && /* @__PURE__ */ jsx("p", {
|
|
48
|
-
className: "text-muted-foreground text-base",
|
|
49
|
-
children: description
|
|
50
|
-
})]
|
|
51
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
52
|
-
className: "flex min-h-[400px] items-center justify-center",
|
|
53
|
-
children: /* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsxs(CardContent, {
|
|
54
|
-
className: "flex flex-col items-center gap-4 p-6 text-center",
|
|
55
|
-
children: [
|
|
56
|
-
/* @__PURE__ */ jsx(AlertTriangle, { className: "text-destructive h-12 w-12" }),
|
|
57
|
-
/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("h3", {
|
|
58
|
-
className: "font-medium",
|
|
59
|
-
children: "Erreur de chargement"
|
|
60
|
-
}), /* @__PURE__ */ jsx("p", {
|
|
61
|
-
className: "text-muted-foreground text-base",
|
|
62
|
-
children: error.message || "Une erreur est survenue"
|
|
63
|
-
})] }),
|
|
64
|
-
onRefresh && /* @__PURE__ */ jsxs(Button, {
|
|
65
|
-
onClick: onRefresh,
|
|
66
|
-
variant: "outline",
|
|
67
|
-
size: "sm",
|
|
68
|
-
children: [/* @__PURE__ */ jsx(RefreshCcw, { className: "mr-2 h-4 w-4" }), "Réessayer"]
|
|
69
|
-
})
|
|
70
|
-
]
|
|
71
|
-
}) })
|
|
72
|
-
})]
|
|
73
|
-
});
|
|
74
|
-
const filterConfigs = filters.map((filter) => ({
|
|
75
|
-
key: filter.key,
|
|
76
|
-
label: filter.label,
|
|
77
|
-
value: filterValues[filter.key] || "",
|
|
78
|
-
options: filter.options,
|
|
79
|
-
onChange: (value) => {
|
|
80
|
-
setFilter(filter.key, value === "all" ? "" : value);
|
|
81
|
-
},
|
|
82
|
-
showCounts: filter.showCounts
|
|
83
|
-
}));
|
|
84
|
-
return /* @__PURE__ */ jsxs(VStack, {
|
|
85
|
-
className: `space-y-4 md:space-y-6 ${className}`,
|
|
86
|
-
children: [
|
|
87
|
-
header ? header : /* @__PURE__ */ jsxs(HStack, {
|
|
88
|
-
className: "items-center justify-between",
|
|
89
|
-
children: [/* @__PURE__ */ jsxs(VStack, {
|
|
90
|
-
className: "gap-1",
|
|
91
|
-
children: [/* @__PURE__ */ jsx("h1", {
|
|
92
|
-
className: "text-2xl font-bold md:text-3xl",
|
|
93
|
-
children: title
|
|
94
|
-
}), description && /* @__PURE__ */ jsx("p", {
|
|
95
|
-
className: "text-muted-foreground text-base",
|
|
96
|
-
children: description
|
|
97
|
-
})]
|
|
98
|
-
}), /* @__PURE__ */ jsxs(HStack, {
|
|
99
|
-
className: "items-center gap-4",
|
|
100
|
-
children: [
|
|
101
|
-
toolbar,
|
|
102
|
-
(isLoading || isFetching) && /* @__PURE__ */ jsxs("div", {
|
|
103
|
-
className: "text-muted-foreground flex items-center gap-2 text-base",
|
|
104
|
-
children: [/* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 animate-spin" }), /* @__PURE__ */ jsx("span", {
|
|
105
|
-
className: "hidden sm:inline",
|
|
106
|
-
children: "Mise à jour..."
|
|
107
|
-
})]
|
|
108
|
-
}),
|
|
109
|
-
onRefresh && /* @__PURE__ */ jsxs(Button, {
|
|
110
|
-
variant: "outline",
|
|
111
|
-
size: "sm",
|
|
112
|
-
onClick: onRefresh,
|
|
113
|
-
disabled: Boolean(isLoading),
|
|
114
|
-
"aria-label": "Rafraîchir",
|
|
115
|
-
children: [/* @__PURE__ */ jsx(RefreshCcw, { className: `mr-2 h-4 w-4 ${isLoading || isFetching ? "animate-spin" : ""}` }), /* @__PURE__ */ jsx("span", {
|
|
116
|
-
className: "hidden sm:inline",
|
|
117
|
-
children: "Rafraîchir"
|
|
118
|
-
})]
|
|
119
|
-
}),
|
|
120
|
-
primaryAction && /* @__PURE__ */ jsx(Fragment, { children: primaryAction.href ? /* @__PURE__ */ jsx(Link, {
|
|
121
|
-
href: primaryAction.href,
|
|
122
|
-
children: /* @__PURE__ */ jsxs(Button, { children: [
|
|
123
|
-
primaryAction.icon || /* @__PURE__ */ jsx(Plus, { className: "mr-2 h-4 w-4" }),
|
|
124
|
-
/* @__PURE__ */ jsx("span", {
|
|
125
|
-
className: "hidden sm:inline",
|
|
126
|
-
children: primaryAction.label
|
|
127
|
-
}),
|
|
128
|
-
/* @__PURE__ */ jsx("span", {
|
|
129
|
-
className: "sm:hidden",
|
|
130
|
-
children: "Nouveau"
|
|
131
|
-
})
|
|
132
|
-
] })
|
|
133
|
-
}) : /* @__PURE__ */ jsxs(Button, {
|
|
134
|
-
onClick: primaryAction.onClick,
|
|
135
|
-
children: [
|
|
136
|
-
primaryAction.icon || /* @__PURE__ */ jsx(Plus, { className: "mr-2 h-4 w-4" }),
|
|
137
|
-
/* @__PURE__ */ jsx("span", {
|
|
138
|
-
className: "hidden sm:inline",
|
|
139
|
-
children: primaryAction.label
|
|
140
|
-
}),
|
|
141
|
-
/* @__PURE__ */ jsx("span", {
|
|
142
|
-
className: "sm:hidden",
|
|
143
|
-
children: "Nouveau"
|
|
144
|
-
})
|
|
145
|
-
]
|
|
146
|
-
}) })
|
|
147
|
-
]
|
|
148
|
-
})]
|
|
149
|
-
}),
|
|
150
|
-
renderStats && /* @__PURE__ */ jsxs(Fragment, { children: [renderStats(items), /* @__PURE__ */ jsx(Separator, {})] }),
|
|
151
|
-
/* @__PURE__ */ jsx(SearchAndFilter, {
|
|
152
|
-
searchValue: searchQuery,
|
|
153
|
-
onSearchChange: setSearchQuery,
|
|
154
|
-
searchPlaceholder,
|
|
155
|
-
filters: filterConfigs,
|
|
156
|
-
isLoading
|
|
157
|
-
}),
|
|
158
|
-
items.length === 0 && !isLoading ? renderEmpty ? renderEmpty() : /* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsxs(CardContent, {
|
|
159
|
-
className: "flex flex-col items-center gap-4 p-8 text-center",
|
|
160
|
-
children: [
|
|
161
|
-
/* @__PURE__ */ jsx("div", {
|
|
162
|
-
className: "bg-muted flex h-12 w-12 items-center justify-center rounded-full",
|
|
163
|
-
children: /* @__PURE__ */ jsx("div", { className: "bg-muted-foreground/20 h-6 w-6 rounded-full" })
|
|
164
|
-
}),
|
|
165
|
-
/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("h3", {
|
|
166
|
-
className: "font-medium",
|
|
167
|
-
children: "Aucun élément trouvé"
|
|
168
|
-
}), /* @__PURE__ */ jsx("p", {
|
|
169
|
-
className: "text-muted-foreground text-base",
|
|
170
|
-
children: searchQuery || Object.values(filterValues).some((v) => v) ? "Essayez de modifier vos critères de recherche" : "Commencez par créer votre premier élément"
|
|
171
|
-
})] }),
|
|
172
|
-
primaryAction && !searchQuery && !Object.values(filterValues).some((v) => v) && /* @__PURE__ */ jsx(Fragment, { children: primaryAction.href ? /* @__PURE__ */ jsx(Link, {
|
|
173
|
-
href: primaryAction.href,
|
|
174
|
-
children: /* @__PURE__ */ jsxs(Button, { children: [primaryAction.icon || /* @__PURE__ */ jsx(Plus, { className: "mr-2 h-4 w-4" }), primaryAction.label] })
|
|
175
|
-
}) : /* @__PURE__ */ jsxs(Button, {
|
|
176
|
-
onClick: primaryAction.onClick,
|
|
177
|
-
children: [primaryAction.icon || /* @__PURE__ */ jsx(Plus, { className: "mr-2 h-4 w-4" }), primaryAction.label]
|
|
178
|
-
}) })
|
|
179
|
-
]
|
|
180
|
-
}) }) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("div", {
|
|
181
|
-
className: `space-y-4 ${itemClassName}`,
|
|
182
|
-
children: items.map((item, index) => renderItem(item, index))
|
|
183
|
-
}), totalPages > 1 && /* @__PURE__ */ jsx(Pagination, {
|
|
184
|
-
currentPage,
|
|
185
|
-
totalPages,
|
|
186
|
-
totalItems,
|
|
187
|
-
itemsPerPage,
|
|
188
|
-
onPageChange: setCurrentPage,
|
|
189
|
-
onItemsPerPageChange: setItemsPerPage,
|
|
190
|
-
disabled: isLoading
|
|
191
|
-
})] })
|
|
192
|
-
]
|
|
193
|
-
});
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
//#endregion
|
|
197
|
-
export { ListPage };
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { cn, init_utils } from "../ui-kit-core/dist/utils.js";
|
|
2
|
-
import { HStack, VStack } from "./stack.js";
|
|
3
|
-
import "react";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
-
import { cva } from "class-variance-authority";
|
|
6
|
-
|
|
7
|
-
//#region ../ui-kit-web/dist/ui/page-header.js
|
|
8
|
-
init_utils();
|
|
9
|
-
const headerVariants = cva("", {
|
|
10
|
-
variants: { spacing: {
|
|
11
|
-
sm: "gap-1",
|
|
12
|
-
md: "gap-2",
|
|
13
|
-
lg: "gap-3"
|
|
14
|
-
} },
|
|
15
|
-
defaultVariants: { spacing: "md" }
|
|
16
|
-
});
|
|
17
|
-
function PageHeader({ breadcrumb, title, subtitle, actions, spacing, className }) {
|
|
18
|
-
return /* @__PURE__ */ jsxs(VStack, {
|
|
19
|
-
className: cn(headerVariants({ spacing }), className),
|
|
20
|
-
children: [breadcrumb, /* @__PURE__ */ jsxs(HStack, {
|
|
21
|
-
className: "flex-col items-start justify-between md:flex-row",
|
|
22
|
-
children: [/* @__PURE__ */ jsxs(VStack, {
|
|
23
|
-
className: "gap-1",
|
|
24
|
-
children: [/* @__PURE__ */ jsx("h1", {
|
|
25
|
-
className: "text-2xl font-semibold md:text-3xl",
|
|
26
|
-
children: title
|
|
27
|
-
}), subtitle ? /* @__PURE__ */ jsx("p", {
|
|
28
|
-
className: "text-muted-foreground text-base",
|
|
29
|
-
children: subtitle
|
|
30
|
-
}) : null]
|
|
31
|
-
}), actions ? /* @__PURE__ */ jsx("div", {
|
|
32
|
-
className: "flex items-center gap-2",
|
|
33
|
-
children: actions
|
|
34
|
-
}) : null]
|
|
35
|
-
})]
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
//#endregion
|
|
40
|
-
export { PageHeader };
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { cn, init_utils } from "../ui-kit-core/dist/utils.js";
|
|
2
|
-
import { buttonVariants } from "./button.js";
|
|
3
|
-
import * as React$1 from "react";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
-
import { ChevronLeft, ChevronRight, MoreHorizontal } from "lucide-react";
|
|
6
|
-
|
|
7
|
-
//#region ../ui-kit-web/dist/ui/pagination.js
|
|
8
|
-
init_utils();
|
|
9
|
-
const Pagination = ({ className, ...props }) => /* @__PURE__ */ jsx("nav", {
|
|
10
|
-
role: "navigation",
|
|
11
|
-
"aria-label": "pagination",
|
|
12
|
-
className: cn("mx-auto flex w-full justify-center", className),
|
|
13
|
-
...props
|
|
14
|
-
});
|
|
15
|
-
Pagination.displayName = "Pagination";
|
|
16
|
-
const PaginationContent = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("ul", {
|
|
17
|
-
ref,
|
|
18
|
-
className: cn("flex flex-row items-center gap-1", className),
|
|
19
|
-
...props
|
|
20
|
-
}));
|
|
21
|
-
PaginationContent.displayName = "PaginationContent";
|
|
22
|
-
const PaginationItem = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("li", {
|
|
23
|
-
ref,
|
|
24
|
-
className: cn("", className),
|
|
25
|
-
...props
|
|
26
|
-
}));
|
|
27
|
-
PaginationItem.displayName = "PaginationItem";
|
|
28
|
-
const PaginationLink = ({ className, isActive, size = "icon", ...props }) => /* @__PURE__ */ jsx("a", {
|
|
29
|
-
"aria-current": isActive ? "page" : void 0,
|
|
30
|
-
className: cn(buttonVariants({
|
|
31
|
-
variant: isActive ? "outline" : "ghost",
|
|
32
|
-
size
|
|
33
|
-
}), className),
|
|
34
|
-
...props
|
|
35
|
-
});
|
|
36
|
-
PaginationLink.displayName = "PaginationLink";
|
|
37
|
-
const PaginationPrevious = ({ className, ...props }) => /* @__PURE__ */ jsxs(PaginationLink, {
|
|
38
|
-
"aria-label": "Go to previous page",
|
|
39
|
-
size: "default",
|
|
40
|
-
className: cn("gap-1 pl-2.5", className),
|
|
41
|
-
...props,
|
|
42
|
-
children: [/* @__PURE__ */ jsx(ChevronLeft, { className: "h-4 w-4" }), /* @__PURE__ */ jsx("span", { children: "Previous" })]
|
|
43
|
-
});
|
|
44
|
-
PaginationPrevious.displayName = "PaginationPrevious";
|
|
45
|
-
const PaginationNext = ({ className, ...props }) => /* @__PURE__ */ jsxs(PaginationLink, {
|
|
46
|
-
"aria-label": "Go to next page",
|
|
47
|
-
size: "default",
|
|
48
|
-
className: cn("gap-1 pr-2.5", className),
|
|
49
|
-
...props,
|
|
50
|
-
children: [/* @__PURE__ */ jsx("span", { children: "Next" }), /* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4" })]
|
|
51
|
-
});
|
|
52
|
-
PaginationNext.displayName = "PaginationNext";
|
|
53
|
-
const PaginationEllipsis = ({ className, ...props }) => /* @__PURE__ */ jsxs("span", {
|
|
54
|
-
"aria-hidden": true,
|
|
55
|
-
className: cn("flex h-9 w-9 items-center justify-center", className),
|
|
56
|
-
...props,
|
|
57
|
-
children: [/* @__PURE__ */ jsx(MoreHorizontal, { className: "h-4 w-4" }), /* @__PURE__ */ jsx("span", {
|
|
58
|
-
className: "sr-only",
|
|
59
|
-
children: "More pages"
|
|
60
|
-
})]
|
|
61
|
-
});
|
|
62
|
-
PaginationEllipsis.displayName = "PaginationEllipsis";
|
|
63
|
-
|
|
64
|
-
//#endregion
|
|
65
|
-
export { Pagination, PaginationContent, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious };
|