@contractspec/lib.ui-kit-web 1.61.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
package/dist/ui/cta.js
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
var __require = import.meta.require;
|
|
3
3
|
|
|
4
4
|
// ui/button.tsx
|
|
5
|
-
import * as React from "react";
|
|
6
5
|
import { Slot } from "@radix-ui/react-slot";
|
|
7
6
|
import { cva } from "class-variance-authority";
|
|
8
7
|
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
@@ -29,7 +28,14 @@ var buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespa
|
|
|
29
28
|
size: "default"
|
|
30
29
|
}
|
|
31
30
|
});
|
|
32
|
-
|
|
31
|
+
function Button({
|
|
32
|
+
className,
|
|
33
|
+
variant,
|
|
34
|
+
size,
|
|
35
|
+
asChild = false,
|
|
36
|
+
ref,
|
|
37
|
+
...props
|
|
38
|
+
}) {
|
|
33
39
|
if (asChild) {
|
|
34
40
|
return /* @__PURE__ */ jsxDEV(Slot, {
|
|
35
41
|
"data-slot": "button",
|
|
@@ -43,13 +49,11 @@ var Button = React.forwardRef(({ className, variant, size, asChild = false, ...p
|
|
|
43
49
|
className: cn(buttonVariants({ variant, size, className })),
|
|
44
50
|
...props
|
|
45
51
|
}, undefined, false, undefined, this);
|
|
46
|
-
}
|
|
47
|
-
Button.displayName = "Button";
|
|
52
|
+
}
|
|
48
53
|
// ui/cta.tsx
|
|
49
|
-
import * as React2 from "react";
|
|
50
54
|
import { cn as cn2 } from "@contractspec/lib.ui-kit-core/utils";
|
|
51
55
|
import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
|
|
52
|
-
|
|
56
|
+
function Cta({
|
|
53
57
|
capture,
|
|
54
58
|
ctaName,
|
|
55
59
|
className,
|
|
@@ -58,8 +62,9 @@ var Cta = React2.forwardRef(({
|
|
|
58
62
|
onClick,
|
|
59
63
|
size = "lg",
|
|
60
64
|
children,
|
|
65
|
+
ref,
|
|
61
66
|
...props
|
|
62
|
-
}
|
|
67
|
+
}) {
|
|
63
68
|
const handleClick = (e) => {
|
|
64
69
|
if (ctaName && capture) {
|
|
65
70
|
try {
|
|
@@ -90,8 +95,7 @@ var Cta = React2.forwardRef(({
|
|
|
90
95
|
...props,
|
|
91
96
|
children
|
|
92
97
|
}, undefined, false, undefined, this);
|
|
93
|
-
}
|
|
94
|
-
Cta.displayName = "Cta";
|
|
98
|
+
}
|
|
95
99
|
export {
|
|
96
100
|
Cta
|
|
97
101
|
};
|
package/dist/ui/date-picker.js
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
var __require = import.meta.require;
|
|
3
3
|
|
|
4
4
|
// ui/button.tsx
|
|
5
|
-
import * as React from "react";
|
|
6
5
|
import { Slot } from "@radix-ui/react-slot";
|
|
7
6
|
import { cva } from "class-variance-authority";
|
|
8
7
|
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
@@ -29,7 +28,14 @@ var buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespa
|
|
|
29
28
|
size: "default"
|
|
30
29
|
}
|
|
31
30
|
});
|
|
32
|
-
|
|
31
|
+
function Button({
|
|
32
|
+
className,
|
|
33
|
+
variant,
|
|
34
|
+
size,
|
|
35
|
+
asChild = false,
|
|
36
|
+
ref,
|
|
37
|
+
...props
|
|
38
|
+
}) {
|
|
33
39
|
if (asChild) {
|
|
34
40
|
return /* @__PURE__ */ jsxDEV(Slot, {
|
|
35
41
|
"data-slot": "button",
|
|
@@ -43,8 +49,7 @@ var Button = React.forwardRef(({ className, variant, size, asChild = false, ...p
|
|
|
43
49
|
className: cn(buttonVariants({ variant, size, className })),
|
|
44
50
|
...props
|
|
45
51
|
}, undefined, false, undefined, this);
|
|
46
|
-
}
|
|
47
|
-
Button.displayName = "Button";
|
|
52
|
+
}
|
|
48
53
|
// ui/input.tsx
|
|
49
54
|
import { cn as cn2 } from "@contractspec/lib.ui-kit-core/utils";
|
|
50
55
|
import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
|
|
@@ -57,7 +62,7 @@ function Input({ className, type, ...props }) {
|
|
|
57
62
|
}, undefined, false, undefined, this);
|
|
58
63
|
}
|
|
59
64
|
// ui/calendar.tsx
|
|
60
|
-
import * as
|
|
65
|
+
import * as React from "react";
|
|
61
66
|
import {
|
|
62
67
|
ChevronDownIcon,
|
|
63
68
|
ChevronLeftIcon,
|
|
@@ -163,8 +168,8 @@ function CalendarDayButton({
|
|
|
163
168
|
...props
|
|
164
169
|
}) {
|
|
165
170
|
const defaultClassNames = getDefaultClassNames();
|
|
166
|
-
const ref =
|
|
167
|
-
|
|
171
|
+
const ref = React.useRef(null);
|
|
172
|
+
React.useEffect(() => {
|
|
168
173
|
if (modifiers.focused)
|
|
169
174
|
ref.current?.focus();
|
|
170
175
|
}, [modifiers.focused]);
|
|
@@ -227,7 +232,7 @@ function PopoverAnchor({
|
|
|
227
232
|
}, undefined, false, undefined, this);
|
|
228
233
|
}
|
|
229
234
|
// ui/date-picker.tsx
|
|
230
|
-
import * as
|
|
235
|
+
import * as React2 from "react";
|
|
231
236
|
import { CalendarIcon } from "lucide-react";
|
|
232
237
|
import { cn as cn5 } from "@contractspec/lib.ui-kit-core/utils";
|
|
233
238
|
import { jsxDEV as jsxDEV5 } from "react/jsx-dev-runtime";
|
|
@@ -242,10 +247,10 @@ function DatePicker({
|
|
|
242
247
|
className,
|
|
243
248
|
language
|
|
244
249
|
}) {
|
|
245
|
-
const [open, setOpen] =
|
|
246
|
-
const [month, setMonth] =
|
|
247
|
-
const [textValue, setTextValue] =
|
|
248
|
-
|
|
250
|
+
const [open, setOpen] = React2.useState(false);
|
|
251
|
+
const [month, setMonth] = React2.useState(value ?? new Date);
|
|
252
|
+
const [textValue, setTextValue] = React2.useState(formatDate(value));
|
|
253
|
+
React2.useEffect(() => {
|
|
249
254
|
setTextValue(formatDate(value));
|
|
250
255
|
if (value)
|
|
251
256
|
setMonth(value);
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
var __require = import.meta.require;
|
|
3
3
|
|
|
4
4
|
// ui/button.tsx
|
|
5
|
-
import * as React from "react";
|
|
6
5
|
import { Slot } from "@radix-ui/react-slot";
|
|
7
6
|
import { cva } from "class-variance-authority";
|
|
8
7
|
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
@@ -29,7 +28,14 @@ var buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespa
|
|
|
29
28
|
size: "default"
|
|
30
29
|
}
|
|
31
30
|
});
|
|
32
|
-
|
|
31
|
+
function Button({
|
|
32
|
+
className,
|
|
33
|
+
variant,
|
|
34
|
+
size,
|
|
35
|
+
asChild = false,
|
|
36
|
+
ref,
|
|
37
|
+
...props
|
|
38
|
+
}) {
|
|
33
39
|
if (asChild) {
|
|
34
40
|
return /* @__PURE__ */ jsxDEV(Slot, {
|
|
35
41
|
"data-slot": "button",
|
|
@@ -43,10 +49,9 @@ var Button = React.forwardRef(({ className, variant, size, asChild = false, ...p
|
|
|
43
49
|
className: cn(buttonVariants({ variant, size, className })),
|
|
44
50
|
...props
|
|
45
51
|
}, undefined, false, undefined, this);
|
|
46
|
-
}
|
|
47
|
-
Button.displayName = "Button";
|
|
52
|
+
}
|
|
48
53
|
// ui/calendar.tsx
|
|
49
|
-
import * as
|
|
54
|
+
import * as React from "react";
|
|
50
55
|
import {
|
|
51
56
|
ChevronDownIcon,
|
|
52
57
|
ChevronLeftIcon,
|
|
@@ -152,8 +157,8 @@ function CalendarDayButton({
|
|
|
152
157
|
...props
|
|
153
158
|
}) {
|
|
154
159
|
const defaultClassNames = getDefaultClassNames();
|
|
155
|
-
const ref =
|
|
156
|
-
|
|
160
|
+
const ref = React.useRef(null);
|
|
161
|
+
React.useEffect(() => {
|
|
157
162
|
if (modifiers.focused)
|
|
158
163
|
ref.current?.focus();
|
|
159
164
|
}, [modifiers.focused]);
|
|
@@ -216,7 +221,7 @@ function PopoverAnchor({
|
|
|
216
221
|
}, undefined, false, undefined, this);
|
|
217
222
|
}
|
|
218
223
|
// ui/date-range-picker.tsx
|
|
219
|
-
import * as
|
|
224
|
+
import * as React2 from "react";
|
|
220
225
|
import { cn as cn4 } from "@contractspec/lib.ui-kit-core/utils";
|
|
221
226
|
import { jsxDEV as jsxDEV4 } from "react/jsx-dev-runtime";
|
|
222
227
|
"use client";
|
|
@@ -228,7 +233,7 @@ function DateRangePicker({
|
|
|
228
233
|
maxDate,
|
|
229
234
|
className
|
|
230
235
|
}) {
|
|
231
|
-
const [open, setOpen] =
|
|
236
|
+
const [open, setOpen] = React2.useState(false);
|
|
232
237
|
return /* @__PURE__ */ jsxDEV4(Popover, {
|
|
233
238
|
open,
|
|
234
239
|
onOpenChange: setOpen,
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
var __require = import.meta.require;
|
|
3
3
|
|
|
4
4
|
// ui/button.tsx
|
|
5
|
-
import * as React from "react";
|
|
6
5
|
import { Slot } from "@radix-ui/react-slot";
|
|
7
6
|
import { cva } from "class-variance-authority";
|
|
8
7
|
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
@@ -29,7 +28,14 @@ var buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespa
|
|
|
29
28
|
size: "default"
|
|
30
29
|
}
|
|
31
30
|
});
|
|
32
|
-
|
|
31
|
+
function Button({
|
|
32
|
+
className,
|
|
33
|
+
variant,
|
|
34
|
+
size,
|
|
35
|
+
asChild = false,
|
|
36
|
+
ref,
|
|
37
|
+
...props
|
|
38
|
+
}) {
|
|
33
39
|
if (asChild) {
|
|
34
40
|
return /* @__PURE__ */ jsxDEV(Slot, {
|
|
35
41
|
"data-slot": "button",
|
|
@@ -43,8 +49,7 @@ var Button = React.forwardRef(({ className, variant, size, asChild = false, ...p
|
|
|
43
49
|
className: cn(buttonVariants({ variant, size, className })),
|
|
44
50
|
...props
|
|
45
51
|
}, undefined, false, undefined, this);
|
|
46
|
-
}
|
|
47
|
-
Button.displayName = "Button";
|
|
52
|
+
}
|
|
48
53
|
// ui/input.tsx
|
|
49
54
|
import { cn as cn2 } from "@contractspec/lib.ui-kit-core/utils";
|
|
50
55
|
import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
|
|
@@ -57,7 +62,7 @@ function Input({ className, type, ...props }) {
|
|
|
57
62
|
}, undefined, false, undefined, this);
|
|
58
63
|
}
|
|
59
64
|
// ui/calendar.tsx
|
|
60
|
-
import * as
|
|
65
|
+
import * as React from "react";
|
|
61
66
|
import {
|
|
62
67
|
ChevronDownIcon,
|
|
63
68
|
ChevronLeftIcon,
|
|
@@ -163,8 +168,8 @@ function CalendarDayButton({
|
|
|
163
168
|
...props
|
|
164
169
|
}) {
|
|
165
170
|
const defaultClassNames = getDefaultClassNames();
|
|
166
|
-
const ref =
|
|
167
|
-
|
|
171
|
+
const ref = React.useRef(null);
|
|
172
|
+
React.useEffect(() => {
|
|
168
173
|
if (modifiers.focused)
|
|
169
174
|
ref.current?.focus();
|
|
170
175
|
}, [modifiers.focused]);
|
|
@@ -227,7 +232,7 @@ function PopoverAnchor({
|
|
|
227
232
|
}, undefined, false, undefined, this);
|
|
228
233
|
}
|
|
229
234
|
// ui/date-picker.tsx
|
|
230
|
-
import * as
|
|
235
|
+
import * as React2 from "react";
|
|
231
236
|
import { CalendarIcon } from "lucide-react";
|
|
232
237
|
import { cn as cn5 } from "@contractspec/lib.ui-kit-core/utils";
|
|
233
238
|
import { jsxDEV as jsxDEV5 } from "react/jsx-dev-runtime";
|
|
@@ -242,10 +247,10 @@ function DatePicker({
|
|
|
242
247
|
className,
|
|
243
248
|
language
|
|
244
249
|
}) {
|
|
245
|
-
const [open, setOpen] =
|
|
246
|
-
const [month, setMonth] =
|
|
247
|
-
const [textValue, setTextValue] =
|
|
248
|
-
|
|
250
|
+
const [open, setOpen] = React2.useState(false);
|
|
251
|
+
const [month, setMonth] = React2.useState(value ?? new Date);
|
|
252
|
+
const [textValue, setTextValue] = React2.useState(formatDate(value));
|
|
253
|
+
React2.useEffect(() => {
|
|
249
254
|
setTextValue(formatDate(value));
|
|
250
255
|
if (value)
|
|
251
256
|
setMonth(value);
|
|
@@ -342,7 +347,7 @@ function DatePicker({
|
|
|
342
347
|
}
|
|
343
348
|
|
|
344
349
|
// ui/time-picker.tsx
|
|
345
|
-
import * as
|
|
350
|
+
import * as React3 from "react";
|
|
346
351
|
import { cn as cn6 } from "@contractspec/lib.ui-kit-core/utils";
|
|
347
352
|
import { jsxDEV as jsxDEV6 } from "react/jsx-dev-runtime";
|
|
348
353
|
"use client";
|
|
@@ -363,9 +368,9 @@ function TimePicker({
|
|
|
363
368
|
is24Hour = true,
|
|
364
369
|
className
|
|
365
370
|
}) {
|
|
366
|
-
const [open, setOpen] =
|
|
367
|
-
const [hours, setHours] =
|
|
368
|
-
const [minutes, setMinutes] =
|
|
371
|
+
const [open, setOpen] = React3.useState(false);
|
|
372
|
+
const [hours, setHours] = React3.useState(() => value ? String(value.getHours()).padStart(2, "0") : "");
|
|
373
|
+
const [minutes, setMinutes] = React3.useState(() => value ? String(value.getMinutes()).padStart(2, "0") : "");
|
|
369
374
|
const commit = (h, m) => {
|
|
370
375
|
const base = value ?? new Date;
|
|
371
376
|
const next = new Date(base);
|
package/dist/ui/empty-state.js
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
var __require = import.meta.require;
|
|
3
3
|
|
|
4
4
|
// ui/stack.tsx
|
|
5
|
-
import * as React from "react";
|
|
6
5
|
import { cva } from "class-variance-authority";
|
|
7
6
|
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
8
7
|
import { jsxDEV } from "react/jsx-dev-runtime";
|
|
@@ -38,15 +37,22 @@ var vStackVariants = cva("flex flex-col", {
|
|
|
38
37
|
justify: "start"
|
|
39
38
|
}
|
|
40
39
|
});
|
|
41
|
-
|
|
40
|
+
function VStack({
|
|
41
|
+
className,
|
|
42
|
+
gap,
|
|
43
|
+
align,
|
|
44
|
+
justify,
|
|
45
|
+
as = "div",
|
|
46
|
+
ref,
|
|
47
|
+
...props
|
|
48
|
+
}) {
|
|
42
49
|
const Comp = as;
|
|
43
50
|
return /* @__PURE__ */ jsxDEV(Comp, {
|
|
44
51
|
ref,
|
|
45
52
|
className: cn(vStackVariants({ gap, align, justify }), className),
|
|
46
53
|
...props
|
|
47
54
|
}, undefined, false, undefined, this);
|
|
48
|
-
}
|
|
49
|
-
VStack.displayName = "VStack";
|
|
55
|
+
}
|
|
50
56
|
var hStackVariants = cva("flex flex-row", {
|
|
51
57
|
variants: {
|
|
52
58
|
gap: {
|
|
@@ -86,15 +92,23 @@ var hStackVariants = cva("flex flex-row", {
|
|
|
86
92
|
wrap: "wrap"
|
|
87
93
|
}
|
|
88
94
|
});
|
|
89
|
-
|
|
95
|
+
function HStack({
|
|
96
|
+
className,
|
|
97
|
+
gap,
|
|
98
|
+
align,
|
|
99
|
+
justify,
|
|
100
|
+
wrap,
|
|
101
|
+
as = "div",
|
|
102
|
+
ref,
|
|
103
|
+
...props
|
|
104
|
+
}) {
|
|
90
105
|
const Comp = as;
|
|
91
106
|
return /* @__PURE__ */ jsxDEV(Comp, {
|
|
92
107
|
ref,
|
|
93
108
|
className: cn(hStackVariants({ gap, align, justify, wrap }), className),
|
|
94
109
|
...props
|
|
95
110
|
}, undefined, false, undefined, this);
|
|
96
|
-
}
|
|
97
|
-
HStack.displayName = "HStack";
|
|
111
|
+
}
|
|
98
112
|
var boxVariants = cva("flex flex-row", {
|
|
99
113
|
variants: {
|
|
100
114
|
gap: {
|
|
@@ -134,15 +148,23 @@ var boxVariants = cva("flex flex-row", {
|
|
|
134
148
|
wrap: "nowrap"
|
|
135
149
|
}
|
|
136
150
|
});
|
|
137
|
-
|
|
151
|
+
function Box({
|
|
152
|
+
className,
|
|
153
|
+
gap,
|
|
154
|
+
align,
|
|
155
|
+
justify,
|
|
156
|
+
wrap,
|
|
157
|
+
as = "div",
|
|
158
|
+
ref,
|
|
159
|
+
...props
|
|
160
|
+
}) {
|
|
138
161
|
const Comp = as;
|
|
139
162
|
return /* @__PURE__ */ jsxDEV(Comp, {
|
|
140
163
|
ref,
|
|
141
164
|
className: cn(boxVariants({ gap, align, justify, wrap }), className),
|
|
142
165
|
...props
|
|
143
166
|
}, undefined, false, undefined, this);
|
|
144
|
-
}
|
|
145
|
-
Box.displayName = "Box";
|
|
167
|
+
}
|
|
146
168
|
// ui/empty-state.tsx
|
|
147
169
|
import { cva as cva2 } from "class-variance-authority";
|
|
148
170
|
import { cn as cn2 } from "@contractspec/lib.ui-kit-core/utils";
|
package/dist/ui/input-group.js
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
var __require = import.meta.require;
|
|
3
3
|
|
|
4
4
|
// ui/button.tsx
|
|
5
|
-
import * as React from "react";
|
|
6
5
|
import { Slot } from "@radix-ui/react-slot";
|
|
7
6
|
import { cva } from "class-variance-authority";
|
|
8
7
|
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
@@ -29,7 +28,14 @@ var buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespa
|
|
|
29
28
|
size: "default"
|
|
30
29
|
}
|
|
31
30
|
});
|
|
32
|
-
|
|
31
|
+
function Button({
|
|
32
|
+
className,
|
|
33
|
+
variant,
|
|
34
|
+
size,
|
|
35
|
+
asChild = false,
|
|
36
|
+
ref,
|
|
37
|
+
...props
|
|
38
|
+
}) {
|
|
33
39
|
if (asChild) {
|
|
34
40
|
return /* @__PURE__ */ jsxDEV(Slot, {
|
|
35
41
|
"data-slot": "button",
|
|
@@ -43,8 +49,7 @@ var Button = React.forwardRef(({ className, variant, size, asChild = false, ...p
|
|
|
43
49
|
className: cn(buttonVariants({ variant, size, className })),
|
|
44
50
|
...props
|
|
45
51
|
}, undefined, false, undefined, this);
|
|
46
|
-
}
|
|
47
|
-
Button.displayName = "Button";
|
|
52
|
+
}
|
|
48
53
|
// ui/input.tsx
|
|
49
54
|
import { cn as cn2 } from "@contractspec/lib.ui-kit-core/utils";
|
|
50
55
|
import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
|
package/dist/ui/input-otp.d.ts
CHANGED
|
@@ -1,35 +1,17 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
containerClassName?: string;
|
|
11
|
-
noScriptCSSFallback?: string | null;
|
|
12
|
-
} & {
|
|
13
|
-
render: (props: import("input-otp").RenderProps) => React.ReactNode;
|
|
14
|
-
children?: never;
|
|
15
|
-
} & React.RefAttributes<HTMLInputElement>, "ref"> | Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
|
|
16
|
-
value?: string;
|
|
17
|
-
onChange?: (newValue: string) => unknown;
|
|
18
|
-
maxLength: number;
|
|
19
|
-
textAlign?: "left" | "center" | "right";
|
|
20
|
-
onComplete?: (...args: any[]) => unknown;
|
|
21
|
-
pushPasswordManagerStrategy?: "increase-width" | "none";
|
|
22
|
-
pasteTransformer?: (pasted: string) => string;
|
|
23
|
-
containerClassName?: string;
|
|
24
|
-
noScriptCSSFallback?: string | null;
|
|
25
|
-
} & {
|
|
26
|
-
render?: never;
|
|
27
|
-
children: React.ReactNode;
|
|
28
|
-
} & React.RefAttributes<HTMLInputElement>, "ref">) & React.RefAttributes<HTMLInputElement>>;
|
|
29
|
-
declare const InputOTPGroup: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
30
|
-
declare const InputOTPSlot: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
2
|
+
import { OTPInput } from 'input-otp';
|
|
3
|
+
declare function InputOTP({ className, containerClassName, ref, ...props }: React.ComponentPropsWithoutRef<typeof OTPInput> & {
|
|
4
|
+
ref?: React.Ref<React.ElementRef<typeof OTPInput>>;
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function InputOTPGroup({ className, ref, ...props }: React.ComponentPropsWithoutRef<'div'> & {
|
|
7
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function InputOTPSlot({ index, className, ref, ...props }: React.ComponentPropsWithoutRef<'div'> & {
|
|
31
10
|
index: number;
|
|
32
|
-
|
|
33
|
-
|
|
11
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
12
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function InputOTPSeparator({ ref, ...props }: React.ComponentPropsWithoutRef<'div'> & {
|
|
14
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
15
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
34
16
|
export { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator };
|
|
35
17
|
//# sourceMappingURL=input-otp.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-otp.d.ts","sourceRoot":"","sources":["../../ui/input-otp.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"input-otp.d.ts","sourceRoot":"","sources":["../../ui/input-otp.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAmB,MAAM,WAAW,CAAC;AAKtD,iBAAS,QAAQ,CAAC,EAChB,SAAS,EACT,kBAAkB,EAClB,GAAG,EACH,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,wBAAwB,CAAC,OAAO,QAAQ,CAAC,GAAG;IACnD,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,QAAQ,CAAC,CAAC,CAAC;CACpD,2CAYA;AAED,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,GAAG,EACH,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,GAAG;IACzC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;CACjC,2CAIA;AAED,iBAAS,YAAY,CAAC,EACpB,KAAK,EACL,SAAS,EACT,GAAG,EACH,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,GAAG;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;CACjC,2CAsBA;AAED,iBAAS,iBAAiB,CAAC,EACzB,GAAG,EACH,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,GAAG;IACzC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;CACjC,2CAMA;AAED,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,YAAY,EAAE,iBAAiB,EAAE,CAAC"}
|
package/dist/ui/input-otp.js
CHANGED
|
@@ -8,20 +8,36 @@ import { Dot } from "lucide-react";
|
|
|
8
8
|
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
9
9
|
import { jsxDEV } from "react/jsx-dev-runtime";
|
|
10
10
|
"use client";
|
|
11
|
-
|
|
11
|
+
function InputOTP({
|
|
12
|
+
className,
|
|
13
|
+
containerClassName,
|
|
12
14
|
ref,
|
|
13
|
-
containerClassName: cn("flex items-center gap-2 has-disabled:opacity-50", containerClassName),
|
|
14
|
-
className: cn("disabled:cursor-not-allowed", className),
|
|
15
15
|
...props
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
}) {
|
|
17
|
+
return /* @__PURE__ */ jsxDEV(OTPInput, {
|
|
18
|
+
ref,
|
|
19
|
+
containerClassName: cn("flex items-center gap-2 has-disabled:opacity-50", containerClassName),
|
|
20
|
+
className: cn("disabled:cursor-not-allowed", className),
|
|
21
|
+
...props
|
|
22
|
+
}, undefined, false, undefined, this);
|
|
23
|
+
}
|
|
24
|
+
function InputOTPGroup({
|
|
25
|
+
className,
|
|
26
|
+
ref,
|
|
27
|
+
...props
|
|
28
|
+
}) {
|
|
29
|
+
return /* @__PURE__ */ jsxDEV("div", {
|
|
30
|
+
ref,
|
|
31
|
+
className: cn("flex items-center", className),
|
|
32
|
+
...props
|
|
33
|
+
}, undefined, false, undefined, this);
|
|
34
|
+
}
|
|
35
|
+
function InputOTPSlot({
|
|
36
|
+
index,
|
|
37
|
+
className,
|
|
19
38
|
ref,
|
|
20
|
-
className: cn("flex items-center", className),
|
|
21
39
|
...props
|
|
22
|
-
}
|
|
23
|
-
InputOTPGroup.displayName = "InputOTPGroup";
|
|
24
|
-
var InputOTPSlot = React.forwardRef(({ index, className, ...props }, ref) => {
|
|
40
|
+
}) {
|
|
25
41
|
const inputOTPContext = React.useContext(OTPInputContext);
|
|
26
42
|
const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index] || {};
|
|
27
43
|
return /* @__PURE__ */ jsxDEV("div", {
|
|
@@ -38,15 +54,18 @@ var InputOTPSlot = React.forwardRef(({ index, className, ...props }, ref) => {
|
|
|
38
54
|
}, undefined, false, undefined, this)
|
|
39
55
|
]
|
|
40
56
|
}, undefined, true, undefined, this);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
var InputOTPSeparator = React.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsxDEV("div", {
|
|
57
|
+
}
|
|
58
|
+
function InputOTPSeparator({
|
|
44
59
|
ref,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
60
|
+
...props
|
|
61
|
+
}) {
|
|
62
|
+
return /* @__PURE__ */ jsxDEV("div", {
|
|
63
|
+
ref,
|
|
64
|
+
role: "separator",
|
|
65
|
+
...props,
|
|
66
|
+
children: /* @__PURE__ */ jsxDEV(Dot, {}, undefined, false, undefined, this)
|
|
67
|
+
}, undefined, false, undefined, this);
|
|
68
|
+
}
|
|
50
69
|
export {
|
|
51
70
|
InputOTPSlot,
|
|
52
71
|
InputOTPSeparator,
|
package/dist/ui/link.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
declare function Link({ className, ref, ...props }: React.HTMLProps<HTMLAnchorElement> & {
|
|
2
3
|
href: string;
|
|
3
|
-
|
|
4
|
+
ref?: React.Ref<HTMLAnchorElement>;
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
4
6
|
export { Link };
|
|
5
7
|
//# sourceMappingURL=link.d.ts.map
|
package/dist/ui/link.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../ui/link.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../ui/link.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,iBAAS,IAAI,CAAC,EACZ,SAAS,EACT,GAAG,EACH,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,SAAS,CAAC,iBAAiB,CAAC,GAAG;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;CACpC,2CAQA;AAED,OAAO,EAAE,IAAI,EAAE,CAAC"}
|
package/dist/ui/link.js
CHANGED
|
@@ -2,18 +2,20 @@
|
|
|
2
2
|
var __require = import.meta.require;
|
|
3
3
|
|
|
4
4
|
// ui/link.tsx
|
|
5
|
-
import { forwardRef } from "react";
|
|
6
5
|
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
7
6
|
import NextLink from "next/link";
|
|
8
7
|
import { jsxDEV } from "react/jsx-dev-runtime";
|
|
9
|
-
|
|
8
|
+
function Link({
|
|
9
|
+
className,
|
|
10
|
+
ref,
|
|
11
|
+
...props
|
|
12
|
+
}) {
|
|
10
13
|
return /* @__PURE__ */ jsxDEV(NextLink, {
|
|
11
14
|
ref,
|
|
12
15
|
className: cn('className="text-primary underline"', className),
|
|
13
16
|
...props
|
|
14
17
|
}, undefined, false, undefined, this);
|
|
15
|
-
}
|
|
16
|
-
Link.displayName = "Link";
|
|
18
|
+
}
|
|
17
19
|
export {
|
|
18
20
|
Link
|
|
19
21
|
};
|