@contractspec/lib.ui-kit-web 3.7.5 → 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 +75 -12
package/dist/ui/card.js
CHANGED
|
@@ -7,7 +7,7 @@ import { jsxDEV } from "react/jsx-dev-runtime";
|
|
|
7
7
|
function Card({ className, ...props }) {
|
|
8
8
|
return /* @__PURE__ */ jsxDEV("div", {
|
|
9
9
|
"data-slot": "card",
|
|
10
|
-
className: cn("
|
|
10
|
+
className: cn("flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-2xs", className),
|
|
11
11
|
...props
|
|
12
12
|
}, undefined, false, undefined, this);
|
|
13
13
|
}
|
|
@@ -27,7 +27,7 @@ function CardTitle({
|
|
|
27
27
|
}) {
|
|
28
28
|
return /* @__PURE__ */ jsxDEV("div", {
|
|
29
29
|
"data-slot": "card-title",
|
|
30
|
-
className: cn("leading-none
|
|
30
|
+
className: cn("font-semibold leading-none", className),
|
|
31
31
|
...props
|
|
32
32
|
}, undefined, false, undefined, this);
|
|
33
33
|
}
|
package/dist/ui/carousel.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import useEmblaCarousel, { type UseEmblaCarouselType } from 'embla-carousel-react';
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
import { Button } from './button';
|
|
4
4
|
type CarouselApi = UseEmblaCarouselType[1];
|
|
5
5
|
type UseCarouselParameters = Parameters<typeof useEmblaCarousel>;
|
|
@@ -16,4 +16,4 @@ declare function CarouselContent({ className, ...props }: React.ComponentPropsWi
|
|
|
16
16
|
declare function CarouselItem({ className, ...props }: React.ComponentPropsWithoutRef<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
17
17
|
declare function CarouselPrevious({ className, variant, size, ...props }: React.ComponentProps<typeof Button>): import("react/jsx-runtime").JSX.Element;
|
|
18
18
|
declare function CarouselNext({ className, variant, size, ...props }: React.ComponentProps<typeof Button>): import("react/jsx-runtime").JSX.Element;
|
|
19
|
-
export { type CarouselApi,
|
|
19
|
+
export { Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, };
|
package/dist/ui/carousel.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
|
}
|
|
@@ -58,9 +58,9 @@ function cn2(...inputs) {
|
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
// ui/carousel.tsx
|
|
61
|
-
import * as React from "react";
|
|
62
61
|
import useEmblaCarousel from "embla-carousel-react";
|
|
63
62
|
import { ArrowLeft, ArrowRight } from "lucide-react";
|
|
63
|
+
import * as React from "react";
|
|
64
64
|
import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
|
|
65
65
|
"use client";
|
|
66
66
|
var CarouselContext = React.createContext(null);
|
package/dist/ui/checkbox.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
declare function Checkbox({ className, ...props }: React.ComponentProps<typeof CheckboxPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export { Checkbox };
|
package/dist/ui/checkbox.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
var __require = import.meta.require;
|
|
3
3
|
|
|
4
4
|
// ui/checkbox.tsx
|
|
5
|
+
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
5
6
|
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
6
7
|
import { CheckIcon } 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 Checkbox({
|
|
@@ -13,7 +13,7 @@ function Checkbox({
|
|
|
13
13
|
}) {
|
|
14
14
|
return /* @__PURE__ */ jsxDEV(CheckboxPrimitive.Root, {
|
|
15
15
|
"data-slot": "checkbox",
|
|
16
|
-
className: cn("peer
|
|
16
|
+
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),
|
|
17
17
|
...props,
|
|
18
18
|
children: /* @__PURE__ */ jsxDEV(CheckboxPrimitive.Indicator, {
|
|
19
19
|
"data-slot": "checkbox-indicator",
|
package/dist/ui/collapsible.d.ts
CHANGED
|
@@ -2,4 +2,4 @@ import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
|
|
|
2
2
|
declare function Collapsible({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
declare function CollapsibleTrigger({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
declare function CollapsibleContent({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
export { Collapsible,
|
|
5
|
+
export { Collapsible, CollapsibleContent, CollapsibleTrigger };
|
package/dist/ui/command.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { Command as CommandPrimitive } from 'cmdk';
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
import { Dialog } from './dialog';
|
|
4
4
|
declare function Command({ className, ...props }: React.ComponentProps<typeof CommandPrimitive>): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
declare function CommandDialog({ title, description, children, className, showCloseButton, ...props }: React.ComponentProps<typeof Dialog> & {
|
|
@@ -15,4 +15,4 @@ declare function CommandGroup({ className, ...props }: React.ComponentProps<type
|
|
|
15
15
|
declare function CommandSeparator({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Separator>): import("react/jsx-runtime").JSX.Element;
|
|
16
16
|
declare function CommandItem({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Item>): import("react/jsx-runtime").JSX.Element;
|
|
17
17
|
declare function CommandShortcut({ className, ...props }: React.ComponentPropsWithoutRef<'span'>): import("react/jsx-runtime").JSX.Element;
|
|
18
|
-
export { Command, CommandDialog,
|
|
18
|
+
export { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, };
|
package/dist/ui/command.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
var __require = import.meta.require;
|
|
3
3
|
|
|
4
4
|
// ui/dialog.tsx
|
|
5
|
+
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
5
6
|
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
6
7
|
import { XIcon } 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 Dialog({
|
|
@@ -45,7 +45,7 @@ function DialogOverlay({
|
|
|
45
45
|
}) {
|
|
46
46
|
return /* @__PURE__ */ jsxDEV(DialogPrimitive.Overlay, {
|
|
47
47
|
"data-slot": "dialog-overlay",
|
|
48
|
-
className: cn("data-[state=
|
|
48
|
+
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),
|
|
49
49
|
...props
|
|
50
50
|
}, undefined, false, undefined, this);
|
|
51
51
|
}
|
|
@@ -61,13 +61,13 @@ function DialogContent({
|
|
|
61
61
|
/* @__PURE__ */ jsxDEV(DialogOverlay, {}, undefined, false, undefined, this),
|
|
62
62
|
/* @__PURE__ */ jsxDEV(DialogPrimitive.Content, {
|
|
63
63
|
"data-slot": "dialog-content",
|
|
64
|
-
className: cn("
|
|
64
|
+
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),
|
|
65
65
|
...props,
|
|
66
66
|
children: [
|
|
67
67
|
children,
|
|
68
68
|
showCloseButton && /* @__PURE__ */ jsxDEV(DialogPrimitive.Close, {
|
|
69
69
|
"data-slot": "dialog-close",
|
|
70
|
-
className: "
|
|
70
|
+
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",
|
|
71
71
|
children: [
|
|
72
72
|
/* @__PURE__ */ jsxDEV(XIcon, {}, undefined, false, undefined, this),
|
|
73
73
|
/* @__PURE__ */ jsxDEV("span", {
|
|
@@ -107,7 +107,7 @@ function DialogTitle({
|
|
|
107
107
|
}) {
|
|
108
108
|
return /* @__PURE__ */ jsxDEV(DialogPrimitive.Title, {
|
|
109
109
|
"data-slot": "dialog-title",
|
|
110
|
-
className: cn("text-lg leading-none
|
|
110
|
+
className: cn("font-semibold text-lg leading-none", className),
|
|
111
111
|
...props
|
|
112
112
|
}, undefined, false, undefined, this);
|
|
113
113
|
}
|
|
@@ -122,9 +122,9 @@ function DialogDescription({
|
|
|
122
122
|
}, undefined, false, undefined, this);
|
|
123
123
|
}
|
|
124
124
|
// ui/command.tsx
|
|
125
|
+
import { cn as cn2 } from "@contractspec/lib.ui-kit-core/utils";
|
|
125
126
|
import { Command as CommandPrimitive } from "cmdk";
|
|
126
127
|
import { SearchIcon } from "lucide-react";
|
|
127
|
-
import { cn as cn2 } from "@contractspec/lib.ui-kit-core/utils";
|
|
128
128
|
import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
|
|
129
129
|
"use client";
|
|
130
130
|
function Command({
|
|
@@ -133,7 +133,7 @@ function Command({
|
|
|
133
133
|
}) {
|
|
134
134
|
return /* @__PURE__ */ jsxDEV2(CommandPrimitive, {
|
|
135
135
|
"data-slot": "command",
|
|
136
|
-
className: cn2("
|
|
136
|
+
className: cn2("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground", className),
|
|
137
137
|
...props
|
|
138
138
|
}, undefined, false, undefined, this);
|
|
139
139
|
}
|
|
@@ -163,7 +163,7 @@ function CommandDialog({
|
|
|
163
163
|
className: cn2("overflow-hidden p-0", className),
|
|
164
164
|
showCloseButton,
|
|
165
165
|
children: /* @__PURE__ */ jsxDEV2(Command, {
|
|
166
|
-
className: "
|
|
166
|
+
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",
|
|
167
167
|
children
|
|
168
168
|
}, undefined, false, undefined, this)
|
|
169
169
|
}, undefined, false, undefined, this)
|
|
@@ -183,7 +183,7 @@ function CommandInput({
|
|
|
183
183
|
}, undefined, false, undefined, this),
|
|
184
184
|
/* @__PURE__ */ jsxDEV2(CommandPrimitive.Input, {
|
|
185
185
|
"data-slot": "command-input",
|
|
186
|
-
className: cn2("
|
|
186
|
+
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),
|
|
187
187
|
...props
|
|
188
188
|
}, undefined, false, undefined, this)
|
|
189
189
|
]
|
|
@@ -195,7 +195,7 @@ function CommandList({
|
|
|
195
195
|
}) {
|
|
196
196
|
return /* @__PURE__ */ jsxDEV2(CommandPrimitive.List, {
|
|
197
197
|
"data-slot": "command-list",
|
|
198
|
-
className: cn2("max-h-[300px] scroll-py-1 overflow-
|
|
198
|
+
className: cn2("max-h-[300px] scroll-py-1 overflow-y-auto overflow-x-hidden", className),
|
|
199
199
|
...props
|
|
200
200
|
}, undefined, false, undefined, this);
|
|
201
201
|
}
|
|
@@ -214,7 +214,7 @@ function CommandGroup({
|
|
|
214
214
|
}) {
|
|
215
215
|
return /* @__PURE__ */ jsxDEV2(CommandPrimitive.Group, {
|
|
216
216
|
"data-slot": "command-group",
|
|
217
|
-
className: cn2("text-foreground [&_[cmdk-group-heading]]:
|
|
217
|
+
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),
|
|
218
218
|
...props
|
|
219
219
|
}, undefined, false, undefined, this);
|
|
220
220
|
}
|
|
@@ -224,7 +224,7 @@ function CommandSeparator({
|
|
|
224
224
|
}) {
|
|
225
225
|
return /* @__PURE__ */ jsxDEV2(CommandPrimitive.Separator, {
|
|
226
226
|
"data-slot": "command-separator",
|
|
227
|
-
className: cn2("
|
|
227
|
+
className: cn2("-mx-1 h-px bg-border", className),
|
|
228
228
|
...props
|
|
229
229
|
}, undefined, false, undefined, this);
|
|
230
230
|
}
|
|
@@ -234,7 +234,7 @@ function CommandItem({
|
|
|
234
234
|
}) {
|
|
235
235
|
return /* @__PURE__ */ jsxDEV2(CommandPrimitive.Item, {
|
|
236
236
|
"data-slot": "command-item",
|
|
237
|
-
className: cn2("
|
|
237
|
+
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),
|
|
238
238
|
...props
|
|
239
239
|
}, undefined, false, undefined, this);
|
|
240
240
|
}
|
|
@@ -244,7 +244,7 @@ function CommandShortcut({
|
|
|
244
244
|
}) {
|
|
245
245
|
return /* @__PURE__ */ jsxDEV2("span", {
|
|
246
246
|
"data-slot": "command-shortcut",
|
|
247
|
-
className: cn2("text-muted-foreground
|
|
247
|
+
className: cn2("ml-auto text-muted-foreground text-xs tracking-widest", className),
|
|
248
248
|
...props
|
|
249
249
|
}, undefined, false, undefined, this);
|
|
250
250
|
}
|
|
@@ -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
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { ContextMenu as ContextMenuPrimitive } from 'radix-ui';
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
declare function ContextMenu({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
declare function ContextMenuTrigger({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
declare function ContextMenuGroup({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Group>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -28,4 +28,4 @@ declare function ContextMenuLabel({ className, inset, ...props }: React.Componen
|
|
|
28
28
|
}): import("react/jsx-runtime").JSX.Element;
|
|
29
29
|
declare function ContextMenuSeparator({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Separator>): import("react/jsx-runtime").JSX.Element;
|
|
30
30
|
declare function ContextMenuShortcut({ className, ...props }: React.ComponentProps<'span'>): import("react/jsx-runtime").JSX.Element;
|
|
31
|
-
export { ContextMenu,
|
|
31
|
+
export { ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, };
|
package/dist/ui/context-menu.js
CHANGED
|
@@ -9,8 +9,8 @@ function cn(...inputs) {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
// ui/context-menu.tsx
|
|
12
|
-
import { ContextMenu as ContextMenuPrimitive } from "radix-ui";
|
|
13
12
|
import { CheckIcon, ChevronRightIcon } from "lucide-react";
|
|
13
|
+
import { ContextMenu as ContextMenuPrimitive } from "radix-ui";
|
|
14
14
|
import { jsxDEV } from "react/jsx-dev-runtime";
|
|
15
15
|
"use client";
|
|
16
16
|
function ContextMenu({
|
|
@@ -70,7 +70,7 @@ function ContextMenuContent({
|
|
|
70
70
|
return /* @__PURE__ */ jsxDEV(ContextMenuPrimitive.Portal, {
|
|
71
71
|
children: /* @__PURE__ */ jsxDEV(ContextMenuPrimitive.Content, {
|
|
72
72
|
"data-slot": "context-menu-content",
|
|
73
|
-
className: cn("data-
|
|
73
|
+
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),
|
|
74
74
|
...props
|
|
75
75
|
}, undefined, false, undefined, this)
|
|
76
76
|
}, undefined, false, undefined, this);
|
|
@@ -85,7 +85,7 @@ function ContextMenuItem({
|
|
|
85
85
|
"data-slot": "context-menu-item",
|
|
86
86
|
"data-inset": inset,
|
|
87
87
|
"data-variant": variant,
|
|
88
|
-
className: cn("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-
|
|
88
|
+
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),
|
|
89
89
|
...props
|
|
90
90
|
}, undefined, false, undefined, this);
|
|
91
91
|
}
|
|
@@ -98,7 +98,7 @@ function ContextMenuSubTrigger({
|
|
|
98
98
|
return /* @__PURE__ */ jsxDEV(ContextMenuPrimitive.SubTrigger, {
|
|
99
99
|
"data-slot": "context-menu-sub-trigger",
|
|
100
100
|
"data-inset": inset,
|
|
101
|
-
className: cn("
|
|
101
|
+
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),
|
|
102
102
|
...props,
|
|
103
103
|
children: [
|
|
104
104
|
children,
|
|
@@ -114,7 +114,7 @@ function ContextMenuSubContent({
|
|
|
114
114
|
}) {
|
|
115
115
|
return /* @__PURE__ */ jsxDEV(ContextMenuPrimitive.SubContent, {
|
|
116
116
|
"data-slot": "context-menu-sub-content",
|
|
117
|
-
className: cn("data-
|
|
117
|
+
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),
|
|
118
118
|
...props
|
|
119
119
|
}, undefined, false, undefined, this);
|
|
120
120
|
}
|
|
@@ -128,7 +128,7 @@ function ContextMenuCheckboxItem({
|
|
|
128
128
|
return /* @__PURE__ */ jsxDEV(ContextMenuPrimitive.CheckboxItem, {
|
|
129
129
|
"data-slot": "context-menu-checkbox-item",
|
|
130
130
|
"data-inset": inset,
|
|
131
|
-
className: cn("
|
|
131
|
+
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),
|
|
132
132
|
checked,
|
|
133
133
|
...props,
|
|
134
134
|
children: [
|
|
@@ -151,7 +151,7 @@ function ContextMenuRadioItem({
|
|
|
151
151
|
return /* @__PURE__ */ jsxDEV(ContextMenuPrimitive.RadioItem, {
|
|
152
152
|
"data-slot": "context-menu-radio-item",
|
|
153
153
|
"data-inset": inset,
|
|
154
|
-
className: cn("
|
|
154
|
+
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),
|
|
155
155
|
...props,
|
|
156
156
|
children: [
|
|
157
157
|
/* @__PURE__ */ jsxDEV("span", {
|
|
@@ -172,7 +172,7 @@ function ContextMenuLabel({
|
|
|
172
172
|
return /* @__PURE__ */ jsxDEV(ContextMenuPrimitive.Label, {
|
|
173
173
|
"data-slot": "context-menu-label",
|
|
174
174
|
"data-inset": inset,
|
|
175
|
-
className: cn("
|
|
175
|
+
className: cn("px-1.5 py-1 font-medium text-muted-foreground text-xs data-inset:pl-7", className),
|
|
176
176
|
...props
|
|
177
177
|
}, undefined, false, undefined, this);
|
|
178
178
|
}
|
|
@@ -182,7 +182,7 @@ function ContextMenuSeparator({
|
|
|
182
182
|
}) {
|
|
183
183
|
return /* @__PURE__ */ jsxDEV(ContextMenuPrimitive.Separator, {
|
|
184
184
|
"data-slot": "context-menu-separator",
|
|
185
|
-
className: cn("
|
|
185
|
+
className: cn("-mx-1 my-1 h-px bg-border", className),
|
|
186
186
|
...props
|
|
187
187
|
}, undefined, false, undefined, this);
|
|
188
188
|
}
|
|
@@ -192,7 +192,7 @@ function ContextMenuShortcut({
|
|
|
192
192
|
}) {
|
|
193
193
|
return /* @__PURE__ */ jsxDEV("span", {
|
|
194
194
|
"data-slot": "context-menu-shortcut",
|
|
195
|
-
className: cn("text-muted-foreground group-focus/context-menu-item:text-accent-foreground
|
|
195
|
+
className: cn("ml-auto text-muted-foreground text-xs tracking-widest group-focus/context-menu-item:text-accent-foreground", className),
|
|
196
196
|
...props
|
|
197
197
|
}, undefined, false, undefined, this);
|
|
198
198
|
}
|
package/dist/ui/cta.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
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ContractTableController, ContractTableRowRenderModel } from '@contractspec/lib.presentation-runtime-core';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export interface DataTableProps<TItem = unknown> {
|
|
4
|
+
controller: ContractTableController<TItem, React.ReactNode>;
|
|
5
|
+
className?: string;
|
|
6
|
+
toolbar?: React.ReactNode;
|
|
7
|
+
footer?: React.ReactNode;
|
|
8
|
+
emptyState?: React.ReactNode;
|
|
9
|
+
loading?: boolean;
|
|
10
|
+
onRowPress?: (row: ContractTableRowRenderModel<TItem, React.ReactNode>) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare function DataTable<TItem>({ controller, className, toolbar, footer, emptyState, loading, onRowPress, }: DataTableProps<TItem>): import("react/jsx-runtime").JSX.Element;
|