@contractspec/lib.design-system 2.5.0 → 2.6.1

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.
@@ -908,11 +908,8 @@ function NavMain({
908
908
  children: [
909
909
  /* @__PURE__ */ jsxDEV13(NavTrigger, {
910
910
  children: /* @__PURE__ */ jsxDEV13(Text2, {
911
- children: [
912
- "r",
913
- it.label
914
- ]
915
- }, undefined, true, undefined, this)
911
+ children: it.label
912
+ }, undefined, false, undefined, this)
916
913
  }, undefined, false, undefined, this),
917
914
  /* @__PURE__ */ jsxDEV13(NavContent, {
918
915
  children: /* @__PURE__ */ jsxDEV13(HStack, {
@@ -1816,22 +1813,25 @@ function MobileHeader({
1816
1813
  }, undefined, false, undefined, this)
1817
1814
  }, undefined, false, undefined, this)
1818
1815
  }, undefined, false, undefined, this),
1819
- /* @__PURE__ */ jsxDEV23(SheetTitle, {
1820
- children: "Menu"
1821
- }, undefined, false, undefined, this),
1822
1816
  /* @__PURE__ */ jsxDEV23(SheetContent, {
1823
1817
  side: "left",
1824
1818
  className: "w-[300px] p-0",
1825
- children: mobileSidebar ? /* @__PURE__ */ jsxDEV23(AppSidebar, {
1826
- sections: mobileSidebar.sections,
1827
- top: mobileSidebar.top,
1828
- bottom: mobileSidebar.bottom,
1829
- className: "h-svh"
1830
- }, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV23("div", {
1831
- className: "p-4",
1832
- children: "No sidebar configured"
1833
- }, undefined, false, undefined, this)
1834
- }, undefined, false, undefined, this)
1819
+ children: [
1820
+ /* @__PURE__ */ jsxDEV23(SheetTitle, {
1821
+ className: "sr-only",
1822
+ children: "Menu"
1823
+ }, undefined, false, undefined, this),
1824
+ mobileSidebar ? /* @__PURE__ */ jsxDEV23(AppSidebar, {
1825
+ sections: mobileSidebar.sections,
1826
+ top: mobileSidebar.top,
1827
+ bottom: mobileSidebar.bottom,
1828
+ className: "h-svh"
1829
+ }, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV23("div", {
1830
+ className: "p-4",
1831
+ children: "No sidebar configured"
1832
+ }, undefined, false, undefined, this)
1833
+ ]
1834
+ }, undefined, true, undefined, this)
1835
1835
  ]
1836
1836
  }, undefined, true, undefined, this),
1837
1837
  /* @__PURE__ */ jsxDEV23("div", {
@@ -1971,7 +1971,7 @@ function FeatureCarousel({
1971
1971
  }, undefined, false, undefined, this);
1972
1972
  }
1973
1973
  // src/components/organisms/MarketingHeader.tsx
1974
- import * as React6 from "react";
1974
+ import * as React5 from "react";
1975
1975
  import { cn as cn10 } from "@contractspec/lib.ui-kit-web/ui/utils";
1976
1976
  import {
1977
1977
  NavigationMenu as Nav2,
@@ -2198,7 +2198,6 @@ function CommandSearchTrigger({
2198
2198
  }
2199
2199
 
2200
2200
  // src/components/molecules/LangSwitchDropdown.tsx
2201
- import * as React5 from "react";
2202
2201
  import { Globe } from "lucide-react";
2203
2202
  import {
2204
2203
  DropdownMenu as DropdownMenu2,
@@ -2213,16 +2212,11 @@ function LangSwitchDropdown({
2213
2212
  onChange,
2214
2213
  className
2215
2214
  }) {
2216
- const [open, setOpen] = React5.useState(false);
2217
2215
  const current = options.find((o) => o.code === value);
2218
2216
  return /* @__PURE__ */ jsxDEV30(DropdownMenu2, {
2219
- open,
2220
- onOpenChange: setOpen,
2221
2217
  children: [
2222
2218
  /* @__PURE__ */ jsxDEV30(DropdownMenuTrigger2, {
2223
2219
  className,
2224
- onMouseEnter: () => setOpen(true),
2225
- onMouseLeave: () => setOpen(false),
2226
2220
  children: /* @__PURE__ */ jsxDEV30("div", {
2227
2221
  className: "hover:bg-muted/40 inline-flex items-center gap-2 rounded-xs border px-2 py-1 text-sm",
2228
2222
  children: [
@@ -2238,10 +2232,8 @@ function LangSwitchDropdown({
2238
2232
  }, undefined, false, undefined, this),
2239
2233
  /* @__PURE__ */ jsxDEV30(DropdownMenuContent2, {
2240
2234
  align: "end",
2241
- onMouseEnter: () => setOpen(true),
2242
- onMouseLeave: () => setOpen(false),
2243
2235
  children: options.map((opt) => /* @__PURE__ */ jsxDEV30(DropdownMenuItem2, {
2244
- onClick: () => onChange(opt.code),
2236
+ onSelect: () => onChange(opt.code),
2245
2237
  children: opt.label
2246
2238
  }, opt.code, false, undefined, this))
2247
2239
  }, undefined, false, undefined, this)
@@ -2276,7 +2268,7 @@ function MarketingHeader({
2276
2268
  commandPaletteGroups,
2277
2269
  langSwitchProps
2278
2270
  }) {
2279
- const [open, setOpen] = React6.useState(false);
2271
+ const [open, setOpen] = React5.useState(false);
2280
2272
  return /* @__PURE__ */ jsxDEV31(HStack2, {
2281
2273
  as: "header",
2282
2274
  className: cn10("bg-background/95 supports-backdrop-filter:bg-background/60 sticky top-0 z-50 w-full border-b backdrop-blur-xs", className),
@@ -2503,7 +2495,7 @@ function MarketingHeaderDesktop({
2503
2495
  }, undefined, false, undefined, this);
2504
2496
  }
2505
2497
  // src/components/organisms/MarketingHeaderMobile.tsx
2506
- import * as React7 from "react";
2498
+ import * as React6 from "react";
2507
2499
  import { cn as cn12 } from "@contractspec/lib.ui-kit-web/ui/utils";
2508
2500
  import {
2509
2501
  Sheet as Sheet3,
@@ -2511,8 +2503,7 @@ import {
2511
2503
  SheetTrigger as SheetTrigger3,
2512
2504
  SheetTitle as SheetTitle2,
2513
2505
  SheetHeader as SheetHeader2,
2514
- SheetFooter,
2515
- SheetDescription
2506
+ SheetFooter
2516
2507
  } from "@contractspec/lib.ui-kit-web/ui/sheet";
2517
2508
  import { Menu as Menu3 } from "lucide-react";
2518
2509
  import { VStack as VStack3 } from "@contractspec/lib.ui-kit-web/ui/stack";
@@ -2522,9 +2513,11 @@ function MarketingHeaderMobile({
2522
2513
  logo,
2523
2514
  nav = [],
2524
2515
  className,
2525
- right
2516
+ right,
2517
+ commandPaletteGroups,
2518
+ langSwitchProps
2526
2519
  }) {
2527
- const [open, setOpen] = React7.useState(false);
2520
+ const [open, setOpen] = React6.useState(false);
2528
2521
  return /* @__PURE__ */ jsxDEV33("div", {
2529
2522
  className: cn12("bg-background/95 supports-backdrop-filter:bg-background/60 w-full border-b backdrop-blur-xs md:hidden", className),
2530
2523
  children: /* @__PURE__ */ jsxDEV33("div", {
@@ -2557,20 +2550,13 @@ function MarketingHeaderMobile({
2557
2550
  /* @__PURE__ */ jsxDEV33(SheetTitle2, {
2558
2551
  children: "Menu"
2559
2552
  }, undefined, false, undefined, this),
2560
- /* @__PURE__ */ jsxDEV33(SheetDescription, {
2561
- children: [
2562
- /* @__PURE__ */ jsxDEV33("div", {
2563
- className: "mb-3",
2564
- children: /* @__PURE__ */ jsxDEV33(CommandSearchTrigger, {
2565
- groups: [],
2566
- compact: true
2567
- }, undefined, false, undefined, this)
2568
- }, undefined, false, undefined, this),
2569
- /* @__PURE__ */ jsxDEV33(MobileNavMenu, {
2570
- items: nav
2571
- }, undefined, false, undefined, this)
2572
- ]
2573
- }, undefined, true, undefined, this)
2553
+ !!commandPaletteGroups?.length && /* @__PURE__ */ jsxDEV33("div", {
2554
+ className: "mb-3",
2555
+ children: /* @__PURE__ */ jsxDEV33(CommandSearchTrigger, {
2556
+ groups: commandPaletteGroups,
2557
+ compact: true
2558
+ }, undefined, false, undefined, this)
2559
+ }, undefined, false, undefined, this)
2574
2560
  ]
2575
2561
  }, undefined, true, undefined, this),
2576
2562
  /* @__PURE__ */ jsxDEV33(VStack3, {
@@ -2590,13 +2576,10 @@ function MarketingHeaderMobile({
2590
2576
  }, undefined, true, undefined, this),
2591
2577
  /* @__PURE__ */ jsxDEV33("div", {
2592
2578
  className: "flex items-center gap-2",
2593
- children: /* @__PURE__ */ jsxDEV33(LangSwitchDropdown, {
2594
- value: "en",
2595
- options: [
2596
- { code: "fr", label: "FR" },
2597
- { code: "en", label: "EN" }
2598
- ],
2599
- onChange: () => {}
2579
+ children: !!(langSwitchProps?.options?.length > 1) && /* @__PURE__ */ jsxDEV33(LangSwitchDropdown, {
2580
+ value: langSwitchProps.value,
2581
+ options: langSwitchProps.options,
2582
+ onChange: langSwitchProps.onChange
2600
2583
  }, undefined, false, undefined, this)
2601
2584
  }, undefined, false, undefined, this)
2602
2585
  ]
@@ -2943,7 +2926,7 @@ function MarketingComparisonSection({
2943
2926
  }, undefined, false, undefined, this);
2944
2927
  }
2945
2928
  // src/components/organisms/AppLayout.tsx
2946
- import * as React8 from "react";
2929
+ import * as React7 from "react";
2947
2930
  import { cn as cn17 } from "@contractspec/lib.ui-kit-web/ui/utils";
2948
2931
  import { Separator as Separator4 } from "@contractspec/lib.ui-kit-web/ui/separator";
2949
2932
  import {
@@ -2988,7 +2971,7 @@ function AppLayout({
2988
2971
  className: "mb-2",
2989
2972
  children: /* @__PURE__ */ jsxDEV41(Breadcrumb, {
2990
2973
  children: /* @__PURE__ */ jsxDEV41(BreadcrumbList, {
2991
- children: breadcrumb.items.map((it, idx) => /* @__PURE__ */ jsxDEV41(React8.Fragment, {
2974
+ children: breadcrumb.items.map((it, idx) => /* @__PURE__ */ jsxDEV41(React7.Fragment, {
2992
2975
  children: [
2993
2976
  /* @__PURE__ */ jsxDEV41(BreadcrumbItem, {
2994
2977
  children: it.href ? /* @__PURE__ */ jsxDEV41(BreadcrumbLink, {
@@ -3021,7 +3004,7 @@ function AppLayout({
3021
3004
  }, undefined, true, undefined, this);
3022
3005
  }
3023
3006
  // src/components/organisms/AcademyLayout.tsx
3024
- import * as React9 from "react";
3007
+ import * as React8 from "react";
3025
3008
  import { cn as cn18 } from "@contractspec/lib.ui-kit-web/ui/utils";
3026
3009
  import {
3027
3010
  Breadcrumb as Breadcrumb2,
@@ -3060,7 +3043,7 @@ function AcademyLayout({
3060
3043
  className: "mb-4",
3061
3044
  children: /* @__PURE__ */ jsxDEV42(Breadcrumb2, {
3062
3045
  children: /* @__PURE__ */ jsxDEV42(BreadcrumbList2, {
3063
- children: breadcrumb.items.map((it, idx) => /* @__PURE__ */ jsxDEV42(React9.Fragment, {
3046
+ children: breadcrumb.items.map((it, idx) => /* @__PURE__ */ jsxDEV42(React8.Fragment, {
3064
3047
  children: [
3065
3048
  /* @__PURE__ */ jsxDEV42(BreadcrumbItem2, {
3066
3049
  children: it.href ? /* @__PURE__ */ jsxDEV42(BreadcrumbLink2, {
@@ -3180,7 +3163,7 @@ function NavBrand({
3180
3163
  }, undefined, false, undefined, this) : content;
3181
3164
  }
3182
3165
  // src/components/molecules/Breadcrumbs.tsx
3183
- import * as React10 from "react";
3166
+ import * as React9 from "react";
3184
3167
  import {
3185
3168
  Breadcrumb as Root,
3186
3169
  BreadcrumbItem as BreadcrumbItem3,
@@ -3196,7 +3179,7 @@ function Breadcrumbs({ items }) {
3196
3179
  return null;
3197
3180
  return /* @__PURE__ */ jsxDEV46(Root, {
3198
3181
  children: /* @__PURE__ */ jsxDEV46(BreadcrumbList3, {
3199
- children: items.map((it, idx) => /* @__PURE__ */ jsxDEV46(React10.Fragment, {
3182
+ children: items.map((it, idx) => /* @__PURE__ */ jsxDEV46(React9.Fragment, {
3200
3183
  children: [
3201
3184
  /* @__PURE__ */ jsxDEV46(BreadcrumbItem3, {
3202
3185
  children: it.href ? /* @__PURE__ */ jsxDEV46(BreadcrumbLink3, {
@@ -3266,7 +3249,7 @@ function StatusChip({
3266
3249
  }
3267
3250
  }
3268
3251
  // src/components/molecules/EntityCard.tsx
3269
- import * as React11 from "react";
3252
+ import * as React10 from "react";
3270
3253
  import { Card as Card5, CardContent as CardContent5 } from "@contractspec/lib.ui-kit-web/ui/card";
3271
3254
  import { cva as cva13 } from "class-variance-authority";
3272
3255
  import { cn as cn22 } from "@contractspec/lib.ui-kit-web/ui/utils";
@@ -3335,7 +3318,7 @@ function EntityCard({
3335
3318
  onClick,
3336
3319
  ...cardProps
3337
3320
  }) {
3338
- const [isExpanded, setIsExpanded] = React11.useState(defaultExpanded);
3321
+ const [isExpanded, setIsExpanded] = React10.useState(defaultExpanded);
3339
3322
  const Wrapper = href ? "a" : "div";
3340
3323
  const isInteractive = interactive ?? !!(onClick || href);
3341
3324
  const handleExpandClick = (e) => {
@@ -3981,13 +3964,13 @@ function HeroSection({
3981
3964
  }, undefined, false, undefined, this);
3982
3965
  }
3983
3966
  // src/platform/useResponsive.ts
3984
- import * as React12 from "react";
3967
+ import * as React11 from "react";
3985
3968
  "use client";
3986
3969
  var DEFAULT = { sm: 640, md: 768, lg: 1024, xl: 1280 };
3987
3970
  function useResponsive(custom) {
3988
- const bp = React12.useMemo(() => ({ ...DEFAULT, ...custom }), [custom]);
3989
- const [width, setWidth] = React12.useState(typeof window !== "undefined" ? window.innerWidth : bp.md);
3990
- React12.useEffect(() => {
3971
+ const bp = React11.useMemo(() => ({ ...DEFAULT, ...custom }), [custom]);
3972
+ const [width, setWidth] = React11.useState(typeof window !== "undefined" ? window.innerWidth : bp.md);
3973
+ React11.useEffect(() => {
3991
3974
  if (typeof window === "undefined")
3992
3975
  return;
3993
3976
  const onResize = () => setWidth(window.innerWidth);
@@ -4131,7 +4114,7 @@ function PricingSection({
4131
4114
  }, undefined, false, undefined, this);
4132
4115
  }
4133
4116
  // src/components/organisms/FAQSection.tsx
4134
- import * as React13 from "react";
4117
+ import * as React12 from "react";
4135
4118
  import { VStack as VStack10 } from "@contractspec/lib.ui-kit-web/ui/stack";
4136
4119
  import {
4137
4120
  Accordion,
@@ -4152,7 +4135,7 @@ function FAQSection({
4152
4135
  accordionClassName
4153
4136
  }) {
4154
4137
  const hasItems = Array.isArray(items) && items.length > 0;
4155
- const defaultValue = React13.useMemo(() => {
4138
+ const defaultValue = React12.useMemo(() => {
4156
4139
  if (!hasItems)
4157
4140
  return;
4158
4141
  if (accordionType === "multiple")
@@ -4451,7 +4434,7 @@ function ListTablePage({
4451
4434
  }, undefined, true, undefined, this);
4452
4435
  }
4453
4436
  // src/components/molecules/FiltersToolbar.tsx
4454
- import * as React14 from "react";
4437
+ import * as React13 from "react";
4455
4438
  import { cn as cn24 } from "@contractspec/lib.ui-kit-web/ui/utils";
4456
4439
  import { Badge as Badge3 } from "@contractspec/lib.ui-kit-web/ui/badge";
4457
4440
  import { jsxDEV as jsxDEV69 } from "react/jsx-dev-runtime";
@@ -4467,11 +4450,11 @@ function FiltersToolbar({
4467
4450
  activeChips = [],
4468
4451
  onClearAll
4469
4452
  }) {
4470
- const [q, setQ] = React14.useState(searchValue ?? "");
4471
- React14.useEffect(() => {
4453
+ const [q, setQ] = React13.useState(searchValue ?? "");
4454
+ React13.useEffect(() => {
4472
4455
  setQ(searchValue ?? "");
4473
4456
  }, [searchValue]);
4474
- React14.useEffect(() => {
4457
+ React13.useEffect(() => {
4475
4458
  if (!onSearchChange)
4476
4459
  return;
4477
4460
  const id = setTimeout(() => onSearchChange(q), debounceMs);
@@ -4544,12 +4527,12 @@ function FiltersToolbar({
4544
4527
  }, undefined, true, undefined, this);
4545
4528
  }
4546
4529
  // src/components/templates/lists/ListPageTemplate/index.web.tsx
4547
- import * as React16 from "react";
4530
+ import * as React15 from "react";
4548
4531
  import { cva as cva20 } from "class-variance-authority";
4549
4532
  import { cn as cn25 } from "@contractspec/lib.ui-kit-web/ui/utils";
4550
4533
 
4551
4534
  // src/components/molecules/AiLinkButton.tsx
4552
- import * as React15 from "react";
4535
+ import * as React14 from "react";
4553
4536
  import {
4554
4537
  DropdownMenu as DropdownMenu3,
4555
4538
  DropdownMenuContent as DropdownMenuContent3,
@@ -4571,19 +4554,19 @@ function buildProviderUrl(provider, href) {
4571
4554
  }
4572
4555
  }
4573
4556
  function AiLinkButton({ href, className }) {
4574
- const copyLink = React15.useCallback(() => {
4557
+ const copyLink = React14.useCallback(() => {
4575
4558
  try {
4576
4559
  navigator.clipboard?.writeText(href).catch(() => {});
4577
4560
  } catch (_e) {}
4578
4561
  }, [href]);
4579
- const openChatGPT = React15.useCallback(() => {
4562
+ const openChatGPT = React14.useCallback(() => {
4580
4563
  const url = buildProviderUrl("chatgpt", href);
4581
4564
  try {
4582
4565
  navigator.clipboard?.writeText(href).catch(() => {});
4583
4566
  } catch (_e) {}
4584
4567
  window.open(url, "_blank", "noopener,noreferrer");
4585
4568
  }, [href]);
4586
- const openClaude = React15.useCallback(() => {
4569
+ const openClaude = React14.useCallback(() => {
4587
4570
  const url = buildProviderUrl("claude", href);
4588
4571
  try {
4589
4572
  navigator.clipboard?.writeText(href).catch(() => {});
@@ -4721,7 +4704,7 @@ function ListPageTemplate({
4721
4704
  renderItem,
4722
4705
  emptyProps
4723
4706
  }) {
4724
- const mdHref = React16.useMemo(() => {
4707
+ const mdHref = React15.useMemo(() => {
4725
4708
  if (typeof window === "undefined")
4726
4709
  return;
4727
4710
  const url = new URL(window.location.href);
@@ -4775,7 +4758,7 @@ function ListPageTemplate({
4775
4758
  }, undefined, true, undefined, this);
4776
4759
  }
4777
4760
  // src/components/organisms/EmptySearchResult.tsx
4778
- import * as React17 from "react";
4761
+ import * as React16 from "react";
4779
4762
  import {
4780
4763
  Empty as Empty2,
4781
4764
  EmptyContent as EmptyContent2,
@@ -4796,7 +4779,7 @@ function EmptySearchResult({
4796
4779
  const title = emptySearchTitle ?? emtptySearchTitle ?? "No results";
4797
4780
  const description = emptySearchDescription ?? emtptySearchDescription ?? "Try another search.";
4798
4781
  const onChange = onSearchChange ?? handleSearchChange;
4799
- const [q, setQ] = React17.useState("");
4782
+ const [q, setQ] = React16.useState("");
4800
4783
  return /* @__PURE__ */ jsxDEV73(Empty2, {
4801
4784
  className,
4802
4785
  children: [
@@ -5000,7 +4983,7 @@ function ErrorState({
5000
4983
  }, undefined, true, undefined, this);
5001
4984
  }
5002
4985
  // src/hooks/useListUrlState.ts
5003
- import * as React18 from "react";
4986
+ import * as React17 from "react";
5004
4987
  function useListUrlState({
5005
4988
  defaults,
5006
4989
  paramKeys = {
@@ -5012,7 +4995,7 @@ function useListUrlState({
5012
4995
  },
5013
4996
  replaceState = true
5014
4997
  }) {
5015
- const read = React18.useCallback(() => {
4998
+ const read = React17.useCallback(() => {
5016
4999
  if (typeof window === "undefined")
5017
5000
  return defaults;
5018
5001
  const url = new URL(window.location.href);
@@ -5038,8 +5021,8 @@ function useListUrlState({
5038
5021
  filters
5039
5022
  };
5040
5023
  }, [defaults, paramKeys]);
5041
- const [state, setState] = React18.useState(read);
5042
- const write = React18.useCallback((next) => {
5024
+ const [state, setState] = React17.useState(read);
5025
+ const write = React17.useCallback((next) => {
5043
5026
  if (typeof window === "undefined")
5044
5027
  return;
5045
5028
  const url = new URL(window.location.href);
@@ -5069,15 +5052,15 @@ function useListUrlState({
5069
5052
  window.history.pushState({}, "", newUrl);
5070
5053
  setState(merged);
5071
5054
  }, [state, paramKeys, replaceState]);
5072
- const setFilter = React18.useCallback((key, value) => {
5055
+ const setFilter = React17.useCallback((key, value) => {
5073
5056
  write({
5074
5057
  filters: { ...state.filters, [key]: value }
5075
5058
  });
5076
5059
  }, [state.filters, write]);
5077
- const clearFilters = React18.useCallback(() => {
5060
+ const clearFilters = React17.useCallback(() => {
5078
5061
  write({ filters: {}, page: 1 });
5079
5062
  }, [write]);
5080
- React18.useEffect(() => {
5063
+ React17.useEffect(() => {
5081
5064
  const onPop = () => setState(read());
5082
5065
  window.addEventListener("popstate", onPop);
5083
5066
  return () => window.removeEventListener("popstate", onPop);
@@ -5616,7 +5599,7 @@ function GDPRRights({
5616
5599
  }, undefined, true, undefined, this);
5617
5600
  }
5618
5601
  // src/components/legal/organisms/ContactForm.tsx
5619
- import * as React19 from "react";
5602
+ import * as React18 from "react";
5620
5603
  import { jsxDEV as jsxDEV93 } from "react/jsx-dev-runtime";
5621
5604
  function ContactForm({
5622
5605
  labels = { submit: "Envoyer" },
@@ -5624,8 +5607,8 @@ function ContactForm({
5624
5607
  disabled,
5625
5608
  onSubmit
5626
5609
  }) {
5627
- const [value, setValue] = React19.useState(initialValue);
5628
- const [loading, setLoading] = React19.useState(false);
5610
+ const [value, setValue] = React18.useState(initialValue);
5611
+ const [loading, setLoading] = React18.useState(false);
5629
5612
  const handleSubmit = async (e) => {
5630
5613
  e.preventDefault();
5631
5614
  if (!onSubmit)
@@ -5655,14 +5638,14 @@ function ContactForm({
5655
5638
  }, undefined, true, undefined, this);
5656
5639
  }
5657
5640
  // src/components/legal/organisms/GDPRDataRequest.tsx
5658
- import * as React20 from "react";
5641
+ import * as React19 from "react";
5659
5642
  import { jsxDEV as jsxDEV94 } from "react/jsx-dev-runtime";
5660
5643
  function GDPRDataRequest({
5661
5644
  onExport,
5662
5645
  onDelete,
5663
5646
  labels = { export: "Demander une copie", delete: "Demander la suppression" }
5664
5647
  }) {
5665
- const [loading, setLoading] = React20.useState(null);
5648
+ const [loading, setLoading] = React19.useState(null);
5666
5649
  const handle = async (kind) => {
5667
5650
  const fn = kind === "export" ? onExport : onDelete;
5668
5651
  if (!fn)
@@ -5852,20 +5835,20 @@ function CookiesTemplate({
5852
5835
  }, undefined, true, undefined, this);
5853
5836
  }
5854
5837
  // src/components/legal/templates/ContactTemplate.tsx
5855
- import * as React21 from "react";
5838
+ import * as React20 from "react";
5856
5839
  import { jsxDEV as jsxDEV99 } from "react/jsx-dev-runtime";
5857
5840
  function ContactTemplate({
5858
5841
  title = "Contact",
5859
5842
  meta,
5860
5843
  onSubmit
5861
5844
  }) {
5862
- const [value, setValue] = React21.useState({
5845
+ const [value, setValue] = React20.useState({
5863
5846
  name: "",
5864
5847
  email: "",
5865
5848
  subject: "",
5866
5849
  message: ""
5867
5850
  });
5868
- const [loading, setLoading] = React21.useState(false);
5851
+ const [loading, setLoading] = React20.useState(false);
5869
5852
  const handleSubmit = async (e) => {
5870
5853
  e.preventDefault();
5871
5854
  if (!onSubmit)
@@ -5919,11 +5902,11 @@ function withPlatformUI(options) {
5919
5902
  };
5920
5903
  }
5921
5904
  // src/platform/useReducedMotion.ts
5922
- import * as React22 from "react";
5905
+ import * as React21 from "react";
5923
5906
  "use client";
5924
5907
  function useReducedMotion() {
5925
- const [reduced, setReduced] = React22.useState(false);
5926
- React22.useEffect(() => {
5908
+ const [reduced, setReduced] = React21.useState(false);
5909
+ React21.useEffect(() => {
5927
5910
  if (typeof window === "undefined" || !window.matchMedia)
5928
5911
  return;
5929
5912
  const mq = window.matchMedia("(prefers-reduced-motion: reduce)");
@@ -5935,11 +5918,11 @@ function useReducedMotion() {
5935
5918
  return reduced;
5936
5919
  }
5937
5920
  // src/platform/useColorScheme.ts
5938
- import * as React23 from "react";
5921
+ import * as React22 from "react";
5939
5922
  "use client";
5940
5923
  function useColorScheme() {
5941
- const [scheme, setScheme] = React23.useState("light");
5942
- React23.useEffect(() => {
5924
+ const [scheme, setScheme] = React22.useState("light");
5925
+ React22.useEffect(() => {
5943
5926
  if (typeof window === "undefined" || !window.matchMedia)
5944
5927
  return;
5945
5928
  const media = window.matchMedia("(prefers-color-scheme: dark)");
@@ -6176,7 +6159,7 @@ function FormCardLayout({
6176
6159
  }, undefined, true, undefined, this);
6177
6160
  }
6178
6161
  // src/components/forms/FormStepsLayout.tsx
6179
- import * as React24 from "react";
6162
+ import * as React23 from "react";
6180
6163
  import { Separator as Separator6 } from "@contractspec/lib.ui-kit-web/ui/separator";
6181
6164
  import { cn as cn42 } from "@contractspec/lib.ui-kit-web/ui/utils";
6182
6165
  import { jsxDEV as jsxDEV104 } from "react/jsx-dev-runtime";
@@ -6187,8 +6170,8 @@ function FormStepsLayout({
6187
6170
  canNext,
6188
6171
  className
6189
6172
  }) {
6190
- const indexByKey = React24.useMemo(() => Object.fromEntries(steps.map((s, i) => [s.key, i])), [steps]);
6191
- const [idx, setIdx] = React24.useState(() => {
6173
+ const indexByKey = React23.useMemo(() => Object.fromEntries(steps.map((s, i) => [s.key, i])), [steps]);
6174
+ const [idx, setIdx] = React23.useState(() => {
6192
6175
  if (initialStepKey && initialStepKey in indexByKey)
6193
6176
  return indexByKey[initialStepKey] || 0;
6194
6177
  return 0;
@@ -6256,7 +6239,7 @@ function FormStepsLayout({
6256
6239
  }, undefined, true, undefined, this);
6257
6240
  }
6258
6241
  // src/components/forms/FormOneByOneLayout.tsx
6259
- import * as React25 from "react";
6242
+ import * as React24 from "react";
6260
6243
  import { cn as cn43 } from "@contractspec/lib.ui-kit-web/ui/utils";
6261
6244
  import { jsxDEV as jsxDEV105 } from "react/jsx-dev-runtime";
6262
6245
  function FormOneByOneLayout({
@@ -6265,8 +6248,8 @@ function FormOneByOneLayout({
6265
6248
  onComplete,
6266
6249
  className
6267
6250
  }) {
6268
- const indexByKey = React25.useMemo(() => Object.fromEntries(fields.map((f, i) => [f.key, i])), [fields]);
6269
- const [idx, setIdx] = React25.useState(() => {
6251
+ const indexByKey = React24.useMemo(() => Object.fromEntries(fields.map((f, i) => [f.key, i])), [fields]);
6252
+ const [idx, setIdx] = React24.useState(() => {
6270
6253
  if (initialKey && initialKey in indexByKey) {
6271
6254
  return indexByKey[initialKey] || 0;
6272
6255
  }
@@ -6734,7 +6717,7 @@ function fieldByKey2(fields, key) {
6734
6717
  return fields.find((field) => field.key === key);
6735
6718
  }
6736
6719
  // src/components/data-view/DataViewRenderer.tsx
6737
- import * as React26 from "react";
6720
+ import * as React25 from "react";
6738
6721
  import {
6739
6722
  Pagination,
6740
6723
  PaginationContent,
@@ -6763,7 +6746,7 @@ function DataViewRenderer({
6763
6746
  pagination,
6764
6747
  onPageChange
6765
6748
  }) {
6766
- const viewContent = React26.useMemo(() => {
6749
+ const viewContent = React25.useMemo(() => {
6767
6750
  switch (spec.view.kind) {
6768
6751
  case "list":
6769
6752
  return /* @__PURE__ */ jsxDEV111(DataViewList, {
@@ -1,2 +1,2 @@
1
1
  import type { MarketingHeaderProps } from './MarketingHeader';
2
- export declare function MarketingHeaderMobile({ logo, nav, className, right, }: MarketingHeaderProps): import("react/jsx-runtime").JSX.Element;
2
+ export declare function MarketingHeaderMobile({ logo, nav, className, right, commandPaletteGroups, langSwitchProps, }: MarketingHeaderProps): import("react/jsx-runtime").JSX.Element;
package/dist/index.js CHANGED
@@ -903,11 +903,8 @@ function NavMain({
903
903
  children: [
904
904
  /* @__PURE__ */ jsxDEV13(NavTrigger, {
905
905
  children: /* @__PURE__ */ jsxDEV13(Text2, {
906
- children: [
907
- "r",
908
- it.label
909
- ]
910
- }, undefined, true, undefined, this)
906
+ children: it.label
907
+ }, undefined, false, undefined, this)
911
908
  }, undefined, false, undefined, this),
912
909
  /* @__PURE__ */ jsxDEV13(NavContent, {
913
910
  children: /* @__PURE__ */ jsxDEV13(HStack, {
@@ -1811,22 +1808,25 @@ function MobileHeader({
1811
1808
  }, undefined, false, undefined, this)
1812
1809
  }, undefined, false, undefined, this)
1813
1810
  }, undefined, false, undefined, this),
1814
- /* @__PURE__ */ jsxDEV23(SheetTitle, {
1815
- children: "Menu"
1816
- }, undefined, false, undefined, this),
1817
1811
  /* @__PURE__ */ jsxDEV23(SheetContent, {
1818
1812
  side: "left",
1819
1813
  className: "w-[300px] p-0",
1820
- children: mobileSidebar ? /* @__PURE__ */ jsxDEV23(AppSidebar, {
1821
- sections: mobileSidebar.sections,
1822
- top: mobileSidebar.top,
1823
- bottom: mobileSidebar.bottom,
1824
- className: "h-svh"
1825
- }, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV23("div", {
1826
- className: "p-4",
1827
- children: "No sidebar configured"
1828
- }, undefined, false, undefined, this)
1829
- }, undefined, false, undefined, this)
1814
+ children: [
1815
+ /* @__PURE__ */ jsxDEV23(SheetTitle, {
1816
+ className: "sr-only",
1817
+ children: "Menu"
1818
+ }, undefined, false, undefined, this),
1819
+ mobileSidebar ? /* @__PURE__ */ jsxDEV23(AppSidebar, {
1820
+ sections: mobileSidebar.sections,
1821
+ top: mobileSidebar.top,
1822
+ bottom: mobileSidebar.bottom,
1823
+ className: "h-svh"
1824
+ }, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV23("div", {
1825
+ className: "p-4",
1826
+ children: "No sidebar configured"
1827
+ }, undefined, false, undefined, this)
1828
+ ]
1829
+ }, undefined, true, undefined, this)
1830
1830
  ]
1831
1831
  }, undefined, true, undefined, this),
1832
1832
  /* @__PURE__ */ jsxDEV23("div", {
@@ -1966,7 +1966,7 @@ function FeatureCarousel({
1966
1966
  }, undefined, false, undefined, this);
1967
1967
  }
1968
1968
  // src/components/organisms/MarketingHeader.tsx
1969
- import * as React6 from "react";
1969
+ import * as React5 from "react";
1970
1970
  import { cn as cn10 } from "@contractspec/lib.ui-kit-web/ui/utils";
1971
1971
  import {
1972
1972
  NavigationMenu as Nav2,
@@ -2193,7 +2193,6 @@ function CommandSearchTrigger({
2193
2193
  }
2194
2194
 
2195
2195
  // src/components/molecules/LangSwitchDropdown.tsx
2196
- import * as React5 from "react";
2197
2196
  import { Globe } from "lucide-react";
2198
2197
  import {
2199
2198
  DropdownMenu as DropdownMenu2,
@@ -2208,16 +2207,11 @@ function LangSwitchDropdown({
2208
2207
  onChange,
2209
2208
  className
2210
2209
  }) {
2211
- const [open, setOpen] = React5.useState(false);
2212
2210
  const current = options.find((o) => o.code === value);
2213
2211
  return /* @__PURE__ */ jsxDEV30(DropdownMenu2, {
2214
- open,
2215
- onOpenChange: setOpen,
2216
2212
  children: [
2217
2213
  /* @__PURE__ */ jsxDEV30(DropdownMenuTrigger2, {
2218
2214
  className,
2219
- onMouseEnter: () => setOpen(true),
2220
- onMouseLeave: () => setOpen(false),
2221
2215
  children: /* @__PURE__ */ jsxDEV30("div", {
2222
2216
  className: "hover:bg-muted/40 inline-flex items-center gap-2 rounded-xs border px-2 py-1 text-sm",
2223
2217
  children: [
@@ -2233,10 +2227,8 @@ function LangSwitchDropdown({
2233
2227
  }, undefined, false, undefined, this),
2234
2228
  /* @__PURE__ */ jsxDEV30(DropdownMenuContent2, {
2235
2229
  align: "end",
2236
- onMouseEnter: () => setOpen(true),
2237
- onMouseLeave: () => setOpen(false),
2238
2230
  children: options.map((opt) => /* @__PURE__ */ jsxDEV30(DropdownMenuItem2, {
2239
- onClick: () => onChange(opt.code),
2231
+ onSelect: () => onChange(opt.code),
2240
2232
  children: opt.label
2241
2233
  }, opt.code, false, undefined, this))
2242
2234
  }, undefined, false, undefined, this)
@@ -2271,7 +2263,7 @@ function MarketingHeader({
2271
2263
  commandPaletteGroups,
2272
2264
  langSwitchProps
2273
2265
  }) {
2274
- const [open, setOpen] = React6.useState(false);
2266
+ const [open, setOpen] = React5.useState(false);
2275
2267
  return /* @__PURE__ */ jsxDEV31(HStack2, {
2276
2268
  as: "header",
2277
2269
  className: cn10("bg-background/95 supports-backdrop-filter:bg-background/60 sticky top-0 z-50 w-full border-b backdrop-blur-xs", className),
@@ -2498,7 +2490,7 @@ function MarketingHeaderDesktop({
2498
2490
  }, undefined, false, undefined, this);
2499
2491
  }
2500
2492
  // src/components/organisms/MarketingHeaderMobile.tsx
2501
- import * as React7 from "react";
2493
+ import * as React6 from "react";
2502
2494
  import { cn as cn12 } from "@contractspec/lib.ui-kit-web/ui/utils";
2503
2495
  import {
2504
2496
  Sheet as Sheet3,
@@ -2506,8 +2498,7 @@ import {
2506
2498
  SheetTrigger as SheetTrigger3,
2507
2499
  SheetTitle as SheetTitle2,
2508
2500
  SheetHeader as SheetHeader2,
2509
- SheetFooter,
2510
- SheetDescription
2501
+ SheetFooter
2511
2502
  } from "@contractspec/lib.ui-kit-web/ui/sheet";
2512
2503
  import { Menu as Menu3 } from "lucide-react";
2513
2504
  import { VStack as VStack3 } from "@contractspec/lib.ui-kit-web/ui/stack";
@@ -2517,9 +2508,11 @@ function MarketingHeaderMobile({
2517
2508
  logo,
2518
2509
  nav = [],
2519
2510
  className,
2520
- right
2511
+ right,
2512
+ commandPaletteGroups,
2513
+ langSwitchProps
2521
2514
  }) {
2522
- const [open, setOpen] = React7.useState(false);
2515
+ const [open, setOpen] = React6.useState(false);
2523
2516
  return /* @__PURE__ */ jsxDEV33("div", {
2524
2517
  className: cn12("bg-background/95 supports-backdrop-filter:bg-background/60 w-full border-b backdrop-blur-xs md:hidden", className),
2525
2518
  children: /* @__PURE__ */ jsxDEV33("div", {
@@ -2552,20 +2545,13 @@ function MarketingHeaderMobile({
2552
2545
  /* @__PURE__ */ jsxDEV33(SheetTitle2, {
2553
2546
  children: "Menu"
2554
2547
  }, undefined, false, undefined, this),
2555
- /* @__PURE__ */ jsxDEV33(SheetDescription, {
2556
- children: [
2557
- /* @__PURE__ */ jsxDEV33("div", {
2558
- className: "mb-3",
2559
- children: /* @__PURE__ */ jsxDEV33(CommandSearchTrigger, {
2560
- groups: [],
2561
- compact: true
2562
- }, undefined, false, undefined, this)
2563
- }, undefined, false, undefined, this),
2564
- /* @__PURE__ */ jsxDEV33(MobileNavMenu, {
2565
- items: nav
2566
- }, undefined, false, undefined, this)
2567
- ]
2568
- }, undefined, true, undefined, this)
2548
+ !!commandPaletteGroups?.length && /* @__PURE__ */ jsxDEV33("div", {
2549
+ className: "mb-3",
2550
+ children: /* @__PURE__ */ jsxDEV33(CommandSearchTrigger, {
2551
+ groups: commandPaletteGroups,
2552
+ compact: true
2553
+ }, undefined, false, undefined, this)
2554
+ }, undefined, false, undefined, this)
2569
2555
  ]
2570
2556
  }, undefined, true, undefined, this),
2571
2557
  /* @__PURE__ */ jsxDEV33(VStack3, {
@@ -2585,13 +2571,10 @@ function MarketingHeaderMobile({
2585
2571
  }, undefined, true, undefined, this),
2586
2572
  /* @__PURE__ */ jsxDEV33("div", {
2587
2573
  className: "flex items-center gap-2",
2588
- children: /* @__PURE__ */ jsxDEV33(LangSwitchDropdown, {
2589
- value: "en",
2590
- options: [
2591
- { code: "fr", label: "FR" },
2592
- { code: "en", label: "EN" }
2593
- ],
2594
- onChange: () => {}
2574
+ children: !!(langSwitchProps?.options?.length > 1) && /* @__PURE__ */ jsxDEV33(LangSwitchDropdown, {
2575
+ value: langSwitchProps.value,
2576
+ options: langSwitchProps.options,
2577
+ onChange: langSwitchProps.onChange
2595
2578
  }, undefined, false, undefined, this)
2596
2579
  }, undefined, false, undefined, this)
2597
2580
  ]
@@ -2938,7 +2921,7 @@ function MarketingComparisonSection({
2938
2921
  }, undefined, false, undefined, this);
2939
2922
  }
2940
2923
  // src/components/organisms/AppLayout.tsx
2941
- import * as React8 from "react";
2924
+ import * as React7 from "react";
2942
2925
  import { cn as cn17 } from "@contractspec/lib.ui-kit-web/ui/utils";
2943
2926
  import { Separator as Separator4 } from "@contractspec/lib.ui-kit-web/ui/separator";
2944
2927
  import {
@@ -2983,7 +2966,7 @@ function AppLayout({
2983
2966
  className: "mb-2",
2984
2967
  children: /* @__PURE__ */ jsxDEV41(Breadcrumb, {
2985
2968
  children: /* @__PURE__ */ jsxDEV41(BreadcrumbList, {
2986
- children: breadcrumb.items.map((it, idx) => /* @__PURE__ */ jsxDEV41(React8.Fragment, {
2969
+ children: breadcrumb.items.map((it, idx) => /* @__PURE__ */ jsxDEV41(React7.Fragment, {
2987
2970
  children: [
2988
2971
  /* @__PURE__ */ jsxDEV41(BreadcrumbItem, {
2989
2972
  children: it.href ? /* @__PURE__ */ jsxDEV41(BreadcrumbLink, {
@@ -3016,7 +2999,7 @@ function AppLayout({
3016
2999
  }, undefined, true, undefined, this);
3017
3000
  }
3018
3001
  // src/components/organisms/AcademyLayout.tsx
3019
- import * as React9 from "react";
3002
+ import * as React8 from "react";
3020
3003
  import { cn as cn18 } from "@contractspec/lib.ui-kit-web/ui/utils";
3021
3004
  import {
3022
3005
  Breadcrumb as Breadcrumb2,
@@ -3055,7 +3038,7 @@ function AcademyLayout({
3055
3038
  className: "mb-4",
3056
3039
  children: /* @__PURE__ */ jsxDEV42(Breadcrumb2, {
3057
3040
  children: /* @__PURE__ */ jsxDEV42(BreadcrumbList2, {
3058
- children: breadcrumb.items.map((it, idx) => /* @__PURE__ */ jsxDEV42(React9.Fragment, {
3041
+ children: breadcrumb.items.map((it, idx) => /* @__PURE__ */ jsxDEV42(React8.Fragment, {
3059
3042
  children: [
3060
3043
  /* @__PURE__ */ jsxDEV42(BreadcrumbItem2, {
3061
3044
  children: it.href ? /* @__PURE__ */ jsxDEV42(BreadcrumbLink2, {
@@ -3175,7 +3158,7 @@ function NavBrand({
3175
3158
  }, undefined, false, undefined, this) : content;
3176
3159
  }
3177
3160
  // src/components/molecules/Breadcrumbs.tsx
3178
- import * as React10 from "react";
3161
+ import * as React9 from "react";
3179
3162
  import {
3180
3163
  Breadcrumb as Root,
3181
3164
  BreadcrumbItem as BreadcrumbItem3,
@@ -3191,7 +3174,7 @@ function Breadcrumbs({ items }) {
3191
3174
  return null;
3192
3175
  return /* @__PURE__ */ jsxDEV46(Root, {
3193
3176
  children: /* @__PURE__ */ jsxDEV46(BreadcrumbList3, {
3194
- children: items.map((it, idx) => /* @__PURE__ */ jsxDEV46(React10.Fragment, {
3177
+ children: items.map((it, idx) => /* @__PURE__ */ jsxDEV46(React9.Fragment, {
3195
3178
  children: [
3196
3179
  /* @__PURE__ */ jsxDEV46(BreadcrumbItem3, {
3197
3180
  children: it.href ? /* @__PURE__ */ jsxDEV46(BreadcrumbLink3, {
@@ -3261,7 +3244,7 @@ function StatusChip({
3261
3244
  }
3262
3245
  }
3263
3246
  // src/components/molecules/EntityCard.tsx
3264
- import * as React11 from "react";
3247
+ import * as React10 from "react";
3265
3248
  import { Card as Card5, CardContent as CardContent5 } from "@contractspec/lib.ui-kit-web/ui/card";
3266
3249
  import { cva as cva13 } from "class-variance-authority";
3267
3250
  import { cn as cn22 } from "@contractspec/lib.ui-kit-web/ui/utils";
@@ -3330,7 +3313,7 @@ function EntityCard({
3330
3313
  onClick,
3331
3314
  ...cardProps
3332
3315
  }) {
3333
- const [isExpanded, setIsExpanded] = React11.useState(defaultExpanded);
3316
+ const [isExpanded, setIsExpanded] = React10.useState(defaultExpanded);
3334
3317
  const Wrapper = href ? "a" : "div";
3335
3318
  const isInteractive = interactive ?? !!(onClick || href);
3336
3319
  const handleExpandClick = (e) => {
@@ -3976,13 +3959,13 @@ function HeroSection({
3976
3959
  }, undefined, false, undefined, this);
3977
3960
  }
3978
3961
  // src/platform/useResponsive.ts
3979
- import * as React12 from "react";
3962
+ import * as React11 from "react";
3980
3963
  "use client";
3981
3964
  var DEFAULT = { sm: 640, md: 768, lg: 1024, xl: 1280 };
3982
3965
  function useResponsive(custom) {
3983
- const bp = React12.useMemo(() => ({ ...DEFAULT, ...custom }), [custom]);
3984
- const [width, setWidth] = React12.useState(typeof window !== "undefined" ? window.innerWidth : bp.md);
3985
- React12.useEffect(() => {
3966
+ const bp = React11.useMemo(() => ({ ...DEFAULT, ...custom }), [custom]);
3967
+ const [width, setWidth] = React11.useState(typeof window !== "undefined" ? window.innerWidth : bp.md);
3968
+ React11.useEffect(() => {
3986
3969
  if (typeof window === "undefined")
3987
3970
  return;
3988
3971
  const onResize = () => setWidth(window.innerWidth);
@@ -4126,7 +4109,7 @@ function PricingSection({
4126
4109
  }, undefined, false, undefined, this);
4127
4110
  }
4128
4111
  // src/components/organisms/FAQSection.tsx
4129
- import * as React13 from "react";
4112
+ import * as React12 from "react";
4130
4113
  import { VStack as VStack10 } from "@contractspec/lib.ui-kit-web/ui/stack";
4131
4114
  import {
4132
4115
  Accordion,
@@ -4147,7 +4130,7 @@ function FAQSection({
4147
4130
  accordionClassName
4148
4131
  }) {
4149
4132
  const hasItems = Array.isArray(items) && items.length > 0;
4150
- const defaultValue = React13.useMemo(() => {
4133
+ const defaultValue = React12.useMemo(() => {
4151
4134
  if (!hasItems)
4152
4135
  return;
4153
4136
  if (accordionType === "multiple")
@@ -4446,7 +4429,7 @@ function ListTablePage({
4446
4429
  }, undefined, true, undefined, this);
4447
4430
  }
4448
4431
  // src/components/molecules/FiltersToolbar.tsx
4449
- import * as React14 from "react";
4432
+ import * as React13 from "react";
4450
4433
  import { cn as cn24 } from "@contractspec/lib.ui-kit-web/ui/utils";
4451
4434
  import { Badge as Badge3 } from "@contractspec/lib.ui-kit-web/ui/badge";
4452
4435
  import { jsxDEV as jsxDEV69 } from "react/jsx-dev-runtime";
@@ -4462,11 +4445,11 @@ function FiltersToolbar({
4462
4445
  activeChips = [],
4463
4446
  onClearAll
4464
4447
  }) {
4465
- const [q, setQ] = React14.useState(searchValue ?? "");
4466
- React14.useEffect(() => {
4448
+ const [q, setQ] = React13.useState(searchValue ?? "");
4449
+ React13.useEffect(() => {
4467
4450
  setQ(searchValue ?? "");
4468
4451
  }, [searchValue]);
4469
- React14.useEffect(() => {
4452
+ React13.useEffect(() => {
4470
4453
  if (!onSearchChange)
4471
4454
  return;
4472
4455
  const id = setTimeout(() => onSearchChange(q), debounceMs);
@@ -4539,12 +4522,12 @@ function FiltersToolbar({
4539
4522
  }, undefined, true, undefined, this);
4540
4523
  }
4541
4524
  // src/components/templates/lists/ListPageTemplate/index.web.tsx
4542
- import * as React16 from "react";
4525
+ import * as React15 from "react";
4543
4526
  import { cva as cva20 } from "class-variance-authority";
4544
4527
  import { cn as cn25 } from "@contractspec/lib.ui-kit-web/ui/utils";
4545
4528
 
4546
4529
  // src/components/molecules/AiLinkButton.tsx
4547
- import * as React15 from "react";
4530
+ import * as React14 from "react";
4548
4531
  import {
4549
4532
  DropdownMenu as DropdownMenu3,
4550
4533
  DropdownMenuContent as DropdownMenuContent3,
@@ -4566,19 +4549,19 @@ function buildProviderUrl(provider, href) {
4566
4549
  }
4567
4550
  }
4568
4551
  function AiLinkButton({ href, className }) {
4569
- const copyLink = React15.useCallback(() => {
4552
+ const copyLink = React14.useCallback(() => {
4570
4553
  try {
4571
4554
  navigator.clipboard?.writeText(href).catch(() => {});
4572
4555
  } catch (_e) {}
4573
4556
  }, [href]);
4574
- const openChatGPT = React15.useCallback(() => {
4557
+ const openChatGPT = React14.useCallback(() => {
4575
4558
  const url = buildProviderUrl("chatgpt", href);
4576
4559
  try {
4577
4560
  navigator.clipboard?.writeText(href).catch(() => {});
4578
4561
  } catch (_e) {}
4579
4562
  window.open(url, "_blank", "noopener,noreferrer");
4580
4563
  }, [href]);
4581
- const openClaude = React15.useCallback(() => {
4564
+ const openClaude = React14.useCallback(() => {
4582
4565
  const url = buildProviderUrl("claude", href);
4583
4566
  try {
4584
4567
  navigator.clipboard?.writeText(href).catch(() => {});
@@ -4716,7 +4699,7 @@ function ListPageTemplate({
4716
4699
  renderItem,
4717
4700
  emptyProps
4718
4701
  }) {
4719
- const mdHref = React16.useMemo(() => {
4702
+ const mdHref = React15.useMemo(() => {
4720
4703
  if (typeof window === "undefined")
4721
4704
  return;
4722
4705
  const url = new URL(window.location.href);
@@ -4770,7 +4753,7 @@ function ListPageTemplate({
4770
4753
  }, undefined, true, undefined, this);
4771
4754
  }
4772
4755
  // src/components/organisms/EmptySearchResult.tsx
4773
- import * as React17 from "react";
4756
+ import * as React16 from "react";
4774
4757
  import {
4775
4758
  Empty as Empty2,
4776
4759
  EmptyContent as EmptyContent2,
@@ -4791,7 +4774,7 @@ function EmptySearchResult({
4791
4774
  const title = emptySearchTitle ?? emtptySearchTitle ?? "No results";
4792
4775
  const description = emptySearchDescription ?? emtptySearchDescription ?? "Try another search.";
4793
4776
  const onChange = onSearchChange ?? handleSearchChange;
4794
- const [q, setQ] = React17.useState("");
4777
+ const [q, setQ] = React16.useState("");
4795
4778
  return /* @__PURE__ */ jsxDEV73(Empty2, {
4796
4779
  className,
4797
4780
  children: [
@@ -4995,7 +4978,7 @@ function ErrorState({
4995
4978
  }, undefined, true, undefined, this);
4996
4979
  }
4997
4980
  // src/hooks/useListUrlState.ts
4998
- import * as React18 from "react";
4981
+ import * as React17 from "react";
4999
4982
  function useListUrlState({
5000
4983
  defaults,
5001
4984
  paramKeys = {
@@ -5007,7 +4990,7 @@ function useListUrlState({
5007
4990
  },
5008
4991
  replaceState = true
5009
4992
  }) {
5010
- const read = React18.useCallback(() => {
4993
+ const read = React17.useCallback(() => {
5011
4994
  if (typeof window === "undefined")
5012
4995
  return defaults;
5013
4996
  const url = new URL(window.location.href);
@@ -5033,8 +5016,8 @@ function useListUrlState({
5033
5016
  filters
5034
5017
  };
5035
5018
  }, [defaults, paramKeys]);
5036
- const [state, setState] = React18.useState(read);
5037
- const write = React18.useCallback((next) => {
5019
+ const [state, setState] = React17.useState(read);
5020
+ const write = React17.useCallback((next) => {
5038
5021
  if (typeof window === "undefined")
5039
5022
  return;
5040
5023
  const url = new URL(window.location.href);
@@ -5064,15 +5047,15 @@ function useListUrlState({
5064
5047
  window.history.pushState({}, "", newUrl);
5065
5048
  setState(merged);
5066
5049
  }, [state, paramKeys, replaceState]);
5067
- const setFilter = React18.useCallback((key, value) => {
5050
+ const setFilter = React17.useCallback((key, value) => {
5068
5051
  write({
5069
5052
  filters: { ...state.filters, [key]: value }
5070
5053
  });
5071
5054
  }, [state.filters, write]);
5072
- const clearFilters = React18.useCallback(() => {
5055
+ const clearFilters = React17.useCallback(() => {
5073
5056
  write({ filters: {}, page: 1 });
5074
5057
  }, [write]);
5075
- React18.useEffect(() => {
5058
+ React17.useEffect(() => {
5076
5059
  const onPop = () => setState(read());
5077
5060
  window.addEventListener("popstate", onPop);
5078
5061
  return () => window.removeEventListener("popstate", onPop);
@@ -5611,7 +5594,7 @@ function GDPRRights({
5611
5594
  }, undefined, true, undefined, this);
5612
5595
  }
5613
5596
  // src/components/legal/organisms/ContactForm.tsx
5614
- import * as React19 from "react";
5597
+ import * as React18 from "react";
5615
5598
  import { jsxDEV as jsxDEV93 } from "react/jsx-dev-runtime";
5616
5599
  function ContactForm({
5617
5600
  labels = { submit: "Envoyer" },
@@ -5619,8 +5602,8 @@ function ContactForm({
5619
5602
  disabled,
5620
5603
  onSubmit
5621
5604
  }) {
5622
- const [value, setValue] = React19.useState(initialValue);
5623
- const [loading, setLoading] = React19.useState(false);
5605
+ const [value, setValue] = React18.useState(initialValue);
5606
+ const [loading, setLoading] = React18.useState(false);
5624
5607
  const handleSubmit = async (e) => {
5625
5608
  e.preventDefault();
5626
5609
  if (!onSubmit)
@@ -5650,14 +5633,14 @@ function ContactForm({
5650
5633
  }, undefined, true, undefined, this);
5651
5634
  }
5652
5635
  // src/components/legal/organisms/GDPRDataRequest.tsx
5653
- import * as React20 from "react";
5636
+ import * as React19 from "react";
5654
5637
  import { jsxDEV as jsxDEV94 } from "react/jsx-dev-runtime";
5655
5638
  function GDPRDataRequest({
5656
5639
  onExport,
5657
5640
  onDelete,
5658
5641
  labels = { export: "Demander une copie", delete: "Demander la suppression" }
5659
5642
  }) {
5660
- const [loading, setLoading] = React20.useState(null);
5643
+ const [loading, setLoading] = React19.useState(null);
5661
5644
  const handle = async (kind) => {
5662
5645
  const fn = kind === "export" ? onExport : onDelete;
5663
5646
  if (!fn)
@@ -5847,20 +5830,20 @@ function CookiesTemplate({
5847
5830
  }, undefined, true, undefined, this);
5848
5831
  }
5849
5832
  // src/components/legal/templates/ContactTemplate.tsx
5850
- import * as React21 from "react";
5833
+ import * as React20 from "react";
5851
5834
  import { jsxDEV as jsxDEV99 } from "react/jsx-dev-runtime";
5852
5835
  function ContactTemplate({
5853
5836
  title = "Contact",
5854
5837
  meta,
5855
5838
  onSubmit
5856
5839
  }) {
5857
- const [value, setValue] = React21.useState({
5840
+ const [value, setValue] = React20.useState({
5858
5841
  name: "",
5859
5842
  email: "",
5860
5843
  subject: "",
5861
5844
  message: ""
5862
5845
  });
5863
- const [loading, setLoading] = React21.useState(false);
5846
+ const [loading, setLoading] = React20.useState(false);
5864
5847
  const handleSubmit = async (e) => {
5865
5848
  e.preventDefault();
5866
5849
  if (!onSubmit)
@@ -5914,11 +5897,11 @@ function withPlatformUI(options) {
5914
5897
  };
5915
5898
  }
5916
5899
  // src/platform/useReducedMotion.ts
5917
- import * as React22 from "react";
5900
+ import * as React21 from "react";
5918
5901
  "use client";
5919
5902
  function useReducedMotion() {
5920
- const [reduced, setReduced] = React22.useState(false);
5921
- React22.useEffect(() => {
5903
+ const [reduced, setReduced] = React21.useState(false);
5904
+ React21.useEffect(() => {
5922
5905
  if (typeof window === "undefined" || !window.matchMedia)
5923
5906
  return;
5924
5907
  const mq = window.matchMedia("(prefers-reduced-motion: reduce)");
@@ -5930,11 +5913,11 @@ function useReducedMotion() {
5930
5913
  return reduced;
5931
5914
  }
5932
5915
  // src/platform/useColorScheme.ts
5933
- import * as React23 from "react";
5916
+ import * as React22 from "react";
5934
5917
  "use client";
5935
5918
  function useColorScheme() {
5936
- const [scheme, setScheme] = React23.useState("light");
5937
- React23.useEffect(() => {
5919
+ const [scheme, setScheme] = React22.useState("light");
5920
+ React22.useEffect(() => {
5938
5921
  if (typeof window === "undefined" || !window.matchMedia)
5939
5922
  return;
5940
5923
  const media = window.matchMedia("(prefers-color-scheme: dark)");
@@ -6171,7 +6154,7 @@ function FormCardLayout({
6171
6154
  }, undefined, true, undefined, this);
6172
6155
  }
6173
6156
  // src/components/forms/FormStepsLayout.tsx
6174
- import * as React24 from "react";
6157
+ import * as React23 from "react";
6175
6158
  import { Separator as Separator6 } from "@contractspec/lib.ui-kit-web/ui/separator";
6176
6159
  import { cn as cn42 } from "@contractspec/lib.ui-kit-web/ui/utils";
6177
6160
  import { jsxDEV as jsxDEV104 } from "react/jsx-dev-runtime";
@@ -6182,8 +6165,8 @@ function FormStepsLayout({
6182
6165
  canNext,
6183
6166
  className
6184
6167
  }) {
6185
- const indexByKey = React24.useMemo(() => Object.fromEntries(steps.map((s, i) => [s.key, i])), [steps]);
6186
- const [idx, setIdx] = React24.useState(() => {
6168
+ const indexByKey = React23.useMemo(() => Object.fromEntries(steps.map((s, i) => [s.key, i])), [steps]);
6169
+ const [idx, setIdx] = React23.useState(() => {
6187
6170
  if (initialStepKey && initialStepKey in indexByKey)
6188
6171
  return indexByKey[initialStepKey] || 0;
6189
6172
  return 0;
@@ -6251,7 +6234,7 @@ function FormStepsLayout({
6251
6234
  }, undefined, true, undefined, this);
6252
6235
  }
6253
6236
  // src/components/forms/FormOneByOneLayout.tsx
6254
- import * as React25 from "react";
6237
+ import * as React24 from "react";
6255
6238
  import { cn as cn43 } from "@contractspec/lib.ui-kit-web/ui/utils";
6256
6239
  import { jsxDEV as jsxDEV105 } from "react/jsx-dev-runtime";
6257
6240
  function FormOneByOneLayout({
@@ -6260,8 +6243,8 @@ function FormOneByOneLayout({
6260
6243
  onComplete,
6261
6244
  className
6262
6245
  }) {
6263
- const indexByKey = React25.useMemo(() => Object.fromEntries(fields.map((f, i) => [f.key, i])), [fields]);
6264
- const [idx, setIdx] = React25.useState(() => {
6246
+ const indexByKey = React24.useMemo(() => Object.fromEntries(fields.map((f, i) => [f.key, i])), [fields]);
6247
+ const [idx, setIdx] = React24.useState(() => {
6265
6248
  if (initialKey && initialKey in indexByKey) {
6266
6249
  return indexByKey[initialKey] || 0;
6267
6250
  }
@@ -6729,7 +6712,7 @@ function fieldByKey2(fields, key) {
6729
6712
  return fields.find((field) => field.key === key);
6730
6713
  }
6731
6714
  // src/components/data-view/DataViewRenderer.tsx
6732
- import * as React26 from "react";
6715
+ import * as React25 from "react";
6733
6716
  import {
6734
6717
  Pagination,
6735
6718
  PaginationContent,
@@ -6758,7 +6741,7 @@ function DataViewRenderer({
6758
6741
  pagination,
6759
6742
  onPageChange
6760
6743
  }) {
6761
- const viewContent = React26.useMemo(() => {
6744
+ const viewContent = React25.useMemo(() => {
6762
6745
  switch (spec.view.kind) {
6763
6746
  case "list":
6764
6747
  return /* @__PURE__ */ jsxDEV111(DataViewList, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contractspec/lib.design-system",
3
- "version": "2.5.0",
3
+ "version": "2.6.1",
4
4
  "description": "Design tokens and theming primitives",
5
5
  "keywords": [
6
6
  "contractspec",
@@ -30,35 +30,35 @@
30
30
  "sideEffects": false,
31
31
  "tree-shake": true,
32
32
  "dependencies": {
33
- "@contractspec/lib.ai-agent": "2.5.0",
34
- "@contractspec/lib.contracts-spec": "2.5.0",
35
- "@contractspec/lib.contracts-runtime-client-react": "2.5.0",
36
- "@contractspec/lib.ui-kit": "2.5.0",
37
- "@contractspec/lib.ui-kit-web": "2.5.0",
33
+ "@contractspec/lib.ai-agent": "2.6.0",
34
+ "@contractspec/lib.contracts-spec": "2.6.0",
35
+ "@contractspec/lib.contracts-runtime-client-react": "2.6.0",
36
+ "@contractspec/lib.ui-kit": "2.6.0",
37
+ "@contractspec/lib.ui-kit-web": "2.6.0",
38
38
  "@hookform/resolvers": "5.2.2",
39
39
  "class-variance-authority": "^0.7.1",
40
40
  "clsx": "^2.1.1",
41
- "lucide-react": "^0.564.0",
41
+ "lucide-react": "^0.575.0",
42
42
  "next": "16.1.6",
43
43
  "react": "19.2.4",
44
44
  "react-dom": "19.2.4",
45
- "react-hook-form": "^7.70.0",
45
+ "react-hook-form": "^7.71.2",
46
46
  "shiki": "^3.21.0",
47
- "tailwind-merge": "^3.4.1",
47
+ "tailwind-merge": "^3.5.0",
48
48
  "tailwindcss-animate": "^1.0.7",
49
49
  "zod": "^4.3.5"
50
50
  },
51
51
  "devDependencies": {
52
- "@contractspec/tool.typescript": "2.5.0",
53
- "@types/node": "^25.2.3",
52
+ "@contractspec/tool.typescript": "2.6.0",
53
+ "@types/node": "^25.3.0",
54
54
  "@types/react-dom": "^19.0.14",
55
55
  "postcss": "^8.5",
56
56
  "postcss-load-config": "^6.0.1",
57
57
  "react-native": "^0.81.4",
58
58
  "react-native-css": "^3.0.0",
59
- "tailwindcss": "4.1.18",
59
+ "tailwindcss": "4.2.1",
60
60
  "typescript": "^5.9.3",
61
- "@contractspec/tool.bun": "2.5.0"
61
+ "@contractspec/tool.bun": "2.6.0"
62
62
  },
63
63
  "files": [
64
64
  "dist",