@contractspec/lib.ui-kit-web 3.7.6 → 3.8.0
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 +1005 -0
- package/dist/browser/ui/data-table.parts.js +463 -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 +439 -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 +1000 -0
- package/dist/ui/data-table.parts.d.ts +14 -0
- package/dist/ui/data-table.parts.js +458 -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 +434 -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 +72 -9
|
@@ -7,9 +7,9 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
7
7
|
});
|
|
8
8
|
|
|
9
9
|
// ui/breadcrumb.tsx
|
|
10
|
+
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
10
11
|
import { Slot } from "@radix-ui/react-slot";
|
|
11
12
|
import { ChevronRight, MoreHorizontal } from "lucide-react";
|
|
12
|
-
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
13
13
|
import { jsxDEV } from "react/jsx-dev-runtime";
|
|
14
14
|
function Breadcrumb({ ...props }) {
|
|
15
15
|
return /* @__PURE__ */ jsxDEV("nav", {
|
|
@@ -24,7 +24,7 @@ function BreadcrumbList({
|
|
|
24
24
|
}) {
|
|
25
25
|
return /* @__PURE__ */ jsxDEV("ol", {
|
|
26
26
|
"data-slot": "breadcrumb-list",
|
|
27
|
-
className: cn("
|
|
27
|
+
className: cn("flex flex-wrap items-center gap-1.5 break-words text-muted-foreground text-sm sm:gap-2.5", className),
|
|
28
28
|
...props
|
|
29
29
|
}, undefined, false, undefined, this);
|
|
30
30
|
}
|
|
@@ -46,7 +46,7 @@ function BreadcrumbLink({
|
|
|
46
46
|
const Comp = asChild ? Slot : "a";
|
|
47
47
|
return /* @__PURE__ */ jsxDEV(Comp, {
|
|
48
48
|
"data-slot": "breadcrumb-link",
|
|
49
|
-
className: cn("hover:text-foreground
|
|
49
|
+
className: cn("transition-colors hover:text-foreground", className),
|
|
50
50
|
...props
|
|
51
51
|
}, undefined, false, undefined, this);
|
|
52
52
|
}
|
|
@@ -59,7 +59,7 @@ function BreadcrumbPage({
|
|
|
59
59
|
role: "link",
|
|
60
60
|
"aria-disabled": "true",
|
|
61
61
|
"aria-current": "page",
|
|
62
|
-
className: cn("text-foreground
|
|
62
|
+
className: cn("font-normal text-foreground", className),
|
|
63
63
|
...props
|
|
64
64
|
}, undefined, false, undefined, this);
|
|
65
65
|
}
|
|
@@ -7,23 +7,23 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
7
7
|
});
|
|
8
8
|
|
|
9
9
|
// ui/button.tsx
|
|
10
|
+
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
10
11
|
import { Slot } from "@radix-ui/react-slot";
|
|
11
12
|
import { cva } from "class-variance-authority";
|
|
12
|
-
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
13
13
|
import { jsxDEV } from "react/jsx-dev-runtime";
|
|
14
|
-
var buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm
|
|
14
|
+
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", {
|
|
15
15
|
variants: {
|
|
16
16
|
variant: {
|
|
17
17
|
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
18
|
-
destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40
|
|
19
|
-
outline: "border bg-background shadow-2xs hover:bg-accent hover:text-accent-foreground dark:
|
|
18
|
+
destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",
|
|
19
|
+
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",
|
|
20
20
|
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
21
21
|
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
22
22
|
link: "text-primary underline-offset-4 hover:underline"
|
|
23
23
|
},
|
|
24
24
|
size: {
|
|
25
25
|
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
26
|
-
sm: "h-8
|
|
26
|
+
sm: "h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",
|
|
27
27
|
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
|
28
28
|
icon: "size-9"
|
|
29
29
|
}
|
|
@@ -7,23 +7,23 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
7
7
|
});
|
|
8
8
|
|
|
9
9
|
// ui/button.tsx
|
|
10
|
+
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
10
11
|
import { Slot } from "@radix-ui/react-slot";
|
|
11
12
|
import { cva } from "class-variance-authority";
|
|
12
|
-
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
13
13
|
import { jsxDEV } from "react/jsx-dev-runtime";
|
|
14
|
-
var buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm
|
|
14
|
+
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", {
|
|
15
15
|
variants: {
|
|
16
16
|
variant: {
|
|
17
17
|
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
18
|
-
destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40
|
|
19
|
-
outline: "border bg-background shadow-2xs hover:bg-accent hover:text-accent-foreground dark:
|
|
18
|
+
destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",
|
|
19
|
+
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",
|
|
20
20
|
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
21
21
|
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
22
22
|
link: "text-primary underline-offset-4 hover:underline"
|
|
23
23
|
},
|
|
24
24
|
size: {
|
|
25
25
|
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
26
|
-
sm: "h-8
|
|
26
|
+
sm: "h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",
|
|
27
27
|
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
|
28
28
|
icon: "size-9"
|
|
29
29
|
}
|
|
@@ -56,14 +56,14 @@ function Button({
|
|
|
56
56
|
}, undefined, false, undefined, this);
|
|
57
57
|
}
|
|
58
58
|
// ui/calendar.tsx
|
|
59
|
-
import
|
|
59
|
+
import { cn as cn2 } from "@contractspec/lib.ui-kit-core/utils";
|
|
60
60
|
import {
|
|
61
61
|
ChevronDownIcon,
|
|
62
62
|
ChevronLeftIcon,
|
|
63
63
|
ChevronRightIcon
|
|
64
64
|
} from "lucide-react";
|
|
65
|
+
import * as React from "react";
|
|
65
66
|
import { DayPicker, getDefaultClassNames } from "react-day-picker";
|
|
66
|
-
import { cn as cn2 } from "@contractspec/lib.ui-kit-core/utils";
|
|
67
67
|
import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
|
|
68
68
|
"use client";
|
|
69
69
|
function Calendar({
|
|
@@ -79,7 +79,7 @@ function Calendar({
|
|
|
79
79
|
const defaultClassNames = getDefaultClassNames();
|
|
80
80
|
return /* @__PURE__ */ jsxDEV2(DayPicker, {
|
|
81
81
|
showOutsideDays,
|
|
82
|
-
className: cn2("group/calendar bg-background
|
|
82
|
+
className: cn2("group/calendar bg-background in-data-[slot=card-content]:bg-transparent in-data-[slot=popover-content]:bg-transparent p-3 [--cell-size:--spacing(8)]", String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`, String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`, className),
|
|
83
83
|
captionLayout,
|
|
84
84
|
formatters: {
|
|
85
85
|
formatMonthDropdown: (date) => date.toLocaleString("default", { month: "short" }),
|
|
@@ -90,24 +90,24 @@ function Calendar({
|
|
|
90
90
|
months: cn2("relative flex flex-col gap-4 md:flex-row", defaultClassNames.months),
|
|
91
91
|
month: cn2("flex w-full flex-col gap-4", defaultClassNames.month),
|
|
92
92
|
nav: cn2("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1", defaultClassNames.nav),
|
|
93
|
-
button_previous: cn2(buttonVariants({ variant: buttonVariant }), "size-(--cell-size) p-0
|
|
94
|
-
button_next: cn2(buttonVariants({ variant: buttonVariant }), "size-(--cell-size) p-0
|
|
93
|
+
button_previous: cn2(buttonVariants({ variant: buttonVariant }), "size-(--cell-size) select-none p-0 aria-disabled:opacity-50", defaultClassNames.button_previous),
|
|
94
|
+
button_next: cn2(buttonVariants({ variant: buttonVariant }), "size-(--cell-size) select-none p-0 aria-disabled:opacity-50", defaultClassNames.button_next),
|
|
95
95
|
month_caption: cn2("flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)", defaultClassNames.month_caption),
|
|
96
|
-
dropdowns: cn2("flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm
|
|
97
|
-
dropdown_root: cn2("has-focus:border-ring has-focus:ring-
|
|
98
|
-
dropdown: cn2("
|
|
99
|
-
caption_label: cn2("font-medium
|
|
96
|
+
dropdowns: cn2("flex h-(--cell-size) w-full items-center justify-center gap-1.5 font-medium text-sm", defaultClassNames.dropdowns),
|
|
97
|
+
dropdown_root: cn2("relative rounded-md border border-input shadow-2xs has-focus:border-ring has-focus:ring-[3px] has-focus:ring-ring/50", defaultClassNames.dropdown_root),
|
|
98
|
+
dropdown: cn2("absolute inset-0 bg-popover opacity-0", defaultClassNames.dropdown),
|
|
99
|
+
caption_label: cn2("select-none font-medium", captionLayout === "label" ? "text-sm" : "flex h-8 items-center gap-1 rounded-md pr-1 pl-2 text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground", defaultClassNames.caption_label),
|
|
100
100
|
table: "w-full border-collapse",
|
|
101
101
|
weekdays: cn2("flex", defaultClassNames.weekdays),
|
|
102
|
-
weekday: cn2("
|
|
102
|
+
weekday: cn2("flex-1 select-none rounded-md font-normal text-[0.8rem] text-muted-foreground", defaultClassNames.weekday),
|
|
103
103
|
week: cn2("mt-2 flex w-full", defaultClassNames.week),
|
|
104
104
|
week_number_header: cn2("w-(--cell-size) select-none", defaultClassNames.week_number_header),
|
|
105
|
-
week_number: cn2("
|
|
106
|
-
day: cn2("group/day relative aspect-square h-full w-full p-0 text-center
|
|
107
|
-
range_start: cn2("
|
|
105
|
+
week_number: cn2("select-none text-[0.8rem] text-muted-foreground", defaultClassNames.week_number),
|
|
106
|
+
day: cn2("group/day relative aspect-square h-full w-full select-none p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md", defaultClassNames.day),
|
|
107
|
+
range_start: cn2("rounded-l-md bg-accent", defaultClassNames.range_start),
|
|
108
108
|
range_middle: cn2("rounded-none", defaultClassNames.range_middle),
|
|
109
|
-
range_end: cn2("
|
|
110
|
-
today: cn2("bg-accent text-accent-foreground
|
|
109
|
+
range_end: cn2("rounded-r-md bg-accent", defaultClassNames.range_end),
|
|
110
|
+
today: cn2("rounded-md bg-accent text-accent-foreground data-[selected=true]:rounded-none", defaultClassNames.today),
|
|
111
111
|
outside: cn2("text-muted-foreground aria-selected:text-muted-foreground", defaultClassNames.outside),
|
|
112
112
|
disabled: cn2("text-muted-foreground opacity-50", defaultClassNames.disabled),
|
|
113
113
|
hidden: cn2("invisible", defaultClassNames.hidden),
|
|
@@ -176,7 +176,7 @@ function CalendarDayButton({
|
|
|
176
176
|
"data-range-start": modifiers.range_start,
|
|
177
177
|
"data-range-end": modifiers.range_end,
|
|
178
178
|
"data-range-middle": modifiers.range_middle,
|
|
179
|
-
className: cn2("data-[range-end=true]:
|
|
179
|
+
className: cn2("flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 font-normal leading-none data-[range-end=true]:rounded-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-start=true]:rounded-l-md data-[range-end=true]:bg-primary data-[range-middle=true]:bg-accent data-[range-start=true]:bg-primary data-[selected-single=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:text-accent-foreground data-[range-start=true]:text-primary-foreground data-[selected-single=true]:text-primary-foreground group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 dark:hover:text-accent-foreground [&>span]:text-xs [&>span]:opacity-70", defaultClassNames.day, className),
|
|
180
180
|
...props
|
|
181
181
|
}, undefined, false, undefined, this);
|
|
182
182
|
}
|
package/dist/browser/ui/card.js
CHANGED
|
@@ -12,7 +12,7 @@ import { jsxDEV } from "react/jsx-dev-runtime";
|
|
|
12
12
|
function Card({ className, ...props }) {
|
|
13
13
|
return /* @__PURE__ */ jsxDEV("div", {
|
|
14
14
|
"data-slot": "card",
|
|
15
|
-
className: cn("
|
|
15
|
+
className: cn("flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-2xs", className),
|
|
16
16
|
...props
|
|
17
17
|
}, undefined, false, undefined, this);
|
|
18
18
|
}
|
|
@@ -32,7 +32,7 @@ function CardTitle({
|
|
|
32
32
|
}) {
|
|
33
33
|
return /* @__PURE__ */ jsxDEV("div", {
|
|
34
34
|
"data-slot": "card-title",
|
|
35
|
-
className: cn("leading-none
|
|
35
|
+
className: cn("font-semibold leading-none", className),
|
|
36
36
|
...props
|
|
37
37
|
}, undefined, false, undefined, this);
|
|
38
38
|
}
|
|
@@ -7,23 +7,23 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
7
7
|
});
|
|
8
8
|
|
|
9
9
|
// ui/button.tsx
|
|
10
|
+
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
10
11
|
import { Slot } from "@radix-ui/react-slot";
|
|
11
12
|
import { cva } from "class-variance-authority";
|
|
12
|
-
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
13
13
|
import { jsxDEV } from "react/jsx-dev-runtime";
|
|
14
|
-
var buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm
|
|
14
|
+
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", {
|
|
15
15
|
variants: {
|
|
16
16
|
variant: {
|
|
17
17
|
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
18
|
-
destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40
|
|
19
|
-
outline: "border bg-background shadow-2xs hover:bg-accent hover:text-accent-foreground dark:
|
|
18
|
+
destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",
|
|
19
|
+
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",
|
|
20
20
|
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
21
21
|
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
22
22
|
link: "text-primary underline-offset-4 hover:underline"
|
|
23
23
|
},
|
|
24
24
|
size: {
|
|
25
25
|
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
26
|
-
sm: "h-8
|
|
26
|
+
sm: "h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",
|
|
27
27
|
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
|
28
28
|
icon: "size-9"
|
|
29
29
|
}
|
|
@@ -63,9 +63,9 @@ function cn2(...inputs) {
|
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
// ui/carousel.tsx
|
|
66
|
-
import * as React from "react";
|
|
67
66
|
import useEmblaCarousel from "embla-carousel-react";
|
|
68
67
|
import { ArrowLeft, ArrowRight } from "lucide-react";
|
|
68
|
+
import * as React from "react";
|
|
69
69
|
import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
|
|
70
70
|
"use client";
|
|
71
71
|
var CarouselContext = React.createContext(null);
|
|
@@ -7,9 +7,9 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
7
7
|
});
|
|
8
8
|
|
|
9
9
|
// ui/checkbox.tsx
|
|
10
|
+
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
10
11
|
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
11
12
|
import { CheckIcon } from "lucide-react";
|
|
12
|
-
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
13
13
|
import { jsxDEV } from "react/jsx-dev-runtime";
|
|
14
14
|
"use client";
|
|
15
15
|
function Checkbox({
|
|
@@ -18,7 +18,7 @@ function Checkbox({
|
|
|
18
18
|
}) {
|
|
19
19
|
return /* @__PURE__ */ jsxDEV(CheckboxPrimitive.Root, {
|
|
20
20
|
"data-slot": "checkbox",
|
|
21
|
-
className: cn("peer
|
|
21
|
+
className: cn("peer size-4 shrink-0 rounded-[4px] border border-input shadow-xs outline-none transition-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-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:bg-input/30 dark:data-[state=checked]:bg-primary dark:aria-invalid:ring-destructive/40", className),
|
|
22
22
|
...props,
|
|
23
23
|
children: /* @__PURE__ */ jsxDEV(CheckboxPrimitive.Indicator, {
|
|
24
24
|
"data-slot": "checkbox-indicator",
|
|
@@ -7,9 +7,9 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
7
7
|
});
|
|
8
8
|
|
|
9
9
|
// ui/dialog.tsx
|
|
10
|
+
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
10
11
|
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
11
12
|
import { XIcon } from "lucide-react";
|
|
12
|
-
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
13
13
|
import { jsxDEV } from "react/jsx-dev-runtime";
|
|
14
14
|
"use client";
|
|
15
15
|
function Dialog({
|
|
@@ -50,7 +50,7 @@ function DialogOverlay({
|
|
|
50
50
|
}) {
|
|
51
51
|
return /* @__PURE__ */ jsxDEV(DialogPrimitive.Overlay, {
|
|
52
52
|
"data-slot": "dialog-overlay",
|
|
53
|
-
className: cn("data-[state=
|
|
53
|
+
className: cn("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),
|
|
54
54
|
...props
|
|
55
55
|
}, undefined, false, undefined, this);
|
|
56
56
|
}
|
|
@@ -66,13 +66,13 @@ function DialogContent({
|
|
|
66
66
|
/* @__PURE__ */ jsxDEV(DialogOverlay, {}, undefined, false, undefined, this),
|
|
67
67
|
/* @__PURE__ */ jsxDEV(DialogPrimitive.Content, {
|
|
68
68
|
"data-slot": "dialog-content",
|
|
69
|
-
className: cn("
|
|
69
|
+
className: cn("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),
|
|
70
70
|
...props,
|
|
71
71
|
children: [
|
|
72
72
|
children,
|
|
73
73
|
showCloseButton && /* @__PURE__ */ jsxDEV(DialogPrimitive.Close, {
|
|
74
74
|
"data-slot": "dialog-close",
|
|
75
|
-
className: "
|
|
75
|
+
className: "absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
76
76
|
children: [
|
|
77
77
|
/* @__PURE__ */ jsxDEV(XIcon, {}, undefined, false, undefined, this),
|
|
78
78
|
/* @__PURE__ */ jsxDEV("span", {
|
|
@@ -112,7 +112,7 @@ function DialogTitle({
|
|
|
112
112
|
}) {
|
|
113
113
|
return /* @__PURE__ */ jsxDEV(DialogPrimitive.Title, {
|
|
114
114
|
"data-slot": "dialog-title",
|
|
115
|
-
className: cn("text-lg leading-none
|
|
115
|
+
className: cn("font-semibold text-lg leading-none", className),
|
|
116
116
|
...props
|
|
117
117
|
}, undefined, false, undefined, this);
|
|
118
118
|
}
|
|
@@ -127,9 +127,9 @@ function DialogDescription({
|
|
|
127
127
|
}, undefined, false, undefined, this);
|
|
128
128
|
}
|
|
129
129
|
// ui/command.tsx
|
|
130
|
+
import { cn as cn2 } from "@contractspec/lib.ui-kit-core/utils";
|
|
130
131
|
import { Command as CommandPrimitive } from "cmdk";
|
|
131
132
|
import { SearchIcon } from "lucide-react";
|
|
132
|
-
import { cn as cn2 } from "@contractspec/lib.ui-kit-core/utils";
|
|
133
133
|
import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
|
|
134
134
|
"use client";
|
|
135
135
|
function Command({
|
|
@@ -138,7 +138,7 @@ function Command({
|
|
|
138
138
|
}) {
|
|
139
139
|
return /* @__PURE__ */ jsxDEV2(CommandPrimitive, {
|
|
140
140
|
"data-slot": "command",
|
|
141
|
-
className: cn2("
|
|
141
|
+
className: cn2("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground", className),
|
|
142
142
|
...props
|
|
143
143
|
}, undefined, false, undefined, this);
|
|
144
144
|
}
|
|
@@ -168,7 +168,7 @@ function CommandDialog({
|
|
|
168
168
|
className: cn2("overflow-hidden p-0", className),
|
|
169
169
|
showCloseButton,
|
|
170
170
|
children: /* @__PURE__ */ jsxDEV2(Command, {
|
|
171
|
-
className: "
|
|
171
|
+
className: "**:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",
|
|
172
172
|
children
|
|
173
173
|
}, undefined, false, undefined, this)
|
|
174
174
|
}, undefined, false, undefined, this)
|
|
@@ -188,7 +188,7 @@ function CommandInput({
|
|
|
188
188
|
}, undefined, false, undefined, this),
|
|
189
189
|
/* @__PURE__ */ jsxDEV2(CommandPrimitive.Input, {
|
|
190
190
|
"data-slot": "command-input",
|
|
191
|
-
className: cn2("
|
|
191
|
+
className: cn2("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50", className),
|
|
192
192
|
...props
|
|
193
193
|
}, undefined, false, undefined, this)
|
|
194
194
|
]
|
|
@@ -200,7 +200,7 @@ function CommandList({
|
|
|
200
200
|
}) {
|
|
201
201
|
return /* @__PURE__ */ jsxDEV2(CommandPrimitive.List, {
|
|
202
202
|
"data-slot": "command-list",
|
|
203
|
-
className: cn2("max-h-[300px] scroll-py-1 overflow-
|
|
203
|
+
className: cn2("max-h-[300px] scroll-py-1 overflow-y-auto overflow-x-hidden", className),
|
|
204
204
|
...props
|
|
205
205
|
}, undefined, false, undefined, this);
|
|
206
206
|
}
|
|
@@ -219,7 +219,7 @@ function CommandGroup({
|
|
|
219
219
|
}) {
|
|
220
220
|
return /* @__PURE__ */ jsxDEV2(CommandPrimitive.Group, {
|
|
221
221
|
"data-slot": "command-group",
|
|
222
|
-
className: cn2("text-foreground [&_[cmdk-group-heading]]:
|
|
222
|
+
className: cn2("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:text-xs", className),
|
|
223
223
|
...props
|
|
224
224
|
}, undefined, false, undefined, this);
|
|
225
225
|
}
|
|
@@ -229,7 +229,7 @@ function CommandSeparator({
|
|
|
229
229
|
}) {
|
|
230
230
|
return /* @__PURE__ */ jsxDEV2(CommandPrimitive.Separator, {
|
|
231
231
|
"data-slot": "command-separator",
|
|
232
|
-
className: cn2("
|
|
232
|
+
className: cn2("-mx-1 h-px bg-border", className),
|
|
233
233
|
...props
|
|
234
234
|
}, undefined, false, undefined, this);
|
|
235
235
|
}
|
|
@@ -239,7 +239,7 @@ function CommandItem({
|
|
|
239
239
|
}) {
|
|
240
240
|
return /* @__PURE__ */ jsxDEV2(CommandPrimitive.Item, {
|
|
241
241
|
"data-slot": "command-item",
|
|
242
|
-
className: cn2("
|
|
242
|
+
className: cn2("relative flex cursor-default select-none items-center gap-2 rounded-xs px-2 py-1.5 text-sm outline-hidden data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0", className),
|
|
243
243
|
...props
|
|
244
244
|
}, undefined, false, undefined, this);
|
|
245
245
|
}
|
|
@@ -249,7 +249,7 @@ function CommandShortcut({
|
|
|
249
249
|
}) {
|
|
250
250
|
return /* @__PURE__ */ jsxDEV2("span", {
|
|
251
251
|
"data-slot": "command-shortcut",
|
|
252
|
-
className: cn2("text-muted-foreground
|
|
252
|
+
className: cn2("ml-auto text-muted-foreground text-xs tracking-widest", className),
|
|
253
253
|
...props
|
|
254
254
|
}, undefined, false, undefined, this);
|
|
255
255
|
}
|
|
@@ -7,23 +7,23 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
7
7
|
});
|
|
8
8
|
|
|
9
9
|
// ui/button.tsx
|
|
10
|
+
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
10
11
|
import { Slot } from "@radix-ui/react-slot";
|
|
11
12
|
import { cva } from "class-variance-authority";
|
|
12
|
-
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
13
13
|
import { jsxDEV } from "react/jsx-dev-runtime";
|
|
14
|
-
var buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm
|
|
14
|
+
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", {
|
|
15
15
|
variants: {
|
|
16
16
|
variant: {
|
|
17
17
|
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
18
|
-
destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40
|
|
19
|
-
outline: "border bg-background shadow-2xs hover:bg-accent hover:text-accent-foreground dark:
|
|
18
|
+
destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",
|
|
19
|
+
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",
|
|
20
20
|
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
21
21
|
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
22
22
|
link: "text-primary underline-offset-4 hover:underline"
|
|
23
23
|
},
|
|
24
24
|
size: {
|
|
25
25
|
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
26
|
-
sm: "h-8
|
|
26
|
+
sm: "h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",
|
|
27
27
|
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
|
28
28
|
icon: "size-9"
|
|
29
29
|
}
|
|
@@ -56,8 +56,8 @@ function Button({
|
|
|
56
56
|
}, undefined, false, undefined, this);
|
|
57
57
|
}
|
|
58
58
|
// ui/alert-dialog.tsx
|
|
59
|
-
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
|
|
60
59
|
import { cn as cn2 } from "@contractspec/lib.ui-kit-core/utils";
|
|
60
|
+
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
|
|
61
61
|
import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
|
|
62
62
|
"use client";
|
|
63
63
|
function AlertDialog({
|
|
@@ -90,7 +90,7 @@ function AlertDialogOverlay({
|
|
|
90
90
|
}) {
|
|
91
91
|
return /* @__PURE__ */ jsxDEV2(AlertDialogPrimitive.Overlay, {
|
|
92
92
|
"data-slot": "alert-dialog-overlay",
|
|
93
|
-
className: cn2("data-[state=
|
|
93
|
+
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),
|
|
94
94
|
...props
|
|
95
95
|
}, undefined, false, undefined, this);
|
|
96
96
|
}
|
|
@@ -103,7 +103,7 @@ function AlertDialogContent({
|
|
|
103
103
|
/* @__PURE__ */ jsxDEV2(AlertDialogOverlay, {}, undefined, false, undefined, this),
|
|
104
104
|
/* @__PURE__ */ jsxDEV2(AlertDialogPrimitive.Content, {
|
|
105
105
|
"data-slot": "alert-dialog-content",
|
|
106
|
-
className: cn2("
|
|
106
|
+
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),
|
|
107
107
|
...props
|
|
108
108
|
}, undefined, false, undefined, this)
|
|
109
109
|
]
|
|
@@ -135,7 +135,7 @@ function AlertDialogTitle({
|
|
|
135
135
|
}) {
|
|
136
136
|
return /* @__PURE__ */ jsxDEV2(AlertDialogPrimitive.Title, {
|
|
137
137
|
"data-slot": "alert-dialog-title",
|
|
138
|
-
className: cn2("text-lg
|
|
138
|
+
className: cn2("font-semibold text-lg", className),
|
|
139
139
|
...props
|
|
140
140
|
}, undefined, false, undefined, this);
|
|
141
141
|
}
|
|
@@ -14,8 +14,8 @@ function cn(...inputs) {
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
// ui/context-menu.tsx
|
|
17
|
-
import { ContextMenu as ContextMenuPrimitive } from "radix-ui";
|
|
18
17
|
import { CheckIcon, ChevronRightIcon } from "lucide-react";
|
|
18
|
+
import { ContextMenu as ContextMenuPrimitive } from "radix-ui";
|
|
19
19
|
import { jsxDEV } from "react/jsx-dev-runtime";
|
|
20
20
|
"use client";
|
|
21
21
|
function ContextMenu({
|
|
@@ -75,7 +75,7 @@ function ContextMenuContent({
|
|
|
75
75
|
return /* @__PURE__ */ jsxDEV(ContextMenuPrimitive.Portal, {
|
|
76
76
|
children: /* @__PURE__ */ jsxDEV(ContextMenuPrimitive.Content, {
|
|
77
77
|
"data-slot": "context-menu-content",
|
|
78
|
-
className: cn("data-
|
|
78
|
+
className: cn("data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-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 z-50 max-h-(--radix-context-menu-content-available-height) min-w-36 origin-(--radix-context-menu-content-transform-origin) overflow-y-auto overflow-x-hidden rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-closed:animate-out data-open:animate-in", className),
|
|
79
79
|
...props
|
|
80
80
|
}, undefined, false, undefined, this)
|
|
81
81
|
}, undefined, false, undefined, this);
|
|
@@ -90,7 +90,7 @@ function ContextMenuItem({
|
|
|
90
90
|
"data-slot": "context-menu-item",
|
|
91
91
|
"data-inset": inset,
|
|
92
92
|
"data-variant": variant,
|
|
93
|
-
className: cn("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-
|
|
93
|
+
className: cn("group/context-menu-item relative flex cursor-default select-none items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-inset:pl-7 data-[variant=destructive]:text-destructive data-disabled:opacity-50 data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0 focus:*:[svg]:text-accent-foreground data-[variant=destructive]:*:[svg]:text-destructive", className),
|
|
94
94
|
...props
|
|
95
95
|
}, undefined, false, undefined, this);
|
|
96
96
|
}
|
|
@@ -103,7 +103,7 @@ function ContextMenuSubTrigger({
|
|
|
103
103
|
return /* @__PURE__ */ jsxDEV(ContextMenuPrimitive.SubTrigger, {
|
|
104
104
|
"data-slot": "context-menu-sub-trigger",
|
|
105
105
|
"data-inset": inset,
|
|
106
|
-
className: cn("
|
|
106
|
+
className: cn("flex cursor-default select-none items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-open:bg-accent data-inset:pl-7 data-open:text-accent-foreground [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0", className),
|
|
107
107
|
...props,
|
|
108
108
|
children: [
|
|
109
109
|
children,
|
|
@@ -119,7 +119,7 @@ function ContextMenuSubContent({
|
|
|
119
119
|
}) {
|
|
120
120
|
return /* @__PURE__ */ jsxDEV(ContextMenuPrimitive.SubContent, {
|
|
121
121
|
"data-slot": "context-menu-sub-content",
|
|
122
|
-
className: cn("data-
|
|
122
|
+
className: cn("data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-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 z-50 min-w-32 origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-lg border bg-popover p-1 text-popover-foreground shadow-lg duration-100 data-closed:animate-out data-open:animate-in", className),
|
|
123
123
|
...props
|
|
124
124
|
}, undefined, false, undefined, this);
|
|
125
125
|
}
|
|
@@ -133,7 +133,7 @@ function ContextMenuCheckboxItem({
|
|
|
133
133
|
return /* @__PURE__ */ jsxDEV(ContextMenuPrimitive.CheckboxItem, {
|
|
134
134
|
"data-slot": "context-menu-checkbox-item",
|
|
135
135
|
"data-inset": inset,
|
|
136
|
-
className: cn("
|
|
136
|
+
className: cn("relative flex cursor-default select-none items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-inset:pl-7 data-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0", className),
|
|
137
137
|
checked,
|
|
138
138
|
...props,
|
|
139
139
|
children: [
|
|
@@ -156,7 +156,7 @@ function ContextMenuRadioItem({
|
|
|
156
156
|
return /* @__PURE__ */ jsxDEV(ContextMenuPrimitive.RadioItem, {
|
|
157
157
|
"data-slot": "context-menu-radio-item",
|
|
158
158
|
"data-inset": inset,
|
|
159
|
-
className: cn("
|
|
159
|
+
className: cn("relative flex cursor-default select-none items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-inset:pl-7 data-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0", className),
|
|
160
160
|
...props,
|
|
161
161
|
children: [
|
|
162
162
|
/* @__PURE__ */ jsxDEV("span", {
|
|
@@ -177,7 +177,7 @@ function ContextMenuLabel({
|
|
|
177
177
|
return /* @__PURE__ */ jsxDEV(ContextMenuPrimitive.Label, {
|
|
178
178
|
"data-slot": "context-menu-label",
|
|
179
179
|
"data-inset": inset,
|
|
180
|
-
className: cn("
|
|
180
|
+
className: cn("px-1.5 py-1 font-medium text-muted-foreground text-xs data-inset:pl-7", className),
|
|
181
181
|
...props
|
|
182
182
|
}, undefined, false, undefined, this);
|
|
183
183
|
}
|
|
@@ -187,7 +187,7 @@ function ContextMenuSeparator({
|
|
|
187
187
|
}) {
|
|
188
188
|
return /* @__PURE__ */ jsxDEV(ContextMenuPrimitive.Separator, {
|
|
189
189
|
"data-slot": "context-menu-separator",
|
|
190
|
-
className: cn("
|
|
190
|
+
className: cn("-mx-1 my-1 h-px bg-border", className),
|
|
191
191
|
...props
|
|
192
192
|
}, undefined, false, undefined, this);
|
|
193
193
|
}
|
|
@@ -197,7 +197,7 @@ function ContextMenuShortcut({
|
|
|
197
197
|
}) {
|
|
198
198
|
return /* @__PURE__ */ jsxDEV("span", {
|
|
199
199
|
"data-slot": "context-menu-shortcut",
|
|
200
|
-
className: cn("text-muted-foreground group-focus/context-menu-item:text-accent-foreground
|
|
200
|
+
className: cn("ml-auto text-muted-foreground text-xs tracking-widest group-focus/context-menu-item:text-accent-foreground", className),
|
|
201
201
|
...props
|
|
202
202
|
}, undefined, false, undefined, this);
|
|
203
203
|
}
|
package/dist/browser/ui/cta.js
CHANGED
|
@@ -7,23 +7,23 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
7
7
|
});
|
|
8
8
|
|
|
9
9
|
// ui/button.tsx
|
|
10
|
+
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
10
11
|
import { Slot } from "@radix-ui/react-slot";
|
|
11
12
|
import { cva } from "class-variance-authority";
|
|
12
|
-
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
13
13
|
import { jsxDEV } from "react/jsx-dev-runtime";
|
|
14
|
-
var buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm
|
|
14
|
+
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", {
|
|
15
15
|
variants: {
|
|
16
16
|
variant: {
|
|
17
17
|
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
18
|
-
destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40
|
|
19
|
-
outline: "border bg-background shadow-2xs hover:bg-accent hover:text-accent-foreground dark:
|
|
18
|
+
destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",
|
|
19
|
+
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",
|
|
20
20
|
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
21
21
|
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
22
22
|
link: "text-primary underline-offset-4 hover:underline"
|
|
23
23
|
},
|
|
24
24
|
size: {
|
|
25
25
|
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
26
|
-
sm: "h-8
|
|
26
|
+
sm: "h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",
|
|
27
27
|
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
|
28
28
|
icon: "size-9"
|
|
29
29
|
}
|