@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
package/dist/ui/sidebar.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/utils.ts
|
|
49
54
|
import { clsx } from "clsx";
|
|
50
55
|
import { twMerge } from "tailwind-merge";
|
|
@@ -213,11 +218,11 @@ function SheetDescription({
|
|
|
213
218
|
}, undefined, false, undefined, this);
|
|
214
219
|
}
|
|
215
220
|
// ui/use-mobile.tsx
|
|
216
|
-
import * as
|
|
221
|
+
import * as React from "react";
|
|
217
222
|
var MOBILE_BREAKPOINT = 640;
|
|
218
223
|
function useIsMobile() {
|
|
219
|
-
const [isMobile, setIsMobile] =
|
|
220
|
-
|
|
224
|
+
const [isMobile, setIsMobile] = React.useState(undefined);
|
|
225
|
+
React.useEffect(() => {
|
|
221
226
|
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
222
227
|
const onChange = () => {
|
|
223
228
|
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
@@ -284,7 +289,7 @@ function TooltipContent({
|
|
|
284
289
|
}, undefined, false, undefined, this);
|
|
285
290
|
}
|
|
286
291
|
// ui/sidebar.tsx
|
|
287
|
-
import * as
|
|
292
|
+
import * as React2 from "react";
|
|
288
293
|
import { Slot as Slot2 } from "@radix-ui/react-slot";
|
|
289
294
|
import { cva as cva2 } from "class-variance-authority";
|
|
290
295
|
import { PanelLeftIcon } from "lucide-react";
|
|
@@ -297,9 +302,9 @@ var SIDEBAR_WIDTH = "16rem";
|
|
|
297
302
|
var SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
298
303
|
var SIDEBAR_WIDTH_ICON = "3rem";
|
|
299
304
|
var SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
300
|
-
var SidebarContext =
|
|
305
|
+
var SidebarContext = React2.createContext(null);
|
|
301
306
|
function useSidebar() {
|
|
302
|
-
const context =
|
|
307
|
+
const context = React2.useContext(SidebarContext);
|
|
303
308
|
if (!context) {
|
|
304
309
|
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
305
310
|
}
|
|
@@ -315,10 +320,10 @@ function SidebarProvider({
|
|
|
315
320
|
...props
|
|
316
321
|
}) {
|
|
317
322
|
const isMobile = useIsMobile();
|
|
318
|
-
const [openMobile, setOpenMobile] =
|
|
319
|
-
const [_open, _setOpen] =
|
|
323
|
+
const [openMobile, setOpenMobile] = React2.useState(false);
|
|
324
|
+
const [_open, _setOpen] = React2.useState(defaultOpen);
|
|
320
325
|
const open = openProp ?? _open;
|
|
321
|
-
const setOpen =
|
|
326
|
+
const setOpen = React2.useCallback((value) => {
|
|
322
327
|
const openState = typeof value === "function" ? value(open) : value;
|
|
323
328
|
if (setOpenProp) {
|
|
324
329
|
setOpenProp(openState);
|
|
@@ -327,10 +332,10 @@ function SidebarProvider({
|
|
|
327
332
|
}
|
|
328
333
|
document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
|
|
329
334
|
}, [setOpenProp, open]);
|
|
330
|
-
const toggleSidebar =
|
|
335
|
+
const toggleSidebar = React2.useCallback(() => {
|
|
331
336
|
return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
|
|
332
337
|
}, [isMobile, setOpen, setOpenMobile]);
|
|
333
|
-
|
|
338
|
+
React2.useEffect(() => {
|
|
334
339
|
const handleKeyDown = (event) => {
|
|
335
340
|
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
336
341
|
event.preventDefault();
|
|
@@ -341,7 +346,7 @@ function SidebarProvider({
|
|
|
341
346
|
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
342
347
|
}, [toggleSidebar]);
|
|
343
348
|
const state = open ? "expanded" : "collapsed";
|
|
344
|
-
const contextValue =
|
|
349
|
+
const contextValue = React2.useMemo(() => ({
|
|
345
350
|
state,
|
|
346
351
|
open,
|
|
347
352
|
setOpen,
|
|
@@ -711,7 +716,7 @@ function SidebarMenuSkeleton({
|
|
|
711
716
|
showIcon = false,
|
|
712
717
|
...props
|
|
713
718
|
}) {
|
|
714
|
-
const width =
|
|
719
|
+
const width = React2.useMemo(() => {
|
|
715
720
|
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
716
721
|
}, []);
|
|
717
722
|
return /* @__PURE__ */ jsxDEV7("div", {
|
package/dist/ui/stack.d.ts
CHANGED
|
@@ -5,40 +5,32 @@ declare const vStackVariants: (props?: ({
|
|
|
5
5
|
align?: "center" | "end" | "start" | "stretch" | null | undefined;
|
|
6
6
|
justify?: "center" | "end" | "start" | "between" | "around" | "evenly" | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
as?: "div" | "section" | "nav" | "main" | "header" | "footer" | "article" | "aside";
|
|
14
|
-
} & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
type VStackProps = React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof vStackVariants> & {
|
|
9
|
+
as?: 'div' | 'section' | 'nav' | 'main' | 'header' | 'footer' | 'article' | 'aside';
|
|
10
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
11
|
+
};
|
|
12
|
+
declare function VStack({ className, gap, align, justify, as, ref, ...props }: VStackProps): import("react/jsx-runtime").JSX.Element;
|
|
15
13
|
declare const hStackVariants: (props?: ({
|
|
16
14
|
gap?: "none" | "sm" | "lg" | "xs" | "md" | "xl" | "2xl" | null | undefined;
|
|
17
15
|
align?: "center" | "end" | "start" | "stretch" | "baseline" | null | undefined;
|
|
18
16
|
justify?: "center" | "end" | "start" | "between" | "around" | "evenly" | null | undefined;
|
|
19
17
|
wrap?: "wrap" | "nowrap" | "wrapReverse" | null | undefined;
|
|
20
18
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
} & import("class-variance-authority/types").ClassProp) | undefined) => string> & {
|
|
27
|
-
as?: "div" | "section" | "nav" | "header" | "footer" | "article" | "aside";
|
|
28
|
-
} & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
+
type HStackProps = React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof hStackVariants> & {
|
|
20
|
+
as?: 'div' | 'section' | 'nav' | 'header' | 'footer' | 'article' | 'aside';
|
|
21
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
22
|
+
};
|
|
23
|
+
declare function HStack({ className, gap, align, justify, wrap, as, ref, ...props }: HStackProps): import("react/jsx-runtime").JSX.Element;
|
|
29
24
|
declare const boxVariants: (props?: ({
|
|
30
25
|
gap?: "none" | "sm" | "lg" | "xs" | "md" | "xl" | "2xl" | null | undefined;
|
|
31
26
|
align?: "center" | "end" | "start" | "stretch" | "baseline" | null | undefined;
|
|
32
27
|
justify?: "center" | "end" | "start" | "between" | "around" | "evenly" | null | undefined;
|
|
33
28
|
wrap?: "wrap" | "nowrap" | "wrapReverse" | null | undefined;
|
|
34
29
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
} & import("class-variance-authority/types").ClassProp) | undefined) => string> & {
|
|
41
|
-
as?: "div" | "section" | "nav" | "header" | "footer" | "article" | "aside";
|
|
42
|
-
} & React.RefAttributes<HTMLDivElement>>;
|
|
30
|
+
type BoxProps = React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof boxVariants> & {
|
|
31
|
+
as?: 'div' | 'section' | 'nav' | 'header' | 'footer' | 'article' | 'aside';
|
|
32
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
33
|
+
};
|
|
34
|
+
declare function Box({ className, gap, align, justify, wrap, as, ref, ...props }: BoxProps): import("react/jsx-runtime").JSX.Element;
|
|
43
35
|
export { VStack, HStack, vStackVariants, hStackVariants, boxVariants, Box };
|
|
44
36
|
//# sourceMappingURL=stack.d.ts.map
|
package/dist/ui/stack.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stack.d.ts","sourceRoot":"","sources":["../../ui/stack.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGlE,QAAA,MAAM,cAAc;;;;8EA+BlB,CAAC;
|
|
1
|
+
{"version":3,"file":"stack.d.ts","sourceRoot":"","sources":["../../ui/stack.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGlE,QAAA,MAAM,cAAc;;;;8EA+BlB,CAAC;AAEH,KAAK,WAAW,GAAG,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,GACrD,YAAY,CAAC,OAAO,cAAc,CAAC,GAAG;IACpC,EAAE,CAAC,EACC,KAAK,GACL,SAAS,GACT,KAAK,GACL,MAAM,GACN,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,OAAO,CAAC;IAC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AW,EAAE,GAAG,EAAE,CAAC"}
|
package/dist/ui/stack.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
|
export {
|
|
147
169
|
vStackVariants,
|
|
148
170
|
hStackVariants,
|
|
@@ -72,7 +72,6 @@ function CardFooter({
|
|
|
72
72
|
}, undefined, false, undefined, this);
|
|
73
73
|
}
|
|
74
74
|
// ui/stack.tsx
|
|
75
|
-
import * as React from "react";
|
|
76
75
|
import { cva } from "class-variance-authority";
|
|
77
76
|
import { cn as cn2 } from "@contractspec/lib.ui-kit-core/utils";
|
|
78
77
|
import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
|
|
@@ -108,15 +107,22 @@ var vStackVariants = cva("flex flex-col", {
|
|
|
108
107
|
justify: "start"
|
|
109
108
|
}
|
|
110
109
|
});
|
|
111
|
-
|
|
110
|
+
function VStack({
|
|
111
|
+
className,
|
|
112
|
+
gap,
|
|
113
|
+
align,
|
|
114
|
+
justify,
|
|
115
|
+
as = "div",
|
|
116
|
+
ref,
|
|
117
|
+
...props
|
|
118
|
+
}) {
|
|
112
119
|
const Comp = as;
|
|
113
120
|
return /* @__PURE__ */ jsxDEV2(Comp, {
|
|
114
121
|
ref,
|
|
115
122
|
className: cn2(vStackVariants({ gap, align, justify }), className),
|
|
116
123
|
...props
|
|
117
124
|
}, undefined, false, undefined, this);
|
|
118
|
-
}
|
|
119
|
-
VStack.displayName = "VStack";
|
|
125
|
+
}
|
|
120
126
|
var hStackVariants = cva("flex flex-row", {
|
|
121
127
|
variants: {
|
|
122
128
|
gap: {
|
|
@@ -156,15 +162,23 @@ var hStackVariants = cva("flex flex-row", {
|
|
|
156
162
|
wrap: "wrap"
|
|
157
163
|
}
|
|
158
164
|
});
|
|
159
|
-
|
|
165
|
+
function HStack({
|
|
166
|
+
className,
|
|
167
|
+
gap,
|
|
168
|
+
align,
|
|
169
|
+
justify,
|
|
170
|
+
wrap,
|
|
171
|
+
as = "div",
|
|
172
|
+
ref,
|
|
173
|
+
...props
|
|
174
|
+
}) {
|
|
160
175
|
const Comp = as;
|
|
161
176
|
return /* @__PURE__ */ jsxDEV2(Comp, {
|
|
162
177
|
ref,
|
|
163
178
|
className: cn2(hStackVariants({ gap, align, justify, wrap }), className),
|
|
164
179
|
...props
|
|
165
180
|
}, undefined, false, undefined, this);
|
|
166
|
-
}
|
|
167
|
-
HStack.displayName = "HStack";
|
|
181
|
+
}
|
|
168
182
|
var boxVariants = cva("flex flex-row", {
|
|
169
183
|
variants: {
|
|
170
184
|
gap: {
|
|
@@ -204,15 +218,23 @@ var boxVariants = cva("flex flex-row", {
|
|
|
204
218
|
wrap: "nowrap"
|
|
205
219
|
}
|
|
206
220
|
});
|
|
207
|
-
|
|
221
|
+
function Box({
|
|
222
|
+
className,
|
|
223
|
+
gap,
|
|
224
|
+
align,
|
|
225
|
+
justify,
|
|
226
|
+
wrap,
|
|
227
|
+
as = "div",
|
|
228
|
+
ref,
|
|
229
|
+
...props
|
|
230
|
+
}) {
|
|
208
231
|
const Comp = as;
|
|
209
232
|
return /* @__PURE__ */ jsxDEV2(Comp, {
|
|
210
233
|
ref,
|
|
211
234
|
className: cn2(boxVariants({ gap, align, justify, wrap }), className),
|
|
212
235
|
...props
|
|
213
236
|
}, undefined, false, undefined, this);
|
|
214
|
-
}
|
|
215
|
-
Box.displayName = "Box";
|
|
237
|
+
}
|
|
216
238
|
// ui/stat-card-group.tsx
|
|
217
239
|
import { jsxDEV as jsxDEV3 } from "react/jsx-dev-runtime";
|
|
218
240
|
function toneClasses(tone) {
|
package/dist/ui/stepper.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/stepper.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/time-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/popover.tsx
|
|
49
54
|
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
50
55
|
import { cn as cn2 } from "@contractspec/lib.ui-kit-core/utils";
|
|
@@ -91,7 +96,7 @@ function PopoverAnchor({
|
|
|
91
96
|
}, undefined, false, undefined, this);
|
|
92
97
|
}
|
|
93
98
|
// ui/time-picker.tsx
|
|
94
|
-
import * as
|
|
99
|
+
import * as React from "react";
|
|
95
100
|
import { cn as cn3 } from "@contractspec/lib.ui-kit-core/utils";
|
|
96
101
|
import { jsxDEV as jsxDEV3 } from "react/jsx-dev-runtime";
|
|
97
102
|
"use client";
|
|
@@ -112,9 +117,9 @@ function TimePicker({
|
|
|
112
117
|
is24Hour = true,
|
|
113
118
|
className
|
|
114
119
|
}) {
|
|
115
|
-
const [open, setOpen] =
|
|
116
|
-
const [hours, setHours] =
|
|
117
|
-
const [minutes, setMinutes] =
|
|
120
|
+
const [open, setOpen] = React.useState(false);
|
|
121
|
+
const [hours, setHours] = React.useState(() => value ? String(value.getHours()).padStart(2, "0") : "");
|
|
122
|
+
const [minutes, setMinutes] = React.useState(() => value ? String(value.getMinutes()).padStart(2, "0") : "");
|
|
118
123
|
const commit = (h, m) => {
|
|
119
124
|
const base = value ?? new Date;
|
|
120
125
|
const next = new Date(base);
|
package/dist/ui/toast.d.ts
CHANGED
|
@@ -2,14 +2,27 @@ import * as React from 'react';
|
|
|
2
2
|
import * as ToastPrimitives from '@radix-ui/react-toast';
|
|
3
3
|
import { type VariantProps } from 'class-variance-authority';
|
|
4
4
|
declare const ToastProvider: React.FC<ToastPrimitives.ToastProviderProps>;
|
|
5
|
-
declare
|
|
6
|
-
|
|
5
|
+
declare function ToastViewport({ className, ref, ...props }: React.ComponentPropsWithoutRef<typeof ToastPrimitives.Viewport> & {
|
|
6
|
+
ref?: React.Ref<React.ElementRef<typeof ToastPrimitives.Viewport>>;
|
|
7
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare const toastVariants: (props?: ({
|
|
7
9
|
variant?: "default" | "destructive" | null | undefined;
|
|
8
|
-
} & import("class-variance-authority/types").ClassProp) | undefined) => string
|
|
9
|
-
declare
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
declare
|
|
10
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
11
|
+
declare function Toast({ className, variant, ref, ...props }: React.ComponentPropsWithoutRef<typeof ToastPrimitives.Root> & VariantProps<typeof toastVariants> & {
|
|
12
|
+
ref?: React.Ref<React.ElementRef<typeof ToastPrimitives.Root>>;
|
|
13
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare function ToastAction({ className, ref, ...props }: React.ComponentPropsWithoutRef<typeof ToastPrimitives.Action> & {
|
|
15
|
+
ref?: React.Ref<React.ElementRef<typeof ToastPrimitives.Action>>;
|
|
16
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
declare function ToastClose({ className, ref, ...props }: React.ComponentPropsWithoutRef<typeof ToastPrimitives.Close> & {
|
|
18
|
+
ref?: React.Ref<React.ElementRef<typeof ToastPrimitives.Close>>;
|
|
19
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
declare function ToastTitle({ className, ref, ...props }: React.ComponentPropsWithoutRef<typeof ToastPrimitives.Title> & {
|
|
21
|
+
ref?: React.Ref<React.ElementRef<typeof ToastPrimitives.Title>>;
|
|
22
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
declare function ToastDescription({ className, ref, ...props }: React.ComponentPropsWithoutRef<typeof ToastPrimitives.Description> & {
|
|
24
|
+
ref?: React.Ref<React.ElementRef<typeof ToastPrimitives.Description>>;
|
|
25
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
13
26
|
type ToastProps = React.ComponentPropsWithoutRef<typeof Toast>;
|
|
14
27
|
type ToastActionElement = React.ReactElement<typeof ToastAction>;
|
|
15
28
|
export { type ToastProps, type ToastActionElement, ToastProvider, ToastViewport, Toast, ToastTitle, ToastDescription, ToastClose, ToastAction, };
|
package/dist/ui/toast.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toast.d.ts","sourceRoot":"","sources":["../../ui/toast.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,eAAe,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAKlE,QAAA,MAAM,aAAa,8CAA2B,CAAC;AAE/C,QAAA,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"toast.d.ts","sourceRoot":"","sources":["../../ui/toast.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO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