@contractspec/lib.ui-kit-web 3.7.6 → 3.9.2
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 +33 -88
- package/dist/browser/ui/accordion.js +4 -4
- package/dist/browser/ui/alert-dialog.js +9 -9
- package/dist/browser/ui/alert.js +4 -4
- package/dist/browser/ui/atoms/FilterSelect/FilterSelect.js +51 -51
- package/dist/browser/ui/atoms/FilterSelect/index.js +51 -51
- package/dist/browser/ui/atoms/LoadingSpinner/LoadingSpinner.js +1 -1
- package/dist/browser/ui/atoms/Pagination/Pagination.js +13 -13
- package/dist/browser/ui/atoms/Pagination/index.js +13 -13
- package/dist/browser/ui/atoms/SearchInput/SearchInput.js +8 -8
- package/dist/browser/ui/atoms/SearchInput/index.js +8 -8
- package/dist/browser/ui/avatar.js +1 -1
- package/dist/browser/ui/badge.js +3 -3
- package/dist/browser/ui/breadcrumb.js +4 -4
- package/dist/browser/ui/button.js +5 -5
- package/dist/browser/ui/calendar.js +21 -21
- package/dist/browser/ui/card.js +2 -2
- package/dist/browser/ui/carousel.js +6 -6
- package/dist/browser/ui/checkbox.js +2 -2
- package/dist/browser/ui/command.js +14 -14
- package/dist/browser/ui/confirm-dialog.js +9 -9
- package/dist/browser/ui/context-menu.js +10 -10
- package/dist/browser/ui/cta.js +5 -5
- package/dist/browser/ui/data-table.js +1009 -0
- package/dist/browser/ui/data-table.parts.js +467 -0
- package/dist/browser/ui/date-picker.js +26 -26
- package/dist/browser/ui/date-range-picker.js +24 -24
- package/dist/browser/ui/datetime-picker.js +29 -29
- package/dist/browser/ui/dialog.js +5 -5
- package/dist/browser/ui/drawer.js +5 -5
- package/dist/browser/ui/dropdown-menu.js +10 -10
- package/dist/browser/ui/empty-state.js +5 -5
- package/dist/browser/ui/empty.js +7 -7
- package/dist/browser/ui/field.js +12 -12
- package/dist/browser/ui/form.js +4 -4
- package/dist/browser/ui/hover-card.js +2 -2
- package/dist/browser/ui/input-group.js +16 -16
- package/dist/browser/ui/input-otp.js +4 -4
- package/dist/browser/ui/input.js +1 -1
- package/dist/browser/ui/label.js +2 -2
- package/dist/browser/ui/loading-button.js +8 -8
- package/dist/browser/ui/marketing/FeatureGrid.js +3 -3
- package/dist/browser/ui/marketing/Hero.js +7 -7
- package/dist/browser/ui/marketing/PricingTable.js +10 -10
- package/dist/browser/ui/menubar.js +12 -12
- package/dist/browser/ui/molecules/Autocomplete/index.js +26 -26
- package/dist/browser/ui/molecules/SearchAndFilter/SearchAndFilter.js +62 -62
- package/dist/browser/ui/molecules/SearchAndFilter/index.js +62 -62
- package/dist/browser/ui/molecules/SkeletonList.js +1 -1
- package/dist/browser/ui/nav-layout.js +22 -22
- package/dist/browser/ui/navigation-menu.js +7 -7
- package/dist/browser/ui/organisms/ErrorBoundary/ErrorBoundary.js +11 -11
- package/dist/browser/ui/organisms/ListPage/ListPage.js +84 -84
- package/dist/browser/ui/page-header.js +4 -4
- package/dist/browser/ui/pagination.js +6 -6
- package/dist/browser/ui/popover.js +2 -2
- package/dist/browser/ui/progress.js +3 -3
- package/dist/browser/ui/radio-group.js +3 -3
- package/dist/browser/ui/resizable.js +3 -3
- package/dist/browser/ui/scroll-area.js +4 -4
- package/dist/browser/ui/section.js +1 -1
- package/dist/browser/ui/select.js +6 -6
- package/dist/browser/ui/separator.js +2 -2
- package/dist/browser/ui/sheet.js +5 -5
- package/dist/browser/ui/sidebar.js +64 -64
- package/dist/browser/ui/skeleton.js +1 -1
- package/dist/browser/ui/slider.js +6 -6
- package/dist/browser/ui/stack.js +1 -1
- package/dist/browser/ui/stat-card-group.js +5 -5
- package/dist/browser/ui/stepper.js +2 -2
- package/dist/browser/ui/switch.js +3 -3
- package/dist/browser/ui/table.js +5 -5
- package/dist/browser/ui/tabs.js +3 -3
- package/dist/browser/ui/text.js +2 -2
- package/dist/browser/ui/textarea.js +1 -1
- package/dist/browser/ui/time-picker.js +10 -10
- package/dist/browser/ui/toast.js +5 -5
- package/dist/browser/ui/toaster.js +5 -5
- package/dist/browser/ui/toggle-group.js +7 -7
- package/dist/browser/ui/toggle.js +5 -5
- package/dist/browser/ui/tooltip.js +3 -3
- package/dist/browser/ui/typography.js +14 -14
- package/dist/browser/ui/usecases/UseCaseCard.js +8 -8
- package/dist/browser/ui/usecases/UserStoryCard.js +3 -3
- package/dist/browser/ui/visualization/Visualization.js +447 -0
- package/dist/browser/ui/visualization/Visualization.support.js +128 -0
- package/dist/browser/ui/visualization/index.js +10 -0
- package/dist/ui/accordion.d.ts +2 -2
- package/dist/ui/accordion.js +4 -4
- package/dist/ui/alert-dialog.d.ts +2 -2
- package/dist/ui/alert-dialog.js +9 -9
- package/dist/ui/alert.d.ts +2 -2
- package/dist/ui/alert.js +4 -4
- package/dist/ui/atoms/FilterSelect/FilterSelect.js +51 -51
- package/dist/ui/atoms/FilterSelect/index.d.ts +1 -1
- package/dist/ui/atoms/FilterSelect/index.js +51 -51
- package/dist/ui/atoms/LoadingSpinner/LoadingSpinner.js +1 -1
- package/dist/ui/atoms/LoadingSpinner/index.d.ts +1 -1
- package/dist/ui/atoms/Pagination/Pagination.js +13 -13
- package/dist/ui/atoms/Pagination/index.js +13 -13
- package/dist/ui/atoms/SearchInput/SearchInput.js +8 -8
- package/dist/ui/atoms/SearchInput/index.js +8 -8
- package/dist/ui/avatar.d.ts +2 -2
- package/dist/ui/avatar.js +1 -1
- package/dist/ui/badge.d.ts +1 -1
- package/dist/ui/badge.js +3 -3
- package/dist/ui/breadcrumb.d.ts +1 -1
- package/dist/ui/breadcrumb.js +4 -4
- package/dist/ui/button.d.ts +1 -1
- package/dist/ui/button.js +5 -5
- package/dist/ui/calendar.js +21 -21
- package/dist/ui/card.d.ts +1 -1
- package/dist/ui/card.js +2 -2
- package/dist/ui/carousel.d.ts +2 -2
- package/dist/ui/carousel.js +6 -6
- package/dist/ui/checkbox.d.ts +1 -1
- package/dist/ui/checkbox.js +2 -2
- package/dist/ui/collapsible.d.ts +1 -1
- package/dist/ui/command.d.ts +2 -2
- package/dist/ui/command.js +14 -14
- package/dist/ui/confirm-dialog.js +9 -9
- package/dist/ui/context-menu.d.ts +2 -2
- package/dist/ui/context-menu.js +10 -10
- package/dist/ui/cta.js +5 -5
- package/dist/ui/data-table.d.ts +12 -0
- package/dist/ui/data-table.js +1004 -0
- package/dist/ui/data-table.parts.d.ts +14 -0
- package/dist/ui/data-table.parts.js +462 -0
- package/dist/ui/date-picker.js +26 -26
- package/dist/ui/date-range-picker.js +24 -24
- package/dist/ui/datetime-picker.js +29 -29
- package/dist/ui/dialog.d.ts +1 -1
- package/dist/ui/dialog.js +5 -5
- package/dist/ui/drawer.d.ts +1 -1
- package/dist/ui/drawer.js +5 -5
- package/dist/ui/dropdown-menu.d.ts +2 -2
- package/dist/ui/dropdown-menu.js +10 -10
- package/dist/ui/empty-state.d.ts +1 -1
- package/dist/ui/empty-state.js +5 -5
- package/dist/ui/empty.d.ts +2 -2
- package/dist/ui/empty.js +7 -7
- package/dist/ui/field.d.ts +2 -2
- package/dist/ui/field.js +12 -12
- package/dist/ui/form.d.ts +3 -3
- package/dist/ui/form.js +4 -4
- package/dist/ui/hover-card.d.ts +2 -2
- package/dist/ui/hover-card.js +2 -2
- package/dist/ui/input-group.d.ts +2 -2
- package/dist/ui/input-group.js +16 -16
- package/dist/ui/input-otp.d.ts +2 -2
- package/dist/ui/input-otp.js +4 -4
- package/dist/ui/input.js +1 -1
- package/dist/ui/label.d.ts +1 -1
- package/dist/ui/label.js +2 -2
- package/dist/ui/loading-button.js +8 -8
- package/dist/ui/map/index.d.ts +1 -1
- package/dist/ui/marketing/FeatureGrid.js +3 -3
- package/dist/ui/marketing/Hero.js +7 -7
- package/dist/ui/marketing/PricingTable.js +10 -10
- package/dist/ui/marketing/index.d.ts +1 -1
- package/dist/ui/menubar.d.ts +2 -2
- package/dist/ui/menubar.js +12 -12
- package/dist/ui/molecules/Autocomplete/index.js +26 -26
- package/dist/ui/molecules/SearchAndFilter/SearchAndFilter.js +62 -62
- package/dist/ui/molecules/SearchAndFilter/index.js +62 -62
- package/dist/ui/molecules/SkeletonList.js +1 -1
- package/dist/ui/nav-layout.d.ts +1 -1
- package/dist/ui/nav-layout.js +22 -22
- package/dist/ui/navigation-menu.d.ts +2 -2
- package/dist/ui/navigation-menu.js +7 -7
- package/dist/ui/organisms/ErrorBoundary/ErrorBoundary.js +11 -11
- package/dist/ui/organisms/ErrorBoundary/index.d.ts +1 -1
- package/dist/ui/organisms/ListPage/ListPage.js +84 -84
- package/dist/ui/organisms/ListPage/index.d.ts +1 -1
- package/dist/ui/organisms/ListPage/types.d.ts +1 -1
- package/dist/ui/page-header.d.ts +1 -1
- package/dist/ui/page-header.js +4 -4
- package/dist/ui/pagination.js +6 -6
- package/dist/ui/popover.d.ts +2 -2
- package/dist/ui/popover.js +2 -2
- package/dist/ui/progress.d.ts +1 -1
- package/dist/ui/progress.js +3 -3
- package/dist/ui/radio-group.d.ts +1 -1
- package/dist/ui/radio-group.js +3 -3
- package/dist/ui/resizable.d.ts +2 -2
- package/dist/ui/resizable.js +3 -3
- package/dist/ui/scroll-area.d.ts +1 -1
- package/dist/ui/scroll-area.js +4 -4
- package/dist/ui/section.d.ts +1 -1
- package/dist/ui/section.js +1 -1
- package/dist/ui/select.d.ts +1 -1
- package/dist/ui/select.js +6 -6
- package/dist/ui/separator.d.ts +1 -1
- package/dist/ui/separator.js +2 -2
- package/dist/ui/sheet.d.ts +2 -2
- package/dist/ui/sheet.js +5 -5
- package/dist/ui/sidebar.d.ts +1 -1
- package/dist/ui/sidebar.js +64 -64
- package/dist/ui/skeleton.js +1 -1
- package/dist/ui/slider.d.ts +1 -1
- package/dist/ui/slider.js +6 -6
- package/dist/ui/stack.d.ts +4 -4
- package/dist/ui/stack.js +1 -1
- package/dist/ui/stat-card-group.js +5 -5
- package/dist/ui/stepper.js +2 -2
- package/dist/ui/switch.d.ts +1 -1
- package/dist/ui/switch.js +3 -3
- package/dist/ui/table.d.ts +1 -1
- package/dist/ui/table.js +5 -5
- package/dist/ui/tabs.d.ts +2 -2
- package/dist/ui/tabs.js +3 -3
- package/dist/ui/text.js +2 -2
- package/dist/ui/textarea.js +1 -1
- package/dist/ui/time-picker.js +10 -10
- package/dist/ui/toast.d.ts +2 -2
- package/dist/ui/toast.js +5 -5
- package/dist/ui/toaster.js +5 -5
- package/dist/ui/toggle-group.d.ts +1 -1
- package/dist/ui/toggle-group.js +7 -7
- package/dist/ui/toggle.d.ts +1 -1
- package/dist/ui/toggle.js +5 -5
- package/dist/ui/tooltip.d.ts +2 -2
- package/dist/ui/tooltip.js +3 -3
- package/dist/ui/typography.js +14 -14
- package/dist/ui/use-toast.d.ts +1 -1
- package/dist/ui/usecases/UseCaseCard.js +8 -8
- package/dist/ui/usecases/UserStoryCard.js +3 -3
- package/dist/ui/visualization/Visualization.d.ts +9 -0
- package/dist/ui/visualization/Visualization.js +442 -0
- package/dist/ui/visualization/Visualization.support.d.ts +15 -0
- package/dist/ui/visualization/Visualization.support.js +123 -0
- package/dist/ui/visualization/index.d.ts +1 -0
- package/dist/ui/visualization/index.js +5 -0
- package/package.json +75 -12
package/dist/ui/accordion.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
var __require = import.meta.require;
|
|
3
3
|
|
|
4
4
|
// ui/accordion.tsx
|
|
5
|
+
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
5
6
|
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
|
6
7
|
import { ChevronDownIcon } from "lucide-react";
|
|
7
|
-
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
8
8
|
import { jsxDEV } from "react/jsx-dev-runtime";
|
|
9
9
|
"use client";
|
|
10
10
|
function Accordion({
|
|
@@ -34,12 +34,12 @@ function AccordionTrigger({
|
|
|
34
34
|
className: "flex",
|
|
35
35
|
children: /* @__PURE__ */ jsxDEV(AccordionPrimitive.Trigger, {
|
|
36
36
|
"data-slot": "accordion-trigger",
|
|
37
|
-
className: cn("
|
|
37
|
+
className: cn("flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left font-medium text-sm outline-hidden transition-all hover:underline focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180", className),
|
|
38
38
|
...props,
|
|
39
39
|
children: [
|
|
40
40
|
children,
|
|
41
41
|
/* @__PURE__ */ jsxDEV(ChevronDownIcon, {
|
|
42
|
-
className: "
|
|
42
|
+
className: "pointer-events-none size-4 shrink-0 translate-y-0.5 text-muted-foreground transition-transform duration-200"
|
|
43
43
|
}, undefined, false, undefined, this)
|
|
44
44
|
]
|
|
45
45
|
}, undefined, true, undefined, this)
|
|
@@ -52,7 +52,7 @@ function AccordionContent({
|
|
|
52
52
|
}) {
|
|
53
53
|
return /* @__PURE__ */ jsxDEV(AccordionPrimitive.Content, {
|
|
54
54
|
"data-slot": "accordion-content",
|
|
55
|
-
className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down
|
|
55
|
+
className: "overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
|
|
56
56
|
...props,
|
|
57
57
|
children: /* @__PURE__ */ jsxDEV("div", {
|
|
58
58
|
className: cn("pt-0 pb-4", className),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
declare function AlertDialog({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
declare function AlertDialogTrigger({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
declare function AlertDialogPortal({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -11,4 +11,4 @@ declare function AlertDialogTitle({ className, ...props }: React.ComponentProps<
|
|
|
11
11
|
declare function AlertDialogDescription({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
declare function AlertDialogAction({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Action>): import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
declare function AlertDialogCancel({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Cancel>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
export { AlertDialog,
|
|
14
|
+
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, };
|
package/dist/ui/alert-dialog.js
CHANGED
|
@@ -2,23 +2,23 @@
|
|
|
2
2
|
var __require = import.meta.require;
|
|
3
3
|
|
|
4
4
|
// ui/button.tsx
|
|
5
|
+
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
5
6
|
import { Slot } from "@radix-ui/react-slot";
|
|
6
7
|
import { cva } from "class-variance-authority";
|
|
7
|
-
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
8
8
|
import { jsxDEV } from "react/jsx-dev-runtime";
|
|
9
|
-
var buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm
|
|
9
|
+
var buttonVariants = cva("inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap rounded-md font-medium text-sm outline-hidden transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0", {
|
|
10
10
|
variants: {
|
|
11
11
|
variant: {
|
|
12
12
|
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
13
|
-
destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40
|
|
14
|
-
outline: "border bg-background shadow-2xs hover:bg-accent hover:text-accent-foreground dark:
|
|
13
|
+
destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",
|
|
14
|
+
outline: "border bg-background shadow-2xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
|
|
15
15
|
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
16
16
|
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
17
17
|
link: "text-primary underline-offset-4 hover:underline"
|
|
18
18
|
},
|
|
19
19
|
size: {
|
|
20
20
|
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
21
|
-
sm: "h-8
|
|
21
|
+
sm: "h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",
|
|
22
22
|
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
|
23
23
|
icon: "size-9"
|
|
24
24
|
}
|
|
@@ -51,8 +51,8 @@ function Button({
|
|
|
51
51
|
}, undefined, false, undefined, this);
|
|
52
52
|
}
|
|
53
53
|
// ui/alert-dialog.tsx
|
|
54
|
-
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
|
|
55
54
|
import { cn as cn2 } from "@contractspec/lib.ui-kit-core/utils";
|
|
55
|
+
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
|
|
56
56
|
import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
|
|
57
57
|
"use client";
|
|
58
58
|
function AlertDialog({
|
|
@@ -85,7 +85,7 @@ function AlertDialogOverlay({
|
|
|
85
85
|
}) {
|
|
86
86
|
return /* @__PURE__ */ jsxDEV2(AlertDialogPrimitive.Overlay, {
|
|
87
87
|
"data-slot": "alert-dialog-overlay",
|
|
88
|
-
className: cn2("data-[state=
|
|
88
|
+
className: cn2("data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=open]:animate-in", className),
|
|
89
89
|
...props
|
|
90
90
|
}, undefined, false, undefined, this);
|
|
91
91
|
}
|
|
@@ -98,7 +98,7 @@ function AlertDialogContent({
|
|
|
98
98
|
/* @__PURE__ */ jsxDEV2(AlertDialogOverlay, {}, undefined, false, undefined, this),
|
|
99
99
|
/* @__PURE__ */ jsxDEV2(AlertDialogPrimitive.Content, {
|
|
100
100
|
"data-slot": "alert-dialog-content",
|
|
101
|
-
className: cn2("
|
|
101
|
+
className: cn2("data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 data-[state=closed]:animate-out data-[state=open]:animate-in sm:max-w-lg", className),
|
|
102
102
|
...props
|
|
103
103
|
}, undefined, false, undefined, this)
|
|
104
104
|
]
|
|
@@ -130,7 +130,7 @@ function AlertDialogTitle({
|
|
|
130
130
|
}) {
|
|
131
131
|
return /* @__PURE__ */ jsxDEV2(AlertDialogPrimitive.Title, {
|
|
132
132
|
"data-slot": "alert-dialog-title",
|
|
133
|
-
className: cn2("text-lg
|
|
133
|
+
className: cn2("font-semibold text-lg", className),
|
|
134
134
|
...props
|
|
135
135
|
}, undefined, false, undefined, this);
|
|
136
136
|
}
|
package/dist/ui/alert.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
declare const alertVariants: (props?: ({
|
|
4
4
|
variant?: "default" | "destructive" | null | undefined;
|
|
5
5
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
6
|
declare function Alert({ className, variant, ...props }: React.ComponentPropsWithoutRef<'div'> & VariantProps<typeof alertVariants>): import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
declare function AlertTitle({ className, ...props }: React.ComponentPropsWithoutRef<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
declare function AlertDescription({ className, ...props }: React.ComponentPropsWithoutRef<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export { Alert,
|
|
9
|
+
export { Alert, AlertDescription, AlertTitle };
|
package/dist/ui/alert.js
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
var __require = import.meta.require;
|
|
3
3
|
|
|
4
4
|
// ui/alert.tsx
|
|
5
|
-
import { cva } from "class-variance-authority";
|
|
6
5
|
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
6
|
+
import { cva } from "class-variance-authority";
|
|
7
7
|
import { jsxDEV } from "react/jsx-dev-runtime";
|
|
8
|
-
var alertVariants = cva("relative w-full rounded-lg border px-4 py-3 text-sm
|
|
8
|
+
var alertVariants = cva("relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current", {
|
|
9
9
|
variants: {
|
|
10
10
|
variant: {
|
|
11
11
|
default: "bg-card text-card-foreground",
|
|
12
|
-
destructive: "
|
|
12
|
+
destructive: "bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 [&>svg]:text-current"
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
defaultVariants: {
|
|
@@ -44,7 +44,7 @@ function AlertDescription({
|
|
|
44
44
|
}) {
|
|
45
45
|
return /* @__PURE__ */ jsxDEV("div", {
|
|
46
46
|
"data-slot": "alert-description",
|
|
47
|
-
className: cn("
|
|
47
|
+
className: cn("col-start-2 grid justify-items-start gap-1 text-muted-foreground text-sm [&_p]:leading-relaxed", className),
|
|
48
48
|
...props
|
|
49
49
|
}, undefined, false, undefined, this);
|
|
50
50
|
}
|
|
@@ -1,16 +1,31 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
var __require = import.meta.require;
|
|
3
3
|
|
|
4
|
+
// ui/label.tsx
|
|
5
|
+
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
6
|
+
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
7
|
+
import { jsxDEV } from "react/jsx-dev-runtime";
|
|
8
|
+
"use client";
|
|
9
|
+
function Label({
|
|
10
|
+
className,
|
|
11
|
+
...props
|
|
12
|
+
}) {
|
|
13
|
+
return /* @__PURE__ */ jsxDEV(LabelPrimitive.Root, {
|
|
14
|
+
"data-slot": "label",
|
|
15
|
+
className: cn("flex select-none items-center gap-2 font-medium text-sm leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-50 group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50", className),
|
|
16
|
+
...props
|
|
17
|
+
}, undefined, false, undefined, this);
|
|
18
|
+
}
|
|
4
19
|
// ui/select.tsx
|
|
20
|
+
import { cn as cn2 } from "@contractspec/lib.ui-kit-core/utils";
|
|
5
21
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
6
22
|
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
|
|
7
|
-
import {
|
|
8
|
-
import { jsxDEV } from "react/jsx-dev-runtime";
|
|
23
|
+
import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
|
|
9
24
|
"use client";
|
|
10
25
|
function Select({
|
|
11
26
|
...props
|
|
12
27
|
}) {
|
|
13
|
-
return /* @__PURE__ */
|
|
28
|
+
return /* @__PURE__ */ jsxDEV2(SelectPrimitive.Root, {
|
|
14
29
|
"data-slot": "select",
|
|
15
30
|
...props
|
|
16
31
|
}, undefined, false, undefined, this);
|
|
@@ -18,7 +33,7 @@ function Select({
|
|
|
18
33
|
function SelectGroup({
|
|
19
34
|
...props
|
|
20
35
|
}) {
|
|
21
|
-
return /* @__PURE__ */
|
|
36
|
+
return /* @__PURE__ */ jsxDEV2(SelectPrimitive.Group, {
|
|
22
37
|
"data-slot": "select-group",
|
|
23
38
|
...props
|
|
24
39
|
}, undefined, false, undefined, this);
|
|
@@ -26,7 +41,7 @@ function SelectGroup({
|
|
|
26
41
|
function SelectValue({
|
|
27
42
|
...props
|
|
28
43
|
}) {
|
|
29
|
-
return /* @__PURE__ */
|
|
44
|
+
return /* @__PURE__ */ jsxDEV2(SelectPrimitive.Value, {
|
|
30
45
|
"data-slot": "select-value",
|
|
31
46
|
...props
|
|
32
47
|
}, undefined, false, undefined, this);
|
|
@@ -37,16 +52,16 @@ function SelectTrigger({
|
|
|
37
52
|
children,
|
|
38
53
|
...props
|
|
39
54
|
}) {
|
|
40
|
-
return /* @__PURE__ */
|
|
55
|
+
return /* @__PURE__ */ jsxDEV2(SelectPrimitive.Trigger, {
|
|
41
56
|
"data-slot": "select-trigger",
|
|
42
57
|
"data-size": size,
|
|
43
|
-
className:
|
|
58
|
+
className: cn2("flex w-fit items-center justify-between gap-2 whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-2xs outline-hidden transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[size=default]:h-9 data-[size=sm]:h-8 data-placeholder:text-muted-foreground *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:bg-input/30 dark:aria-invalid:ring-destructive/40 dark:hover:bg-input/50 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0", className),
|
|
44
59
|
...props,
|
|
45
60
|
children: [
|
|
46
61
|
children,
|
|
47
|
-
/* @__PURE__ */
|
|
62
|
+
/* @__PURE__ */ jsxDEV2(SelectPrimitive.Icon, {
|
|
48
63
|
asChild: true,
|
|
49
|
-
children: /* @__PURE__ */
|
|
64
|
+
children: /* @__PURE__ */ jsxDEV2(ChevronDownIcon, {
|
|
50
65
|
className: "size-4 opacity-50"
|
|
51
66
|
}, undefined, false, undefined, this)
|
|
52
67
|
}, undefined, false, undefined, this)
|
|
@@ -59,19 +74,19 @@ function SelectContent({
|
|
|
59
74
|
position = "popper",
|
|
60
75
|
...props
|
|
61
76
|
}) {
|
|
62
|
-
return /* @__PURE__ */
|
|
63
|
-
children: /* @__PURE__ */
|
|
77
|
+
return /* @__PURE__ */ jsxDEV2(SelectPrimitive.Portal, {
|
|
78
|
+
children: /* @__PURE__ */ jsxDEV2(SelectPrimitive.Content, {
|
|
64
79
|
"data-slot": "select-content",
|
|
65
|
-
className:
|
|
80
|
+
className: cn2("data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-32 origin-(--radix-select-content-transform-origin) overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=closed]:animate-out data-[state=open]:animate-in", position === "popper" && "data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1", className),
|
|
66
81
|
position,
|
|
67
82
|
...props,
|
|
68
83
|
children: [
|
|
69
|
-
/* @__PURE__ */
|
|
70
|
-
/* @__PURE__ */
|
|
71
|
-
className:
|
|
84
|
+
/* @__PURE__ */ jsxDEV2(SelectScrollUpButton, {}, undefined, false, undefined, this),
|
|
85
|
+
/* @__PURE__ */ jsxDEV2(SelectPrimitive.Viewport, {
|
|
86
|
+
className: cn2("p-1", position === "popper" && "h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width) scroll-my-1"),
|
|
72
87
|
children
|
|
73
88
|
}, undefined, false, undefined, this),
|
|
74
|
-
/* @__PURE__ */
|
|
89
|
+
/* @__PURE__ */ jsxDEV2(SelectScrollDownButton, {}, undefined, false, undefined, this)
|
|
75
90
|
]
|
|
76
91
|
}, undefined, true, undefined, this)
|
|
77
92
|
}, undefined, false, undefined, this);
|
|
@@ -80,9 +95,9 @@ function SelectLabel({
|
|
|
80
95
|
className,
|
|
81
96
|
...props
|
|
82
97
|
}) {
|
|
83
|
-
return /* @__PURE__ */
|
|
98
|
+
return /* @__PURE__ */ jsxDEV2(SelectPrimitive.Label, {
|
|
84
99
|
"data-slot": "select-label",
|
|
85
|
-
className:
|
|
100
|
+
className: cn2("px-2 py-1.5 text-muted-foreground text-xs", className),
|
|
86
101
|
...props
|
|
87
102
|
}, undefined, false, undefined, this);
|
|
88
103
|
}
|
|
@@ -91,20 +106,20 @@ function SelectItem({
|
|
|
91
106
|
children,
|
|
92
107
|
...props
|
|
93
108
|
}) {
|
|
94
|
-
return /* @__PURE__ */
|
|
109
|
+
return /* @__PURE__ */ jsxDEV2(SelectPrimitive.Item, {
|
|
95
110
|
"data-slot": "select-item",
|
|
96
|
-
className:
|
|
111
|
+
className: cn2("relative flex w-full cursor-default select-none items-center gap-2 rounded-xs py-1.5 pr-8 pl-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", className),
|
|
97
112
|
...props,
|
|
98
113
|
children: [
|
|
99
|
-
/* @__PURE__ */
|
|
114
|
+
/* @__PURE__ */ jsxDEV2("span", {
|
|
100
115
|
className: "absolute right-2 flex size-3.5 items-center justify-center",
|
|
101
|
-
children: /* @__PURE__ */
|
|
102
|
-
children: /* @__PURE__ */
|
|
116
|
+
children: /* @__PURE__ */ jsxDEV2(SelectPrimitive.ItemIndicator, {
|
|
117
|
+
children: /* @__PURE__ */ jsxDEV2(CheckIcon, {
|
|
103
118
|
className: "size-4"
|
|
104
119
|
}, undefined, false, undefined, this)
|
|
105
120
|
}, undefined, false, undefined, this)
|
|
106
121
|
}, undefined, false, undefined, this),
|
|
107
|
-
/* @__PURE__ */
|
|
122
|
+
/* @__PURE__ */ jsxDEV2(SelectPrimitive.ItemText, {
|
|
108
123
|
children
|
|
109
124
|
}, undefined, false, undefined, this)
|
|
110
125
|
]
|
|
@@ -114,9 +129,9 @@ function SelectSeparator({
|
|
|
114
129
|
className,
|
|
115
130
|
...props
|
|
116
131
|
}) {
|
|
117
|
-
return /* @__PURE__ */
|
|
132
|
+
return /* @__PURE__ */ jsxDEV2(SelectPrimitive.Separator, {
|
|
118
133
|
"data-slot": "select-separator",
|
|
119
|
-
className:
|
|
134
|
+
className: cn2("pointer-events-none -mx-1 my-1 h-px bg-border", className),
|
|
120
135
|
...props
|
|
121
136
|
}, undefined, false, undefined, this);
|
|
122
137
|
}
|
|
@@ -124,11 +139,11 @@ function SelectScrollUpButton({
|
|
|
124
139
|
className,
|
|
125
140
|
...props
|
|
126
141
|
}) {
|
|
127
|
-
return /* @__PURE__ */
|
|
142
|
+
return /* @__PURE__ */ jsxDEV2(SelectPrimitive.ScrollUpButton, {
|
|
128
143
|
"data-slot": "select-scroll-up-button",
|
|
129
|
-
className:
|
|
144
|
+
className: cn2("flex cursor-default items-center justify-center py-1", className),
|
|
130
145
|
...props,
|
|
131
|
-
children: /* @__PURE__ */
|
|
146
|
+
children: /* @__PURE__ */ jsxDEV2(ChevronUpIcon, {
|
|
132
147
|
className: "size-4"
|
|
133
148
|
}, undefined, false, undefined, this)
|
|
134
149
|
}, undefined, false, undefined, this);
|
|
@@ -137,30 +152,15 @@ function SelectScrollDownButton({
|
|
|
137
152
|
className,
|
|
138
153
|
...props
|
|
139
154
|
}) {
|
|
140
|
-
return /* @__PURE__ */
|
|
155
|
+
return /* @__PURE__ */ jsxDEV2(SelectPrimitive.ScrollDownButton, {
|
|
141
156
|
"data-slot": "select-scroll-down-button",
|
|
142
|
-
className:
|
|
157
|
+
className: cn2("flex cursor-default items-center justify-center py-1", className),
|
|
143
158
|
...props,
|
|
144
|
-
children: /* @__PURE__ */
|
|
159
|
+
children: /* @__PURE__ */ jsxDEV2(ChevronDownIcon, {
|
|
145
160
|
className: "size-4"
|
|
146
161
|
}, undefined, false, undefined, this)
|
|
147
162
|
}, undefined, false, undefined, this);
|
|
148
163
|
}
|
|
149
|
-
// ui/label.tsx
|
|
150
|
-
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
151
|
-
import { cn as cn2 } from "@contractspec/lib.ui-kit-core/utils";
|
|
152
|
-
import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
|
|
153
|
-
"use client";
|
|
154
|
-
function Label2({
|
|
155
|
-
className,
|
|
156
|
-
...props
|
|
157
|
-
}) {
|
|
158
|
-
return /* @__PURE__ */ jsxDEV2(LabelPrimitive.Root, {
|
|
159
|
-
"data-slot": "label",
|
|
160
|
-
className: cn2("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", className),
|
|
161
|
-
...props
|
|
162
|
-
}, undefined, false, undefined, this);
|
|
163
|
-
}
|
|
164
164
|
// ui/atoms/FilterSelect/FilterSelect.tsx
|
|
165
165
|
import { jsxDEV as jsxDEV3 } from "react/jsx-dev-runtime";
|
|
166
166
|
var FilterSelect = ({
|
|
@@ -176,8 +176,8 @@ var FilterSelect = ({
|
|
|
176
176
|
return /* @__PURE__ */ jsxDEV3("div", {
|
|
177
177
|
className: `space-y-2 ${className}`,
|
|
178
178
|
children: [
|
|
179
|
-
label && /* @__PURE__ */ jsxDEV3(
|
|
180
|
-
className: "
|
|
179
|
+
label && /* @__PURE__ */ jsxDEV3(Label, {
|
|
180
|
+
className: "font-medium text-base text-foreground",
|
|
181
181
|
children: label
|
|
182
182
|
}, undefined, false, undefined, this),
|
|
183
183
|
/* @__PURE__ */ jsxDEV3(Select, {
|
|
@@ -199,7 +199,7 @@ var FilterSelect = ({
|
|
|
199
199
|
children: [
|
|
200
200
|
"Tous",
|
|
201
201
|
showCounts && /* @__PURE__ */ jsxDEV3("span", {
|
|
202
|
-
className: "text-muted-foreground
|
|
202
|
+
className: "ml-2 text-muted-foreground text-sm",
|
|
203
203
|
children: [
|
|
204
204
|
"(",
|
|
205
205
|
options.reduce((sum, option) => sum + (option.count || 0), 0),
|
|
@@ -217,7 +217,7 @@ var FilterSelect = ({
|
|
|
217
217
|
children: option.label
|
|
218
218
|
}, undefined, false, undefined, this),
|
|
219
219
|
showCounts && option.count !== undefined && /* @__PURE__ */ jsxDEV3("span", {
|
|
220
|
-
className: "text-muted-foreground
|
|
220
|
+
className: "ml-2 text-muted-foreground text-sm",
|
|
221
221
|
children: [
|
|
222
222
|
"(",
|
|
223
223
|
option.count,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { FilterSelect } from './FilterSelect';
|
|
2
|
-
export type {
|
|
2
|
+
export type { FilterOption, FilterSelectProps } from './types';
|
|
@@ -1,16 +1,31 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
var __require = import.meta.require;
|
|
3
3
|
|
|
4
|
+
// ui/label.tsx
|
|
5
|
+
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
6
|
+
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
7
|
+
import { jsxDEV } from "react/jsx-dev-runtime";
|
|
8
|
+
"use client";
|
|
9
|
+
function Label({
|
|
10
|
+
className,
|
|
11
|
+
...props
|
|
12
|
+
}) {
|
|
13
|
+
return /* @__PURE__ */ jsxDEV(LabelPrimitive.Root, {
|
|
14
|
+
"data-slot": "label",
|
|
15
|
+
className: cn("flex select-none items-center gap-2 font-medium text-sm leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-50 group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50", className),
|
|
16
|
+
...props
|
|
17
|
+
}, undefined, false, undefined, this);
|
|
18
|
+
}
|
|
4
19
|
// ui/select.tsx
|
|
20
|
+
import { cn as cn2 } from "@contractspec/lib.ui-kit-core/utils";
|
|
5
21
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
6
22
|
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
|
|
7
|
-
import {
|
|
8
|
-
import { jsxDEV } from "react/jsx-dev-runtime";
|
|
23
|
+
import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
|
|
9
24
|
"use client";
|
|
10
25
|
function Select({
|
|
11
26
|
...props
|
|
12
27
|
}) {
|
|
13
|
-
return /* @__PURE__ */
|
|
28
|
+
return /* @__PURE__ */ jsxDEV2(SelectPrimitive.Root, {
|
|
14
29
|
"data-slot": "select",
|
|
15
30
|
...props
|
|
16
31
|
}, undefined, false, undefined, this);
|
|
@@ -18,7 +33,7 @@ function Select({
|
|
|
18
33
|
function SelectGroup({
|
|
19
34
|
...props
|
|
20
35
|
}) {
|
|
21
|
-
return /* @__PURE__ */
|
|
36
|
+
return /* @__PURE__ */ jsxDEV2(SelectPrimitive.Group, {
|
|
22
37
|
"data-slot": "select-group",
|
|
23
38
|
...props
|
|
24
39
|
}, undefined, false, undefined, this);
|
|
@@ -26,7 +41,7 @@ function SelectGroup({
|
|
|
26
41
|
function SelectValue({
|
|
27
42
|
...props
|
|
28
43
|
}) {
|
|
29
|
-
return /* @__PURE__ */
|
|
44
|
+
return /* @__PURE__ */ jsxDEV2(SelectPrimitive.Value, {
|
|
30
45
|
"data-slot": "select-value",
|
|
31
46
|
...props
|
|
32
47
|
}, undefined, false, undefined, this);
|
|
@@ -37,16 +52,16 @@ function SelectTrigger({
|
|
|
37
52
|
children,
|
|
38
53
|
...props
|
|
39
54
|
}) {
|
|
40
|
-
return /* @__PURE__ */
|
|
55
|
+
return /* @__PURE__ */ jsxDEV2(SelectPrimitive.Trigger, {
|
|
41
56
|
"data-slot": "select-trigger",
|
|
42
57
|
"data-size": size,
|
|
43
|
-
className:
|
|
58
|
+
className: cn2("flex w-fit items-center justify-between gap-2 whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-2xs outline-hidden transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[size=default]:h-9 data-[size=sm]:h-8 data-placeholder:text-muted-foreground *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:bg-input/30 dark:aria-invalid:ring-destructive/40 dark:hover:bg-input/50 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0", className),
|
|
44
59
|
...props,
|
|
45
60
|
children: [
|
|
46
61
|
children,
|
|
47
|
-
/* @__PURE__ */
|
|
62
|
+
/* @__PURE__ */ jsxDEV2(SelectPrimitive.Icon, {
|
|
48
63
|
asChild: true,
|
|
49
|
-
children: /* @__PURE__ */
|
|
64
|
+
children: /* @__PURE__ */ jsxDEV2(ChevronDownIcon, {
|
|
50
65
|
className: "size-4 opacity-50"
|
|
51
66
|
}, undefined, false, undefined, this)
|
|
52
67
|
}, undefined, false, undefined, this)
|
|
@@ -59,19 +74,19 @@ function SelectContent({
|
|
|
59
74
|
position = "popper",
|
|
60
75
|
...props
|
|
61
76
|
}) {
|
|
62
|
-
return /* @__PURE__ */
|
|
63
|
-
children: /* @__PURE__ */
|
|
77
|
+
return /* @__PURE__ */ jsxDEV2(SelectPrimitive.Portal, {
|
|
78
|
+
children: /* @__PURE__ */ jsxDEV2(SelectPrimitive.Content, {
|
|
64
79
|
"data-slot": "select-content",
|
|
65
|
-
className:
|
|
80
|
+
className: cn2("data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-32 origin-(--radix-select-content-transform-origin) overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=closed]:animate-out data-[state=open]:animate-in", position === "popper" && "data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1", className),
|
|
66
81
|
position,
|
|
67
82
|
...props,
|
|
68
83
|
children: [
|
|
69
|
-
/* @__PURE__ */
|
|
70
|
-
/* @__PURE__ */
|
|
71
|
-
className:
|
|
84
|
+
/* @__PURE__ */ jsxDEV2(SelectScrollUpButton, {}, undefined, false, undefined, this),
|
|
85
|
+
/* @__PURE__ */ jsxDEV2(SelectPrimitive.Viewport, {
|
|
86
|
+
className: cn2("p-1", position === "popper" && "h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width) scroll-my-1"),
|
|
72
87
|
children
|
|
73
88
|
}, undefined, false, undefined, this),
|
|
74
|
-
/* @__PURE__ */
|
|
89
|
+
/* @__PURE__ */ jsxDEV2(SelectScrollDownButton, {}, undefined, false, undefined, this)
|
|
75
90
|
]
|
|
76
91
|
}, undefined, true, undefined, this)
|
|
77
92
|
}, undefined, false, undefined, this);
|
|
@@ -80,9 +95,9 @@ function SelectLabel({
|
|
|
80
95
|
className,
|
|
81
96
|
...props
|
|
82
97
|
}) {
|
|
83
|
-
return /* @__PURE__ */
|
|
98
|
+
return /* @__PURE__ */ jsxDEV2(SelectPrimitive.Label, {
|
|
84
99
|
"data-slot": "select-label",
|
|
85
|
-
className:
|
|
100
|
+
className: cn2("px-2 py-1.5 text-muted-foreground text-xs", className),
|
|
86
101
|
...props
|
|
87
102
|
}, undefined, false, undefined, this);
|
|
88
103
|
}
|
|
@@ -91,20 +106,20 @@ function SelectItem({
|
|
|
91
106
|
children,
|
|
92
107
|
...props
|
|
93
108
|
}) {
|
|
94
|
-
return /* @__PURE__ */
|
|
109
|
+
return /* @__PURE__ */ jsxDEV2(SelectPrimitive.Item, {
|
|
95
110
|
"data-slot": "select-item",
|
|
96
|
-
className:
|
|
111
|
+
className: cn2("relative flex w-full cursor-default select-none items-center gap-2 rounded-xs py-1.5 pr-8 pl-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", className),
|
|
97
112
|
...props,
|
|
98
113
|
children: [
|
|
99
|
-
/* @__PURE__ */
|
|
114
|
+
/* @__PURE__ */ jsxDEV2("span", {
|
|
100
115
|
className: "absolute right-2 flex size-3.5 items-center justify-center",
|
|
101
|
-
children: /* @__PURE__ */
|
|
102
|
-
children: /* @__PURE__ */
|
|
116
|
+
children: /* @__PURE__ */ jsxDEV2(SelectPrimitive.ItemIndicator, {
|
|
117
|
+
children: /* @__PURE__ */ jsxDEV2(CheckIcon, {
|
|
103
118
|
className: "size-4"
|
|
104
119
|
}, undefined, false, undefined, this)
|
|
105
120
|
}, undefined, false, undefined, this)
|
|
106
121
|
}, undefined, false, undefined, this),
|
|
107
|
-
/* @__PURE__ */
|
|
122
|
+
/* @__PURE__ */ jsxDEV2(SelectPrimitive.ItemText, {
|
|
108
123
|
children
|
|
109
124
|
}, undefined, false, undefined, this)
|
|
110
125
|
]
|
|
@@ -114,9 +129,9 @@ function SelectSeparator({
|
|
|
114
129
|
className,
|
|
115
130
|
...props
|
|
116
131
|
}) {
|
|
117
|
-
return /* @__PURE__ */
|
|
132
|
+
return /* @__PURE__ */ jsxDEV2(SelectPrimitive.Separator, {
|
|
118
133
|
"data-slot": "select-separator",
|
|
119
|
-
className:
|
|
134
|
+
className: cn2("pointer-events-none -mx-1 my-1 h-px bg-border", className),
|
|
120
135
|
...props
|
|
121
136
|
}, undefined, false, undefined, this);
|
|
122
137
|
}
|
|
@@ -124,11 +139,11 @@ function SelectScrollUpButton({
|
|
|
124
139
|
className,
|
|
125
140
|
...props
|
|
126
141
|
}) {
|
|
127
|
-
return /* @__PURE__ */
|
|
142
|
+
return /* @__PURE__ */ jsxDEV2(SelectPrimitive.ScrollUpButton, {
|
|
128
143
|
"data-slot": "select-scroll-up-button",
|
|
129
|
-
className:
|
|
144
|
+
className: cn2("flex cursor-default items-center justify-center py-1", className),
|
|
130
145
|
...props,
|
|
131
|
-
children: /* @__PURE__ */
|
|
146
|
+
children: /* @__PURE__ */ jsxDEV2(ChevronUpIcon, {
|
|
132
147
|
className: "size-4"
|
|
133
148
|
}, undefined, false, undefined, this)
|
|
134
149
|
}, undefined, false, undefined, this);
|
|
@@ -137,30 +152,15 @@ function SelectScrollDownButton({
|
|
|
137
152
|
className,
|
|
138
153
|
...props
|
|
139
154
|
}) {
|
|
140
|
-
return /* @__PURE__ */
|
|
155
|
+
return /* @__PURE__ */ jsxDEV2(SelectPrimitive.ScrollDownButton, {
|
|
141
156
|
"data-slot": "select-scroll-down-button",
|
|
142
|
-
className:
|
|
157
|
+
className: cn2("flex cursor-default items-center justify-center py-1", className),
|
|
143
158
|
...props,
|
|
144
|
-
children: /* @__PURE__ */
|
|
159
|
+
children: /* @__PURE__ */ jsxDEV2(ChevronDownIcon, {
|
|
145
160
|
className: "size-4"
|
|
146
161
|
}, undefined, false, undefined, this)
|
|
147
162
|
}, undefined, false, undefined, this);
|
|
148
163
|
}
|
|
149
|
-
// ui/label.tsx
|
|
150
|
-
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
151
|
-
import { cn as cn2 } from "@contractspec/lib.ui-kit-core/utils";
|
|
152
|
-
import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
|
|
153
|
-
"use client";
|
|
154
|
-
function Label2({
|
|
155
|
-
className,
|
|
156
|
-
...props
|
|
157
|
-
}) {
|
|
158
|
-
return /* @__PURE__ */ jsxDEV2(LabelPrimitive.Root, {
|
|
159
|
-
"data-slot": "label",
|
|
160
|
-
className: cn2("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", className),
|
|
161
|
-
...props
|
|
162
|
-
}, undefined, false, undefined, this);
|
|
163
|
-
}
|
|
164
164
|
// ui/atoms/FilterSelect/FilterSelect.tsx
|
|
165
165
|
import { jsxDEV as jsxDEV3 } from "react/jsx-dev-runtime";
|
|
166
166
|
var FilterSelect = ({
|
|
@@ -176,8 +176,8 @@ var FilterSelect = ({
|
|
|
176
176
|
return /* @__PURE__ */ jsxDEV3("div", {
|
|
177
177
|
className: `space-y-2 ${className}`,
|
|
178
178
|
children: [
|
|
179
|
-
label && /* @__PURE__ */ jsxDEV3(
|
|
180
|
-
className: "
|
|
179
|
+
label && /* @__PURE__ */ jsxDEV3(Label, {
|
|
180
|
+
className: "font-medium text-base text-foreground",
|
|
181
181
|
children: label
|
|
182
182
|
}, undefined, false, undefined, this),
|
|
183
183
|
/* @__PURE__ */ jsxDEV3(Select, {
|
|
@@ -199,7 +199,7 @@ var FilterSelect = ({
|
|
|
199
199
|
children: [
|
|
200
200
|
"Tous",
|
|
201
201
|
showCounts && /* @__PURE__ */ jsxDEV3("span", {
|
|
202
|
-
className: "text-muted-foreground
|
|
202
|
+
className: "ml-2 text-muted-foreground text-sm",
|
|
203
203
|
children: [
|
|
204
204
|
"(",
|
|
205
205
|
options.reduce((sum, option) => sum + (option.count || 0), 0),
|
|
@@ -217,7 +217,7 @@ var FilterSelect = ({
|
|
|
217
217
|
children: option.label
|
|
218
218
|
}, undefined, false, undefined, this),
|
|
219
219
|
showCounts && option.count !== undefined && /* @__PURE__ */ jsxDEV3("span", {
|
|
220
|
-
className: "text-muted-foreground
|
|
220
|
+
className: "ml-2 text-muted-foreground text-sm",
|
|
221
221
|
children: [
|
|
222
222
|
"(",
|
|
223
223
|
option.count,
|
|
@@ -27,7 +27,7 @@ var LoadingSpinner = ({
|
|
|
27
27
|
className: cn("flex flex-col items-center justify-center gap-2", className),
|
|
28
28
|
children: [
|
|
29
29
|
/* @__PURE__ */ jsxDEV(Loader2, {
|
|
30
|
-
className: cn("text-primary-600
|
|
30
|
+
className: cn("animate-spin text-primary-600", sizeClasses[size])
|
|
31
31
|
}, undefined, false, undefined, this),
|
|
32
32
|
text && /* @__PURE__ */ jsxDEV("p", {
|
|
33
33
|
className: "animate-pulse text-base text-gray-600",
|