@contractspec/lib.design-system 3.7.6 → 3.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +45 -110
- package/dist/browser/index.js +473 -466
- package/dist/components/agent/ApprovalQueue.d.ts +1 -1
- package/dist/components/agent/ApprovalQueue.mobile.d.ts +12 -0
- package/dist/components/atoms/ActionButtons.d.ts +3 -3
- package/dist/components/atoms/Button.d.ts +1 -1
- package/dist/components/atoms/Cta.d.ts +2 -2
- package/dist/components/atoms/DataChips.d.ts +1 -1
- package/dist/components/atoms/Input.mobile.d.ts +1 -1
- package/dist/components/atoms/LoaderCircular.d.ts +1 -1
- package/dist/components/atoms/Textarea.mobile.d.ts +1 -1
- package/dist/components/data-table/DataTable.d.ts +15 -0
- package/dist/components/data-table/DataTable.mobile.d.ts +15 -0
- package/dist/components/data-view/DataViewDetail.d.ts +1 -1
- package/dist/components/data-view/DataViewList.d.ts +1 -1
- package/dist/components/data-view/DataViewRenderer.d.ts +1 -1
- package/dist/components/data-view/DataViewRenderer.mobile.d.ts +25 -0
- package/dist/components/data-view/DataViewTable.d.ts +2 -2
- package/dist/components/data-view/DataViewTable.mobile.d.ts +17 -0
- package/dist/components/forms/ZodForm.d.ts +1 -1
- package/dist/components/legal/atoms/LegalCallout.d.ts +1 -1
- package/dist/components/legal/atoms/LegalHeading.d.ts +2 -2
- package/dist/components/legal/atoms/LegalList.d.ts +1 -1
- package/dist/components/legal/atoms/LegalSection.d.ts +2 -2
- package/dist/components/legal/atoms/LegalText.d.ts +3 -3
- package/dist/components/legal/molecules/LegalTOC.d.ts +1 -1
- package/dist/components/marketing/MarketingCard.d.ts +1 -1
- package/dist/components/marketing/MarketingCardsSection.d.ts +2 -2
- package/dist/components/marketing/MarketingComparisonSection.d.ts +1 -1
- package/dist/components/marketing/MarketingIconCard.d.ts +2 -2
- package/dist/components/marketing/MarketingSection.d.ts +1 -1
- package/dist/components/molecules/EntityCard.d.ts +2 -2
- package/dist/components/molecules/MarkdownRenderer/MarkdownRenderer.d.ts +2 -0
- package/dist/components/molecules/MarkdownRenderer/formatInlineMarkdown.d.ts +2 -0
- package/dist/components/molecules/MarkdownRenderer/index.d.ts +2 -0
- package/dist/components/molecules/MarkdownRenderer/renderMarkdownTable.d.ts +2 -0
- package/dist/components/molecules/MarkdownRenderer/types.d.ts +3 -0
- package/dist/components/molecules/SkeletonBlock/index.d.ts +1 -1
- package/dist/components/molecules/SkeletonCircle/index.d.ts +1 -1
- package/dist/components/molecules/SkeletonList/index.d.ts +1 -1
- package/dist/components/molecules/StatCard.d.ts +2 -2
- package/dist/components/molecules/StatusChip.d.ts +1 -1
- package/dist/components/native/FlatListScreen.mobile.d.ts +2 -2
- package/dist/components/organisms/GridLayout.d.ts +1 -1
- package/dist/components/organisms/ListCardPage.d.ts +1 -1
- package/dist/components/organisms/ListGridPage.d.ts +1 -1
- package/dist/components/organisms/ListTablePage.d.ts +1 -1
- package/dist/components/organisms/ListTablePage.mobile.d.ts +20 -0
- package/dist/components/organisms/PricingSection.d.ts +1 -1
- package/dist/components/templates/lists/ListPageTemplate/index.d.ts +1 -1
- package/dist/components/visualization/ComparisonView.d.ts +9 -0
- package/dist/components/visualization/ComparisonView.mobile.d.ts +9 -0
- package/dist/components/visualization/TimelineView.d.ts +9 -0
- package/dist/components/visualization/TimelineView.mobile.d.ts +9 -0
- package/dist/components/visualization/VisualizationCard.d.ts +13 -0
- package/dist/components/visualization/VisualizationCard.mobile.d.ts +13 -0
- package/dist/components/visualization/VisualizationGrid.d.ts +6 -0
- package/dist/components/visualization/VisualizationGrid.mobile.d.ts +6 -0
- package/dist/components/visualization/VisualizationRenderer.d.ts +12 -0
- package/dist/components/visualization/VisualizationRenderer.mobile.d.ts +12 -0
- package/dist/components/visualization/types.d.ts +12 -0
- package/dist/index.d.ts +108 -100
- package/dist/index.js +473 -466
- package/dist/theme/tokenBridge.d.ts +1 -1
- package/dist/theme/variants.d.ts +1 -1
- package/package.json +13 -12
package/dist/browser/index.js
CHANGED
|
@@ -1,13 +1,5 @@
|
|
|
1
|
-
// src/
|
|
2
|
-
import
|
|
3
|
-
import { shadcnDriver } from "@contractspec/lib.contracts-runtime-client-react/drivers/shadcn";
|
|
4
|
-
import {
|
|
5
|
-
Field as FieldWrap,
|
|
6
|
-
FieldDescription,
|
|
7
|
-
FieldError,
|
|
8
|
-
FieldGroup,
|
|
9
|
-
FieldLabel
|
|
10
|
-
} from "@contractspec/lib.ui-kit-web/ui/field";
|
|
1
|
+
// src/components/legal/organisms/ContactForm.tsx
|
|
2
|
+
import * as React2 from "react";
|
|
11
3
|
|
|
12
4
|
// src/components/atoms/Button.tsx
|
|
13
5
|
import {
|
|
@@ -63,6 +55,9 @@ function Button({
|
|
|
63
55
|
}, undefined, false, undefined, this);
|
|
64
56
|
}
|
|
65
57
|
|
|
58
|
+
// src/components/legal/molecules/ContactFields.tsx
|
|
59
|
+
import { Label } from "@contractspec/lib.ui-kit-web/ui/label";
|
|
60
|
+
|
|
66
61
|
// src/components/atoms/Input.tsx
|
|
67
62
|
import {
|
|
68
63
|
Input as WebInput
|
|
@@ -321,10 +316,10 @@ function Input({
|
|
|
321
316
|
}
|
|
322
317
|
|
|
323
318
|
// src/components/atoms/Textarea.tsx
|
|
324
|
-
import * as React from "react";
|
|
325
319
|
import {
|
|
326
320
|
Textarea as WebTextarea
|
|
327
321
|
} from "@contractspec/lib.ui-kit-web/ui/textarea";
|
|
322
|
+
import * as React from "react";
|
|
328
323
|
import { jsxDEV as jsxDEV3 } from "react/jsx-dev-runtime";
|
|
329
324
|
function Textarea({
|
|
330
325
|
value,
|
|
@@ -363,111 +358,132 @@ function Textarea({
|
|
|
363
358
|
}, undefined, false, undefined, this);
|
|
364
359
|
}
|
|
365
360
|
|
|
366
|
-
// src/
|
|
367
|
-
import { Switch as SwitchUiKit } from "@contractspec/lib.ui-kit-web/ui/switch";
|
|
368
|
-
import {
|
|
369
|
-
RadioGroup as RadioGroupUiKit,
|
|
370
|
-
RadioGroupItem
|
|
371
|
-
} from "@contractspec/lib.ui-kit-web/ui/radio-group";
|
|
372
|
-
import { Checkbox as CheckboxUiKit } from "@contractspec/lib.ui-kit-web/ui/checkbox";
|
|
373
|
-
import {
|
|
374
|
-
Select as SelectUiKit,
|
|
375
|
-
SelectContent,
|
|
376
|
-
SelectGroup,
|
|
377
|
-
SelectItem,
|
|
378
|
-
SelectTrigger,
|
|
379
|
-
SelectValue
|
|
380
|
-
} from "@contractspec/lib.ui-kit-web/ui/select";
|
|
381
|
-
import { Label } from "@contractspec/lib.ui-kit-web/ui/label";
|
|
361
|
+
// src/components/legal/molecules/ContactFields.tsx
|
|
382
362
|
import { jsxDEV as jsxDEV4 } from "react/jsx-dev-runtime";
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
363
|
+
function ContactFields({
|
|
364
|
+
value,
|
|
365
|
+
onChange,
|
|
366
|
+
disabled
|
|
367
|
+
}) {
|
|
368
|
+
return /* @__PURE__ */ jsxDEV4("div", {
|
|
369
|
+
className: "space-y-4",
|
|
390
370
|
children: [
|
|
391
|
-
/* @__PURE__ */ jsxDEV4(
|
|
392
|
-
className: "
|
|
393
|
-
children:
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
371
|
+
/* @__PURE__ */ jsxDEV4("div", {
|
|
372
|
+
className: "space-y-2",
|
|
373
|
+
children: [
|
|
374
|
+
/* @__PURE__ */ jsxDEV4(Label, {
|
|
375
|
+
children: "Nom"
|
|
376
|
+
}, undefined, false, undefined, this),
|
|
377
|
+
/* @__PURE__ */ jsxDEV4(Input, {
|
|
378
|
+
value: value.name,
|
|
379
|
+
onChange: (e) => onChange({ ...value, name: e.target.value }),
|
|
380
|
+
disabled
|
|
381
|
+
}, undefined, false, undefined, this)
|
|
382
|
+
]
|
|
383
|
+
}, undefined, true, undefined, this),
|
|
384
|
+
/* @__PURE__ */ jsxDEV4("div", {
|
|
385
|
+
className: "space-y-2",
|
|
386
|
+
children: [
|
|
387
|
+
/* @__PURE__ */ jsxDEV4(Label, {
|
|
388
|
+
children: "Email"
|
|
389
|
+
}, undefined, false, undefined, this),
|
|
390
|
+
/* @__PURE__ */ jsxDEV4(Input, {
|
|
391
|
+
type: "email",
|
|
392
|
+
value: value.email,
|
|
393
|
+
onChange: (e) => onChange({ ...value, email: e.target.value }),
|
|
394
|
+
disabled
|
|
395
|
+
}, undefined, false, undefined, this)
|
|
396
|
+
]
|
|
397
|
+
}, undefined, true, undefined, this),
|
|
398
|
+
/* @__PURE__ */ jsxDEV4("div", {
|
|
399
|
+
className: "space-y-2",
|
|
400
|
+
children: [
|
|
401
|
+
/* @__PURE__ */ jsxDEV4(Label, {
|
|
402
|
+
children: "Objet"
|
|
403
|
+
}, undefined, false, undefined, this),
|
|
404
|
+
/* @__PURE__ */ jsxDEV4(Input, {
|
|
405
|
+
value: value.subject,
|
|
406
|
+
onChange: (e) => onChange({
|
|
407
|
+
...value,
|
|
408
|
+
subject: e.target.value
|
|
409
|
+
}),
|
|
410
|
+
disabled
|
|
411
|
+
}, undefined, false, undefined, this)
|
|
412
|
+
]
|
|
413
|
+
}, undefined, true, undefined, this),
|
|
414
|
+
/* @__PURE__ */ jsxDEV4("div", {
|
|
415
|
+
className: "space-y-2",
|
|
416
|
+
children: [
|
|
417
|
+
/* @__PURE__ */ jsxDEV4(Label, {
|
|
418
|
+
children: "Message"
|
|
419
|
+
}, undefined, false, undefined, this),
|
|
420
|
+
/* @__PURE__ */ jsxDEV4(Textarea, {
|
|
421
|
+
value: value.message,
|
|
422
|
+
onChange: (e) => onChange({
|
|
423
|
+
...value,
|
|
424
|
+
message: e.target.value
|
|
425
|
+
}),
|
|
426
|
+
disabled,
|
|
427
|
+
rows: 6
|
|
428
|
+
}, undefined, false, undefined, this)
|
|
429
|
+
]
|
|
430
|
+
}, undefined, true, undefined, this)
|
|
406
431
|
]
|
|
407
432
|
}, undefined, true, undefined, this);
|
|
408
|
-
}
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
// src/components/legal/organisms/ContactForm.tsx
|
|
436
|
+
import { jsxDEV as jsxDEV5 } from "react/jsx-dev-runtime";
|
|
437
|
+
function ContactForm({
|
|
438
|
+
labels = { submit: "Envoyer" },
|
|
439
|
+
initialValue = { name: "", email: "", subject: "", message: "" },
|
|
440
|
+
disabled,
|
|
441
|
+
onSubmit
|
|
442
|
+
}) {
|
|
443
|
+
const [value, setValue] = React2.useState(initialValue);
|
|
444
|
+
const [loading, setLoading] = React2.useState(false);
|
|
445
|
+
const handleSubmit = async (e) => {
|
|
446
|
+
e.preventDefault();
|
|
447
|
+
if (!onSubmit)
|
|
448
|
+
return;
|
|
449
|
+
setLoading(true);
|
|
450
|
+
try {
|
|
451
|
+
await onSubmit(value);
|
|
452
|
+
} finally {
|
|
453
|
+
setLoading(false);
|
|
454
|
+
}
|
|
455
|
+
};
|
|
456
|
+
return /* @__PURE__ */ jsxDEV5("form", {
|
|
457
|
+
onSubmit: handleSubmit,
|
|
458
|
+
className: "space-y-6",
|
|
418
459
|
children: [
|
|
419
|
-
/* @__PURE__ */
|
|
420
|
-
value
|
|
421
|
-
|
|
460
|
+
/* @__PURE__ */ jsxDEV5(ContactFields, {
|
|
461
|
+
value,
|
|
462
|
+
onChange: setValue,
|
|
463
|
+
disabled: disabled || loading
|
|
422
464
|
}, undefined, false, undefined, this),
|
|
423
|
-
/* @__PURE__ */
|
|
424
|
-
|
|
425
|
-
|
|
465
|
+
/* @__PURE__ */ jsxDEV5(Button, {
|
|
466
|
+
disabled: disabled || loading,
|
|
467
|
+
type: "submit",
|
|
468
|
+
children: loading ? "Envoi…" : labels.submit
|
|
426
469
|
}, undefined, false, undefined, this)
|
|
427
470
|
]
|
|
428
|
-
},
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
onCheckedChange: (v) => props.onCheckedChange?.(v),
|
|
433
|
-
...props
|
|
434
|
-
}, undefined, false, undefined, this);
|
|
435
|
-
var formRenderer = createFormRenderer({
|
|
436
|
-
driver: shadcnDriver({
|
|
437
|
-
Field: FieldWrap,
|
|
438
|
-
FieldLabel,
|
|
439
|
-
FieldDescription,
|
|
440
|
-
FieldError,
|
|
441
|
-
FieldGroup,
|
|
442
|
-
FieldSet: (p) => /* @__PURE__ */ jsxDEV4("fieldset", {
|
|
443
|
-
...p
|
|
444
|
-
}, undefined, false, undefined, this),
|
|
445
|
-
FieldLegend: (p) => /* @__PURE__ */ jsxDEV4("legend", {
|
|
446
|
-
...p
|
|
447
|
-
}, undefined, false, undefined, this),
|
|
448
|
-
Input,
|
|
449
|
-
Textarea,
|
|
450
|
-
Select,
|
|
451
|
-
Checkbox,
|
|
452
|
-
RadioGroup,
|
|
453
|
-
Switch,
|
|
454
|
-
Button
|
|
455
|
-
})
|
|
456
|
-
});
|
|
457
|
-
// src/components/legal/organisms/LegalPageLayout.tsx
|
|
458
|
-
import { cn as cn4 } from "@contractspec/lib.ui-kit-web/ui/utils";
|
|
471
|
+
}, undefined, true, undefined, this);
|
|
472
|
+
}
|
|
473
|
+
// src/components/legal/organisms/GDPRDataRequest.tsx
|
|
474
|
+
import * as React3 from "react";
|
|
459
475
|
|
|
460
476
|
// src/components/legal/atoms/LegalHeading.tsx
|
|
461
|
-
import { cva } from "class-variance-authority";
|
|
462
477
|
import { cn } from "@contractspec/lib.ui-kit-web/ui/utils";
|
|
463
|
-
import {
|
|
478
|
+
import { cva } from "class-variance-authority";
|
|
479
|
+
import { jsxDEV as jsxDEV6 } from "react/jsx-dev-runtime";
|
|
464
480
|
var headingVariants = cva("text-foreground tracking-tight", {
|
|
465
481
|
variants: {
|
|
466
482
|
level: {
|
|
467
|
-
h1: "text-3xl
|
|
468
|
-
h2: "text-2xl
|
|
469
|
-
h3: "text-xl
|
|
470
|
-
h4: "text-lg
|
|
483
|
+
h1: "font-semibold text-3xl md:text-4xl",
|
|
484
|
+
h2: "font-semibold text-2xl md:text-3xl",
|
|
485
|
+
h3: "font-semibold text-xl md:text-2xl",
|
|
486
|
+
h4: "font-semibold text-lg md:text-xl"
|
|
471
487
|
},
|
|
472
488
|
tone: {
|
|
473
489
|
default: "",
|
|
@@ -496,153 +512,141 @@ function LegalHeading({
|
|
|
496
512
|
...props
|
|
497
513
|
}) {
|
|
498
514
|
const Comp = as ?? level ?? "h2";
|
|
499
|
-
return /* @__PURE__ */
|
|
515
|
+
return /* @__PURE__ */ jsxDEV6(Comp, {
|
|
500
516
|
className: cn(headingVariants({ level, tone, spacing }), className),
|
|
501
517
|
...props
|
|
502
518
|
}, undefined, false, undefined, this);
|
|
503
519
|
}
|
|
504
520
|
|
|
505
|
-
// src/components/legal/
|
|
521
|
+
// src/components/legal/atoms/LegalSection.tsx
|
|
506
522
|
import { cn as cn2 } from "@contractspec/lib.ui-kit-web/ui/utils";
|
|
507
|
-
import { jsxDEV as jsxDEV6 } from "react/jsx-dev-runtime";
|
|
508
|
-
function LegalMeta({
|
|
509
|
-
lastUpdated,
|
|
510
|
-
version,
|
|
511
|
-
className
|
|
512
|
-
}) {
|
|
513
|
-
const fmtDate = (d) => {
|
|
514
|
-
if (!d)
|
|
515
|
-
return null;
|
|
516
|
-
try {
|
|
517
|
-
const date = typeof d === "string" ? new Date(d) : d;
|
|
518
|
-
return date.toLocaleDateString();
|
|
519
|
-
} catch {
|
|
520
|
-
return String(d);
|
|
521
|
-
}
|
|
522
|
-
};
|
|
523
|
-
return /* @__PURE__ */ jsxDEV6("div", {
|
|
524
|
-
className: cn2("text-muted-foreground text-base", className),
|
|
525
|
-
children: [
|
|
526
|
-
version && /* @__PURE__ */ jsxDEV6("span", {
|
|
527
|
-
children: [
|
|
528
|
-
"Version ",
|
|
529
|
-
version
|
|
530
|
-
]
|
|
531
|
-
}, undefined, true, undefined, this),
|
|
532
|
-
version && lastUpdated && /* @__PURE__ */ jsxDEV6("span", {
|
|
533
|
-
className: "mx-2",
|
|
534
|
-
children: "•"
|
|
535
|
-
}, undefined, false, undefined, this),
|
|
536
|
-
lastUpdated && /* @__PURE__ */ jsxDEV6("span", {
|
|
537
|
-
children: [
|
|
538
|
-
"Dernière mise à jour: ",
|
|
539
|
-
fmtDate(lastUpdated)
|
|
540
|
-
]
|
|
541
|
-
}, undefined, true, undefined, this)
|
|
542
|
-
]
|
|
543
|
-
}, undefined, true, undefined, this);
|
|
544
|
-
}
|
|
545
|
-
|
|
546
|
-
// src/components/legal/molecules/LegalTOC.tsx
|
|
547
523
|
import { cva as cva2 } from "class-variance-authority";
|
|
548
|
-
import { cn as cn3 } from "@contractspec/lib.ui-kit-web/ui/utils";
|
|
549
524
|
import { jsxDEV as jsxDEV7 } from "react/jsx-dev-runtime";
|
|
550
|
-
var
|
|
525
|
+
var sectionVariants = cva2("space-y-3", {
|
|
551
526
|
variants: {
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
527
|
+
spacing: {
|
|
528
|
+
sm: "py-3",
|
|
529
|
+
md: "py-4",
|
|
530
|
+
lg: "py-6"
|
|
555
531
|
},
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
532
|
+
border: {
|
|
533
|
+
none: "",
|
|
534
|
+
top: "border-t",
|
|
535
|
+
bottom: "border-b",
|
|
536
|
+
both: "border-y"
|
|
537
|
+
},
|
|
538
|
+
tone: {
|
|
539
|
+
plain: "",
|
|
540
|
+
subtle: "bg-muted/30"
|
|
559
541
|
}
|
|
560
542
|
},
|
|
561
|
-
defaultVariants: {
|
|
543
|
+
defaultVariants: {
|
|
544
|
+
spacing: "md",
|
|
545
|
+
border: "none",
|
|
546
|
+
tone: "plain"
|
|
547
|
+
}
|
|
562
548
|
});
|
|
563
|
-
function
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
variant,
|
|
568
|
-
size,
|
|
549
|
+
function LegalSection({
|
|
550
|
+
spacing,
|
|
551
|
+
border,
|
|
552
|
+
tone,
|
|
569
553
|
className,
|
|
570
554
|
...props
|
|
571
555
|
}) {
|
|
572
|
-
return /* @__PURE__ */ jsxDEV7("
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
...props,
|
|
576
|
-
children: variant === "inline" ? items.map((it) => /* @__PURE__ */ jsxDEV7("a", {
|
|
577
|
-
href: it.href,
|
|
578
|
-
onClick: (_e) => {
|
|
579
|
-
onNavigate?.(it.href);
|
|
580
|
-
},
|
|
581
|
-
className: cn3("hover:bg-accent hover:text-accent-foreground rounded-xs px-2 py-1", activeHref === it.href && "bg-accent text-accent-foreground"),
|
|
582
|
-
children: it.label
|
|
583
|
-
}, it.href, false, undefined, this)) : /* @__PURE__ */ jsxDEV7("ul", {
|
|
584
|
-
className: "list-none space-y-2 pl-0",
|
|
585
|
-
children: items.map((it) => /* @__PURE__ */ jsxDEV7("li", {
|
|
586
|
-
children: /* @__PURE__ */ jsxDEV7("a", {
|
|
587
|
-
href: it.href,
|
|
588
|
-
onClick: () => onNavigate?.(it.href),
|
|
589
|
-
className: cn3("hover:bg-accent hover:text-accent-foreground block rounded-xs px-2 py-1", activeHref === it.href && "bg-accent text-accent-foreground"),
|
|
590
|
-
children: it.label
|
|
591
|
-
}, undefined, false, undefined, this)
|
|
592
|
-
}, it.href, false, undefined, this))
|
|
593
|
-
}, undefined, false, undefined, this)
|
|
556
|
+
return /* @__PURE__ */ jsxDEV7("div", {
|
|
557
|
+
className: cn2(sectionVariants({ spacing, border, tone }), className),
|
|
558
|
+
...props
|
|
594
559
|
}, undefined, false, undefined, this);
|
|
595
560
|
}
|
|
596
561
|
|
|
597
|
-
// src/components/legal/
|
|
562
|
+
// src/components/legal/atoms/LegalText.tsx
|
|
563
|
+
import { cn as cn3 } from "@contractspec/lib.ui-kit-web/ui/utils";
|
|
564
|
+
import { cva as cva3 } from "class-variance-authority";
|
|
598
565
|
import { jsxDEV as jsxDEV8 } from "react/jsx-dev-runtime";
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
566
|
+
var textVariants = cva3("text-base leading-relaxed", {
|
|
567
|
+
variants: {
|
|
568
|
+
tone: {
|
|
569
|
+
default: "text-foreground",
|
|
570
|
+
muted: "text-muted-foreground",
|
|
571
|
+
danger: "text-destructive"
|
|
572
|
+
},
|
|
573
|
+
size: {
|
|
574
|
+
base: "text-base",
|
|
575
|
+
sm: "text-sm",
|
|
576
|
+
lg: "text-lg"
|
|
577
|
+
},
|
|
578
|
+
spacing: {
|
|
579
|
+
none: "",
|
|
580
|
+
sm: "mt-2",
|
|
581
|
+
md: "mt-3",
|
|
582
|
+
lg: "mt-4"
|
|
583
|
+
}
|
|
584
|
+
},
|
|
585
|
+
defaultVariants: {
|
|
586
|
+
tone: "default",
|
|
587
|
+
size: "base",
|
|
588
|
+
spacing: "sm"
|
|
589
|
+
}
|
|
590
|
+
});
|
|
591
|
+
function LegalText({
|
|
592
|
+
as = "p",
|
|
593
|
+
tone,
|
|
594
|
+
size,
|
|
595
|
+
spacing,
|
|
596
|
+
className,
|
|
597
|
+
...props
|
|
598
|
+
}) {
|
|
599
|
+
const Comp = as;
|
|
600
|
+
return /* @__PURE__ */ jsxDEV8(Comp, {
|
|
601
|
+
className: cn3(textVariants({ tone, size, spacing }), className),
|
|
602
|
+
...props
|
|
603
|
+
}, undefined, false, undefined, this);
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
// src/components/legal/organisms/GDPRDataRequest.tsx
|
|
607
|
+
import { jsxDEV as jsxDEV9 } from "react/jsx-dev-runtime";
|
|
608
|
+
function GDPRDataRequest({
|
|
609
|
+
onExport,
|
|
610
|
+
onDelete,
|
|
611
|
+
labels = { export: "Demander une copie", delete: "Demander la suppression" }
|
|
605
612
|
}) {
|
|
606
|
-
|
|
607
|
-
|
|
613
|
+
const [loading, setLoading] = React3.useState(null);
|
|
614
|
+
const handle = async (kind) => {
|
|
615
|
+
const fn = kind === "export" ? onExport : onDelete;
|
|
616
|
+
if (!fn)
|
|
617
|
+
return;
|
|
618
|
+
setLoading(kind);
|
|
619
|
+
try {
|
|
620
|
+
await fn();
|
|
621
|
+
} finally {
|
|
622
|
+
setLoading(null);
|
|
623
|
+
}
|
|
624
|
+
};
|
|
625
|
+
return /* @__PURE__ */ jsxDEV9(LegalSection, {
|
|
626
|
+
border: "top",
|
|
627
|
+
className: "space-y-3",
|
|
608
628
|
children: [
|
|
609
|
-
/* @__PURE__ */
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
as: "h1",
|
|
614
|
-
level: "h1",
|
|
615
|
-
spacing: "sm",
|
|
616
|
-
children: title
|
|
617
|
-
}, undefined, false, undefined, this),
|
|
618
|
-
meta && /* @__PURE__ */ jsxDEV8(LegalMeta, {
|
|
619
|
-
lastUpdated: meta.lastUpdated,
|
|
620
|
-
version: meta.version
|
|
621
|
-
}, undefined, false, undefined, this)
|
|
622
|
-
]
|
|
623
|
-
}, undefined, true, undefined, this),
|
|
624
|
-
toc && toc.length > 0 && /* @__PURE__ */ jsxDEV8("div", {
|
|
625
|
-
className: "mb-6 md:hidden",
|
|
626
|
-
children: /* @__PURE__ */ jsxDEV8(LegalTOC, {
|
|
627
|
-
items: toc,
|
|
628
|
-
variant: "inline"
|
|
629
|
-
}, undefined, false, undefined, this)
|
|
629
|
+
/* @__PURE__ */ jsxDEV9(LegalHeading, {
|
|
630
|
+
as: "h2",
|
|
631
|
+
level: "h2",
|
|
632
|
+
children: "Demandes de données"
|
|
630
633
|
}, undefined, false, undefined, this),
|
|
631
|
-
/* @__PURE__ */
|
|
632
|
-
|
|
634
|
+
/* @__PURE__ */ jsxDEV9(LegalText, {
|
|
635
|
+
children: "Vous pouvez demander une copie de vos données ou solliciter leur suppression. Ces demandes nécessitent une vérification d’identité et sont traitées dans les délais légaux."
|
|
636
|
+
}, undefined, false, undefined, this),
|
|
637
|
+
/* @__PURE__ */ jsxDEV9("div", {
|
|
638
|
+
className: "flex flex-wrap gap-3",
|
|
633
639
|
children: [
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
variant: "sidebar"
|
|
639
|
-
}, undefined, false, undefined, this)
|
|
640
|
-
}, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV8("div", {
|
|
641
|
-
className: "hidden md:block"
|
|
640
|
+
/* @__PURE__ */ jsxDEV9(Button, {
|
|
641
|
+
onPress: () => handle("export"),
|
|
642
|
+
disabled: loading !== null,
|
|
643
|
+
children: loading === "export" ? "Envoi…" : labels.export
|
|
642
644
|
}, undefined, false, undefined, this),
|
|
643
|
-
/* @__PURE__ */
|
|
644
|
-
|
|
645
|
-
|
|
645
|
+
/* @__PURE__ */ jsxDEV9(Button, {
|
|
646
|
+
variant: "destructive",
|
|
647
|
+
onPress: () => handle("delete"),
|
|
648
|
+
disabled: loading !== null,
|
|
649
|
+
children: loading === "delete" ? "Envoi…" : labels.delete
|
|
646
650
|
}, undefined, false, undefined, this)
|
|
647
651
|
]
|
|
648
652
|
}, undefined, true, undefined, this)
|
|
@@ -650,10 +654,10 @@ function LegalPageLayout({
|
|
|
650
654
|
}, undefined, true, undefined, this);
|
|
651
655
|
}
|
|
652
656
|
// src/components/legal/atoms/LegalList.tsx
|
|
653
|
-
import {
|
|
654
|
-
import {
|
|
655
|
-
import { jsxDEV as
|
|
656
|
-
var listVariants =
|
|
657
|
+
import { cn as cn4 } from "@contractspec/lib.ui-kit-web/ui/utils";
|
|
658
|
+
import { cva as cva4 } from "class-variance-authority";
|
|
659
|
+
import { jsxDEV as jsxDEV10 } from "react/jsx-dev-runtime";
|
|
660
|
+
var listVariants = cva4("", {
|
|
657
661
|
variants: {
|
|
658
662
|
type: {
|
|
659
663
|
unordered: "list-disc pl-6",
|
|
@@ -679,54 +683,13 @@ function LegalList({
|
|
|
679
683
|
...props
|
|
680
684
|
}) {
|
|
681
685
|
const Comp = type === "ordered" ? "ol" : "ul";
|
|
682
|
-
return /* @__PURE__ */
|
|
683
|
-
className:
|
|
686
|
+
return /* @__PURE__ */ jsxDEV10(Comp, {
|
|
687
|
+
className: cn4(listVariants({ type, spacing }), className),
|
|
684
688
|
...props,
|
|
685
689
|
children
|
|
686
690
|
}, undefined, false, undefined, this);
|
|
687
691
|
}
|
|
688
692
|
|
|
689
|
-
// src/components/legal/atoms/LegalSection.tsx
|
|
690
|
-
import { cva as cva4 } from "class-variance-authority";
|
|
691
|
-
import { cn as cn6 } from "@contractspec/lib.ui-kit-web/ui/utils";
|
|
692
|
-
import { jsxDEV as jsxDEV10 } from "react/jsx-dev-runtime";
|
|
693
|
-
var sectionVariants = cva4("space-y-3", {
|
|
694
|
-
variants: {
|
|
695
|
-
spacing: {
|
|
696
|
-
sm: "py-3",
|
|
697
|
-
md: "py-4",
|
|
698
|
-
lg: "py-6"
|
|
699
|
-
},
|
|
700
|
-
border: {
|
|
701
|
-
none: "",
|
|
702
|
-
top: "border-t",
|
|
703
|
-
bottom: "border-b",
|
|
704
|
-
both: "border-y"
|
|
705
|
-
},
|
|
706
|
-
tone: {
|
|
707
|
-
plain: "",
|
|
708
|
-
subtle: "bg-muted/30"
|
|
709
|
-
}
|
|
710
|
-
},
|
|
711
|
-
defaultVariants: {
|
|
712
|
-
spacing: "md",
|
|
713
|
-
border: "none",
|
|
714
|
-
tone: "plain"
|
|
715
|
-
}
|
|
716
|
-
});
|
|
717
|
-
function LegalSection({
|
|
718
|
-
spacing,
|
|
719
|
-
border,
|
|
720
|
-
tone,
|
|
721
|
-
className,
|
|
722
|
-
...props
|
|
723
|
-
}) {
|
|
724
|
-
return /* @__PURE__ */ jsxDEV10("div", {
|
|
725
|
-
className: cn6(sectionVariants({ spacing, border, tone }), className),
|
|
726
|
-
...props
|
|
727
|
-
}, undefined, false, undefined, this);
|
|
728
|
-
}
|
|
729
|
-
|
|
730
693
|
// src/components/legal/organisms/GDPRRights.tsx
|
|
731
694
|
import { jsxDEV as jsxDEV11 } from "react/jsx-dev-runtime";
|
|
732
695
|
function GDPRRights({
|
|
@@ -756,213 +719,150 @@ function GDPRRights({
|
|
|
756
719
|
]
|
|
757
720
|
}, undefined, true, undefined, this);
|
|
758
721
|
}
|
|
759
|
-
// src/components/legal/organisms/
|
|
760
|
-
import
|
|
722
|
+
// src/components/legal/organisms/LegalPageLayout.tsx
|
|
723
|
+
import { cn as cn7 } from "@contractspec/lib.ui-kit-web/ui/utils";
|
|
761
724
|
|
|
762
|
-
// src/components/legal/molecules/
|
|
763
|
-
import {
|
|
725
|
+
// src/components/legal/molecules/LegalMeta.tsx
|
|
726
|
+
import { cn as cn5 } from "@contractspec/lib.ui-kit-web/ui/utils";
|
|
764
727
|
import { jsxDEV as jsxDEV12 } from "react/jsx-dev-runtime";
|
|
765
|
-
function
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
728
|
+
function LegalMeta({
|
|
729
|
+
lastUpdated,
|
|
730
|
+
version,
|
|
731
|
+
className
|
|
769
732
|
}) {
|
|
733
|
+
const fmtDate = (d) => {
|
|
734
|
+
if (!d)
|
|
735
|
+
return null;
|
|
736
|
+
try {
|
|
737
|
+
const date = typeof d === "string" ? new Date(d) : d;
|
|
738
|
+
return date.toLocaleDateString();
|
|
739
|
+
} catch {
|
|
740
|
+
return String(d);
|
|
741
|
+
}
|
|
742
|
+
};
|
|
770
743
|
return /* @__PURE__ */ jsxDEV12("div", {
|
|
771
|
-
className: "
|
|
744
|
+
className: cn5("text-base text-muted-foreground", className),
|
|
772
745
|
children: [
|
|
773
|
-
/* @__PURE__ */ jsxDEV12("
|
|
774
|
-
className: "space-y-2",
|
|
775
|
-
children: [
|
|
776
|
-
/* @__PURE__ */ jsxDEV12(Label2, {
|
|
777
|
-
children: "Nom"
|
|
778
|
-
}, undefined, false, undefined, this),
|
|
779
|
-
/* @__PURE__ */ jsxDEV12(Input, {
|
|
780
|
-
value: value.name,
|
|
781
|
-
onChange: (e) => onChange({ ...value, name: e.target.value }),
|
|
782
|
-
disabled
|
|
783
|
-
}, undefined, false, undefined, this)
|
|
784
|
-
]
|
|
785
|
-
}, undefined, true, undefined, this),
|
|
786
|
-
/* @__PURE__ */ jsxDEV12("div", {
|
|
787
|
-
className: "space-y-2",
|
|
788
|
-
children: [
|
|
789
|
-
/* @__PURE__ */ jsxDEV12(Label2, {
|
|
790
|
-
children: "Email"
|
|
791
|
-
}, undefined, false, undefined, this),
|
|
792
|
-
/* @__PURE__ */ jsxDEV12(Input, {
|
|
793
|
-
type: "email",
|
|
794
|
-
value: value.email,
|
|
795
|
-
onChange: (e) => onChange({ ...value, email: e.target.value }),
|
|
796
|
-
disabled
|
|
797
|
-
}, undefined, false, undefined, this)
|
|
798
|
-
]
|
|
799
|
-
}, undefined, true, undefined, this),
|
|
800
|
-
/* @__PURE__ */ jsxDEV12("div", {
|
|
801
|
-
className: "space-y-2",
|
|
746
|
+
version && /* @__PURE__ */ jsxDEV12("span", {
|
|
802
747
|
children: [
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
}, undefined, false, undefined, this),
|
|
806
|
-
/* @__PURE__ */ jsxDEV12(Input, {
|
|
807
|
-
value: value.subject,
|
|
808
|
-
onChange: (e) => onChange({
|
|
809
|
-
...value,
|
|
810
|
-
subject: e.target.value
|
|
811
|
-
}),
|
|
812
|
-
disabled
|
|
813
|
-
}, undefined, false, undefined, this)
|
|
748
|
+
"Version ",
|
|
749
|
+
version
|
|
814
750
|
]
|
|
815
751
|
}, undefined, true, undefined, this),
|
|
816
|
-
/* @__PURE__ */ jsxDEV12("
|
|
817
|
-
className: "
|
|
752
|
+
version && lastUpdated && /* @__PURE__ */ jsxDEV12("span", {
|
|
753
|
+
className: "mx-2",
|
|
754
|
+
children: "•"
|
|
755
|
+
}, undefined, false, undefined, this),
|
|
756
|
+
lastUpdated && /* @__PURE__ */ jsxDEV12("span", {
|
|
818
757
|
children: [
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
}, undefined, false, undefined, this),
|
|
822
|
-
/* @__PURE__ */ jsxDEV12(Textarea, {
|
|
823
|
-
value: value.message,
|
|
824
|
-
onChange: (e) => onChange({
|
|
825
|
-
...value,
|
|
826
|
-
message: e.target.value
|
|
827
|
-
}),
|
|
828
|
-
disabled,
|
|
829
|
-
rows: 6
|
|
830
|
-
}, undefined, false, undefined, this)
|
|
758
|
+
"Dernière mise à jour: ",
|
|
759
|
+
fmtDate(lastUpdated)
|
|
831
760
|
]
|
|
832
761
|
}, undefined, true, undefined, this)
|
|
833
762
|
]
|
|
834
763
|
}, undefined, true, undefined, this);
|
|
835
764
|
}
|
|
836
765
|
|
|
837
|
-
// src/components/legal/
|
|
766
|
+
// src/components/legal/molecules/LegalTOC.tsx
|
|
767
|
+
import { cn as cn6 } from "@contractspec/lib.ui-kit-web/ui/utils";
|
|
768
|
+
import { cva as cva5 } from "class-variance-authority";
|
|
838
769
|
import { jsxDEV as jsxDEV13 } from "react/jsx-dev-runtime";
|
|
839
|
-
|
|
840
|
-
labels = { submit: "Envoyer" },
|
|
841
|
-
initialValue = { name: "", email: "", subject: "", message: "" },
|
|
842
|
-
disabled,
|
|
843
|
-
onSubmit
|
|
844
|
-
}) {
|
|
845
|
-
const [value, setValue] = React2.useState(initialValue);
|
|
846
|
-
const [loading, setLoading] = React2.useState(false);
|
|
847
|
-
const handleSubmit = async (e) => {
|
|
848
|
-
e.preventDefault();
|
|
849
|
-
if (!onSubmit)
|
|
850
|
-
return;
|
|
851
|
-
setLoading(true);
|
|
852
|
-
try {
|
|
853
|
-
await onSubmit(value);
|
|
854
|
-
} finally {
|
|
855
|
-
setLoading(false);
|
|
856
|
-
}
|
|
857
|
-
};
|
|
858
|
-
return /* @__PURE__ */ jsxDEV13("form", {
|
|
859
|
-
onSubmit: handleSubmit,
|
|
860
|
-
className: "space-y-6",
|
|
861
|
-
children: [
|
|
862
|
-
/* @__PURE__ */ jsxDEV13(ContactFields, {
|
|
863
|
-
value,
|
|
864
|
-
onChange: setValue,
|
|
865
|
-
disabled: disabled || loading
|
|
866
|
-
}, undefined, false, undefined, this),
|
|
867
|
-
/* @__PURE__ */ jsxDEV13(Button, {
|
|
868
|
-
disabled: disabled || loading,
|
|
869
|
-
type: "submit",
|
|
870
|
-
children: loading ? "Envoi…" : labels.submit
|
|
871
|
-
}, undefined, false, undefined, this)
|
|
872
|
-
]
|
|
873
|
-
}, undefined, true, undefined, this);
|
|
874
|
-
}
|
|
875
|
-
// src/components/legal/organisms/GDPRDataRequest.tsx
|
|
876
|
-
import * as React3 from "react";
|
|
877
|
-
|
|
878
|
-
// src/components/legal/atoms/LegalText.tsx
|
|
879
|
-
import { cva as cva5 } from "class-variance-authority";
|
|
880
|
-
import { cn as cn7 } from "@contractspec/lib.ui-kit-web/ui/utils";
|
|
881
|
-
import { jsxDEV as jsxDEV14 } from "react/jsx-dev-runtime";
|
|
882
|
-
var textVariants = cva5("text-base leading-relaxed", {
|
|
770
|
+
var tocVariants = cva5("text-base", {
|
|
883
771
|
variants: {
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
danger: "text-destructive"
|
|
772
|
+
variant: {
|
|
773
|
+
sidebar: "space-y-2",
|
|
774
|
+
inline: "flex flex-wrap gap-3"
|
|
888
775
|
},
|
|
889
776
|
size: {
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
lg: "text-lg"
|
|
893
|
-
},
|
|
894
|
-
spacing: {
|
|
895
|
-
none: "",
|
|
896
|
-
sm: "mt-2",
|
|
897
|
-
md: "mt-3",
|
|
898
|
-
lg: "mt-4"
|
|
777
|
+
sm: "",
|
|
778
|
+
md: "text-base"
|
|
899
779
|
}
|
|
900
780
|
},
|
|
901
|
-
defaultVariants: {
|
|
902
|
-
tone: "default",
|
|
903
|
-
size: "base",
|
|
904
|
-
spacing: "sm"
|
|
905
|
-
}
|
|
781
|
+
defaultVariants: { variant: "sidebar", size: "md" }
|
|
906
782
|
});
|
|
907
|
-
function
|
|
908
|
-
|
|
909
|
-
|
|
783
|
+
function LegalTOC({
|
|
784
|
+
items,
|
|
785
|
+
activeHref,
|
|
786
|
+
onNavigate,
|
|
787
|
+
variant,
|
|
910
788
|
size,
|
|
911
|
-
spacing,
|
|
912
789
|
className,
|
|
913
790
|
...props
|
|
914
791
|
}) {
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
className:
|
|
918
|
-
...props
|
|
792
|
+
return /* @__PURE__ */ jsxDEV13("nav", {
|
|
793
|
+
"aria-label": "Table of contents",
|
|
794
|
+
className: cn6(tocVariants({ variant, size }), className),
|
|
795
|
+
...props,
|
|
796
|
+
children: variant === "inline" ? items.map((it) => /* @__PURE__ */ jsxDEV13("a", {
|
|
797
|
+
href: it.href,
|
|
798
|
+
onClick: (_e) => {
|
|
799
|
+
onNavigate?.(it.href);
|
|
800
|
+
},
|
|
801
|
+
className: cn6("rounded-xs px-2 py-1 hover:bg-accent hover:text-accent-foreground", activeHref === it.href && "bg-accent text-accent-foreground"),
|
|
802
|
+
children: it.label
|
|
803
|
+
}, it.href, false, undefined, this)) : /* @__PURE__ */ jsxDEV13("ul", {
|
|
804
|
+
className: "list-none space-y-2 pl-0",
|
|
805
|
+
children: items.map((it) => /* @__PURE__ */ jsxDEV13("li", {
|
|
806
|
+
children: /* @__PURE__ */ jsxDEV13("a", {
|
|
807
|
+
href: it.href,
|
|
808
|
+
onClick: () => onNavigate?.(it.href),
|
|
809
|
+
className: cn6("block rounded-xs px-2 py-1 hover:bg-accent hover:text-accent-foreground", activeHref === it.href && "bg-accent text-accent-foreground"),
|
|
810
|
+
children: it.label
|
|
811
|
+
}, undefined, false, undefined, this)
|
|
812
|
+
}, it.href, false, undefined, this))
|
|
813
|
+
}, undefined, false, undefined, this)
|
|
919
814
|
}, undefined, false, undefined, this);
|
|
920
815
|
}
|
|
921
816
|
|
|
922
|
-
// src/components/legal/organisms/
|
|
923
|
-
import { jsxDEV as
|
|
924
|
-
function
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
817
|
+
// src/components/legal/organisms/LegalPageLayout.tsx
|
|
818
|
+
import { jsxDEV as jsxDEV14 } from "react/jsx-dev-runtime";
|
|
819
|
+
function LegalPageLayout({
|
|
820
|
+
title,
|
|
821
|
+
meta,
|
|
822
|
+
toc,
|
|
823
|
+
children,
|
|
824
|
+
className
|
|
928
825
|
}) {
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
const fn = kind === "export" ? onExport : onDelete;
|
|
932
|
-
if (!fn)
|
|
933
|
-
return;
|
|
934
|
-
setLoading(kind);
|
|
935
|
-
try {
|
|
936
|
-
await fn();
|
|
937
|
-
} finally {
|
|
938
|
-
setLoading(null);
|
|
939
|
-
}
|
|
940
|
-
};
|
|
941
|
-
return /* @__PURE__ */ jsxDEV15(LegalSection, {
|
|
942
|
-
border: "top",
|
|
943
|
-
className: "space-y-3",
|
|
826
|
+
return /* @__PURE__ */ jsxDEV14("div", {
|
|
827
|
+
className: cn7("mx-auto w-full max-w-6xl px-4 py-8 md:py-12", className),
|
|
944
828
|
children: [
|
|
945
|
-
/* @__PURE__ */
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
829
|
+
/* @__PURE__ */ jsxDEV14("div", {
|
|
830
|
+
className: "mb-6 space-y-2",
|
|
831
|
+
children: [
|
|
832
|
+
/* @__PURE__ */ jsxDEV14(LegalHeading, {
|
|
833
|
+
as: "h1",
|
|
834
|
+
level: "h1",
|
|
835
|
+
spacing: "sm",
|
|
836
|
+
children: title
|
|
837
|
+
}, undefined, false, undefined, this),
|
|
838
|
+
meta && /* @__PURE__ */ jsxDEV14(LegalMeta, {
|
|
839
|
+
lastUpdated: meta.lastUpdated,
|
|
840
|
+
version: meta.version
|
|
841
|
+
}, undefined, false, undefined, this)
|
|
842
|
+
]
|
|
843
|
+
}, undefined, true, undefined, this),
|
|
844
|
+
toc && toc.length > 0 && /* @__PURE__ */ jsxDEV14("div", {
|
|
845
|
+
className: "mb-6 md:hidden",
|
|
846
|
+
children: /* @__PURE__ */ jsxDEV14(LegalTOC, {
|
|
847
|
+
items: toc,
|
|
848
|
+
variant: "inline"
|
|
849
|
+
}, undefined, false, undefined, this)
|
|
952
850
|
}, undefined, false, undefined, this),
|
|
953
|
-
/* @__PURE__ */
|
|
954
|
-
className: "
|
|
851
|
+
/* @__PURE__ */ jsxDEV14("div", {
|
|
852
|
+
className: "grid grid-cols-1 gap-8 md:grid-cols-[220px_minmax(0,1fr)]",
|
|
955
853
|
children: [
|
|
956
|
-
/* @__PURE__ */
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
854
|
+
toc && toc.length > 0 ? /* @__PURE__ */ jsxDEV14("aside", {
|
|
855
|
+
className: "sticky top-24 hidden self-start md:block",
|
|
856
|
+
children: /* @__PURE__ */ jsxDEV14(LegalTOC, {
|
|
857
|
+
items: toc,
|
|
858
|
+
variant: "sidebar"
|
|
859
|
+
}, undefined, false, undefined, this)
|
|
860
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV14("div", {
|
|
861
|
+
className: "hidden md:block"
|
|
960
862
|
}, undefined, false, undefined, this),
|
|
961
|
-
/* @__PURE__ */
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
disabled: loading !== null,
|
|
965
|
-
children: loading === "delete" ? "Envoi…" : labels.delete
|
|
863
|
+
/* @__PURE__ */ jsxDEV14("article", {
|
|
864
|
+
className: "prose max-w-none text-foreground",
|
|
865
|
+
children
|
|
966
866
|
}, undefined, false, undefined, this)
|
|
967
867
|
]
|
|
968
868
|
}, undefined, true, undefined, this)
|
|
@@ -989,6 +889,128 @@ function withPlatformUI(options) {
|
|
|
989
889
|
breakpoints
|
|
990
890
|
};
|
|
991
891
|
}
|
|
892
|
+
// src/renderers/form-contract.tsx
|
|
893
|
+
import { shadcnDriver } from "@contractspec/lib.contracts-runtime-client-react/drivers/shadcn";
|
|
894
|
+
import { createFormRenderer } from "@contractspec/lib.contracts-runtime-client-react/form-render";
|
|
895
|
+
import { Checkbox as CheckboxUiKit } from "@contractspec/lib.ui-kit-web/ui/checkbox";
|
|
896
|
+
import {
|
|
897
|
+
FieldDescription,
|
|
898
|
+
FieldError,
|
|
899
|
+
FieldGroup,
|
|
900
|
+
FieldLabel,
|
|
901
|
+
Field as FieldWrap
|
|
902
|
+
} from "@contractspec/lib.ui-kit-web/ui/field";
|
|
903
|
+
import { Label as Label2 } from "@contractspec/lib.ui-kit-web/ui/label";
|
|
904
|
+
import {
|
|
905
|
+
RadioGroupItem,
|
|
906
|
+
RadioGroup as RadioGroupUiKit
|
|
907
|
+
} from "@contractspec/lib.ui-kit-web/ui/radio-group";
|
|
908
|
+
import {
|
|
909
|
+
SelectContent,
|
|
910
|
+
SelectGroup,
|
|
911
|
+
SelectItem,
|
|
912
|
+
SelectTrigger,
|
|
913
|
+
Select as SelectUiKit,
|
|
914
|
+
SelectValue
|
|
915
|
+
} from "@contractspec/lib.ui-kit-web/ui/select";
|
|
916
|
+
import { Switch as SwitchUiKit } from "@contractspec/lib.ui-kit-web/ui/switch";
|
|
917
|
+
import { jsxDEV as jsxDEV15 } from "react/jsx-dev-runtime";
|
|
918
|
+
"use client";
|
|
919
|
+
var Select = (props) => {
|
|
920
|
+
const { options, value, onChange, ...rest } = props;
|
|
921
|
+
return /* @__PURE__ */ jsxDEV15(SelectUiKit, {
|
|
922
|
+
value: value ?? "",
|
|
923
|
+
onValueChange: (v) => onChange?.(v),
|
|
924
|
+
...rest,
|
|
925
|
+
children: [
|
|
926
|
+
/* @__PURE__ */ jsxDEV15(SelectTrigger, {
|
|
927
|
+
className: "w-[180px]",
|
|
928
|
+
children: /* @__PURE__ */ jsxDEV15(SelectValue, {
|
|
929
|
+
placeholder: props.placeholder
|
|
930
|
+
}, undefined, false, undefined, this)
|
|
931
|
+
}, undefined, false, undefined, this),
|
|
932
|
+
/* @__PURE__ */ jsxDEV15(SelectContent, {
|
|
933
|
+
children: /* @__PURE__ */ jsxDEV15(SelectGroup, {
|
|
934
|
+
children: options?.map((o, i) => /* @__PURE__ */ jsxDEV15(SelectItem, {
|
|
935
|
+
value: o.value,
|
|
936
|
+
disabled: o.disabled,
|
|
937
|
+
children: o.labelI18n
|
|
938
|
+
}, i, false, undefined, this))
|
|
939
|
+
}, undefined, false, undefined, this)
|
|
940
|
+
}, undefined, false, undefined, this)
|
|
941
|
+
]
|
|
942
|
+
}, undefined, true, undefined, this);
|
|
943
|
+
};
|
|
944
|
+
var Checkbox = (props) => /* @__PURE__ */ jsxDEV15(CheckboxUiKit, {
|
|
945
|
+
checked: !!props.checked,
|
|
946
|
+
onCheckedChange: (v) => props.onCheckedChange?.(v),
|
|
947
|
+
...props
|
|
948
|
+
}, undefined, false, undefined, this);
|
|
949
|
+
var RadioGroup = (props) => /* @__PURE__ */ jsxDEV15(RadioGroupUiKit, {
|
|
950
|
+
...props,
|
|
951
|
+
children: props.options?.map((o) => /* @__PURE__ */ jsxDEV15("div", {
|
|
952
|
+
className: "flex items-center gap-3",
|
|
953
|
+
children: [
|
|
954
|
+
/* @__PURE__ */ jsxDEV15(RadioGroupItem, {
|
|
955
|
+
value: o.value,
|
|
956
|
+
id: o.value
|
|
957
|
+
}, undefined, false, undefined, this),
|
|
958
|
+
/* @__PURE__ */ jsxDEV15(Label2, {
|
|
959
|
+
htmlFor: o.value,
|
|
960
|
+
children: o.label
|
|
961
|
+
}, undefined, false, undefined, this)
|
|
962
|
+
]
|
|
963
|
+
}, o.value, true, undefined, this))
|
|
964
|
+
}, undefined, false, undefined, this);
|
|
965
|
+
var Switch = (props) => /* @__PURE__ */ jsxDEV15(SwitchUiKit, {
|
|
966
|
+
checked: !!props.checked,
|
|
967
|
+
onCheckedChange: (v) => props.onCheckedChange?.(v),
|
|
968
|
+
...props
|
|
969
|
+
}, undefined, false, undefined, this);
|
|
970
|
+
var formRenderer = createFormRenderer({
|
|
971
|
+
driver: shadcnDriver({
|
|
972
|
+
Field: FieldWrap,
|
|
973
|
+
FieldLabel,
|
|
974
|
+
FieldDescription,
|
|
975
|
+
FieldError,
|
|
976
|
+
FieldGroup,
|
|
977
|
+
FieldSet: (p) => /* @__PURE__ */ jsxDEV15("fieldset", {
|
|
978
|
+
...p
|
|
979
|
+
}, undefined, false, undefined, this),
|
|
980
|
+
FieldLegend: (p) => /* @__PURE__ */ jsxDEV15("legend", {
|
|
981
|
+
...p
|
|
982
|
+
}, undefined, false, undefined, this),
|
|
983
|
+
Input,
|
|
984
|
+
Textarea,
|
|
985
|
+
Select,
|
|
986
|
+
Checkbox,
|
|
987
|
+
RadioGroup,
|
|
988
|
+
Switch,
|
|
989
|
+
Button
|
|
990
|
+
})
|
|
991
|
+
});
|
|
992
|
+
// src/theme/tokens.ts
|
|
993
|
+
"use client";
|
|
994
|
+
var defaultTokens = {
|
|
995
|
+
colors: {
|
|
996
|
+
background: "#ffffff",
|
|
997
|
+
foreground: "#0a0a0a",
|
|
998
|
+
muted: "#f4f4f5",
|
|
999
|
+
mutedForeground: "#71717a",
|
|
1000
|
+
primary: "#0f49a0",
|
|
1001
|
+
primaryForeground: "#ffffff",
|
|
1002
|
+
accent: "#16a34a",
|
|
1003
|
+
accentForeground: "#ffffff",
|
|
1004
|
+
destructive: "#ef4444",
|
|
1005
|
+
destructiveForeground: "#ffffff",
|
|
1006
|
+
border: "#e4e4e7",
|
|
1007
|
+
ring: "#2563eb"
|
|
1008
|
+
},
|
|
1009
|
+
radii: { sm: 4, md: 8, lg: 12, xl: 16, full: 9999 },
|
|
1010
|
+
space: { xs: 4, sm: 8, md: 12, lg: 16, xl: 24 },
|
|
1011
|
+
typography: { h1: 30, h2: 24, h3: 20, body: 16, small: 14 },
|
|
1012
|
+
icons: { sm: 16, md: 20, lg: 24 }
|
|
1013
|
+
};
|
|
992
1014
|
// src/theme/variants.ts
|
|
993
1015
|
import { cva as cva6 } from "class-variance-authority";
|
|
994
1016
|
"use client";
|
|
@@ -1023,28 +1045,6 @@ var dsBaseVariants = cva6("", {
|
|
|
1023
1045
|
emphasis: "default"
|
|
1024
1046
|
}
|
|
1025
1047
|
});
|
|
1026
|
-
// src/theme/tokens.ts
|
|
1027
|
-
"use client";
|
|
1028
|
-
var defaultTokens = {
|
|
1029
|
-
colors: {
|
|
1030
|
-
background: "#ffffff",
|
|
1031
|
-
foreground: "#0a0a0a",
|
|
1032
|
-
muted: "#f4f4f5",
|
|
1033
|
-
mutedForeground: "#71717a",
|
|
1034
|
-
primary: "#0f49a0",
|
|
1035
|
-
primaryForeground: "#ffffff",
|
|
1036
|
-
accent: "#16a34a",
|
|
1037
|
-
accentForeground: "#ffffff",
|
|
1038
|
-
destructive: "#ef4444",
|
|
1039
|
-
destructiveForeground: "#ffffff",
|
|
1040
|
-
border: "#e4e4e7",
|
|
1041
|
-
ring: "#2563eb"
|
|
1042
|
-
},
|
|
1043
|
-
radii: { sm: 4, md: 8, lg: 12, xl: 16, full: 9999 },
|
|
1044
|
-
space: { xs: 4, sm: 8, md: 12, lg: 16, xl: 24 },
|
|
1045
|
-
typography: { h1: 30, h2: 24, h3: 20, body: 16, small: 14 },
|
|
1046
|
-
icons: { sm: 16, md: 20, lg: 24 }
|
|
1047
|
-
};
|
|
1048
1048
|
export {
|
|
1049
1049
|
withPlatformUI,
|
|
1050
1050
|
useResponsive,
|
|
@@ -1057,10 +1057,14 @@ export {
|
|
|
1057
1057
|
dsBaseVariants,
|
|
1058
1058
|
defaultTokens,
|
|
1059
1059
|
ZodForm,
|
|
1060
|
+
VisualizationRenderer,
|
|
1061
|
+
VisualizationGrid,
|
|
1062
|
+
VisualizationCard,
|
|
1060
1063
|
ViewButton,
|
|
1061
1064
|
ToggleRightButton,
|
|
1062
1065
|
ToggleLeftButton,
|
|
1063
1066
|
ToggleButton,
|
|
1067
|
+
TimelineView,
|
|
1064
1068
|
TimeChip,
|
|
1065
1069
|
Textarea2 as Textarea,
|
|
1066
1070
|
TestimonialCarousel,
|
|
@@ -1101,6 +1105,7 @@ export {
|
|
|
1101
1105
|
MarketingCardDescription,
|
|
1102
1106
|
MarketingCardContent,
|
|
1103
1107
|
MarketingCard,
|
|
1108
|
+
MarkdownRenderer,
|
|
1104
1109
|
LoaderCircular,
|
|
1105
1110
|
LoaderBlock,
|
|
1106
1111
|
ListTablePage,
|
|
@@ -1160,6 +1165,7 @@ export {
|
|
|
1160
1165
|
DataViewRenderer,
|
|
1161
1166
|
DataViewList,
|
|
1162
1167
|
DataViewDetail,
|
|
1168
|
+
DataTable,
|
|
1163
1169
|
DEFAULT_BREAKPOINTS,
|
|
1164
1170
|
Cta,
|
|
1165
1171
|
CopyButton,
|
|
@@ -1169,6 +1175,7 @@ export {
|
|
|
1169
1175
|
ContactFields2 as ContactFields,
|
|
1170
1176
|
ConsentList,
|
|
1171
1177
|
ConsentItem,
|
|
1178
|
+
ComparisonView,
|
|
1172
1179
|
CommandTabs,
|
|
1173
1180
|
CommandSearchTrigger,
|
|
1174
1181
|
CommandPalette,
|