@contractspec/lib.ui-kit-web 1.60.0 → 1.62.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/dist/browser/ui/alert-dialog.js +9 -4
- package/dist/browser/ui/atoms/Pagination/Pagination.js +9 -4
- package/dist/browser/ui/atoms/Pagination/index.js +9 -4
- package/dist/browser/ui/atoms/SearchInput/SearchInput.js +9 -4
- package/dist/browser/ui/atoms/SearchInput/index.js +9 -4
- package/dist/browser/ui/button.js +9 -4
- package/dist/browser/ui/calendar.js +12 -7
- package/dist/browser/ui/carousel.js +20 -15
- package/dist/browser/ui/confirm-dialog.js +9 -4
- package/dist/browser/ui/context-menu.js +178 -85
- package/dist/browser/ui/cta.js +13 -9
- package/dist/browser/ui/date-picker.js +17 -12
- package/dist/browser/ui/date-range-picker.js +14 -9
- package/dist/browser/ui/datetime-picker.js +21 -16
- package/dist/browser/ui/empty-state.js +32 -10
- package/dist/browser/ui/input-group.js +9 -4
- package/dist/browser/ui/input-otp.js +37 -18
- package/dist/browser/ui/link.js +6 -4
- package/dist/browser/ui/loading-button.js +41 -14
- package/dist/browser/ui/marketing/Hero.js +9 -4
- package/dist/browser/ui/marketing/PricingTable.js +9 -4
- package/dist/browser/ui/marketing/index.js +9 -4
- package/dist/browser/ui/molecules/Autocomplete/index.js +15 -10
- package/dist/browser/ui/molecules/SearchAndFilter/SearchAndFilter.js +9 -4
- package/dist/browser/ui/molecules/SearchAndFilter/index.js +9 -4
- package/dist/browser/ui/organisms/ErrorBoundary/ErrorBoundary.js +12 -7
- package/dist/browser/ui/organisms/ErrorBoundary/index.js +12 -7
- package/dist/browser/ui/organisms/ListPage/ListPage.js +41 -14
- package/dist/browser/ui/organisms/ListPage/index.js +41 -14
- package/dist/browser/ui/page-header.js +32 -10
- package/dist/browser/ui/pagination.js +98 -79
- package/dist/browser/ui/resizable.js +6 -9
- package/dist/browser/ui/section.js +12 -4
- package/dist/browser/ui/sidebar.js +22 -17
- package/dist/browser/ui/stack.js +32 -10
- package/dist/browser/ui/stat-card-group.js +32 -10
- package/dist/browser/ui/stepper.js +32 -10
- package/dist/browser/ui/time-picker.js +13 -8
- package/dist/browser/ui/toast.js +57 -29
- package/dist/browser/ui/toaster.js +60 -32
- package/dist/browser/ui/usecases/UseCaseCard.js +41 -14
- package/dist/browser/ui/usecases/UserStoryCard.js +32 -10
- package/dist/browser/ui/usecases/index.js +41 -14
- package/dist/browser/ui/visually-hidden.js +8 -4
- package/dist/ui/alert-dialog.js +9 -4
- package/dist/ui/atoms/Pagination/Pagination.js +9 -4
- package/dist/ui/atoms/Pagination/index.js +9 -4
- package/dist/ui/atoms/SearchInput/SearchInput.js +9 -4
- package/dist/ui/atoms/SearchInput/index.js +9 -4
- package/dist/ui/button.d.ts +2 -6
- package/dist/ui/button.d.ts.map +1 -1
- package/dist/ui/button.js +9 -4
- package/dist/ui/calendar.js +12 -7
- package/dist/ui/carousel.js +20 -15
- package/dist/ui/confirm-dialog.js +9 -4
- package/dist/ui/context-menu.d.ts +26 -22
- package/dist/ui/context-menu.d.ts.map +1 -1
- package/dist/ui/context-menu.js +178 -85
- package/dist/ui/cta.d.ts +2 -8
- package/dist/ui/cta.d.ts.map +1 -1
- package/dist/ui/cta.js +13 -9
- package/dist/ui/date-picker.js +17 -12
- package/dist/ui/date-range-picker.js +14 -9
- package/dist/ui/datetime-picker.js +21 -16
- package/dist/ui/empty-state.js +32 -10
- package/dist/ui/input-group.js +9 -4
- package/dist/ui/input-otp.d.ts +13 -31
- package/dist/ui/input-otp.d.ts.map +1 -1
- package/dist/ui/input-otp.js +37 -18
- package/dist/ui/link.d.ts +4 -2
- package/dist/ui/link.d.ts.map +1 -1
- package/dist/ui/link.js +6 -4
- package/dist/ui/loading-button.js +41 -14
- package/dist/ui/marketing/Hero.js +9 -4
- package/dist/ui/marketing/PricingTable.js +9 -4
- package/dist/ui/marketing/index.js +9 -4
- package/dist/ui/molecules/Autocomplete/index.js +15 -10
- package/dist/ui/molecules/SearchAndFilter/SearchAndFilter.js +9 -4
- package/dist/ui/molecules/SearchAndFilter/index.js +9 -4
- package/dist/ui/organisms/ErrorBoundary/ErrorBoundary.js +12 -7
- package/dist/ui/organisms/ErrorBoundary/index.js +12 -7
- package/dist/ui/organisms/ListPage/ListPage.js +41 -14
- package/dist/ui/organisms/ListPage/index.js +41 -14
- package/dist/ui/page-header.js +32 -10
- package/dist/ui/pagination.d.ts +11 -22
- package/dist/ui/pagination.d.ts.map +1 -1
- package/dist/ui/pagination.js +98 -79
- package/dist/ui/resizable.d.ts +5 -20
- package/dist/ui/resizable.d.ts.map +1 -1
- package/dist/ui/resizable.js +6 -9
- package/dist/ui/section.d.ts +2 -9
- package/dist/ui/section.d.ts.map +1 -1
- package/dist/ui/section.js +12 -4
- package/dist/ui/sidebar.js +22 -17
- package/dist/ui/stack.d.ts +15 -23
- package/dist/ui/stack.d.ts.map +1 -1
- package/dist/ui/stack.js +32 -10
- package/dist/ui/stat-card-group.js +32 -10
- package/dist/ui/stepper.js +32 -10
- package/dist/ui/time-picker.js +13 -8
- package/dist/ui/toast.d.ts +20 -7
- package/dist/ui/toast.d.ts.map +1 -1
- package/dist/ui/toast.js +57 -29
- package/dist/ui/toaster.js +60 -32
- package/dist/ui/usecases/UseCaseCard.js +41 -14
- package/dist/ui/usecases/UserStoryCard.js +32 -10
- package/dist/ui/usecases/index.js +41 -14
- package/dist/ui/visually-hidden.d.ts +4 -2
- package/dist/ui/visually-hidden.d.ts.map +1 -1
- package/dist/ui/visually-hidden.js +8 -4
- package/package.json +11 -10
|
@@ -7,7 +7,6 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
7
7
|
});
|
|
8
8
|
|
|
9
9
|
// ui/button.tsx
|
|
10
|
-
import * as React from "react";
|
|
11
10
|
import { Slot } from "@radix-ui/react-slot";
|
|
12
11
|
import { cva } from "class-variance-authority";
|
|
13
12
|
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
@@ -34,7 +33,14 @@ var buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespa
|
|
|
34
33
|
size: "default"
|
|
35
34
|
}
|
|
36
35
|
});
|
|
37
|
-
|
|
36
|
+
function Button({
|
|
37
|
+
className,
|
|
38
|
+
variant,
|
|
39
|
+
size,
|
|
40
|
+
asChild = false,
|
|
41
|
+
ref,
|
|
42
|
+
...props
|
|
43
|
+
}) {
|
|
38
44
|
if (asChild) {
|
|
39
45
|
return /* @__PURE__ */ jsxDEV(Slot, {
|
|
40
46
|
"data-slot": "button",
|
|
@@ -48,8 +54,7 @@ var Button = React.forwardRef(({ className, variant, size, asChild = false, ...p
|
|
|
48
54
|
className: cn(buttonVariants({ variant, size, className })),
|
|
49
55
|
...props
|
|
50
56
|
}, undefined, false, undefined, this);
|
|
51
|
-
}
|
|
52
|
-
Button.displayName = "Button";
|
|
57
|
+
}
|
|
53
58
|
// ui/alert-dialog.tsx
|
|
54
59
|
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
|
|
55
60
|
import { cn as cn2 } from "@contractspec/lib.ui-kit-core/utils";
|
|
@@ -7,7 +7,6 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
7
7
|
});
|
|
8
8
|
|
|
9
9
|
// ui/button.tsx
|
|
10
|
-
import * as React from "react";
|
|
11
10
|
import { Slot } from "@radix-ui/react-slot";
|
|
12
11
|
import { cva } from "class-variance-authority";
|
|
13
12
|
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
@@ -34,7 +33,14 @@ var buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespa
|
|
|
34
33
|
size: "default"
|
|
35
34
|
}
|
|
36
35
|
});
|
|
37
|
-
|
|
36
|
+
function Button({
|
|
37
|
+
className,
|
|
38
|
+
variant,
|
|
39
|
+
size,
|
|
40
|
+
asChild = false,
|
|
41
|
+
ref,
|
|
42
|
+
...props
|
|
43
|
+
}) {
|
|
38
44
|
if (asChild) {
|
|
39
45
|
return /* @__PURE__ */ jsxDEV(Slot, {
|
|
40
46
|
"data-slot": "button",
|
|
@@ -48,8 +54,7 @@ var Button = React.forwardRef(({ className, variant, size, asChild = false, ...p
|
|
|
48
54
|
className: cn(buttonVariants({ variant, size, className })),
|
|
49
55
|
...props
|
|
50
56
|
}, undefined, false, undefined, this);
|
|
51
|
-
}
|
|
52
|
-
Button.displayName = "Button";
|
|
57
|
+
}
|
|
53
58
|
// ui/select.tsx
|
|
54
59
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
55
60
|
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
|
|
@@ -7,7 +7,6 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
7
7
|
});
|
|
8
8
|
|
|
9
9
|
// ui/button.tsx
|
|
10
|
-
import * as React from "react";
|
|
11
10
|
import { Slot } from "@radix-ui/react-slot";
|
|
12
11
|
import { cva } from "class-variance-authority";
|
|
13
12
|
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
@@ -34,7 +33,14 @@ var buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespa
|
|
|
34
33
|
size: "default"
|
|
35
34
|
}
|
|
36
35
|
});
|
|
37
|
-
|
|
36
|
+
function Button({
|
|
37
|
+
className,
|
|
38
|
+
variant,
|
|
39
|
+
size,
|
|
40
|
+
asChild = false,
|
|
41
|
+
ref,
|
|
42
|
+
...props
|
|
43
|
+
}) {
|
|
38
44
|
if (asChild) {
|
|
39
45
|
return /* @__PURE__ */ jsxDEV(Slot, {
|
|
40
46
|
"data-slot": "button",
|
|
@@ -48,8 +54,7 @@ var Button = React.forwardRef(({ className, variant, size, asChild = false, ...p
|
|
|
48
54
|
className: cn(buttonVariants({ variant, size, className })),
|
|
49
55
|
...props
|
|
50
56
|
}, undefined, false, undefined, this);
|
|
51
|
-
}
|
|
52
|
-
Button.displayName = "Button";
|
|
57
|
+
}
|
|
53
58
|
// ui/select.tsx
|
|
54
59
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
55
60
|
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
|
|
@@ -7,7 +7,6 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
7
7
|
});
|
|
8
8
|
|
|
9
9
|
// ui/button.tsx
|
|
10
|
-
import * as React from "react";
|
|
11
10
|
import { Slot } from "@radix-ui/react-slot";
|
|
12
11
|
import { cva } from "class-variance-authority";
|
|
13
12
|
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
@@ -34,7 +33,14 @@ var buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespa
|
|
|
34
33
|
size: "default"
|
|
35
34
|
}
|
|
36
35
|
});
|
|
37
|
-
|
|
36
|
+
function Button({
|
|
37
|
+
className,
|
|
38
|
+
variant,
|
|
39
|
+
size,
|
|
40
|
+
asChild = false,
|
|
41
|
+
ref,
|
|
42
|
+
...props
|
|
43
|
+
}) {
|
|
38
44
|
if (asChild) {
|
|
39
45
|
return /* @__PURE__ */ jsxDEV(Slot, {
|
|
40
46
|
"data-slot": "button",
|
|
@@ -48,8 +54,7 @@ var Button = React.forwardRef(({ className, variant, size, asChild = false, ...p
|
|
|
48
54
|
className: cn(buttonVariants({ variant, size, className })),
|
|
49
55
|
...props
|
|
50
56
|
}, undefined, false, undefined, this);
|
|
51
|
-
}
|
|
52
|
-
Button.displayName = "Button";
|
|
57
|
+
}
|
|
53
58
|
// ui/input.tsx
|
|
54
59
|
import { cn as cn2 } from "@contractspec/lib.ui-kit-core/utils";
|
|
55
60
|
import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
|
|
@@ -7,7 +7,6 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
7
7
|
});
|
|
8
8
|
|
|
9
9
|
// ui/button.tsx
|
|
10
|
-
import * as React from "react";
|
|
11
10
|
import { Slot } from "@radix-ui/react-slot";
|
|
12
11
|
import { cva } from "class-variance-authority";
|
|
13
12
|
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
@@ -34,7 +33,14 @@ var buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespa
|
|
|
34
33
|
size: "default"
|
|
35
34
|
}
|
|
36
35
|
});
|
|
37
|
-
|
|
36
|
+
function Button({
|
|
37
|
+
className,
|
|
38
|
+
variant,
|
|
39
|
+
size,
|
|
40
|
+
asChild = false,
|
|
41
|
+
ref,
|
|
42
|
+
...props
|
|
43
|
+
}) {
|
|
38
44
|
if (asChild) {
|
|
39
45
|
return /* @__PURE__ */ jsxDEV(Slot, {
|
|
40
46
|
"data-slot": "button",
|
|
@@ -48,8 +54,7 @@ var Button = React.forwardRef(({ className, variant, size, asChild = false, ...p
|
|
|
48
54
|
className: cn(buttonVariants({ variant, size, className })),
|
|
49
55
|
...props
|
|
50
56
|
}, undefined, false, undefined, this);
|
|
51
|
-
}
|
|
52
|
-
Button.displayName = "Button";
|
|
57
|
+
}
|
|
53
58
|
// ui/input.tsx
|
|
54
59
|
import { cn as cn2 } from "@contractspec/lib.ui-kit-core/utils";
|
|
55
60
|
import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
|
|
@@ -7,7 +7,6 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
7
7
|
});
|
|
8
8
|
|
|
9
9
|
// ui/button.tsx
|
|
10
|
-
import * as React from "react";
|
|
11
10
|
import { Slot } from "@radix-ui/react-slot";
|
|
12
11
|
import { cva } from "class-variance-authority";
|
|
13
12
|
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
@@ -34,7 +33,14 @@ var buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespa
|
|
|
34
33
|
size: "default"
|
|
35
34
|
}
|
|
36
35
|
});
|
|
37
|
-
|
|
36
|
+
function Button({
|
|
37
|
+
className,
|
|
38
|
+
variant,
|
|
39
|
+
size,
|
|
40
|
+
asChild = false,
|
|
41
|
+
ref,
|
|
42
|
+
...props
|
|
43
|
+
}) {
|
|
38
44
|
if (asChild) {
|
|
39
45
|
return /* @__PURE__ */ jsxDEV(Slot, {
|
|
40
46
|
"data-slot": "button",
|
|
@@ -48,8 +54,7 @@ var Button = React.forwardRef(({ className, variant, size, asChild = false, ...p
|
|
|
48
54
|
className: cn(buttonVariants({ variant, size, className })),
|
|
49
55
|
...props
|
|
50
56
|
}, undefined, false, undefined, this);
|
|
51
|
-
}
|
|
52
|
-
Button.displayName = "Button";
|
|
57
|
+
}
|
|
53
58
|
export {
|
|
54
59
|
buttonVariants,
|
|
55
60
|
Button
|
|
@@ -7,7 +7,6 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
7
7
|
});
|
|
8
8
|
|
|
9
9
|
// ui/button.tsx
|
|
10
|
-
import * as React from "react";
|
|
11
10
|
import { Slot } from "@radix-ui/react-slot";
|
|
12
11
|
import { cva } from "class-variance-authority";
|
|
13
12
|
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
@@ -34,7 +33,14 @@ var buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespa
|
|
|
34
33
|
size: "default"
|
|
35
34
|
}
|
|
36
35
|
});
|
|
37
|
-
|
|
36
|
+
function Button({
|
|
37
|
+
className,
|
|
38
|
+
variant,
|
|
39
|
+
size,
|
|
40
|
+
asChild = false,
|
|
41
|
+
ref,
|
|
42
|
+
...props
|
|
43
|
+
}) {
|
|
38
44
|
if (asChild) {
|
|
39
45
|
return /* @__PURE__ */ jsxDEV(Slot, {
|
|
40
46
|
"data-slot": "button",
|
|
@@ -48,10 +54,9 @@ var Button = React.forwardRef(({ className, variant, size, asChild = false, ...p
|
|
|
48
54
|
className: cn(buttonVariants({ variant, size, className })),
|
|
49
55
|
...props
|
|
50
56
|
}, undefined, false, undefined, this);
|
|
51
|
-
}
|
|
52
|
-
Button.displayName = "Button";
|
|
57
|
+
}
|
|
53
58
|
// ui/calendar.tsx
|
|
54
|
-
import * as
|
|
59
|
+
import * as React from "react";
|
|
55
60
|
import {
|
|
56
61
|
ChevronDownIcon,
|
|
57
62
|
ChevronLeftIcon,
|
|
@@ -157,8 +162,8 @@ function CalendarDayButton({
|
|
|
157
162
|
...props
|
|
158
163
|
}) {
|
|
159
164
|
const defaultClassNames = getDefaultClassNames();
|
|
160
|
-
const ref =
|
|
161
|
-
|
|
165
|
+
const ref = React.useRef(null);
|
|
166
|
+
React.useEffect(() => {
|
|
162
167
|
if (modifiers.focused)
|
|
163
168
|
ref.current?.focus();
|
|
164
169
|
}, [modifiers.focused]);
|
|
@@ -7,7 +7,6 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
7
7
|
});
|
|
8
8
|
|
|
9
9
|
// ui/button.tsx
|
|
10
|
-
import * as React from "react";
|
|
11
10
|
import { Slot } from "@radix-ui/react-slot";
|
|
12
11
|
import { cva } from "class-variance-authority";
|
|
13
12
|
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
@@ -34,7 +33,14 @@ var buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespa
|
|
|
34
33
|
size: "default"
|
|
35
34
|
}
|
|
36
35
|
});
|
|
37
|
-
|
|
36
|
+
function Button({
|
|
37
|
+
className,
|
|
38
|
+
variant,
|
|
39
|
+
size,
|
|
40
|
+
asChild = false,
|
|
41
|
+
ref,
|
|
42
|
+
...props
|
|
43
|
+
}) {
|
|
38
44
|
if (asChild) {
|
|
39
45
|
return /* @__PURE__ */ jsxDEV(Slot, {
|
|
40
46
|
"data-slot": "button",
|
|
@@ -48,8 +54,7 @@ var Button = React.forwardRef(({ className, variant, size, asChild = false, ...p
|
|
|
48
54
|
className: cn(buttonVariants({ variant, size, className })),
|
|
49
55
|
...props
|
|
50
56
|
}, undefined, false, undefined, this);
|
|
51
|
-
}
|
|
52
|
-
Button.displayName = "Button";
|
|
57
|
+
}
|
|
53
58
|
// ui/utils.ts
|
|
54
59
|
import { clsx } from "clsx";
|
|
55
60
|
import { twMerge } from "tailwind-merge";
|
|
@@ -58,14 +63,14 @@ function cn2(...inputs) {
|
|
|
58
63
|
}
|
|
59
64
|
|
|
60
65
|
// ui/carousel.tsx
|
|
61
|
-
import * as
|
|
66
|
+
import * as React from "react";
|
|
62
67
|
import useEmblaCarousel from "embla-carousel-react";
|
|
63
68
|
import { ArrowLeft, ArrowRight } from "lucide-react";
|
|
64
69
|
import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
|
|
65
70
|
"use client";
|
|
66
|
-
var CarouselContext =
|
|
71
|
+
var CarouselContext = React.createContext(null);
|
|
67
72
|
function useCarousel() {
|
|
68
|
-
const context =
|
|
73
|
+
const context = React.useContext(CarouselContext);
|
|
69
74
|
if (!context) {
|
|
70
75
|
throw new Error("useCarousel must be used within a <Carousel />");
|
|
71
76
|
}
|
|
@@ -84,21 +89,21 @@ function Carousel({
|
|
|
84
89
|
...opts,
|
|
85
90
|
axis: orientation === "horizontal" ? "x" : "y"
|
|
86
91
|
}, plugins);
|
|
87
|
-
const [canScrollPrev, setCanScrollPrev] =
|
|
88
|
-
const [canScrollNext, setCanScrollNext] =
|
|
89
|
-
const onSelect =
|
|
92
|
+
const [canScrollPrev, setCanScrollPrev] = React.useState(false);
|
|
93
|
+
const [canScrollNext, setCanScrollNext] = React.useState(false);
|
|
94
|
+
const onSelect = React.useCallback((api2) => {
|
|
90
95
|
if (!api2)
|
|
91
96
|
return;
|
|
92
97
|
setCanScrollPrev(api2.canScrollPrev());
|
|
93
98
|
setCanScrollNext(api2.canScrollNext());
|
|
94
99
|
}, []);
|
|
95
|
-
const scrollPrev =
|
|
100
|
+
const scrollPrev = React.useCallback(() => {
|
|
96
101
|
api?.scrollPrev();
|
|
97
102
|
}, [api]);
|
|
98
|
-
const scrollNext =
|
|
103
|
+
const scrollNext = React.useCallback(() => {
|
|
99
104
|
api?.scrollNext();
|
|
100
105
|
}, [api]);
|
|
101
|
-
const handleKeyDown =
|
|
106
|
+
const handleKeyDown = React.useCallback((event) => {
|
|
102
107
|
if (event.key === "ArrowLeft") {
|
|
103
108
|
event.preventDefault();
|
|
104
109
|
scrollPrev();
|
|
@@ -107,12 +112,12 @@ function Carousel({
|
|
|
107
112
|
scrollNext();
|
|
108
113
|
}
|
|
109
114
|
}, [scrollPrev, scrollNext]);
|
|
110
|
-
|
|
115
|
+
React.useEffect(() => {
|
|
111
116
|
if (!api || !setApi)
|
|
112
117
|
return;
|
|
113
118
|
setApi(api);
|
|
114
119
|
}, [api, setApi]);
|
|
115
|
-
|
|
120
|
+
React.useEffect(() => {
|
|
116
121
|
if (!api)
|
|
117
122
|
return;
|
|
118
123
|
onSelect(api);
|
|
@@ -7,7 +7,6 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
7
7
|
});
|
|
8
8
|
|
|
9
9
|
// ui/button.tsx
|
|
10
|
-
import * as React from "react";
|
|
11
10
|
import { Slot } from "@radix-ui/react-slot";
|
|
12
11
|
import { cva } from "class-variance-authority";
|
|
13
12
|
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
@@ -34,7 +33,14 @@ var buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespa
|
|
|
34
33
|
size: "default"
|
|
35
34
|
}
|
|
36
35
|
});
|
|
37
|
-
|
|
36
|
+
function Button({
|
|
37
|
+
className,
|
|
38
|
+
variant,
|
|
39
|
+
size,
|
|
40
|
+
asChild = false,
|
|
41
|
+
ref,
|
|
42
|
+
...props
|
|
43
|
+
}) {
|
|
38
44
|
if (asChild) {
|
|
39
45
|
return /* @__PURE__ */ jsxDEV(Slot, {
|
|
40
46
|
"data-slot": "button",
|
|
@@ -48,8 +54,7 @@ var Button = React.forwardRef(({ className, variant, size, asChild = false, ...p
|
|
|
48
54
|
className: cn(buttonVariants({ variant, size, className })),
|
|
49
55
|
...props
|
|
50
56
|
}, undefined, false, undefined, this);
|
|
51
|
-
}
|
|
52
|
-
Button.displayName = "Button";
|
|
57
|
+
}
|
|
53
58
|
// ui/alert-dialog.tsx
|
|
54
59
|
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
|
|
55
60
|
import { cn as cn2 } from "@contractspec/lib.ui-kit-core/utils";
|