@examplary/ui 1.15.0 → 1.17.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/components/question-types/format-question-type.d.ts +1 -1
- package/dist/components/ui/alert.d.ts +9 -0
- package/dist/components/ui/alert.js +50 -0
- package/dist/components/ui/card.d.ts +8 -0
- package/dist/components/ui/card.js +56 -0
- package/dist/components/ui/checkbox.js +0 -1
- package/dist/components/ui/dialog.d.ts +21 -0
- package/dist/components/ui/dialog.js +66 -0
- package/dist/components/ui/dropdown.d.ts +27 -0
- package/dist/components/ui/dropdown.js +83 -0
- package/dist/components/ui/form.d.ts +23 -0
- package/dist/components/ui/form.js +82 -0
- package/dist/components/ui/index.d.ts +15 -0
- package/dist/components/ui/index.js +15 -0
- package/dist/components/ui/label.js +0 -1
- package/dist/components/ui/popover.d.ts +10 -0
- package/dist/components/ui/popover.js +37 -0
- package/dist/components/ui/progress-bar.d.ts +3 -0
- package/dist/components/ui/progress-bar.js +5 -0
- package/dist/components/ui/radio-group.js +0 -1
- package/dist/components/ui/resizable.d.ts +10 -0
- package/dist/components/ui/resizable.js +63 -0
- package/dist/components/ui/separator.d.ts +4 -0
- package/dist/components/ui/separator.js +32 -0
- package/dist/components/ui/sheet.d.ts +25 -0
- package/dist/components/ui/sheet.js +76 -0
- package/dist/components/ui/slider.d.ts +4 -0
- package/dist/components/ui/slider.js +38 -0
- package/dist/components/ui/switch.d.ts +7 -0
- package/dist/components/ui/switch.js +55 -0
- package/dist/components/ui/table.d.ts +10 -0
- package/dist/components/ui/table.js +66 -0
- package/dist/components/ui/textarea.d.ts +4 -0
- package/dist/components/ui/textarea.js +31 -0
- package/dist/components/ui/tooltip.d.ts +7 -0
- package/dist/components/ui/tooltip.js +35 -0
- package/dist/components/web-components/page-clipping.js +1 -1
- package/dist/src/global.css +1 -1
- package/dist/utils.d.ts +1 -1
- package/package.json +12 -3
- package/src/global.css +1 -1
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
+
import { useRef, useState, useEffect } from "react";
|
|
25
|
+
import * as ResizablePrimitive from "react-resizable-panels";
|
|
26
|
+
import { GripVertical } from "lucide-react";
|
|
27
|
+
import { cn } from "../../utils";
|
|
28
|
+
var ResizablePanelGroup = function (_a) {
|
|
29
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
30
|
+
return (_jsx(ResizablePrimitive.PanelGroup, __assign({ className: cn("flex h-full w-full font-base data-[panel-group-direction=vertical]:flex-col", className) }, props)));
|
|
31
|
+
};
|
|
32
|
+
var ResizablePanel = function (_a) {
|
|
33
|
+
var onResize = _a.onResize, props = __rest(_a, ["onResize"]);
|
|
34
|
+
return (_jsx(ResizablePrimitive.Panel, __assign({ onResize: function (size, prevSize) {
|
|
35
|
+
setTimeout(function () { return window.dispatchEvent(new Event("resize")); }, 1);
|
|
36
|
+
onResize === null || onResize === void 0 ? void 0 : onResize(size, prevSize);
|
|
37
|
+
} }, props)));
|
|
38
|
+
};
|
|
39
|
+
var FloatingResizablePanel = function (_a) {
|
|
40
|
+
var onResize = _a.onResize, _b = _a.floatClassName, floatClassName = _b === void 0 ? "" : _b, children = _a.children, props = __rest(_a, ["onResize", "floatClassName", "children"]);
|
|
41
|
+
var ref = useRef(null);
|
|
42
|
+
var _c = useState("auto"), width = _c[0], setWidth = _c[1];
|
|
43
|
+
var updateSize = function () {
|
|
44
|
+
if (ref.current) {
|
|
45
|
+
var rect = ref.current.getBoundingClientRect();
|
|
46
|
+
setWidth(rect.width);
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
useEffect(function () {
|
|
50
|
+
updateSize();
|
|
51
|
+
window.addEventListener("resize", updateSize);
|
|
52
|
+
return function () { return window.removeEventListener("resize", updateSize); };
|
|
53
|
+
}, []);
|
|
54
|
+
return (_jsx(ResizablePrimitive.Panel, __assign({ onResize: function (size, prevSize) {
|
|
55
|
+
setTimeout(function () { return window.dispatchEvent(new Event("resize")); }, 1);
|
|
56
|
+
onResize === null || onResize === void 0 ? void 0 : onResize(size, prevSize);
|
|
57
|
+
} }, props, { children: _jsx("div", { ref: ref, className: "h-full", children: _jsx("div", { className: cn("fixed top-36 bottom-20 overflow-auto", floatClassName), style: { width: width }, children: children }) }) })));
|
|
58
|
+
};
|
|
59
|
+
var ResizableHandle = function (_a) {
|
|
60
|
+
var withHandle = _a.withHandle, className = _a.className, props = __rest(_a, ["withHandle", "className"]);
|
|
61
|
+
return (_jsx(ResizablePrimitive.PanelResizeHandle, __assign({ className: cn("relative flex w-0.5 items-center justify-center bg-border dark:bg-darkBorder after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-black focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-0.5 data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90", className) }, props, { children: withHandle && (_jsx("div", { className: "z-10 flex h-4 w-3 items-center justify-center rounded-sm bg-border dark:bg-darkBorder", children: _jsx(GripVertical, { className: "h-2.5 w-2.5" }) })) })));
|
|
62
|
+
};
|
|
63
|
+
export { ResizablePanelGroup, ResizablePanel, ResizableHandle, FloatingResizablePanel, };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
3
|
+
declare const Separator: React.ForwardRefExoticComponent<Omit<SeparatorPrimitive.SeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
export { Separator };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
+
import * as React from "react";
|
|
25
|
+
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
26
|
+
import { cn } from "../../utils";
|
|
27
|
+
var Separator = React.forwardRef(function (_a, ref) {
|
|
28
|
+
var className = _a.className, _b = _a.orientation, orientation = _b === void 0 ? "horizontal" : _b, _c = _a.decorative, decorative = _c === void 0 ? true : _c, props = __rest(_a, ["className", "orientation", "decorative"]);
|
|
29
|
+
return (_jsx(SeparatorPrimitive.Root, __assign({ ref: ref, decorative: decorative, orientation: orientation, className: cn("shrink-0 bg-neutral-200 dark:bg-neutral-800", orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]", className) }, props)));
|
|
30
|
+
});
|
|
31
|
+
Separator.displayName = SeparatorPrimitive.Root.displayName;
|
|
32
|
+
export { Separator };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
3
|
+
import { type VariantProps } from "class-variance-authority";
|
|
4
|
+
declare const Sheet: React.FC<SheetPrimitive.DialogProps>;
|
|
5
|
+
declare const SheetTrigger: React.ForwardRefExoticComponent<SheetPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
declare const SheetClose: React.ForwardRefExoticComponent<SheetPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
+
declare const SheetPortal: React.FC<SheetPrimitive.DialogPortalProps>;
|
|
8
|
+
declare const SheetOverlay: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
declare const sheetVariants: (props?: {
|
|
10
|
+
side?: "top" | "right" | "bottom" | "left";
|
|
11
|
+
} & import("class-variance-authority/types").ClassProp) => string;
|
|
12
|
+
interface SheetContentProps extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>, VariantProps<typeof sheetVariants> {
|
|
13
|
+
}
|
|
14
|
+
declare const SheetContent: React.ForwardRefExoticComponent<SheetContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
15
|
+
declare const SheetHeader: {
|
|
16
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
displayName: string;
|
|
18
|
+
};
|
|
19
|
+
declare const SheetFooter: {
|
|
20
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
displayName: string;
|
|
22
|
+
};
|
|
23
|
+
declare const SheetTitle: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
24
|
+
declare const SheetDescription: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
25
|
+
export { Sheet, SheetPortal, SheetOverlay, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription, };
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
|
+
import * as React from "react";
|
|
25
|
+
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
26
|
+
import { cva } from "class-variance-authority";
|
|
27
|
+
import { X } from "lucide-react";
|
|
28
|
+
import { cn } from "../../utils";
|
|
29
|
+
var Sheet = SheetPrimitive.Root;
|
|
30
|
+
var SheetTrigger = SheetPrimitive.Trigger;
|
|
31
|
+
var SheetClose = SheetPrimitive.Close;
|
|
32
|
+
var SheetPortal = SheetPrimitive.Portal;
|
|
33
|
+
var SheetOverlay = React.forwardRef(function (_a, ref) {
|
|
34
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
35
|
+
return (_jsx(SheetPrimitive.Overlay, __assign({ className: cn("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", className) }, props, { ref: ref })));
|
|
36
|
+
});
|
|
37
|
+
SheetOverlay.displayName = SheetPrimitive.Overlay.displayName;
|
|
38
|
+
var sheetVariants = cva("fixed z-50 gap-4 bg-white p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500 dark:bg-neutral-950", {
|
|
39
|
+
variants: {
|
|
40
|
+
side: {
|
|
41
|
+
top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
|
|
42
|
+
bottom: "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
|
|
43
|
+
left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
|
|
44
|
+
right: "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm",
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
defaultVariants: {
|
|
48
|
+
side: "right",
|
|
49
|
+
},
|
|
50
|
+
});
|
|
51
|
+
var SheetContent = React.forwardRef(function (_a, ref) {
|
|
52
|
+
var _b = _a.side, side = _b === void 0 ? "right" : _b, className = _a.className, children = _a.children, props = __rest(_a, ["side", "className", "children"]);
|
|
53
|
+
return (_jsxs(SheetPortal, { children: [_jsx(SheetOverlay, {}), _jsxs(SheetPrimitive.Content, __assign({ ref: ref, className: cn(sheetVariants({ side: side }), className) }, props, { children: [children, _jsxs(SheetPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-neutral-950 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-neutral-100 dark:ring-offset-neutral-950 dark:focus:ring-neutral-300 dark:data-[state=open]:bg-neutral-800", children: [_jsx(X, { className: "h-4 w-4" }), _jsx("span", { className: "sr-only", children: "Close" })] })] }))] }));
|
|
54
|
+
});
|
|
55
|
+
SheetContent.displayName = SheetPrimitive.Content.displayName;
|
|
56
|
+
var SheetHeader = function (_a) {
|
|
57
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
58
|
+
return (_jsx("div", __assign({ className: cn("flex flex-col space-y-2 text-center sm:text-left", className) }, props)));
|
|
59
|
+
};
|
|
60
|
+
SheetHeader.displayName = "SheetHeader";
|
|
61
|
+
var SheetFooter = function (_a) {
|
|
62
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
63
|
+
return (_jsx("div", __assign({ className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className) }, props)));
|
|
64
|
+
};
|
|
65
|
+
SheetFooter.displayName = "SheetFooter";
|
|
66
|
+
var SheetTitle = React.forwardRef(function (_a, ref) {
|
|
67
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
68
|
+
return (_jsx(SheetPrimitive.Title, __assign({ ref: ref, className: cn("text-lg font-semibold text-neutral-950 dark:text-neutral-50", className) }, props)));
|
|
69
|
+
});
|
|
70
|
+
SheetTitle.displayName = SheetPrimitive.Title.displayName;
|
|
71
|
+
var SheetDescription = React.forwardRef(function (_a, ref) {
|
|
72
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
73
|
+
return (_jsx(SheetPrimitive.Description, __assign({ ref: ref, className: cn("text-sm text-neutral-500 dark:text-neutral-400", className) }, props)));
|
|
74
|
+
});
|
|
75
|
+
SheetDescription.displayName = SheetPrimitive.Description.displayName;
|
|
76
|
+
export { Sheet, SheetPortal, SheetOverlay, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription, };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as SliderPrimitive from "@radix-ui/react-slider";
|
|
3
|
+
declare function Slider({ className, defaultValue, value, min, max, ...props }: React.ComponentProps<typeof SliderPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export { Slider };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
|
+
import * as React from "react";
|
|
25
|
+
import * as SliderPrimitive from "@radix-ui/react-slider";
|
|
26
|
+
import { cn } from "../../utils";
|
|
27
|
+
function Slider(_a) {
|
|
28
|
+
var className = _a.className, defaultValue = _a.defaultValue, value = _a.value, _b = _a.min, min = _b === void 0 ? 0 : _b, _c = _a.max, max = _c === void 0 ? 100 : _c, props = __rest(_a, ["className", "defaultValue", "value", "min", "max"]);
|
|
29
|
+
var _values = React.useMemo(function () {
|
|
30
|
+
return Array.isArray(value)
|
|
31
|
+
? value
|
|
32
|
+
: Array.isArray(defaultValue)
|
|
33
|
+
? defaultValue
|
|
34
|
+
: [min, max];
|
|
35
|
+
}, [value, defaultValue, min, max]);
|
|
36
|
+
return (_jsxs(SliderPrimitive.Root, __assign({ "data-slot": "slider", defaultValue: defaultValue, value: value, min: min, max: max, className: cn("relative flex w-full touch-none select-none items-center data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col", className) }, props, { children: [_jsx(SliderPrimitive.Track, { "data-slot": "slider-track", className: "relative w-full grow overflow-hidden rounded-full bg-nav/75 data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-3" }), Array.from({ length: _values.length }, function (_, index) { return (_jsx(SliderPrimitive.Thumb, { "data-slot": "slider-thumb", className: "block size-5 rounded-full border border-black bg-white ring-offset-white transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-neutral-950 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50" }, index)); })] })));
|
|
37
|
+
}
|
|
38
|
+
export { Slider };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as SwitchPrimitives from "@radix-ui/react-switch";
|
|
3
|
+
import { type VariantProps } from "class-variance-authority";
|
|
4
|
+
declare const Switch: React.ForwardRefExoticComponent<Omit<SwitchPrimitives.SwitchProps & React.RefAttributes<HTMLButtonElement>, "ref"> & VariantProps<(props?: {
|
|
5
|
+
size?: "default" | "sm";
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) => string> & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
+
export { Switch };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
+
import * as React from "react";
|
|
25
|
+
import * as SwitchPrimitives from "@radix-ui/react-switch";
|
|
26
|
+
import { cva } from "class-variance-authority";
|
|
27
|
+
import { cn } from "../../utils";
|
|
28
|
+
var switchVariants = cva("peer inline-flex h-6 w-12 shrink-0 cursor-pointer items-center rounded-full border-black transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-black focus-visible:ring-offset-2 focus-visible:ring-offset-white disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-bright data-[state=unchecked]:bg-white", {
|
|
29
|
+
variants: {
|
|
30
|
+
size: {
|
|
31
|
+
default: "h-6 w-12 border-2",
|
|
32
|
+
sm: "h-4 w-7 border-[1.5px]",
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
defaultVariants: {
|
|
36
|
+
size: "default",
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
var switchThumbVariants = cva("pointer-events-none block rounded-full border-black bg-white ring-0 transition-transform", {
|
|
40
|
+
variants: {
|
|
41
|
+
size: {
|
|
42
|
+
default: "h-4 w-4 data-[state=checked]:translate-x-6 data-[state=unchecked]:translate-x-1 border-2",
|
|
43
|
+
sm: "h-2.5 w-2.5 data-[state=checked]:translate-x-3 data-[state=unchecked]:translate-x-0.5 border-[1.5px]",
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
defaultVariants: {
|
|
47
|
+
size: "default",
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
var Switch = React.forwardRef(function (_a, ref) {
|
|
51
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
52
|
+
return (_jsx(SwitchPrimitives.Root, __assign({ className: cn(switchVariants(props), className) }, props, { ref: ref, children: _jsx(SwitchPrimitives.Thumb, { className: cn(switchThumbVariants(props)) }) })));
|
|
53
|
+
});
|
|
54
|
+
Switch.displayName = SwitchPrimitives.Root.displayName;
|
|
55
|
+
export { Switch };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare const Table: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableElement> & React.RefAttributes<HTMLTableElement>>;
|
|
3
|
+
declare const TableHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
|
|
4
|
+
declare const TableBody: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
|
|
5
|
+
declare const TableFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
|
|
6
|
+
declare const TableRow: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableRowElement> & React.RefAttributes<HTMLTableRowElement>>;
|
|
7
|
+
declare const TableHead: React.ForwardRefExoticComponent<React.ThHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
|
|
8
|
+
declare const TableCell: React.ForwardRefExoticComponent<React.TdHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
|
|
9
|
+
declare const TableCaption: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableCaptionElement> & React.RefAttributes<HTMLTableCaptionElement>>;
|
|
10
|
+
export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
+
import * as React from "react";
|
|
25
|
+
import { cn } from "../../utils";
|
|
26
|
+
var Table = React.forwardRef(function (_a, ref) {
|
|
27
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
28
|
+
return (_jsx("div", { className: "relative w-full overflow-auto", children: _jsx("table", __assign({ ref: ref, className: cn("w-full caption-bottom border-2 text-sm bg-white", className) }, props)) }));
|
|
29
|
+
});
|
|
30
|
+
Table.displayName = "Table";
|
|
31
|
+
var TableHeader = React.forwardRef(function (_a, ref) {
|
|
32
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
33
|
+
return (_jsx("thead", __assign({ ref: ref, className: cn("[&_tr]:border-b-2", className) }, props)));
|
|
34
|
+
});
|
|
35
|
+
TableHeader.displayName = "TableHeader";
|
|
36
|
+
var TableBody = React.forwardRef(function (_a, ref) {
|
|
37
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
38
|
+
return (_jsx("tbody", __assign({ ref: ref, className: cn("[&_tr:last-child]:border-0", className) }, props)));
|
|
39
|
+
});
|
|
40
|
+
TableBody.displayName = "TableBody";
|
|
41
|
+
var TableFooter = React.forwardRef(function (_a, ref) {
|
|
42
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
43
|
+
return (_jsx("tfoot", __assign({ ref: ref, className: cn("border-t border-t-border bg-main font-base [&>tr]:last:border-b-0", className) }, props)));
|
|
44
|
+
});
|
|
45
|
+
TableFooter.displayName = "TableFooter";
|
|
46
|
+
var TableRow = React.forwardRef(function (_a, ref) {
|
|
47
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
48
|
+
return (_jsx("tr", __assign({ ref: ref, className: cn("border-b border-neutral-200 dark:border-darkBorder text-text transition-colors bg-main font-base data-[state=selected]:bg-white dark:data-[state=selected]:bg-secondaryBlack data-[state=selected]:text-text dark:data-[state=selected]:text-darkText dark:border-neutral-800", className) }, props)));
|
|
49
|
+
});
|
|
50
|
+
TableRow.displayName = "TableRow";
|
|
51
|
+
var TableHead = React.forwardRef(function (_a, ref) {
|
|
52
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
53
|
+
return (_jsx("th", __assign({ ref: ref, className: cn("h-12 px-4 text-left align-middle font-heading text-text [&:has([role=checkbox])]:pr-0", className) }, props)));
|
|
54
|
+
});
|
|
55
|
+
TableHead.displayName = "TableHead";
|
|
56
|
+
var TableCell = React.forwardRef(function (_a, ref) {
|
|
57
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
58
|
+
return (_jsx("td", __assign({ ref: ref, className: cn("p-4 align-middle font-base [&:has([role=checkbox])]:pr-0", className) }, props)));
|
|
59
|
+
});
|
|
60
|
+
TableCell.displayName = "TableCell";
|
|
61
|
+
var TableCaption = React.forwardRef(function (_a, ref) {
|
|
62
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
63
|
+
return (_jsx("caption", __assign({ ref: ref, className: cn("mt-4 text-sm text-text font-base", className) }, props)));
|
|
64
|
+
});
|
|
65
|
+
TableCaption.displayName = "TableCaption";
|
|
66
|
+
export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
+
import * as React from "react";
|
|
25
|
+
import { cn } from "../../utils";
|
|
26
|
+
var Textarea = React.forwardRef(function (_a, ref) {
|
|
27
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
28
|
+
return (_jsx("textarea", __assign({ className: cn("flex min-h-[80px] w-full rounded-lg border text-text font-base selection:bg-main selection:text-text border-border bg-white px-3 py-2 text-sm ring-offset-white placeholder:text-text placeholder:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-black focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", className), ref: ref }, props)));
|
|
29
|
+
});
|
|
30
|
+
Textarea.displayName = "Textarea";
|
|
31
|
+
export { Textarea };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
3
|
+
declare const TooltipProvider: React.FC<TooltipPrimitive.TooltipProviderProps>;
|
|
4
|
+
declare const Tooltip: React.FC<TooltipPrimitive.TooltipProps>;
|
|
5
|
+
declare const TooltipTrigger: React.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
declare const TooltipContent: React.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
+
import * as React from "react";
|
|
25
|
+
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
26
|
+
import { cn } from "../../utils";
|
|
27
|
+
var TooltipProvider = TooltipPrimitive.Provider;
|
|
28
|
+
var Tooltip = TooltipPrimitive.Root;
|
|
29
|
+
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
30
|
+
var TooltipContent = React.forwardRef(function (_a, ref) {
|
|
31
|
+
var className = _a.className, _b = _a.sideOffset, sideOffset = _b === void 0 ? 4 : _b, props = __rest(_a, ["className", "sideOffset"]);
|
|
32
|
+
return (_jsx(TooltipPrimitive.Content, __assign({ ref: ref, collisionPadding: 8, sideOffset: sideOffset, className: cn("z-50 overflow-hidden border px-4 font-medium text-sm py-1 rounded-3xl shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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 border-neutral-800 bg-neutral-950 text-neutral-50", className) }, props)));
|
|
33
|
+
});
|
|
34
|
+
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
35
|
+
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
|
|
@@ -16,7 +16,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
16
16
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
17
|
import { createRoot } from "react-dom/client";
|
|
18
18
|
export var PageClippingView = function (props) {
|
|
19
|
-
return (_jsx("img", { src: "https://
|
|
19
|
+
return (_jsx("img", { src: "https://page-clippings.examplary.ai/?".concat(new URLSearchParams(props)), alt: "Page Clipping" }));
|
|
20
20
|
};
|
|
21
21
|
// Custom element for use in rich text editors
|
|
22
22
|
var PageClippingElement = /** @class */ (function (_super) {
|