@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
|
@@ -6,108 +6,201 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
6
6
|
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
7
7
|
});
|
|
8
8
|
|
|
9
|
+
// ui/utils.ts
|
|
10
|
+
import { clsx } from "clsx";
|
|
11
|
+
import { twMerge } from "tailwind-merge";
|
|
12
|
+
function cn(...inputs) {
|
|
13
|
+
return twMerge(clsx(inputs));
|
|
14
|
+
}
|
|
15
|
+
|
|
9
16
|
// ui/context-menu.tsx
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import { Check, ChevronRight, Circle } from "lucide-react";
|
|
13
|
-
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
17
|
+
import { ContextMenu as ContextMenuPrimitive } from "radix-ui";
|
|
18
|
+
import { CheckIcon, ChevronRightIcon } from "lucide-react";
|
|
14
19
|
import { jsxDEV } from "react/jsx-dev-runtime";
|
|
15
20
|
"use client";
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
21
|
+
function ContextMenu({
|
|
22
|
+
...props
|
|
23
|
+
}) {
|
|
24
|
+
return /* @__PURE__ */ jsxDEV(ContextMenuPrimitive.Root, {
|
|
25
|
+
"data-slot": "context-menu",
|
|
26
|
+
...props
|
|
27
|
+
}, undefined, false, undefined, this);
|
|
28
|
+
}
|
|
29
|
+
function ContextMenuTrigger({
|
|
30
|
+
className,
|
|
31
|
+
...props
|
|
32
|
+
}) {
|
|
33
|
+
return /* @__PURE__ */ jsxDEV(ContextMenuPrimitive.Trigger, {
|
|
34
|
+
"data-slot": "context-menu-trigger",
|
|
35
|
+
className: cn("select-none", className),
|
|
36
|
+
...props
|
|
37
|
+
}, undefined, false, undefined, this);
|
|
38
|
+
}
|
|
39
|
+
function ContextMenuGroup({
|
|
40
|
+
...props
|
|
41
|
+
}) {
|
|
42
|
+
return /* @__PURE__ */ jsxDEV(ContextMenuPrimitive.Group, {
|
|
43
|
+
"data-slot": "context-menu-group",
|
|
44
|
+
...props
|
|
45
|
+
}, undefined, false, undefined, this);
|
|
46
|
+
}
|
|
47
|
+
function ContextMenuPortal({
|
|
48
|
+
...props
|
|
49
|
+
}) {
|
|
50
|
+
return /* @__PURE__ */ jsxDEV(ContextMenuPrimitive.Portal, {
|
|
51
|
+
"data-slot": "context-menu-portal",
|
|
52
|
+
...props
|
|
53
|
+
}, undefined, false, undefined, this);
|
|
54
|
+
}
|
|
55
|
+
function ContextMenuSub({
|
|
56
|
+
...props
|
|
57
|
+
}) {
|
|
58
|
+
return /* @__PURE__ */ jsxDEV(ContextMenuPrimitive.Sub, {
|
|
59
|
+
"data-slot": "context-menu-sub",
|
|
60
|
+
...props
|
|
61
|
+
}, undefined, false, undefined, this);
|
|
62
|
+
}
|
|
63
|
+
function ContextMenuRadioGroup({
|
|
64
|
+
...props
|
|
65
|
+
}) {
|
|
66
|
+
return /* @__PURE__ */ jsxDEV(ContextMenuPrimitive.RadioGroup, {
|
|
67
|
+
"data-slot": "context-menu-radio-group",
|
|
68
|
+
...props
|
|
69
|
+
}, undefined, false, undefined, this);
|
|
70
|
+
}
|
|
71
|
+
function ContextMenuContent({
|
|
72
|
+
className,
|
|
73
|
+
...props
|
|
74
|
+
}) {
|
|
75
|
+
return /* @__PURE__ */ jsxDEV(ContextMenuPrimitive.Portal, {
|
|
76
|
+
children: /* @__PURE__ */ jsxDEV(ContextMenuPrimitive.Content, {
|
|
77
|
+
"data-slot": "context-menu-content",
|
|
78
|
+
className: cn("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 bg-popover text-popover-foreground z-50 max-h-(--radix-context-menu-content-available-height) min-w-36 origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg p-1 shadow-md ring-1 duration-100", className),
|
|
79
|
+
...props
|
|
30
80
|
}, undefined, false, undefined, this)
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
81
|
+
}, undefined, false, undefined, this);
|
|
82
|
+
}
|
|
83
|
+
function ContextMenuItem({
|
|
84
|
+
className,
|
|
85
|
+
inset,
|
|
86
|
+
variant = "default",
|
|
37
87
|
...props
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
className: cn("bg-
|
|
88
|
+
}) {
|
|
89
|
+
return /* @__PURE__ */ jsxDEV(ContextMenuPrimitive.Item, {
|
|
90
|
+
"data-slot": "context-menu-item",
|
|
91
|
+
"data-inset": inset,
|
|
92
|
+
"data-variant": variant,
|
|
93
|
+
className: cn("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:text-destructive focus:*:[svg]:text-accent-foreground group/context-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:pl-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
44
94
|
...props
|
|
45
|
-
}, undefined, false, undefined, this)
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
95
|
+
}, undefined, false, undefined, this);
|
|
96
|
+
}
|
|
97
|
+
function ContextMenuSubTrigger({
|
|
98
|
+
className,
|
|
99
|
+
inset,
|
|
100
|
+
children,
|
|
51
101
|
...props
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
102
|
+
}) {
|
|
103
|
+
return /* @__PURE__ */ jsxDEV(ContextMenuPrimitive.SubTrigger, {
|
|
104
|
+
"data-slot": "context-menu-sub-trigger",
|
|
105
|
+
"data-inset": inset,
|
|
106
|
+
className: cn("focus:bg-accent focus:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none data-inset:pl-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
107
|
+
...props,
|
|
108
|
+
children: [
|
|
109
|
+
children,
|
|
110
|
+
/* @__PURE__ */ jsxDEV(ChevronRightIcon, {
|
|
111
|
+
className: "cn-rtl-flip ml-auto"
|
|
112
|
+
}, undefined, false, undefined, this)
|
|
113
|
+
]
|
|
114
|
+
}, undefined, true, undefined, this);
|
|
115
|
+
}
|
|
116
|
+
function ContextMenuSubContent({
|
|
117
|
+
className,
|
|
118
|
+
...props
|
|
119
|
+
}) {
|
|
120
|
+
return /* @__PURE__ */ jsxDEV(ContextMenuPrimitive.SubContent, {
|
|
121
|
+
"data-slot": "context-menu-sub-content",
|
|
122
|
+
className: cn("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 bg-popover text-popover-foreground z-50 min-w-32 origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-lg border p-1 shadow-lg duration-100", className),
|
|
123
|
+
...props
|
|
124
|
+
}, undefined, false, undefined, this);
|
|
125
|
+
}
|
|
126
|
+
function ContextMenuCheckboxItem({
|
|
127
|
+
className,
|
|
128
|
+
children,
|
|
57
129
|
checked,
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
130
|
+
inset,
|
|
131
|
+
...props
|
|
132
|
+
}) {
|
|
133
|
+
return /* @__PURE__ */ jsxDEV(ContextMenuPrimitive.CheckboxItem, {
|
|
134
|
+
"data-slot": "context-menu-checkbox-item",
|
|
135
|
+
"data-inset": inset,
|
|
136
|
+
className: cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:pl-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
137
|
+
checked,
|
|
138
|
+
...props,
|
|
139
|
+
children: [
|
|
140
|
+
/* @__PURE__ */ jsxDEV("span", {
|
|
141
|
+
className: "pointer-events-none absolute right-2",
|
|
142
|
+
children: /* @__PURE__ */ jsxDEV(ContextMenuPrimitive.ItemIndicator, {
|
|
143
|
+
children: /* @__PURE__ */ jsxDEV(CheckIcon, {}, undefined, false, undefined, this)
|
|
65
144
|
}, undefined, false, undefined, this)
|
|
66
|
-
}, undefined, false, undefined, this)
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
...props
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
145
|
+
}, undefined, false, undefined, this),
|
|
146
|
+
children
|
|
147
|
+
]
|
|
148
|
+
}, undefined, true, undefined, this);
|
|
149
|
+
}
|
|
150
|
+
function ContextMenuRadioItem({
|
|
151
|
+
className,
|
|
152
|
+
children,
|
|
153
|
+
inset,
|
|
154
|
+
...props
|
|
155
|
+
}) {
|
|
156
|
+
return /* @__PURE__ */ jsxDEV(ContextMenuPrimitive.RadioItem, {
|
|
157
|
+
"data-slot": "context-menu-radio-item",
|
|
158
|
+
"data-inset": inset,
|
|
159
|
+
className: cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:pl-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
160
|
+
...props,
|
|
161
|
+
children: [
|
|
162
|
+
/* @__PURE__ */ jsxDEV("span", {
|
|
163
|
+
className: "pointer-events-none absolute right-2",
|
|
164
|
+
children: /* @__PURE__ */ jsxDEV(ContextMenuPrimitive.ItemIndicator, {
|
|
165
|
+
children: /* @__PURE__ */ jsxDEV(CheckIcon, {}, undefined, false, undefined, this)
|
|
82
166
|
}, undefined, false, undefined, this)
|
|
83
|
-
}, undefined, false, undefined, this)
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
className: cn("text-foreground px-2 py-1.5 text-base font-semibold", inset && "pl-8", className),
|
|
167
|
+
}, undefined, false, undefined, this),
|
|
168
|
+
children
|
|
169
|
+
]
|
|
170
|
+
}, undefined, true, undefined, this);
|
|
171
|
+
}
|
|
172
|
+
function ContextMenuLabel({
|
|
173
|
+
className,
|
|
174
|
+
inset,
|
|
92
175
|
...props
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
176
|
+
}) {
|
|
177
|
+
return /* @__PURE__ */ jsxDEV(ContextMenuPrimitive.Label, {
|
|
178
|
+
"data-slot": "context-menu-label",
|
|
179
|
+
"data-inset": inset,
|
|
180
|
+
className: cn("text-muted-foreground px-1.5 py-1 text-xs font-medium data-inset:pl-7", className),
|
|
181
|
+
...props
|
|
182
|
+
}, undefined, false, undefined, this);
|
|
183
|
+
}
|
|
184
|
+
function ContextMenuSeparator({
|
|
185
|
+
className,
|
|
98
186
|
...props
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
|
|
187
|
+
}) {
|
|
188
|
+
return /* @__PURE__ */ jsxDEV(ContextMenuPrimitive.Separator, {
|
|
189
|
+
"data-slot": "context-menu-separator",
|
|
190
|
+
className: cn("bg-border -mx-1 my-1 h-px", className),
|
|
191
|
+
...props
|
|
192
|
+
}, undefined, false, undefined, this);
|
|
193
|
+
}
|
|
194
|
+
function ContextMenuShortcut({
|
|
102
195
|
className,
|
|
103
196
|
...props
|
|
104
|
-
})
|
|
197
|
+
}) {
|
|
105
198
|
return /* @__PURE__ */ jsxDEV("span", {
|
|
106
|
-
|
|
199
|
+
"data-slot": "context-menu-shortcut",
|
|
200
|
+
className: cn("text-muted-foreground group-focus/context-menu-item:text-accent-foreground ml-auto text-xs tracking-widest", className),
|
|
107
201
|
...props
|
|
108
202
|
}, undefined, false, undefined, this);
|
|
109
|
-
}
|
|
110
|
-
ContextMenuShortcut.displayName = "ContextMenuShortcut";
|
|
203
|
+
}
|
|
111
204
|
export {
|
|
112
205
|
ContextMenuTrigger,
|
|
113
206
|
ContextMenuSubTrigger,
|
package/dist/browser/ui/cta.js
CHANGED
|
@@ -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,13 +54,11 @@ 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/cta.tsx
|
|
54
|
-
import * as React2 from "react";
|
|
55
59
|
import { cn as cn2 } from "@contractspec/lib.ui-kit-core/utils";
|
|
56
60
|
import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
|
|
57
|
-
|
|
61
|
+
function Cta({
|
|
58
62
|
capture,
|
|
59
63
|
ctaName,
|
|
60
64
|
className,
|
|
@@ -63,8 +67,9 @@ var Cta = React2.forwardRef(({
|
|
|
63
67
|
onClick,
|
|
64
68
|
size = "lg",
|
|
65
69
|
children,
|
|
70
|
+
ref,
|
|
66
71
|
...props
|
|
67
|
-
}
|
|
72
|
+
}) {
|
|
68
73
|
const handleClick = (e) => {
|
|
69
74
|
if (ctaName && capture) {
|
|
70
75
|
try {
|
|
@@ -95,8 +100,7 @@ var Cta = React2.forwardRef(({
|
|
|
95
100
|
...props,
|
|
96
101
|
children
|
|
97
102
|
}, undefined, false, undefined, this);
|
|
98
|
-
}
|
|
99
|
-
Cta.displayName = "Cta";
|
|
103
|
+
}
|
|
100
104
|
export {
|
|
101
105
|
Cta
|
|
102
106
|
};
|
|
@@ -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";
|
|
@@ -62,7 +67,7 @@ function Input({ className, type, ...props }) {
|
|
|
62
67
|
}, undefined, false, undefined, this);
|
|
63
68
|
}
|
|
64
69
|
// ui/calendar.tsx
|
|
65
|
-
import * as
|
|
70
|
+
import * as React from "react";
|
|
66
71
|
import {
|
|
67
72
|
ChevronDownIcon,
|
|
68
73
|
ChevronLeftIcon,
|
|
@@ -168,8 +173,8 @@ function CalendarDayButton({
|
|
|
168
173
|
...props
|
|
169
174
|
}) {
|
|
170
175
|
const defaultClassNames = getDefaultClassNames();
|
|
171
|
-
const ref =
|
|
172
|
-
|
|
176
|
+
const ref = React.useRef(null);
|
|
177
|
+
React.useEffect(() => {
|
|
173
178
|
if (modifiers.focused)
|
|
174
179
|
ref.current?.focus();
|
|
175
180
|
}, [modifiers.focused]);
|
|
@@ -232,7 +237,7 @@ function PopoverAnchor({
|
|
|
232
237
|
}, undefined, false, undefined, this);
|
|
233
238
|
}
|
|
234
239
|
// ui/date-picker.tsx
|
|
235
|
-
import * as
|
|
240
|
+
import * as React2 from "react";
|
|
236
241
|
import { CalendarIcon } from "lucide-react";
|
|
237
242
|
import { cn as cn5 } from "@contractspec/lib.ui-kit-core/utils";
|
|
238
243
|
import { jsxDEV as jsxDEV5 } from "react/jsx-dev-runtime";
|
|
@@ -247,10 +252,10 @@ function DatePicker({
|
|
|
247
252
|
className,
|
|
248
253
|
language
|
|
249
254
|
}) {
|
|
250
|
-
const [open, setOpen] =
|
|
251
|
-
const [month, setMonth] =
|
|
252
|
-
const [textValue, setTextValue] =
|
|
253
|
-
|
|
255
|
+
const [open, setOpen] = React2.useState(false);
|
|
256
|
+
const [month, setMonth] = React2.useState(value ?? new Date);
|
|
257
|
+
const [textValue, setTextValue] = React2.useState(formatDate(value));
|
|
258
|
+
React2.useEffect(() => {
|
|
254
259
|
setTextValue(formatDate(value));
|
|
255
260
|
if (value)
|
|
256
261
|
setMonth(value);
|
|
@@ -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]);
|
|
@@ -221,7 +226,7 @@ function PopoverAnchor({
|
|
|
221
226
|
}, undefined, false, undefined, this);
|
|
222
227
|
}
|
|
223
228
|
// ui/date-range-picker.tsx
|
|
224
|
-
import * as
|
|
229
|
+
import * as React2 from "react";
|
|
225
230
|
import { cn as cn4 } from "@contractspec/lib.ui-kit-core/utils";
|
|
226
231
|
import { jsxDEV as jsxDEV4 } from "react/jsx-dev-runtime";
|
|
227
232
|
"use client";
|
|
@@ -233,7 +238,7 @@ function DateRangePicker({
|
|
|
233
238
|
maxDate,
|
|
234
239
|
className
|
|
235
240
|
}) {
|
|
236
|
-
const [open, setOpen] =
|
|
241
|
+
const [open, setOpen] = React2.useState(false);
|
|
237
242
|
return /* @__PURE__ */ jsxDEV4(Popover, {
|
|
238
243
|
open,
|
|
239
244
|
onOpenChange: setOpen,
|
|
@@ -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";
|
|
@@ -62,7 +67,7 @@ function Input({ className, type, ...props }) {
|
|
|
62
67
|
}, undefined, false, undefined, this);
|
|
63
68
|
}
|
|
64
69
|
// ui/calendar.tsx
|
|
65
|
-
import * as
|
|
70
|
+
import * as React from "react";
|
|
66
71
|
import {
|
|
67
72
|
ChevronDownIcon,
|
|
68
73
|
ChevronLeftIcon,
|
|
@@ -168,8 +173,8 @@ function CalendarDayButton({
|
|
|
168
173
|
...props
|
|
169
174
|
}) {
|
|
170
175
|
const defaultClassNames = getDefaultClassNames();
|
|
171
|
-
const ref =
|
|
172
|
-
|
|
176
|
+
const ref = React.useRef(null);
|
|
177
|
+
React.useEffect(() => {
|
|
173
178
|
if (modifiers.focused)
|
|
174
179
|
ref.current?.focus();
|
|
175
180
|
}, [modifiers.focused]);
|
|
@@ -232,7 +237,7 @@ function PopoverAnchor({
|
|
|
232
237
|
}, undefined, false, undefined, this);
|
|
233
238
|
}
|
|
234
239
|
// ui/date-picker.tsx
|
|
235
|
-
import * as
|
|
240
|
+
import * as React2 from "react";
|
|
236
241
|
import { CalendarIcon } from "lucide-react";
|
|
237
242
|
import { cn as cn5 } from "@contractspec/lib.ui-kit-core/utils";
|
|
238
243
|
import { jsxDEV as jsxDEV5 } from "react/jsx-dev-runtime";
|
|
@@ -247,10 +252,10 @@ function DatePicker({
|
|
|
247
252
|
className,
|
|
248
253
|
language
|
|
249
254
|
}) {
|
|
250
|
-
const [open, setOpen] =
|
|
251
|
-
const [month, setMonth] =
|
|
252
|
-
const [textValue, setTextValue] =
|
|
253
|
-
|
|
255
|
+
const [open, setOpen] = React2.useState(false);
|
|
256
|
+
const [month, setMonth] = React2.useState(value ?? new Date);
|
|
257
|
+
const [textValue, setTextValue] = React2.useState(formatDate(value));
|
|
258
|
+
React2.useEffect(() => {
|
|
254
259
|
setTextValue(formatDate(value));
|
|
255
260
|
if (value)
|
|
256
261
|
setMonth(value);
|
|
@@ -347,7 +352,7 @@ function DatePicker({
|
|
|
347
352
|
}
|
|
348
353
|
|
|
349
354
|
// ui/time-picker.tsx
|
|
350
|
-
import * as
|
|
355
|
+
import * as React3 from "react";
|
|
351
356
|
import { cn as cn6 } from "@contractspec/lib.ui-kit-core/utils";
|
|
352
357
|
import { jsxDEV as jsxDEV6 } from "react/jsx-dev-runtime";
|
|
353
358
|
"use client";
|
|
@@ -368,9 +373,9 @@ function TimePicker({
|
|
|
368
373
|
is24Hour = true,
|
|
369
374
|
className
|
|
370
375
|
}) {
|
|
371
|
-
const [open, setOpen] =
|
|
372
|
-
const [hours, setHours] =
|
|
373
|
-
const [minutes, setMinutes] =
|
|
376
|
+
const [open, setOpen] = React3.useState(false);
|
|
377
|
+
const [hours, setHours] = React3.useState(() => value ? String(value.getHours()).padStart(2, "0") : "");
|
|
378
|
+
const [minutes, setMinutes] = React3.useState(() => value ? String(value.getMinutes()).padStart(2, "0") : "");
|
|
374
379
|
const commit = (h, m) => {
|
|
375
380
|
const base = value ?? new Date;
|
|
376
381
|
const next = new Date(base);
|