@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,7 +1,7 @@
|
|
|
1
|
-
import { Card, CardContent } from "../../ui-kit-web/dist/ui/card.js";
|
|
2
|
-
import { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious } from "../../ui-kit-web/dist/ui/carousel.js";
|
|
3
1
|
import "react";
|
|
4
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Card, CardContent } from "@lssm/lib.ui-kit-web/ui/card";
|
|
4
|
+
import { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious } from "@lssm/lib.ui-kit-web/ui/carousel";
|
|
5
5
|
|
|
6
6
|
//#region src/components/organisms/TestimonialCarousel.tsx
|
|
7
7
|
function TestimonialCarousel({ testimonials, className }) {
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { cn } from "../../../../ui-kit-web/dist/ui/utils.js";
|
|
2
|
-
import { Card, CardContent } from "../../../../ui-kit-web/dist/ui/card.js";
|
|
3
|
-
import { Skeleton } from "../../../../ui-kit-web/dist/ui/skeleton.js";
|
|
4
1
|
import { PageHeaderResponsive } from "../../../organisms/PageHeaderResponsive.js";
|
|
5
2
|
import { FiltersToolbar } from "../../../molecules/FiltersToolbar.js";
|
|
6
3
|
import { AiLinkButton } from "../../../molecules/AiLinkButton.js";
|
|
7
4
|
import { EmptyDataList } from "../../../organisms/EmptyDataList.js";
|
|
8
|
-
import * as React
|
|
5
|
+
import * as React from "react";
|
|
9
6
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
10
7
|
import { cva } from "class-variance-authority";
|
|
8
|
+
import { cn } from "@lssm/lib.ui-kit-web/ui/utils";
|
|
9
|
+
import { Card, CardContent } from "@lssm/lib.ui-kit-web/ui/card";
|
|
10
|
+
import { Skeleton } from "@lssm/lib.ui-kit-web/ui/skeleton";
|
|
11
11
|
|
|
12
12
|
//#region src/components/templates/lists/ListPageTemplate/index.web.tsx
|
|
13
13
|
const containerVariants = cva("space-y-4 md:space-y-6");
|
|
14
14
|
function ListPageTemplate({ children, title, description, breadcrumb, actions, className, searchPlaceholder, searchValue, onSearchChange, onSearchSubmit, isLoading, data, renderItem, emptyProps }) {
|
|
15
|
-
const mdHref = React
|
|
15
|
+
const mdHref = React.useMemo(() => {
|
|
16
16
|
if (typeof window === "undefined") return void 0;
|
|
17
17
|
const url = new URL(window.location.href);
|
|
18
18
|
url.pathname = url.pathname.replace(/\/$/, "") + ".md";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { EmptyDataListProps } from "../../../organisms/EmptyDataList.types.js";
|
|
2
|
-
import * as React
|
|
2
|
+
import * as React from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/templates/lists/ListPageTemplate/types.d.ts
|
|
5
5
|
interface ListPageTemplateProps<T = any> {
|
|
6
|
-
children?: React
|
|
7
|
-
title: React
|
|
8
|
-
description?: React
|
|
9
|
-
breadcrumb?: React
|
|
10
|
-
actions?: React
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
title: React.ReactNode;
|
|
8
|
+
description?: React.ReactNode;
|
|
9
|
+
breadcrumb?: React.ReactNode;
|
|
10
|
+
actions?: React.ReactNode;
|
|
11
11
|
className?: string;
|
|
12
12
|
searchPlaceholder?: string;
|
|
13
13
|
searchValue?: string;
|
|
@@ -18,7 +18,7 @@ interface ListPageTemplateProps<T = any> {
|
|
|
18
18
|
renderItem: (args: {
|
|
19
19
|
item: T;
|
|
20
20
|
index: number;
|
|
21
|
-
}) => React
|
|
21
|
+
}) => React.ReactNode;
|
|
22
22
|
emptyProps: EmptyDataListProps;
|
|
23
23
|
}
|
|
24
24
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as React
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
|
|
3
3
|
//#region src/hooks/useListUrlState.ts
|
|
4
4
|
function useListUrlState({ defaults, paramKeys = {
|
|
@@ -8,7 +8,7 @@ function useListUrlState({ defaults, paramKeys = {
|
|
|
8
8
|
sort: "sort",
|
|
9
9
|
filters: "f"
|
|
10
10
|
}, replaceState = true }) {
|
|
11
|
-
const read = React
|
|
11
|
+
const read = React.useCallback(() => {
|
|
12
12
|
if (typeof window === "undefined") return defaults;
|
|
13
13
|
const qs = new URL(window.location.href).searchParams;
|
|
14
14
|
const parseNum = (v, d) => {
|
|
@@ -30,8 +30,8 @@ function useListUrlState({ defaults, paramKeys = {
|
|
|
30
30
|
filters
|
|
31
31
|
};
|
|
32
32
|
}, [defaults, paramKeys]);
|
|
33
|
-
const [state, setState] = React
|
|
34
|
-
const write = React
|
|
33
|
+
const [state, setState] = React.useState(read);
|
|
34
|
+
const write = React.useCallback((next) => {
|
|
35
35
|
if (typeof window === "undefined") return;
|
|
36
36
|
const url = new URL(window.location.href);
|
|
37
37
|
const qs = url.searchParams;
|
|
@@ -60,19 +60,19 @@ function useListUrlState({ defaults, paramKeys = {
|
|
|
60
60
|
paramKeys,
|
|
61
61
|
replaceState
|
|
62
62
|
]);
|
|
63
|
-
const setFilter = React
|
|
63
|
+
const setFilter = React.useCallback((key, value) => {
|
|
64
64
|
write({ filters: {
|
|
65
65
|
...state.filters,
|
|
66
66
|
[key]: value
|
|
67
67
|
} });
|
|
68
68
|
}, [state.filters, write]);
|
|
69
|
-
const clearFilters = React
|
|
69
|
+
const clearFilters = React.useCallback(() => {
|
|
70
70
|
write({
|
|
71
71
|
filters: {},
|
|
72
72
|
page: 1
|
|
73
73
|
});
|
|
74
74
|
}, [write]);
|
|
75
|
-
React
|
|
75
|
+
React.useEffect(() => {
|
|
76
76
|
const onPop = () => setState(read());
|
|
77
77
|
window.addEventListener("popstate", onPop);
|
|
78
78
|
return () => window.removeEventListener("popstate", onPop);
|
package/dist/index.js
CHANGED
|
@@ -11,7 +11,6 @@ import { DeleteButton, EditButton, ToggleButton, ToggleLeftButton, ToggleRightBu
|
|
|
11
11
|
import { DateChip, DurationChip, PlaceChip, TimeChip } from "./components/atoms/DataChips.js";
|
|
12
12
|
import { NavMain } from "./components/molecules/NavMain.js";
|
|
13
13
|
import { NavUser } from "./components/molecules/NavUser.js";
|
|
14
|
-
import { CardContent, CardDescription, CardHeader, CardTitle } from "./ui-kit-web/dist/ui/card.js";
|
|
15
14
|
import { ApprovalQueue } from "./components/agent/ApprovalQueue.js";
|
|
16
15
|
import { AgentMonitor } from "./components/agent/AgentMonitor.js";
|
|
17
16
|
import { AppSidebar } from "./components/organisms/AppSidebar.js";
|
|
@@ -26,7 +25,7 @@ import { MarketingHeaderMobile } from "./components/organisms/MarketingHeaderMob
|
|
|
26
25
|
import { MarketingLayout } from "./components/organisms/MarketingLayout.js";
|
|
27
26
|
import { MarketingSection } from "./components/marketing/MarketingSection.js";
|
|
28
27
|
import { MarketingCardsSection } from "./components/marketing/MarketingCardsSection.js";
|
|
29
|
-
import { MarketingCard } from "./components/marketing/MarketingCard.js";
|
|
28
|
+
import { CardContent, CardDescription, CardHeader, CardTitle, MarketingCard } from "./components/marketing/MarketingCard.js";
|
|
30
29
|
import { MarketingIconCard } from "./components/marketing/MarketingIconCard.js";
|
|
31
30
|
import { MarketingStepCard } from "./components/marketing/MarketingStepCard.js";
|
|
32
31
|
import { MarketingComparisonSection } from "./components/marketing/MarketingComparisonSection.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import * as React
|
|
3
|
+
import * as React from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/platform/useColorScheme.ts
|
|
6
6
|
function useColorScheme() {
|
|
7
|
-
const [scheme, setScheme] = React
|
|
8
|
-
React
|
|
7
|
+
const [scheme, setScheme] = React.useState("light");
|
|
8
|
+
React.useEffect(() => {
|
|
9
9
|
if (typeof window === "undefined" || !window.matchMedia) return;
|
|
10
10
|
const media = window.matchMedia("(prefers-color-scheme: dark)");
|
|
11
11
|
const update = () => setScheme(media.matches ? "dark" : "light");
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import * as React
|
|
3
|
+
import * as React from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/platform/useReducedMotion.ts
|
|
6
6
|
function useReducedMotion() {
|
|
7
|
-
const [reduced, setReduced] = React
|
|
8
|
-
React
|
|
7
|
+
const [reduced, setReduced] = React.useState(false);
|
|
8
|
+
React.useEffect(() => {
|
|
9
9
|
if (typeof window === "undefined" || !window.matchMedia) return;
|
|
10
10
|
const mq = window.matchMedia("(prefers-reduced-motion: reduce)");
|
|
11
11
|
const onChange = () => setReduced(mq.matches);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import * as React
|
|
3
|
+
import * as React from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/platform/useResponsive.ts
|
|
6
6
|
const DEFAULT = {
|
|
@@ -10,12 +10,12 @@ const DEFAULT = {
|
|
|
10
10
|
xl: 1280
|
|
11
11
|
};
|
|
12
12
|
function useResponsive(custom) {
|
|
13
|
-
const bp = React
|
|
13
|
+
const bp = React.useMemo(() => ({
|
|
14
14
|
...DEFAULT,
|
|
15
15
|
...custom
|
|
16
16
|
}), [custom]);
|
|
17
|
-
const [width, setWidth] = React
|
|
18
|
-
React
|
|
17
|
+
const [width, setWidth] = React.useState(typeof window !== "undefined" ? window.innerWidth : bp.md);
|
|
18
|
+
React.useEffect(() => {
|
|
19
19
|
if (typeof window === "undefined") return;
|
|
20
20
|
const onResize = () => setWidth(window.innerWidth);
|
|
21
21
|
window.addEventListener("resize", onResize);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import * as _lssm_lib_contracts_client_react_form_render0 from "@lssm/lib.contracts/client/react/form-render";
|
|
1
2
|
import * as react_jsx_runtime108 from "react/jsx-runtime";
|
|
2
3
|
import * as _lssm_lib_schema0 from "@lssm/lib.schema";
|
|
3
4
|
import * as _lssm_lib_contracts_forms0 from "@lssm/lib.contracts/forms";
|
|
4
|
-
import * as _lssm_lib_contracts_client_react_form_render0 from "@lssm/lib.contracts/client/react/form-render";
|
|
5
5
|
|
|
6
6
|
//#region src/renderers/form-contract.d.ts
|
|
7
7
|
declare const formRenderer: {
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import { v } from "../contracts/dist/client/react/form-render.js";
|
|
4
|
-
import { e } from "../contracts/dist/client/react/drivers/shadcn.js";
|
|
5
|
-
import { Label } from "../ui-kit-web/dist/ui/label.js";
|
|
6
|
-
import { Field, FieldDescription, FieldError, FieldGroup, FieldLabel } from "../ui-kit-web/dist/ui/field.js";
|
|
7
3
|
import { Button } from "../components/atoms/Button.js";
|
|
8
4
|
import { Input } from "../components/atoms/Input.js";
|
|
9
5
|
import { Textarea } from "../components/atoms/Textarea.js";
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import React from "react";
|
|
6
|
+
import "react";
|
|
7
|
+
import { createFormRenderer } from "@lssm/lib.contracts/client/react/form-render";
|
|
8
|
+
import { shadcnDriver } from "@lssm/lib.contracts/client/react/drivers/shadcn";
|
|
9
|
+
import { Field, FieldDescription, FieldError, FieldGroup, FieldLabel } from "@lssm/lib.ui-kit-web/ui/field";
|
|
15
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
+
import { Switch } from "@lssm/lib.ui-kit-web/ui/switch";
|
|
12
|
+
import { RadioGroup, RadioGroupItem } from "@lssm/lib.ui-kit-web/ui/radio-group";
|
|
13
|
+
import { Checkbox } from "@lssm/lib.ui-kit-web/ui/checkbox";
|
|
14
|
+
import { Select, SelectContent, SelectGroup, SelectItem, SelectTrigger, SelectValue } from "@lssm/lib.ui-kit-web/ui/select";
|
|
15
|
+
import { Label } from "@lssm/lib.ui-kit-web/ui/label";
|
|
16
16
|
|
|
17
17
|
//#region src/renderers/form-contract.tsx
|
|
18
18
|
const Select$1 = (props) => {
|
|
19
19
|
const { options, value, onChange, ...rest } = props;
|
|
20
20
|
return /* @__PURE__ */ jsxs(Select, {
|
|
21
21
|
value: value ?? "",
|
|
22
|
-
onValueChange: (v
|
|
22
|
+
onValueChange: (v) => onChange?.(v),
|
|
23
23
|
...rest,
|
|
24
24
|
children: [/* @__PURE__ */ jsx(SelectTrigger, {
|
|
25
25
|
className: "w-[180px]",
|
|
@@ -33,7 +33,7 @@ const Select$1 = (props) => {
|
|
|
33
33
|
};
|
|
34
34
|
const Checkbox$1 = (props) => /* @__PURE__ */ jsx(Checkbox, {
|
|
35
35
|
checked: !!props.checked,
|
|
36
|
-
onCheckedChange: (v
|
|
36
|
+
onCheckedChange: (v) => props.onCheckedChange?.(v),
|
|
37
37
|
...props
|
|
38
38
|
});
|
|
39
39
|
const RadioGroup$1 = (props) => /* @__PURE__ */ jsx(RadioGroup, {
|
|
@@ -51,10 +51,10 @@ const RadioGroup$1 = (props) => /* @__PURE__ */ jsx(RadioGroup, {
|
|
|
51
51
|
});
|
|
52
52
|
const Switch$1 = (props) => /* @__PURE__ */ jsx(Switch, {
|
|
53
53
|
checked: !!props.checked,
|
|
54
|
-
onCheckedChange: (v
|
|
54
|
+
onCheckedChange: (v) => props.onCheckedChange?.(v),
|
|
55
55
|
...props
|
|
56
56
|
});
|
|
57
|
-
const formRenderer =
|
|
57
|
+
const formRenderer = createFormRenderer({ driver: shadcnDriver({
|
|
58
58
|
Field,
|
|
59
59
|
FieldLabel,
|
|
60
60
|
FieldDescription,
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import * as React
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
|
|
3
3
|
//#region src/types/navigation.d.ts
|
|
4
4
|
interface NavLink {
|
|
5
|
-
label: React
|
|
5
|
+
label: React.ReactNode;
|
|
6
6
|
href: string;
|
|
7
|
-
icon?: React
|
|
7
|
+
icon?: React.ReactNode;
|
|
8
8
|
badge?: string | number;
|
|
9
9
|
target?: '_self' | '_blank';
|
|
10
10
|
ariaLabel?: string;
|
|
11
11
|
external?: boolean;
|
|
12
|
-
description?: React
|
|
12
|
+
description?: React.ReactNode;
|
|
13
13
|
imageSrc?: string;
|
|
14
14
|
imageAlt?: string;
|
|
15
15
|
categories?: string[];
|
|
16
16
|
}
|
|
17
17
|
interface NavSection {
|
|
18
|
-
title?: React
|
|
18
|
+
title?: React.ReactNode;
|
|
19
19
|
items: NavLink[];
|
|
20
20
|
}
|
|
21
21
|
interface UserMenuItem {
|
|
22
|
-
label: React
|
|
22
|
+
label: React.ReactNode;
|
|
23
23
|
href?: string;
|
|
24
24
|
onClick?: () => void;
|
|
25
|
-
icon?: React
|
|
25
|
+
icon?: React.ReactNode;
|
|
26
26
|
danger?: boolean;
|
|
27
27
|
}
|
|
28
28
|
interface HeaderNavItem {
|
|
29
|
-
label: React
|
|
29
|
+
label: React.ReactNode;
|
|
30
30
|
href?: string;
|
|
31
|
-
description?: React
|
|
31
|
+
description?: React.ReactNode;
|
|
32
32
|
key?: string;
|
|
33
33
|
items?: NavLink[];
|
|
34
34
|
match?: 'exact' | 'startsWith';
|
|
35
35
|
}
|
|
36
36
|
interface CtaAction {
|
|
37
|
-
label: React
|
|
37
|
+
label: React.ReactNode;
|
|
38
38
|
href?: string;
|
|
39
39
|
onClick?: () => void;
|
|
40
40
|
variant?: 'default' | 'secondary' | 'outline' | 'ghost' | 'destructive';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lssm/lib.design-system",
|
|
3
|
-
"version": "0.0.0-canary-
|
|
3
|
+
"version": "0.0.0-canary-20251217060834",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"publish:pkg": "bun publish --tolerate-republish --ignore-scripts --verbose",
|
|
6
6
|
"publish:pkg:canary": "bun publish:pkg --tag canary",
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
"tree-shake": true,
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@hookform/resolvers": "5.2.2",
|
|
24
|
-
"@lssm/lib.ai-agent": "0.0.0-canary-
|
|
25
|
-
"@lssm/lib.contracts": "0.0.0-canary-
|
|
26
|
-
"@lssm/lib.ui-kit": "0.0.0-canary-
|
|
27
|
-
"@lssm/lib.ui-kit-web": "0.0.0-canary-
|
|
24
|
+
"@lssm/lib.ai-agent": "0.0.0-canary-20251217060834",
|
|
25
|
+
"@lssm/lib.contracts": "0.0.0-canary-20251217060834",
|
|
26
|
+
"@lssm/lib.ui-kit": "0.0.0-canary-20251217060834",
|
|
27
|
+
"@lssm/lib.ui-kit-web": "0.0.0-canary-20251217060834",
|
|
28
28
|
"class-variance-authority": "^0.7.1",
|
|
29
29
|
"clsx": "^2.1.1",
|
|
30
30
|
"lucide-react": "^0.535.0",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"zod": "^4.1.13"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@lssm/tool.typescript": "0.0.0-canary-
|
|
39
|
-
"@lssm/tool.tsdown": "0.0.0-canary-
|
|
38
|
+
"@lssm/tool.typescript": "0.0.0-canary-20251217060834",
|
|
39
|
+
"@lssm/tool.tsdown": "0.0.0-canary-20251217060834",
|
|
40
40
|
"@types/node": "^24.9.0",
|
|
41
41
|
"@types/react-dom": "^19.0.14",
|
|
42
42
|
"postcss": "^8.5",
|
|
@@ -1,261 +0,0 @@
|
|
|
1
|
-
import { i, r } from "../../forms.js";
|
|
2
|
-
import React, { useEffect, useMemo, useState } from "react";
|
|
3
|
-
import { Controller, useFieldArray, useForm } from "react-hook-form";
|
|
4
|
-
import { zodResolver } from "@hookform/resolvers/zod";
|
|
5
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
|
|
7
|
-
//#region ../contracts/dist/client/react/form-render.js
|
|
8
|
-
function p(e) {
|
|
9
|
-
if (e) return Array.isArray(e) ? {
|
|
10
|
-
kind: `static`,
|
|
11
|
-
options: e
|
|
12
|
-
} : e;
|
|
13
|
-
}
|
|
14
|
-
function m(e, t) {
|
|
15
|
-
if (!t) return;
|
|
16
|
-
let n = t.replace(/\[(\d+)\]/g, `.$1`).split(`.`).filter(Boolean), r$1 = e;
|
|
17
|
-
for (let e$1 of n) {
|
|
18
|
-
if (r$1 == null) return;
|
|
19
|
-
r$1 = r$1[e$1];
|
|
20
|
-
}
|
|
21
|
-
return r$1;
|
|
22
|
-
}
|
|
23
|
-
function h(e, t) {
|
|
24
|
-
if (!t || t.length === 0) return `[]`;
|
|
25
|
-
try {
|
|
26
|
-
return JSON.stringify(t.map((t$1) => m(e, t$1)));
|
|
27
|
-
} catch {
|
|
28
|
-
return `[]`;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
function g(e, t, n) {
|
|
32
|
-
let [o, s] = useState([]);
|
|
33
|
-
return useEffect(() => {
|
|
34
|
-
let r$1 = !0;
|
|
35
|
-
return (async () => {
|
|
36
|
-
if (!t) return s([]);
|
|
37
|
-
if (t.kind === `static`) return s([...t.options ?? []]);
|
|
38
|
-
let i$1 = n?.[t.resolverKey];
|
|
39
|
-
if (!i$1) return s([]);
|
|
40
|
-
let a = await i$1(e, t.args);
|
|
41
|
-
r$1 && s([...a ?? []]);
|
|
42
|
-
})(), () => {
|
|
43
|
-
r$1 = !1;
|
|
44
|
-
};
|
|
45
|
-
}, [useMemo(() => t ? t.kind === `static` ? JSON.stringify(t.options ?? []) : h(e, t.deps) : `nil`, [t, e]), t && t.resolverKey]), o;
|
|
46
|
-
}
|
|
47
|
-
function _(e, t, n) {
|
|
48
|
-
if (!t) return e ?? ``;
|
|
49
|
-
let r$1 = typeof n == `number` ? `${t.replace(/^\$index$/, String(n))}` : t;
|
|
50
|
-
return e ? `${e}${typeof n == `number` ? `.${n}` : ``}.${r$1}`.replace(/\.+/g, `.`) : r$1;
|
|
51
|
-
}
|
|
52
|
-
function v(r$1) {
|
|
53
|
-
let a = r$1, { driver: m$1 } = a;
|
|
54
|
-
function h$1(r$2) {
|
|
55
|
-
let { spec: a$1, options: h$2, merged: v$1 } = r$2, y = useMemo(() => i(a$1), [a$1]), b = useForm({
|
|
56
|
-
...v$1.formOptions,
|
|
57
|
-
resolver: zodResolver(y),
|
|
58
|
-
defaultValues: h$2?.defaultValues
|
|
59
|
-
}), x = b.watch(), S = (e, r$3, i$1) => {
|
|
60
|
-
let a$2 = m$1.Field, s = m$1.FieldLabel, c = m$1.FieldDescription, l = m$1.FieldError, h$3 = _(r$3, e.name, i$1), y$1 = r(x, e.visibleWhen), w$1 = r(x, e.enabledWhen), T$1 = !!b.getFieldState(h$3)?.invalid;
|
|
61
|
-
if (!y$1) return null;
|
|
62
|
-
let E = h$3?.replace(/\./g, `-`), D = {
|
|
63
|
-
"data-invalid": T$1,
|
|
64
|
-
hidden: !y$1,
|
|
65
|
-
disabled: !w$1
|
|
66
|
-
}, O = e.labelI18n ? jsx(s, {
|
|
67
|
-
htmlFor: E,
|
|
68
|
-
children: e.labelI18n
|
|
69
|
-
}) : null, k = e.descriptionI18n ? jsx(c, { children: e.descriptionI18n }) : null;
|
|
70
|
-
if (e.kind === `group`) {
|
|
71
|
-
let t = e.fields.map((e$1, t$1) => jsx(React.Fragment, { children: S(e$1, h$3, i$1) }, `${h$3}-${t$1}`));
|
|
72
|
-
return jsxs(a$2, {
|
|
73
|
-
...D,
|
|
74
|
-
children: [
|
|
75
|
-
O,
|
|
76
|
-
t,
|
|
77
|
-
k
|
|
78
|
-
]
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
return e.kind === `array` ? C(e, r$3) : jsx(Controller, {
|
|
82
|
-
name: h$3,
|
|
83
|
-
control: b.control,
|
|
84
|
-
render: ({ field: t, fieldState: n }) => {
|
|
85
|
-
let r$4 = n.error ? [n.error] : [], i$2 = n.invalid || void 0;
|
|
86
|
-
if (e.kind === `text`) {
|
|
87
|
-
let o = m$1.Input;
|
|
88
|
-
return jsxs(a$2, {
|
|
89
|
-
...D,
|
|
90
|
-
children: [
|
|
91
|
-
O,
|
|
92
|
-
jsx(o, {
|
|
93
|
-
id: E,
|
|
94
|
-
"aria-invalid": i$2,
|
|
95
|
-
placeholder: e.placeholderI18n,
|
|
96
|
-
autoComplete: e.autoComplete,
|
|
97
|
-
inputMode: e.inputMode,
|
|
98
|
-
maxLength: e.maxLength,
|
|
99
|
-
minLength: e.minLength,
|
|
100
|
-
disabled: !w$1,
|
|
101
|
-
...t,
|
|
102
|
-
...e.uiProps,
|
|
103
|
-
keyboard: e.keyboard,
|
|
104
|
-
autoComplete: e.keyboard?.autoComplete ?? e.autoComplete
|
|
105
|
-
}),
|
|
106
|
-
k,
|
|
107
|
-
n.invalid ? jsx(l, { errors: r$4 }) : null
|
|
108
|
-
]
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
if (e.kind === `textarea`) {
|
|
112
|
-
let o = m$1.Textarea;
|
|
113
|
-
return jsxs(a$2, {
|
|
114
|
-
...D,
|
|
115
|
-
children: [
|
|
116
|
-
O,
|
|
117
|
-
jsx(o, {
|
|
118
|
-
id: E,
|
|
119
|
-
"aria-invalid": i$2,
|
|
120
|
-
placeholder: e.placeholderI18n,
|
|
121
|
-
rows: e.rows,
|
|
122
|
-
maxLength: e.maxLength,
|
|
123
|
-
disabled: !w$1,
|
|
124
|
-
...t,
|
|
125
|
-
...e.uiProps,
|
|
126
|
-
keyboard: e.keyboard,
|
|
127
|
-
autoComplete: e.keyboard?.autoComplete ?? e.autoComplete
|
|
128
|
-
}),
|
|
129
|
-
k,
|
|
130
|
-
n.invalid ? jsx(l, { errors: r$4 }) : null
|
|
131
|
-
]
|
|
132
|
-
});
|
|
133
|
-
}
|
|
134
|
-
if (e.kind === `select`) {
|
|
135
|
-
let o = m$1.Select, s$1 = g(x, p(e.options), v$1.resolvers);
|
|
136
|
-
return jsxs(a$2, {
|
|
137
|
-
...D,
|
|
138
|
-
children: [
|
|
139
|
-
O,
|
|
140
|
-
jsx(o, {
|
|
141
|
-
id: E,
|
|
142
|
-
name: h$3,
|
|
143
|
-
"aria-invalid": i$2,
|
|
144
|
-
disabled: !w$1,
|
|
145
|
-
value: t.value,
|
|
146
|
-
onChange: (e$1) => t.onChange(e$1),
|
|
147
|
-
options: s$1,
|
|
148
|
-
...e.uiProps
|
|
149
|
-
}),
|
|
150
|
-
k,
|
|
151
|
-
n.invalid ? jsx(l, { errors: r$4 }) : null
|
|
152
|
-
]
|
|
153
|
-
});
|
|
154
|
-
}
|
|
155
|
-
if (e.kind === `checkbox`) {
|
|
156
|
-
let i$3 = m$1.Checkbox;
|
|
157
|
-
return jsxs(a$2, {
|
|
158
|
-
...D,
|
|
159
|
-
children: [
|
|
160
|
-
O,
|
|
161
|
-
jsx(i$3, {
|
|
162
|
-
id: E,
|
|
163
|
-
name: h$3,
|
|
164
|
-
disabled: !w$1,
|
|
165
|
-
checked: !!t.value,
|
|
166
|
-
onCheckedChange: (e$1) => t.onChange(e$1),
|
|
167
|
-
...e.uiProps
|
|
168
|
-
}),
|
|
169
|
-
k,
|
|
170
|
-
n.invalid ? jsx(l, { errors: r$4 }) : null
|
|
171
|
-
]
|
|
172
|
-
});
|
|
173
|
-
}
|
|
174
|
-
if (e.kind === `radio`) {
|
|
175
|
-
let i$3 = m$1.RadioGroup, o = g(x, p(e.options), v$1.resolvers);
|
|
176
|
-
return jsxs(a$2, {
|
|
177
|
-
...D,
|
|
178
|
-
children: [
|
|
179
|
-
O,
|
|
180
|
-
jsx(i$3, {
|
|
181
|
-
id: E,
|
|
182
|
-
name: h$3,
|
|
183
|
-
disabled: !w$1,
|
|
184
|
-
value: t.value,
|
|
185
|
-
onValueChange: (e$1) => t.onChange(e$1),
|
|
186
|
-
options: o,
|
|
187
|
-
...e.uiProps
|
|
188
|
-
}),
|
|
189
|
-
k,
|
|
190
|
-
n.invalid ? jsx(l, { errors: r$4 }) : null
|
|
191
|
-
]
|
|
192
|
-
});
|
|
193
|
-
}
|
|
194
|
-
if (e.kind === `switch`) {
|
|
195
|
-
let i$3 = m$1.Switch;
|
|
196
|
-
return jsxs(a$2, {
|
|
197
|
-
...D,
|
|
198
|
-
children: [
|
|
199
|
-
O,
|
|
200
|
-
jsx(i$3, {
|
|
201
|
-
id: E,
|
|
202
|
-
name: h$3,
|
|
203
|
-
disabled: !w$1,
|
|
204
|
-
checked: !!t.value,
|
|
205
|
-
onCheckedChange: (e$1) => t.onChange(e$1),
|
|
206
|
-
...e.uiProps
|
|
207
|
-
}),
|
|
208
|
-
k,
|
|
209
|
-
n.invalid ? jsx(l, { errors: r$4 }) : null
|
|
210
|
-
]
|
|
211
|
-
});
|
|
212
|
-
}
|
|
213
|
-
return jsx(Fragment, {});
|
|
214
|
-
}
|
|
215
|
-
}, h$3);
|
|
216
|
-
}, C = (e, t) => {
|
|
217
|
-
let n = _(t, e.name), { fields: r$3, append: i$1, remove: a$2 } = useFieldArray({
|
|
218
|
-
control: b.control,
|
|
219
|
-
name: n
|
|
220
|
-
}), o = e.max == null || r$3.length < e.max, c = (t$1) => (e.min == null ? r$3.length > 0 : r$3.length > e.min) && t$1 >= 0, l = m$1.Button, u = m$1.FieldLabel;
|
|
221
|
-
return jsxs(`div`, { children: [
|
|
222
|
-
e.labelI18n ? jsx(u, { children: e.labelI18n }) : null,
|
|
223
|
-
r$3.map((t$1, r$4) => jsxs(`div`, { children: [S(e.of, n, r$4), c(r$4) ? jsx(l, {
|
|
224
|
-
type: `button`,
|
|
225
|
-
variant: `ghost`,
|
|
226
|
-
size: `sm`,
|
|
227
|
-
onClick: () => a$2(r$4),
|
|
228
|
-
children: `Remove`
|
|
229
|
-
}) : null] }, t$1.id ?? r$4)),
|
|
230
|
-
o ? jsx(l, {
|
|
231
|
-
type: `button`,
|
|
232
|
-
variant: `outline`,
|
|
233
|
-
size: `sm`,
|
|
234
|
-
onClick: () => i$1({}),
|
|
235
|
-
children: `Add`
|
|
236
|
-
}) : null
|
|
237
|
-
] }, n);
|
|
238
|
-
}, w = async (e) => {
|
|
239
|
-
let t = a$1.actions?.[0]?.key ?? `submit`;
|
|
240
|
-
if (v$1.onSubmitOverride) return v$1.onSubmitOverride(e, t);
|
|
241
|
-
}, T = m$1.Button;
|
|
242
|
-
return jsxs(`form`, {
|
|
243
|
-
onSubmit: b.handleSubmit(w),
|
|
244
|
-
children: [(a$1.fields || []).map((e, t) => jsx(React.Fragment, { children: S(e) }, t)), a$1.actions && a$1.actions.length ? jsx(`div`, { children: a$1.actions.map((e) => jsx(T, {
|
|
245
|
-
type: `submit`,
|
|
246
|
-
children: e.labelI18n
|
|
247
|
-
}, e.key)) }) : null]
|
|
248
|
-
});
|
|
249
|
-
}
|
|
250
|
-
return { render: (e, t) => jsx(h$1, {
|
|
251
|
-
spec: e,
|
|
252
|
-
options: t,
|
|
253
|
-
merged: {
|
|
254
|
-
...a,
|
|
255
|
-
...t?.overrides ?? {}
|
|
256
|
-
}
|
|
257
|
-
}) };
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
//#endregion
|
|
261
|
-
export { v };
|