@contractspec/lib.ui-kit-web 3.7.6 → 3.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -88
- package/dist/browser/ui/accordion.js +4 -4
- package/dist/browser/ui/alert-dialog.js +9 -9
- package/dist/browser/ui/alert.js +4 -4
- package/dist/browser/ui/atoms/FilterSelect/FilterSelect.js +51 -51
- package/dist/browser/ui/atoms/FilterSelect/index.js +51 -51
- package/dist/browser/ui/atoms/LoadingSpinner/LoadingSpinner.js +1 -1
- package/dist/browser/ui/atoms/Pagination/Pagination.js +13 -13
- package/dist/browser/ui/atoms/Pagination/index.js +13 -13
- package/dist/browser/ui/atoms/SearchInput/SearchInput.js +8 -8
- package/dist/browser/ui/atoms/SearchInput/index.js +8 -8
- package/dist/browser/ui/avatar.js +1 -1
- package/dist/browser/ui/badge.js +3 -3
- package/dist/browser/ui/breadcrumb.js +4 -4
- package/dist/browser/ui/button.js +5 -5
- package/dist/browser/ui/calendar.js +21 -21
- package/dist/browser/ui/card.js +2 -2
- package/dist/browser/ui/carousel.js +6 -6
- package/dist/browser/ui/checkbox.js +2 -2
- package/dist/browser/ui/command.js +14 -14
- package/dist/browser/ui/confirm-dialog.js +9 -9
- package/dist/browser/ui/context-menu.js +10 -10
- package/dist/browser/ui/cta.js +5 -5
- package/dist/browser/ui/data-table.js +1009 -0
- package/dist/browser/ui/data-table.parts.js +467 -0
- package/dist/browser/ui/date-picker.js +26 -26
- package/dist/browser/ui/date-range-picker.js +24 -24
- package/dist/browser/ui/datetime-picker.js +29 -29
- package/dist/browser/ui/dialog.js +5 -5
- package/dist/browser/ui/drawer.js +5 -5
- package/dist/browser/ui/dropdown-menu.js +10 -10
- package/dist/browser/ui/empty-state.js +5 -5
- package/dist/browser/ui/empty.js +7 -7
- package/dist/browser/ui/field.js +12 -12
- package/dist/browser/ui/form.js +4 -4
- package/dist/browser/ui/hover-card.js +2 -2
- package/dist/browser/ui/input-group.js +16 -16
- package/dist/browser/ui/input-otp.js +4 -4
- package/dist/browser/ui/input.js +1 -1
- package/dist/browser/ui/label.js +2 -2
- package/dist/browser/ui/loading-button.js +8 -8
- package/dist/browser/ui/marketing/FeatureGrid.js +3 -3
- package/dist/browser/ui/marketing/Hero.js +7 -7
- package/dist/browser/ui/marketing/PricingTable.js +10 -10
- package/dist/browser/ui/menubar.js +12 -12
- package/dist/browser/ui/molecules/Autocomplete/index.js +26 -26
- package/dist/browser/ui/molecules/SearchAndFilter/SearchAndFilter.js +62 -62
- package/dist/browser/ui/molecules/SearchAndFilter/index.js +62 -62
- package/dist/browser/ui/molecules/SkeletonList.js +1 -1
- package/dist/browser/ui/nav-layout.js +22 -22
- package/dist/browser/ui/navigation-menu.js +7 -7
- package/dist/browser/ui/organisms/ErrorBoundary/ErrorBoundary.js +11 -11
- package/dist/browser/ui/organisms/ListPage/ListPage.js +84 -84
- package/dist/browser/ui/page-header.js +4 -4
- package/dist/browser/ui/pagination.js +6 -6
- package/dist/browser/ui/popover.js +2 -2
- package/dist/browser/ui/progress.js +3 -3
- package/dist/browser/ui/radio-group.js +3 -3
- package/dist/browser/ui/resizable.js +3 -3
- package/dist/browser/ui/scroll-area.js +4 -4
- package/dist/browser/ui/section.js +1 -1
- package/dist/browser/ui/select.js +6 -6
- package/dist/browser/ui/separator.js +2 -2
- package/dist/browser/ui/sheet.js +5 -5
- package/dist/browser/ui/sidebar.js +64 -64
- package/dist/browser/ui/skeleton.js +1 -1
- package/dist/browser/ui/slider.js +6 -6
- package/dist/browser/ui/stack.js +1 -1
- package/dist/browser/ui/stat-card-group.js +5 -5
- package/dist/browser/ui/stepper.js +2 -2
- package/dist/browser/ui/switch.js +3 -3
- package/dist/browser/ui/table.js +5 -5
- package/dist/browser/ui/tabs.js +3 -3
- package/dist/browser/ui/text.js +2 -2
- package/dist/browser/ui/textarea.js +1 -1
- package/dist/browser/ui/time-picker.js +10 -10
- package/dist/browser/ui/toast.js +5 -5
- package/dist/browser/ui/toaster.js +5 -5
- package/dist/browser/ui/toggle-group.js +7 -7
- package/dist/browser/ui/toggle.js +5 -5
- package/dist/browser/ui/tooltip.js +3 -3
- package/dist/browser/ui/typography.js +14 -14
- package/dist/browser/ui/usecases/UseCaseCard.js +8 -8
- package/dist/browser/ui/usecases/UserStoryCard.js +3 -3
- package/dist/browser/ui/visualization/Visualization.js +447 -0
- package/dist/browser/ui/visualization/Visualization.support.js +128 -0
- package/dist/browser/ui/visualization/index.js +10 -0
- package/dist/ui/accordion.d.ts +2 -2
- package/dist/ui/accordion.js +4 -4
- package/dist/ui/alert-dialog.d.ts +2 -2
- package/dist/ui/alert-dialog.js +9 -9
- package/dist/ui/alert.d.ts +2 -2
- package/dist/ui/alert.js +4 -4
- package/dist/ui/atoms/FilterSelect/FilterSelect.js +51 -51
- package/dist/ui/atoms/FilterSelect/index.d.ts +1 -1
- package/dist/ui/atoms/FilterSelect/index.js +51 -51
- package/dist/ui/atoms/LoadingSpinner/LoadingSpinner.js +1 -1
- package/dist/ui/atoms/LoadingSpinner/index.d.ts +1 -1
- package/dist/ui/atoms/Pagination/Pagination.js +13 -13
- package/dist/ui/atoms/Pagination/index.js +13 -13
- package/dist/ui/atoms/SearchInput/SearchInput.js +8 -8
- package/dist/ui/atoms/SearchInput/index.js +8 -8
- package/dist/ui/avatar.d.ts +2 -2
- package/dist/ui/avatar.js +1 -1
- package/dist/ui/badge.d.ts +1 -1
- package/dist/ui/badge.js +3 -3
- package/dist/ui/breadcrumb.d.ts +1 -1
- package/dist/ui/breadcrumb.js +4 -4
- package/dist/ui/button.d.ts +1 -1
- package/dist/ui/button.js +5 -5
- package/dist/ui/calendar.js +21 -21
- package/dist/ui/card.d.ts +1 -1
- package/dist/ui/card.js +2 -2
- package/dist/ui/carousel.d.ts +2 -2
- package/dist/ui/carousel.js +6 -6
- package/dist/ui/checkbox.d.ts +1 -1
- package/dist/ui/checkbox.js +2 -2
- package/dist/ui/collapsible.d.ts +1 -1
- package/dist/ui/command.d.ts +2 -2
- package/dist/ui/command.js +14 -14
- package/dist/ui/confirm-dialog.js +9 -9
- package/dist/ui/context-menu.d.ts +2 -2
- package/dist/ui/context-menu.js +10 -10
- package/dist/ui/cta.js +5 -5
- package/dist/ui/data-table.d.ts +12 -0
- package/dist/ui/data-table.js +1004 -0
- package/dist/ui/data-table.parts.d.ts +14 -0
- package/dist/ui/data-table.parts.js +462 -0
- package/dist/ui/date-picker.js +26 -26
- package/dist/ui/date-range-picker.js +24 -24
- package/dist/ui/datetime-picker.js +29 -29
- package/dist/ui/dialog.d.ts +1 -1
- package/dist/ui/dialog.js +5 -5
- package/dist/ui/drawer.d.ts +1 -1
- package/dist/ui/drawer.js +5 -5
- package/dist/ui/dropdown-menu.d.ts +2 -2
- package/dist/ui/dropdown-menu.js +10 -10
- package/dist/ui/empty-state.d.ts +1 -1
- package/dist/ui/empty-state.js +5 -5
- package/dist/ui/empty.d.ts +2 -2
- package/dist/ui/empty.js +7 -7
- package/dist/ui/field.d.ts +2 -2
- package/dist/ui/field.js +12 -12
- package/dist/ui/form.d.ts +3 -3
- package/dist/ui/form.js +4 -4
- package/dist/ui/hover-card.d.ts +2 -2
- package/dist/ui/hover-card.js +2 -2
- package/dist/ui/input-group.d.ts +2 -2
- package/dist/ui/input-group.js +16 -16
- package/dist/ui/input-otp.d.ts +2 -2
- package/dist/ui/input-otp.js +4 -4
- package/dist/ui/input.js +1 -1
- package/dist/ui/label.d.ts +1 -1
- package/dist/ui/label.js +2 -2
- package/dist/ui/loading-button.js +8 -8
- package/dist/ui/map/index.d.ts +1 -1
- package/dist/ui/marketing/FeatureGrid.js +3 -3
- package/dist/ui/marketing/Hero.js +7 -7
- package/dist/ui/marketing/PricingTable.js +10 -10
- package/dist/ui/marketing/index.d.ts +1 -1
- package/dist/ui/menubar.d.ts +2 -2
- package/dist/ui/menubar.js +12 -12
- package/dist/ui/molecules/Autocomplete/index.js +26 -26
- package/dist/ui/molecules/SearchAndFilter/SearchAndFilter.js +62 -62
- package/dist/ui/molecules/SearchAndFilter/index.js +62 -62
- package/dist/ui/molecules/SkeletonList.js +1 -1
- package/dist/ui/nav-layout.d.ts +1 -1
- package/dist/ui/nav-layout.js +22 -22
- package/dist/ui/navigation-menu.d.ts +2 -2
- package/dist/ui/navigation-menu.js +7 -7
- package/dist/ui/organisms/ErrorBoundary/ErrorBoundary.js +11 -11
- package/dist/ui/organisms/ErrorBoundary/index.d.ts +1 -1
- package/dist/ui/organisms/ListPage/ListPage.js +84 -84
- package/dist/ui/organisms/ListPage/index.d.ts +1 -1
- package/dist/ui/organisms/ListPage/types.d.ts +1 -1
- package/dist/ui/page-header.d.ts +1 -1
- package/dist/ui/page-header.js +4 -4
- package/dist/ui/pagination.js +6 -6
- package/dist/ui/popover.d.ts +2 -2
- package/dist/ui/popover.js +2 -2
- package/dist/ui/progress.d.ts +1 -1
- package/dist/ui/progress.js +3 -3
- package/dist/ui/radio-group.d.ts +1 -1
- package/dist/ui/radio-group.js +3 -3
- package/dist/ui/resizable.d.ts +2 -2
- package/dist/ui/resizable.js +3 -3
- package/dist/ui/scroll-area.d.ts +1 -1
- package/dist/ui/scroll-area.js +4 -4
- package/dist/ui/section.d.ts +1 -1
- package/dist/ui/section.js +1 -1
- package/dist/ui/select.d.ts +1 -1
- package/dist/ui/select.js +6 -6
- package/dist/ui/separator.d.ts +1 -1
- package/dist/ui/separator.js +2 -2
- package/dist/ui/sheet.d.ts +2 -2
- package/dist/ui/sheet.js +5 -5
- package/dist/ui/sidebar.d.ts +1 -1
- package/dist/ui/sidebar.js +64 -64
- package/dist/ui/skeleton.js +1 -1
- package/dist/ui/slider.d.ts +1 -1
- package/dist/ui/slider.js +6 -6
- package/dist/ui/stack.d.ts +4 -4
- package/dist/ui/stack.js +1 -1
- package/dist/ui/stat-card-group.js +5 -5
- package/dist/ui/stepper.js +2 -2
- package/dist/ui/switch.d.ts +1 -1
- package/dist/ui/switch.js +3 -3
- package/dist/ui/table.d.ts +1 -1
- package/dist/ui/table.js +5 -5
- package/dist/ui/tabs.d.ts +2 -2
- package/dist/ui/tabs.js +3 -3
- package/dist/ui/text.js +2 -2
- package/dist/ui/textarea.js +1 -1
- package/dist/ui/time-picker.js +10 -10
- package/dist/ui/toast.d.ts +2 -2
- package/dist/ui/toast.js +5 -5
- package/dist/ui/toaster.js +5 -5
- package/dist/ui/toggle-group.d.ts +1 -1
- package/dist/ui/toggle-group.js +7 -7
- package/dist/ui/toggle.d.ts +1 -1
- package/dist/ui/toggle.js +5 -5
- package/dist/ui/tooltip.d.ts +2 -2
- package/dist/ui/tooltip.js +3 -3
- package/dist/ui/typography.js +14 -14
- package/dist/ui/use-toast.d.ts +1 -1
- package/dist/ui/usecases/UseCaseCard.js +8 -8
- package/dist/ui/usecases/UserStoryCard.js +3 -3
- package/dist/ui/visualization/Visualization.d.ts +9 -0
- package/dist/ui/visualization/Visualization.js +442 -0
- package/dist/ui/visualization/Visualization.support.d.ts +15 -0
- package/dist/ui/visualization/Visualization.support.js +123 -0
- package/dist/ui/visualization/index.d.ts +1 -0
- package/dist/ui/visualization/index.js +5 -0
- package/package.json +75 -12
|
@@ -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,14 +51,14 @@ function Button({
|
|
|
51
51
|
}, undefined, false, undefined, this);
|
|
52
52
|
}
|
|
53
53
|
// ui/calendar.tsx
|
|
54
|
-
import
|
|
54
|
+
import { cn as cn2 } from "@contractspec/lib.ui-kit-core/utils";
|
|
55
55
|
import {
|
|
56
56
|
ChevronDownIcon,
|
|
57
57
|
ChevronLeftIcon,
|
|
58
58
|
ChevronRightIcon
|
|
59
59
|
} from "lucide-react";
|
|
60
|
+
import * as React from "react";
|
|
60
61
|
import { DayPicker, getDefaultClassNames } from "react-day-picker";
|
|
61
|
-
import { cn as cn2 } from "@contractspec/lib.ui-kit-core/utils";
|
|
62
62
|
import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
|
|
63
63
|
"use client";
|
|
64
64
|
function Calendar({
|
|
@@ -74,7 +74,7 @@ function Calendar({
|
|
|
74
74
|
const defaultClassNames = getDefaultClassNames();
|
|
75
75
|
return /* @__PURE__ */ jsxDEV2(DayPicker, {
|
|
76
76
|
showOutsideDays,
|
|
77
|
-
className: cn2("group/calendar bg-background
|
|
77
|
+
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),
|
|
78
78
|
captionLayout,
|
|
79
79
|
formatters: {
|
|
80
80
|
formatMonthDropdown: (date) => date.toLocaleString("default", { month: "short" }),
|
|
@@ -85,24 +85,24 @@ function Calendar({
|
|
|
85
85
|
months: cn2("relative flex flex-col gap-4 md:flex-row", defaultClassNames.months),
|
|
86
86
|
month: cn2("flex w-full flex-col gap-4", defaultClassNames.month),
|
|
87
87
|
nav: cn2("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1", defaultClassNames.nav),
|
|
88
|
-
button_previous: cn2(buttonVariants({ variant: buttonVariant }), "size-(--cell-size) p-0
|
|
89
|
-
button_next: cn2(buttonVariants({ variant: buttonVariant }), "size-(--cell-size) p-0
|
|
88
|
+
button_previous: cn2(buttonVariants({ variant: buttonVariant }), "size-(--cell-size) select-none p-0 aria-disabled:opacity-50", defaultClassNames.button_previous),
|
|
89
|
+
button_next: cn2(buttonVariants({ variant: buttonVariant }), "size-(--cell-size) select-none p-0 aria-disabled:opacity-50", defaultClassNames.button_next),
|
|
90
90
|
month_caption: cn2("flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)", defaultClassNames.month_caption),
|
|
91
|
-
dropdowns: cn2("flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm
|
|
92
|
-
dropdown_root: cn2("has-focus:border-ring has-focus:ring-
|
|
93
|
-
dropdown: cn2("
|
|
94
|
-
caption_label: cn2("font-medium
|
|
91
|
+
dropdowns: cn2("flex h-(--cell-size) w-full items-center justify-center gap-1.5 font-medium text-sm", defaultClassNames.dropdowns),
|
|
92
|
+
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),
|
|
93
|
+
dropdown: cn2("absolute inset-0 bg-popover opacity-0", defaultClassNames.dropdown),
|
|
94
|
+
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),
|
|
95
95
|
table: "w-full border-collapse",
|
|
96
96
|
weekdays: cn2("flex", defaultClassNames.weekdays),
|
|
97
|
-
weekday: cn2("
|
|
97
|
+
weekday: cn2("flex-1 select-none rounded-md font-normal text-[0.8rem] text-muted-foreground", defaultClassNames.weekday),
|
|
98
98
|
week: cn2("mt-2 flex w-full", defaultClassNames.week),
|
|
99
99
|
week_number_header: cn2("w-(--cell-size) select-none", defaultClassNames.week_number_header),
|
|
100
|
-
week_number: cn2("
|
|
101
|
-
day: cn2("group/day relative aspect-square h-full w-full p-0 text-center
|
|
102
|
-
range_start: cn2("
|
|
100
|
+
week_number: cn2("select-none text-[0.8rem] text-muted-foreground", defaultClassNames.week_number),
|
|
101
|
+
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),
|
|
102
|
+
range_start: cn2("rounded-l-md bg-accent", defaultClassNames.range_start),
|
|
103
103
|
range_middle: cn2("rounded-none", defaultClassNames.range_middle),
|
|
104
|
-
range_end: cn2("
|
|
105
|
-
today: cn2("bg-accent text-accent-foreground
|
|
104
|
+
range_end: cn2("rounded-r-md bg-accent", defaultClassNames.range_end),
|
|
105
|
+
today: cn2("rounded-md bg-accent text-accent-foreground data-[selected=true]:rounded-none", defaultClassNames.today),
|
|
106
106
|
outside: cn2("text-muted-foreground aria-selected:text-muted-foreground", defaultClassNames.outside),
|
|
107
107
|
disabled: cn2("text-muted-foreground opacity-50", defaultClassNames.disabled),
|
|
108
108
|
hidden: cn2("invisible", defaultClassNames.hidden),
|
|
@@ -171,13 +171,13 @@ function CalendarDayButton({
|
|
|
171
171
|
"data-range-start": modifiers.range_start,
|
|
172
172
|
"data-range-end": modifiers.range_end,
|
|
173
173
|
"data-range-middle": modifiers.range_middle,
|
|
174
|
-
className: cn2("data-[range-end=true]:
|
|
174
|
+
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),
|
|
175
175
|
...props
|
|
176
176
|
}, undefined, false, undefined, this);
|
|
177
177
|
}
|
|
178
178
|
// ui/popover.tsx
|
|
179
|
-
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
180
179
|
import { cn as cn3 } from "@contractspec/lib.ui-kit-core/utils";
|
|
180
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
181
181
|
import { jsxDEV as jsxDEV3 } from "react/jsx-dev-runtime";
|
|
182
182
|
"use client";
|
|
183
183
|
function Popover({
|
|
@@ -207,7 +207,7 @@ function PopoverContent({
|
|
|
207
207
|
"data-slot": "popover-content",
|
|
208
208
|
align,
|
|
209
209
|
sideOffset,
|
|
210
|
-
className: cn3("
|
|
210
|
+
className: cn3("data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden data-[state=closed]:animate-out data-[state=open]:animate-in", className),
|
|
211
211
|
...props
|
|
212
212
|
}, undefined, false, undefined, this)
|
|
213
213
|
}, undefined, false, undefined, this);
|
|
@@ -221,8 +221,8 @@ function PopoverAnchor({
|
|
|
221
221
|
}, undefined, false, undefined, this);
|
|
222
222
|
}
|
|
223
223
|
// ui/date-range-picker.tsx
|
|
224
|
-
import * as React2 from "react";
|
|
225
224
|
import { cn as cn4 } from "@contractspec/lib.ui-kit-core/utils";
|
|
225
|
+
import * as React2 from "react";
|
|
226
226
|
import { jsxDEV as jsxDEV4 } from "react/jsx-dev-runtime";
|
|
227
227
|
"use client";
|
|
228
228
|
function DateRangePicker({
|
|
@@ -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
|
}
|
|
@@ -57,19 +57,19 @@ function Input({ className, type, ...props }) {
|
|
|
57
57
|
return /* @__PURE__ */ jsxDEV2("input", {
|
|
58
58
|
type,
|
|
59
59
|
"data-slot": "input",
|
|
60
|
-
className: cn2("
|
|
60
|
+
className: cn2("h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs outline-none transition-[color,box-shadow] selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:font-medium file:text-foreground file:text-sm placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30", "focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50", "aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40", className),
|
|
61
61
|
...props
|
|
62
62
|
}, undefined, false, undefined, this);
|
|
63
63
|
}
|
|
64
64
|
// ui/calendar.tsx
|
|
65
|
-
import
|
|
65
|
+
import { cn as cn3 } from "@contractspec/lib.ui-kit-core/utils";
|
|
66
66
|
import {
|
|
67
67
|
ChevronDownIcon,
|
|
68
68
|
ChevronLeftIcon,
|
|
69
69
|
ChevronRightIcon
|
|
70
70
|
} from "lucide-react";
|
|
71
|
+
import * as React from "react";
|
|
71
72
|
import { DayPicker, getDefaultClassNames } from "react-day-picker";
|
|
72
|
-
import { cn as cn3 } from "@contractspec/lib.ui-kit-core/utils";
|
|
73
73
|
import { jsxDEV as jsxDEV3 } from "react/jsx-dev-runtime";
|
|
74
74
|
"use client";
|
|
75
75
|
function Calendar({
|
|
@@ -85,7 +85,7 @@ function Calendar({
|
|
|
85
85
|
const defaultClassNames = getDefaultClassNames();
|
|
86
86
|
return /* @__PURE__ */ jsxDEV3(DayPicker, {
|
|
87
87
|
showOutsideDays,
|
|
88
|
-
className: cn3("group/calendar bg-background
|
|
88
|
+
className: cn3("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),
|
|
89
89
|
captionLayout,
|
|
90
90
|
formatters: {
|
|
91
91
|
formatMonthDropdown: (date) => date.toLocaleString("default", { month: "short" }),
|
|
@@ -96,24 +96,24 @@ function Calendar({
|
|
|
96
96
|
months: cn3("relative flex flex-col gap-4 md:flex-row", defaultClassNames.months),
|
|
97
97
|
month: cn3("flex w-full flex-col gap-4", defaultClassNames.month),
|
|
98
98
|
nav: cn3("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1", defaultClassNames.nav),
|
|
99
|
-
button_previous: cn3(buttonVariants({ variant: buttonVariant }), "size-(--cell-size) p-0
|
|
100
|
-
button_next: cn3(buttonVariants({ variant: buttonVariant }), "size-(--cell-size) p-0
|
|
99
|
+
button_previous: cn3(buttonVariants({ variant: buttonVariant }), "size-(--cell-size) select-none p-0 aria-disabled:opacity-50", defaultClassNames.button_previous),
|
|
100
|
+
button_next: cn3(buttonVariants({ variant: buttonVariant }), "size-(--cell-size) select-none p-0 aria-disabled:opacity-50", defaultClassNames.button_next),
|
|
101
101
|
month_caption: cn3("flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)", defaultClassNames.month_caption),
|
|
102
|
-
dropdowns: cn3("flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm
|
|
103
|
-
dropdown_root: cn3("has-focus:border-ring has-focus:ring-
|
|
104
|
-
dropdown: cn3("
|
|
105
|
-
caption_label: cn3("font-medium
|
|
102
|
+
dropdowns: cn3("flex h-(--cell-size) w-full items-center justify-center gap-1.5 font-medium text-sm", defaultClassNames.dropdowns),
|
|
103
|
+
dropdown_root: cn3("relative rounded-md border border-input shadow-2xs has-focus:border-ring has-focus:ring-[3px] has-focus:ring-ring/50", defaultClassNames.dropdown_root),
|
|
104
|
+
dropdown: cn3("absolute inset-0 bg-popover opacity-0", defaultClassNames.dropdown),
|
|
105
|
+
caption_label: cn3("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),
|
|
106
106
|
table: "w-full border-collapse",
|
|
107
107
|
weekdays: cn3("flex", defaultClassNames.weekdays),
|
|
108
|
-
weekday: cn3("
|
|
108
|
+
weekday: cn3("flex-1 select-none rounded-md font-normal text-[0.8rem] text-muted-foreground", defaultClassNames.weekday),
|
|
109
109
|
week: cn3("mt-2 flex w-full", defaultClassNames.week),
|
|
110
110
|
week_number_header: cn3("w-(--cell-size) select-none", defaultClassNames.week_number_header),
|
|
111
|
-
week_number: cn3("
|
|
112
|
-
day: cn3("group/day relative aspect-square h-full w-full p-0 text-center
|
|
113
|
-
range_start: cn3("
|
|
111
|
+
week_number: cn3("select-none text-[0.8rem] text-muted-foreground", defaultClassNames.week_number),
|
|
112
|
+
day: cn3("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),
|
|
113
|
+
range_start: cn3("rounded-l-md bg-accent", defaultClassNames.range_start),
|
|
114
114
|
range_middle: cn3("rounded-none", defaultClassNames.range_middle),
|
|
115
|
-
range_end: cn3("
|
|
116
|
-
today: cn3("bg-accent text-accent-foreground
|
|
115
|
+
range_end: cn3("rounded-r-md bg-accent", defaultClassNames.range_end),
|
|
116
|
+
today: cn3("rounded-md bg-accent text-accent-foreground data-[selected=true]:rounded-none", defaultClassNames.today),
|
|
117
117
|
outside: cn3("text-muted-foreground aria-selected:text-muted-foreground", defaultClassNames.outside),
|
|
118
118
|
disabled: cn3("text-muted-foreground opacity-50", defaultClassNames.disabled),
|
|
119
119
|
hidden: cn3("invisible", defaultClassNames.hidden),
|
|
@@ -182,13 +182,13 @@ function CalendarDayButton({
|
|
|
182
182
|
"data-range-start": modifiers.range_start,
|
|
183
183
|
"data-range-end": modifiers.range_end,
|
|
184
184
|
"data-range-middle": modifiers.range_middle,
|
|
185
|
-
className: cn3("data-[range-end=true]:
|
|
185
|
+
className: cn3("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),
|
|
186
186
|
...props
|
|
187
187
|
}, undefined, false, undefined, this);
|
|
188
188
|
}
|
|
189
189
|
// ui/popover.tsx
|
|
190
|
-
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
191
190
|
import { cn as cn4 } from "@contractspec/lib.ui-kit-core/utils";
|
|
191
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
192
192
|
import { jsxDEV as jsxDEV4 } from "react/jsx-dev-runtime";
|
|
193
193
|
"use client";
|
|
194
194
|
function Popover({
|
|
@@ -218,7 +218,7 @@ function PopoverContent({
|
|
|
218
218
|
"data-slot": "popover-content",
|
|
219
219
|
align,
|
|
220
220
|
sideOffset,
|
|
221
|
-
className: cn4("
|
|
221
|
+
className: cn4("data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden data-[state=closed]:animate-out data-[state=open]:animate-in", className),
|
|
222
222
|
...props
|
|
223
223
|
}, undefined, false, undefined, this)
|
|
224
224
|
}, undefined, false, undefined, this);
|
|
@@ -232,9 +232,9 @@ function PopoverAnchor({
|
|
|
232
232
|
}, undefined, false, undefined, this);
|
|
233
233
|
}
|
|
234
234
|
// ui/date-picker.tsx
|
|
235
|
-
import * as React2 from "react";
|
|
236
|
-
import { CalendarIcon } from "lucide-react";
|
|
237
235
|
import { cn as cn5 } from "@contractspec/lib.ui-kit-core/utils";
|
|
236
|
+
import { CalendarIcon } from "lucide-react";
|
|
237
|
+
import * as React2 from "react";
|
|
238
238
|
import { jsxDEV as jsxDEV5 } from "react/jsx-dev-runtime";
|
|
239
239
|
"use client";
|
|
240
240
|
function DatePicker({
|
|
@@ -347,8 +347,8 @@ function DatePicker({
|
|
|
347
347
|
}
|
|
348
348
|
|
|
349
349
|
// ui/time-picker.tsx
|
|
350
|
-
import * as React3 from "react";
|
|
351
350
|
import { cn as cn6 } from "@contractspec/lib.ui-kit-core/utils";
|
|
351
|
+
import * as React3 from "react";
|
|
352
352
|
import { jsxDEV as jsxDEV6 } from "react/jsx-dev-runtime";
|
|
353
353
|
"use client";
|
|
354
354
|
function formatTime(d, is24Hour) {
|
|
@@ -407,7 +407,7 @@ function TimePicker({
|
|
|
407
407
|
max: is24Hour ? 23 : 12,
|
|
408
408
|
value: hours,
|
|
409
409
|
onChange: (e) => setHours(e.target.value),
|
|
410
|
-
className: "
|
|
410
|
+
className: "w-16 rounded-md border border-input bg-background px-2 py-1 text-center"
|
|
411
411
|
}, undefined, false, undefined, this),
|
|
412
412
|
/* @__PURE__ */ jsxDEV6("span", {
|
|
413
413
|
children: ":"
|
|
@@ -418,7 +418,7 @@ function TimePicker({
|
|
|
418
418
|
max: 59,
|
|
419
419
|
value: minutes,
|
|
420
420
|
onChange: (e) => setMinutes(e.target.value),
|
|
421
|
-
className: "
|
|
421
|
+
className: "w-16 rounded-md border border-input bg-background px-2 py-1 text-center"
|
|
422
422
|
}, undefined, false, undefined, this),
|
|
423
423
|
/* @__PURE__ */ jsxDEV6(Button, {
|
|
424
424
|
type: "button",
|
package/dist/ui/dialog.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
declare function Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
declare function DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
declare function DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
|
package/dist/ui/dialog.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
|
}
|
package/dist/ui/drawer.d.ts
CHANGED
|
@@ -10,4 +10,4 @@ declare function DrawerHeader({ className, ...props }: React.ComponentPropsWitho
|
|
|
10
10
|
declare function DrawerFooter({ className, ...props }: React.ComponentPropsWithoutRef<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
declare function DrawerTitle({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
declare function DrawerDescription({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
export { Drawer,
|
|
13
|
+
export { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, };
|
package/dist/ui/drawer.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
var __require = import.meta.require;
|
|
3
3
|
|
|
4
4
|
// ui/drawer.tsx
|
|
5
|
-
import { Drawer as DrawerPrimitive } from "vaul";
|
|
6
5
|
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
6
|
+
import { Drawer as DrawerPrimitive } from "vaul";
|
|
7
7
|
import { jsxDEV } from "react/jsx-dev-runtime";
|
|
8
8
|
"use client";
|
|
9
9
|
function Drawer({
|
|
@@ -44,7 +44,7 @@ function DrawerOverlay({
|
|
|
44
44
|
}) {
|
|
45
45
|
return /* @__PURE__ */ jsxDEV(DrawerPrimitive.Overlay, {
|
|
46
46
|
"data-slot": "drawer-overlay",
|
|
47
|
-
className: cn("data-[state=
|
|
47
|
+
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),
|
|
48
48
|
...props
|
|
49
49
|
}, undefined, false, undefined, this);
|
|
50
50
|
}
|
|
@@ -59,11 +59,11 @@ function DrawerContent({
|
|
|
59
59
|
/* @__PURE__ */ jsxDEV(DrawerOverlay, {}, undefined, false, undefined, this),
|
|
60
60
|
/* @__PURE__ */ jsxDEV(DrawerPrimitive.Content, {
|
|
61
61
|
"data-slot": "drawer-content",
|
|
62
|
-
className: cn("group/drawer-content
|
|
62
|
+
className: cn("group/drawer-content fixed z-50 flex h-auto flex-col bg-background", "data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b", "data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t", "data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l sm:data-[vaul-drawer-direction=right]:max-w-sm", "data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r sm:data-[vaul-drawer-direction=left]:max-w-sm", className),
|
|
63
63
|
...props,
|
|
64
64
|
children: [
|
|
65
65
|
/* @__PURE__ */ jsxDEV("div", {
|
|
66
|
-
className: "
|
|
66
|
+
className: "mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full bg-muted group-data-[vaul-drawer-direction=bottom]/drawer-content:block"
|
|
67
67
|
}, undefined, false, undefined, this),
|
|
68
68
|
children
|
|
69
69
|
]
|
|
@@ -97,7 +97,7 @@ function DrawerTitle({
|
|
|
97
97
|
}) {
|
|
98
98
|
return /* @__PURE__ */ jsxDEV(DrawerPrimitive.Title, {
|
|
99
99
|
"data-slot": "drawer-title",
|
|
100
|
-
className: cn("text-foreground
|
|
100
|
+
className: cn("font-semibold text-foreground", className),
|
|
101
101
|
...props
|
|
102
102
|
}, undefined, false, undefined, this);
|
|
103
103
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
declare function DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
declare function DropdownMenuPortal({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
declare function DropdownMenuTrigger({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -22,4 +22,4 @@ declare function DropdownMenuSubTrigger({ className, inset, children, ...props }
|
|
|
22
22
|
inset?: boolean;
|
|
23
23
|
}): import("react/jsx-runtime").JSX.Element;
|
|
24
24
|
declare function DropdownMenuSubContent({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>): import("react/jsx-runtime").JSX.Element;
|
|
25
|
-
export { DropdownMenu,
|
|
25
|
+
export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, };
|
package/dist/ui/dropdown-menu.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
var __require = import.meta.require;
|
|
3
3
|
|
|
4
4
|
// ui/dropdown-menu.tsx
|
|
5
|
+
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
5
6
|
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
6
7
|
import { CheckIcon, ChevronRightIcon, CircleIcon } 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 DropdownMenu({
|
|
@@ -40,7 +40,7 @@ function DropdownMenuContent({
|
|
|
40
40
|
children: /* @__PURE__ */ jsxDEV(DropdownMenuPrimitive.Content, {
|
|
41
41
|
"data-slot": "dropdown-menu-content",
|
|
42
42
|
sideOffset,
|
|
43
|
-
className: cn("
|
|
43
|
+
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 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-dropdown-menu-content-available-height) min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=closed]:animate-out data-[state=open]:animate-in", className),
|
|
44
44
|
...props
|
|
45
45
|
}, undefined, false, undefined, this)
|
|
46
46
|
}, undefined, false, undefined, this);
|
|
@@ -63,7 +63,7 @@ function DropdownMenuItem({
|
|
|
63
63
|
"data-slot": "dropdown-menu-item",
|
|
64
64
|
"data-inset": inset,
|
|
65
65
|
"data-variant": variant,
|
|
66
|
-
className: cn("
|
|
66
|
+
className: cn("relative flex cursor-default select-none items-center gap-2 rounded-xs px-2 py-1.5 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-inset:pl-8 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:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 data-[variant=destructive]:*:[svg]:text-destructive!", className),
|
|
67
67
|
...props
|
|
68
68
|
}, undefined, false, undefined, this);
|
|
69
69
|
}
|
|
@@ -75,7 +75,7 @@ function DropdownMenuCheckboxItem({
|
|
|
75
75
|
}) {
|
|
76
76
|
return /* @__PURE__ */ jsxDEV(DropdownMenuPrimitive.CheckboxItem, {
|
|
77
77
|
"data-slot": "dropdown-menu-checkbox-item",
|
|
78
|
-
className: cn("
|
|
78
|
+
className: cn("relative flex cursor-default select-none items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0", className),
|
|
79
79
|
checked,
|
|
80
80
|
...props,
|
|
81
81
|
children: [
|
|
@@ -106,7 +106,7 @@ function DropdownMenuRadioItem({
|
|
|
106
106
|
}) {
|
|
107
107
|
return /* @__PURE__ */ jsxDEV(DropdownMenuPrimitive.RadioItem, {
|
|
108
108
|
"data-slot": "dropdown-menu-radio-item",
|
|
109
|
-
className: cn("
|
|
109
|
+
className: cn("relative flex cursor-default select-none items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0", className),
|
|
110
110
|
...props,
|
|
111
111
|
children: [
|
|
112
112
|
/* @__PURE__ */ jsxDEV("span", {
|
|
@@ -129,7 +129,7 @@ function DropdownMenuLabel({
|
|
|
129
129
|
return /* @__PURE__ */ jsxDEV(DropdownMenuPrimitive.Label, {
|
|
130
130
|
"data-slot": "dropdown-menu-label",
|
|
131
131
|
"data-inset": inset,
|
|
132
|
-
className: cn("px-2 py-1.5 text-sm
|
|
132
|
+
className: cn("px-2 py-1.5 font-medium text-sm data-inset:pl-8", className),
|
|
133
133
|
...props
|
|
134
134
|
}, undefined, false, undefined, this);
|
|
135
135
|
}
|
|
@@ -139,7 +139,7 @@ function DropdownMenuSeparator({
|
|
|
139
139
|
}) {
|
|
140
140
|
return /* @__PURE__ */ jsxDEV(DropdownMenuPrimitive.Separator, {
|
|
141
141
|
"data-slot": "dropdown-menu-separator",
|
|
142
|
-
className: cn("
|
|
142
|
+
className: cn("-mx-1 my-1 h-px bg-border", className),
|
|
143
143
|
...props
|
|
144
144
|
}, undefined, false, undefined, this);
|
|
145
145
|
}
|
|
@@ -149,7 +149,7 @@ function DropdownMenuShortcut({
|
|
|
149
149
|
}) {
|
|
150
150
|
return /* @__PURE__ */ jsxDEV("span", {
|
|
151
151
|
"data-slot": "dropdown-menu-shortcut",
|
|
152
|
-
className: cn("text-muted-foreground
|
|
152
|
+
className: cn("ml-auto text-muted-foreground text-xs tracking-widest", className),
|
|
153
153
|
...props
|
|
154
154
|
}, undefined, false, undefined, this);
|
|
155
155
|
}
|
|
@@ -170,7 +170,7 @@ function DropdownMenuSubTrigger({
|
|
|
170
170
|
return /* @__PURE__ */ jsxDEV(DropdownMenuPrimitive.SubTrigger, {
|
|
171
171
|
"data-slot": "dropdown-menu-sub-trigger",
|
|
172
172
|
"data-inset": inset,
|
|
173
|
-
className: cn("
|
|
173
|
+
className: cn("flex cursor-default select-none items-center rounded-xs px-2 py-1.5 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-inset:pl-8 data-[state=open]:text-accent-foreground", className),
|
|
174
174
|
...props,
|
|
175
175
|
children: [
|
|
176
176
|
children,
|
|
@@ -186,7 +186,7 @@ function DropdownMenuSubContent({
|
|
|
186
186
|
}) {
|
|
187
187
|
return /* @__PURE__ */ jsxDEV(DropdownMenuPrimitive.SubContent, {
|
|
188
188
|
"data-slot": "dropdown-menu-sub-content",
|
|
189
|
-
className: cn("
|
|
189
|
+
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 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-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=closed]:animate-out data-[state=open]:animate-in", className),
|
|
190
190
|
...props
|
|
191
191
|
}, undefined, false, undefined, this);
|
|
192
192
|
}
|
package/dist/ui/empty-state.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
declare const containerVariants: (props?: ({
|
|
4
4
|
density?: "default" | "compact" | null | undefined;
|
|
5
5
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
package/dist/ui/empty-state.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
var __require = import.meta.require;
|
|
3
3
|
|
|
4
4
|
// ui/stack.tsx
|
|
5
|
-
import { cva } from "class-variance-authority";
|
|
6
5
|
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
6
|
+
import { cva } from "class-variance-authority";
|
|
7
7
|
import { jsxDEV } from "react/jsx-dev-runtime";
|
|
8
8
|
var vStackVariants = cva("flex flex-col", {
|
|
9
9
|
variants: {
|
|
@@ -166,8 +166,8 @@ function Box({
|
|
|
166
166
|
}, undefined, false, undefined, this);
|
|
167
167
|
}
|
|
168
168
|
// ui/empty-state.tsx
|
|
169
|
-
import { cva as cva2 } from "class-variance-authority";
|
|
170
169
|
import { cn as cn2 } from "@contractspec/lib.ui-kit-core/utils";
|
|
170
|
+
import { cva as cva2 } from "class-variance-authority";
|
|
171
171
|
import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
|
|
172
172
|
var containerVariants = cva2("items-center text-center", {
|
|
173
173
|
variants: {
|
|
@@ -193,9 +193,9 @@ function EmptyState({
|
|
|
193
193
|
className: cn2(containerVariants({ density }), className),
|
|
194
194
|
children: [
|
|
195
195
|
icon ? /* @__PURE__ */ jsxDEV2("div", {
|
|
196
|
-
className: "
|
|
196
|
+
className: "flex h-12 w-12 items-center justify-center rounded-full bg-muted",
|
|
197
197
|
children: /* @__PURE__ */ jsxDEV2("div", {
|
|
198
|
-
className: "
|
|
198
|
+
className: "flex items-center justify-center text-muted-foreground",
|
|
199
199
|
children: icon
|
|
200
200
|
}, undefined, false, undefined, this)
|
|
201
201
|
}, undefined, false, undefined, this) : null,
|
|
@@ -206,7 +206,7 @@ function EmptyState({
|
|
|
206
206
|
children: title
|
|
207
207
|
}, undefined, false, undefined, this),
|
|
208
208
|
description ? /* @__PURE__ */ jsxDEV2("p", {
|
|
209
|
-
className: "text-muted-foreground
|
|
209
|
+
className: "text-base text-muted-foreground",
|
|
210
210
|
children: description
|
|
211
211
|
}, undefined, false, undefined, this) : null
|
|
212
212
|
]
|
package/dist/ui/empty.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type * as React from 'react';
|
|
2
1
|
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
import type * as React from 'react';
|
|
3
3
|
declare function Empty({ className, ...props }: React.ComponentPropsWithoutRef<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
declare function EmptyHeader({ className, ...props }: React.ComponentPropsWithoutRef<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
declare const emptyMediaVariants: (props?: ({
|
|
@@ -9,4 +9,4 @@ declare function EmptyMedia({ className, variant, ...props }: React.ComponentPro
|
|
|
9
9
|
declare function EmptyTitle({ className, ...props }: React.ComponentPropsWithoutRef<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
declare function EmptyDescription({ className, ...props }: React.ComponentPropsWithoutRef<'p'>): import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
declare function EmptyContent({ className, ...props }: React.ComponentPropsWithoutRef<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
export { Empty,
|
|
12
|
+
export { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, };
|