@xemahq/ui-kernel 0.1.12 → 0.2.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/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/biome-host/host-bridge.d.ts +2 -0
- package/dist/lib/biome-host/host-bridge.d.ts.map +1 -1
- package/dist/lib/biome-host/host-bridge.js.map +1 -1
- package/dist/lib/capabilities/capability-provider.d.ts +15 -0
- package/dist/lib/capabilities/capability-provider.d.ts.map +1 -0
- package/dist/lib/capabilities/capability-provider.js +36 -0
- package/dist/lib/capabilities/capability-provider.js.map +1 -0
- package/dist/lib/capabilities/index.d.ts +4 -0
- package/dist/lib/capabilities/index.d.ts.map +1 -0
- package/dist/lib/capabilities/index.js +20 -0
- package/dist/lib/capabilities/index.js.map +1 -0
- package/dist/lib/capabilities/types.d.ts +18 -0
- package/dist/lib/capabilities/types.d.ts.map +1 -0
- package/dist/lib/capabilities/types.js +3 -0
- package/dist/lib/capabilities/types.js.map +1 -0
- package/dist/lib/capabilities/use-capability.d.ts +18 -0
- package/dist/lib/capabilities/use-capability.d.ts.map +1 -0
- package/dist/lib/capabilities/use-capability.js +21 -0
- package/dist/lib/capabilities/use-capability.js.map +1 -0
- package/dist/ui/chrome/AsyncBoundary.d.ts +22 -0
- package/dist/ui/chrome/AsyncBoundary.d.ts.map +1 -0
- package/dist/ui/chrome/AsyncBoundary.js +23 -0
- package/dist/ui/chrome/AsyncBoundary.js.map +1 -0
- package/dist/ui/chrome/EmptyState.d.ts +34 -0
- package/dist/ui/chrome/EmptyState.d.ts.map +1 -0
- package/dist/ui/chrome/EmptyState.js +27 -0
- package/dist/ui/chrome/EmptyState.js.map +1 -0
- package/dist/ui/chrome/ErrorCard.d.ts +11 -0
- package/dist/ui/chrome/ErrorCard.d.ts.map +1 -0
- package/dist/ui/chrome/ErrorCard.js +21 -0
- package/dist/ui/chrome/ErrorCard.js.map +1 -0
- package/dist/ui/chrome/LoadingState.d.ts +10 -0
- package/dist/ui/chrome/LoadingState.d.ts.map +1 -0
- package/dist/ui/chrome/LoadingState.js +17 -0
- package/dist/ui/chrome/LoadingState.js.map +1 -0
- package/dist/ui/chrome/PageHeader.d.ts +20 -0
- package/dist/ui/chrome/PageHeader.d.ts.map +1 -0
- package/dist/ui/chrome/PageHeader.js +26 -0
- package/dist/ui/chrome/PageHeader.js.map +1 -0
- package/dist/ui/chrome/StateCard.d.ts +24 -0
- package/dist/ui/chrome/StateCard.d.ts.map +1 -0
- package/dist/ui/chrome/StateCard.js +17 -0
- package/dist/ui/chrome/StateCard.js.map +1 -0
- package/dist/ui/cn.d.ts +3 -0
- package/dist/ui/cn.d.ts.map +1 -0
- package/dist/ui/cn.js +18 -0
- package/dist/ui/cn.js.map +1 -0
- package/dist/ui/index.d.ts +33 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +61 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/ui/primitives/alert-dialog.d.ts +21 -0
- package/dist/ui/primitives/alert-dialog.d.ts.map +1 -0
- package/dist/ui/primitives/alert-dialog.js +72 -0
- package/dist/ui/primitives/alert-dialog.js.map +1 -0
- package/dist/ui/primitives/badge.d.ts +10 -0
- package/dist/ui/primitives/badge.d.ts.map +1 -0
- package/dist/ui/primitives/badge.js +60 -0
- package/dist/ui/primitives/badge.js.map +1 -0
- package/dist/ui/primitives/button.d.ts +12 -0
- package/dist/ui/primitives/button.d.ts.map +1 -0
- package/dist/ui/primitives/button.js +71 -0
- package/dist/ui/primitives/button.js.map +1 -0
- package/dist/ui/primitives/card.d.ts +9 -0
- package/dist/ui/primitives/card.d.ts.map +1 -0
- package/dist/ui/primitives/card.js +58 -0
- package/dist/ui/primitives/card.js.map +1 -0
- package/dist/ui/primitives/checkbox.d.ts +5 -0
- package/dist/ui/primitives/checkbox.d.ts.map +1 -0
- package/dist/ui/primitives/checkbox.js +45 -0
- package/dist/ui/primitives/checkbox.js.map +1 -0
- package/dist/ui/primitives/collapsible.d.ts +6 -0
- package/dist/ui/primitives/collapsible.d.ts.map +1 -0
- package/dist/ui/primitives/collapsible.js +44 -0
- package/dist/ui/primitives/collapsible.js.map +1 -0
- package/dist/ui/primitives/dialog.d.ts +22 -0
- package/dist/ui/primitives/dialog.d.ts.map +1 -0
- package/dist/ui/primitives/dialog.js +68 -0
- package/dist/ui/primitives/dialog.js.map +1 -0
- package/dist/ui/primitives/dropdown-menu.d.ts +28 -0
- package/dist/ui/primitives/dropdown-menu.d.ts.map +1 -0
- package/dist/ui/primitives/dropdown-menu.js +83 -0
- package/dist/ui/primitives/dropdown-menu.js.map +1 -0
- package/dist/ui/primitives/input.d.ts +4 -0
- package/dist/ui/primitives/input.d.ts.map +1 -0
- package/dist/ui/primitives/input.js +45 -0
- package/dist/ui/primitives/input.js.map +1 -0
- package/dist/ui/primitives/label.d.ts +6 -0
- package/dist/ui/primitives/label.d.ts.map +1 -0
- package/dist/ui/primitives/label.js +46 -0
- package/dist/ui/primitives/label.js.map +1 -0
- package/dist/ui/primitives/overflow-tabs.d.ts +18 -0
- package/dist/ui/primitives/overflow-tabs.d.ts.map +1 -0
- package/dist/ui/primitives/overflow-tabs.js +84 -0
- package/dist/ui/primitives/overflow-tabs.js.map +1 -0
- package/dist/ui/primitives/popover.d.ts +9 -0
- package/dist/ui/primitives/popover.d.ts.map +1 -0
- package/dist/ui/primitives/popover.js +48 -0
- package/dist/ui/primitives/popover.js.map +1 -0
- package/dist/ui/primitives/radio-group.d.ts +6 -0
- package/dist/ui/primitives/radio-group.d.ts.map +1 -0
- package/dist/ui/primitives/radio-group.js +52 -0
- package/dist/ui/primitives/radio-group.js.map +1 -0
- package/dist/ui/primitives/resizable.d.ts +12 -0
- package/dist/ui/primitives/resizable.d.ts.map +1 -0
- package/dist/ui/primitives/resizable.js +18 -0
- package/dist/ui/primitives/resizable.js.map +1 -0
- package/dist/ui/primitives/scroll-area.d.ts +6 -0
- package/dist/ui/primitives/scroll-area.d.ts.map +1 -0
- package/dist/ui/primitives/scroll-area.js +47 -0
- package/dist/ui/primitives/scroll-area.js.map +1 -0
- package/dist/ui/primitives/select.d.ts +14 -0
- package/dist/ui/primitives/select.d.ts.map +1 -0
- package/dist/ui/primitives/select.js +71 -0
- package/dist/ui/primitives/select.js.map +1 -0
- package/dist/ui/primitives/separator.d.ts +5 -0
- package/dist/ui/primitives/separator.d.ts.map +1 -0
- package/dist/ui/primitives/separator.js +44 -0
- package/dist/ui/primitives/separator.js.map +1 -0
- package/dist/ui/primitives/sheet.d.ts +26 -0
- package/dist/ui/primitives/sheet.d.ts.map +1 -0
- package/dist/ui/primitives/sheet.js +82 -0
- package/dist/ui/primitives/sheet.js.map +1 -0
- package/dist/ui/primitives/skeleton.d.ts +13 -0
- package/dist/ui/primitives/skeleton.d.ts.map +1 -0
- package/dist/ui/primitives/skeleton.js +29 -0
- package/dist/ui/primitives/skeleton.js.map +1 -0
- package/dist/ui/primitives/switch.d.ts +5 -0
- package/dist/ui/primitives/switch.d.ts.map +1 -0
- package/dist/ui/primitives/switch.js +44 -0
- package/dist/ui/primitives/switch.js.map +1 -0
- package/dist/ui/primitives/table.d.ts +11 -0
- package/dist/ui/primitives/table.d.ts.map +1 -0
- package/dist/ui/primitives/table.js +64 -0
- package/dist/ui/primitives/table.js.map +1 -0
- package/dist/ui/primitives/tabs.d.ts +8 -0
- package/dist/ui/primitives/tabs.d.ts.map +1 -0
- package/dist/ui/primitives/tabs.js +52 -0
- package/dist/ui/primitives/tabs.js.map +1 -0
- package/dist/ui/primitives/tag-multi-select.d.ts +19 -0
- package/dist/ui/primitives/tag-multi-select.d.ts.map +1 -0
- package/dist/ui/primitives/tag-multi-select.js +92 -0
- package/dist/ui/primitives/tag-multi-select.js.map +1 -0
- package/dist/ui/primitives/textarea.d.ts +5 -0
- package/dist/ui/primitives/textarea.d.ts.map +1 -0
- package/dist/ui/primitives/textarea.js +45 -0
- package/dist/ui/primitives/textarea.js.map +1 -0
- package/dist/ui/primitives/tooltip.d.ts +8 -0
- package/dist/ui/primitives/tooltip.d.ts.map +1 -0
- package/dist/ui/primitives/tooltip.js +50 -0
- package/dist/ui/primitives/tooltip.js.map +1 -0
- package/package.json +24 -1
- package/src/index.ts +1 -0
- package/src/lib/biome-host/host-bridge.ts +10 -0
- package/src/lib/capabilities/capability-provider.tsx +95 -0
- package/src/lib/capabilities/index.ts +16 -0
- package/src/lib/capabilities/types.ts +69 -0
- package/src/lib/capabilities/use-capability.ts +72 -0
- package/src/ui/chrome/AsyncBoundary.tsx +66 -0
- package/src/ui/chrome/EmptyState.tsx +184 -0
- package/src/ui/chrome/ErrorCard.tsx +68 -0
- package/src/ui/chrome/LoadingState.tsx +61 -0
- package/src/ui/chrome/PageHeader.tsx +137 -0
- package/src/ui/chrome/StateCard.tsx +150 -0
- package/src/ui/cn.ts +32 -0
- package/src/ui/index.ts +53 -0
- package/src/ui/primitives/alert-dialog.tsx +104 -0
- package/src/ui/primitives/badge.tsx +32 -0
- package/src/ui/primitives/button.tsx +47 -0
- package/src/ui/primitives/card.tsx +43 -0
- package/src/ui/primitives/checkbox.tsx +26 -0
- package/src/ui/primitives/collapsible.tsx +9 -0
- package/src/ui/primitives/dialog.tsx +103 -0
- package/src/ui/primitives/dropdown-menu.tsx +179 -0
- package/src/ui/primitives/input.tsx +22 -0
- package/src/ui/primitives/label.tsx +17 -0
- package/src/ui/primitives/overflow-tabs.tsx +281 -0
- package/src/ui/primitives/popover.tsx +33 -0
- package/src/ui/primitives/radio-group.tsx +36 -0
- package/src/ui/primitives/resizable.tsx +67 -0
- package/src/ui/primitives/scroll-area.tsx +38 -0
- package/src/ui/primitives/select.tsx +143 -0
- package/src/ui/primitives/separator.tsx +20 -0
- package/src/ui/primitives/sheet.tsx +107 -0
- package/src/ui/primitives/skeleton.tsx +99 -0
- package/src/ui/primitives/switch.tsx +27 -0
- package/src/ui/primitives/table.tsx +72 -0
- package/src/ui/primitives/tabs.tsx +53 -0
- package/src/ui/primitives/tag-multi-select.tsx +241 -0
- package/src/ui/primitives/textarea.tsx +21 -0
- package/src/ui/primitives/tooltip.tsx +30 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
|
|
4
|
+
declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
|
|
6
|
+
declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
+
declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
9
|
+
'data-hide-close'?: boolean;
|
|
10
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
declare const DialogHeader: {
|
|
12
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
13
|
+
displayName: string;
|
|
14
|
+
};
|
|
15
|
+
declare const DialogFooter: {
|
|
16
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
17
|
+
displayName: string;
|
|
18
|
+
};
|
|
19
|
+
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
20
|
+
declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
21
|
+
export { Dialog, DialogPortal, DialogOverlay, DialogClose, DialogTrigger, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, };
|
|
22
|
+
//# sourceMappingURL=dialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../../src/ui/primitives/dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAE1D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,QAAA,MAAM,MAAM,uCAAuB,CAAC;AAEpC,QAAA,MAAM,aAAa,8GAA0B,CAAC;AAE9C,QAAA,MAAM,YAAY,6CAAyB,CAAC;AAE5C,QAAA,MAAM,WAAW,4GAAwB,CAAC;AAE1C,QAAA,MAAM,aAAa,8JAYjB,CAAC;AAGH,QAAA,MAAM,aAAa;wBAEsE,OAAO;wCA2B9F,CAAC;AAGH,QAAA,MAAM,YAAY;8BAA6B,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;;CAElF,CAAC;AAGF,QAAA,MAAM,YAAY;8BAA6B,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;;CAElF,CAAC;AAGF,QAAA,MAAM,WAAW,oKASf,CAAC;AAGH,QAAA,MAAM,iBAAiB,8KAKrB,CAAC;AAGH,OAAO,EACL,MAAM,EACN,YAAY,EACZ,aAAa,EACb,WAAW,EACX,aAAa,EACb,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,iBAAiB,GAClB,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.DialogDescription = exports.DialogTitle = exports.DialogFooter = exports.DialogHeader = exports.DialogContent = exports.DialogTrigger = exports.DialogClose = exports.DialogOverlay = exports.DialogPortal = exports.Dialog = void 0;
|
|
37
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
|
+
const DialogPrimitive = __importStar(require("@radix-ui/react-dialog"));
|
|
39
|
+
const lucide_react_1 = require("lucide-react");
|
|
40
|
+
const React = __importStar(require("react"));
|
|
41
|
+
const cn_1 = require("../cn");
|
|
42
|
+
const Dialog = DialogPrimitive.Root;
|
|
43
|
+
exports.Dialog = Dialog;
|
|
44
|
+
const DialogTrigger = DialogPrimitive.Trigger;
|
|
45
|
+
exports.DialogTrigger = DialogTrigger;
|
|
46
|
+
const DialogPortal = DialogPrimitive.Portal;
|
|
47
|
+
exports.DialogPortal = DialogPortal;
|
|
48
|
+
const DialogClose = DialogPrimitive.Close;
|
|
49
|
+
exports.DialogClose = DialogClose;
|
|
50
|
+
const DialogOverlay = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)(DialogPrimitive.Overlay, { ref: ref, className: (0, cn_1.cn)("modal-scrim fixed inset-0 z-50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", className), ...props })));
|
|
51
|
+
exports.DialogOverlay = DialogOverlay;
|
|
52
|
+
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
53
|
+
const DialogContent = React.forwardRef(({ className, children, 'data-hide-close': hideClose, 'aria-describedby': ariaDescribedBy, ...props }, ref) => ((0, jsx_runtime_1.jsxs)(DialogPortal, { children: [(0, jsx_runtime_1.jsx)(DialogOverlay, {}), (0, jsx_runtime_1.jsxs)(DialogPrimitive.Content, { ref: ref, "aria-describedby": ariaDescribedBy, className: (0, cn_1.cn)("modal-surface fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg max-h-[calc(100dvh-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 overflow-y-auto p-6 duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg", className), ...props, children: [children, !hideClose && ((0, jsx_runtime_1.jsxs)(DialogPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm text-ink-3 ring-offset-background transition-colors hover:text-ink focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.X, { className: "h-4 w-4" }), (0, jsx_runtime_1.jsx)("span", { className: "sr-only", children: "Close" })] }))] })] })));
|
|
54
|
+
exports.DialogContent = DialogContent;
|
|
55
|
+
DialogContent.displayName = DialogPrimitive.Content.displayName;
|
|
56
|
+
const DialogHeader = ({ className, ...props }) => ((0, jsx_runtime_1.jsx)("div", { className: (0, cn_1.cn)("flex flex-col space-y-1.5 text-center sm:text-left", className), ...props }));
|
|
57
|
+
exports.DialogHeader = DialogHeader;
|
|
58
|
+
DialogHeader.displayName = "DialogHeader";
|
|
59
|
+
const DialogFooter = ({ className, ...props }) => ((0, jsx_runtime_1.jsx)("div", { className: (0, cn_1.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className), ...props }));
|
|
60
|
+
exports.DialogFooter = DialogFooter;
|
|
61
|
+
DialogFooter.displayName = "DialogFooter";
|
|
62
|
+
const DialogTitle = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)(DialogPrimitive.Title, { ref: ref, className: (0, cn_1.cn)("text-subtitle font-semibold leading-none tracking-tight", className), ...props })));
|
|
63
|
+
exports.DialogTitle = DialogTitle;
|
|
64
|
+
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
65
|
+
const DialogDescription = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)(DialogPrimitive.Description, { ref: ref, className: (0, cn_1.cn)("text-body-1 text-ink-3", className), ...props })));
|
|
66
|
+
exports.DialogDescription = DialogDescription;
|
|
67
|
+
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
68
|
+
//# sourceMappingURL=dialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialog.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AAE,GAAG,EAAE,SAAS,EAAE,IAAA,OAAE,EAAC,wBAAwB,EAAE,SAAS,CAAC,KAAM,KAAK,GAAI,CACzG,CAAC,CAAC;AAaD,8CAAiB;AAZnB,iBAAiB,CAAC,WAAW,GAAG,eAAe,CAAC,WAAW,CAAC,WAAW,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare const DropdownMenu: React.FC<DropdownMenuPrimitive.DropdownMenuProps>;
|
|
4
|
+
declare const DropdownMenuTrigger: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
declare const DropdownMenuGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
declare const DropdownMenuPortal: React.FC<DropdownMenuPrimitive.DropdownMenuPortalProps>;
|
|
7
|
+
declare const DropdownMenuSub: React.FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
|
|
8
|
+
declare const DropdownMenuRadioGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
declare const DropdownMenuSubTrigger: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
10
|
+
inset?: boolean;
|
|
11
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
declare const DropdownMenuSubContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
declare const DropdownMenuContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
14
|
+
declare const DropdownMenuItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
15
|
+
inset?: boolean;
|
|
16
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
+
declare const DropdownMenuCheckboxItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
18
|
+
declare const DropdownMenuRadioItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuRadioItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
+
declare const DropdownMenuLabel: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
20
|
+
inset?: boolean;
|
|
21
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
22
|
+
declare const DropdownMenuSeparator: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
23
|
+
declare const DropdownMenuShortcut: {
|
|
24
|
+
({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): React.JSX.Element;
|
|
25
|
+
displayName: string;
|
|
26
|
+
};
|
|
27
|
+
export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup, };
|
|
28
|
+
//# sourceMappingURL=dropdown-menu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dropdown-menu.d.ts","sourceRoot":"","sources":["../../../src/ui/primitives/dropdown-menu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,qBAAqB,MAAM,+BAA+B,CAAC;AAEvE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,QAAA,MAAM,YAAY,mDAA6B,CAAC;AAEhD,QAAA,MAAM,mBAAmB,0HAAgC,CAAC;AAE1D,QAAA,MAAM,iBAAiB,qHAA8B,CAAC;AAEtD,QAAA,MAAM,kBAAkB,yDAA+B,CAAC;AAExD,QAAA,MAAM,eAAe,sDAA4B,CAAC;AAElD,QAAA,MAAM,sBAAsB,0HAAmC,CAAC;AAEhE,QAAA,MAAM,sBAAsB;YAGhB,OAAO;wCAejB,CAAC;AAGH,QAAA,MAAM,sBAAsB,6KAY1B,CAAC;AAGH,QAAA,MAAM,mBAAmB,0KAevB,CAAC;AAGH,QAAA,MAAM,gBAAgB;YAGV,OAAO;wCAYjB,CAAC;AAGH,QAAA,MAAM,wBAAwB,+KAoB5B,CAAC;AAGH,QAAA,MAAM,qBAAqB,4KAmBzB,CAAC;AAGH,QAAA,MAAM,iBAAiB;YAGX,OAAO;wCAQjB,CAAC;AAGH,QAAA,MAAM,qBAAqB,4KAKzB,CAAC;AAGH,QAAA,MAAM,oBAAoB;8BAA6B,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC;;CAE3F,CAAC;AAGF,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,wBAAwB,EACxB,qBAAqB,EACrB,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,GACvB,CAAC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.DropdownMenuRadioGroup = exports.DropdownMenuSubTrigger = exports.DropdownMenuSubContent = exports.DropdownMenuSub = exports.DropdownMenuPortal = exports.DropdownMenuGroup = exports.DropdownMenuShortcut = exports.DropdownMenuSeparator = exports.DropdownMenuLabel = exports.DropdownMenuRadioItem = exports.DropdownMenuCheckboxItem = exports.DropdownMenuItem = exports.DropdownMenuContent = exports.DropdownMenuTrigger = exports.DropdownMenu = void 0;
|
|
37
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
|
+
const DropdownMenuPrimitive = __importStar(require("@radix-ui/react-dropdown-menu"));
|
|
39
|
+
const lucide_react_1 = require("lucide-react");
|
|
40
|
+
const React = __importStar(require("react"));
|
|
41
|
+
const cn_1 = require("../cn");
|
|
42
|
+
const DropdownMenu = DropdownMenuPrimitive.Root;
|
|
43
|
+
exports.DropdownMenu = DropdownMenu;
|
|
44
|
+
const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
45
|
+
exports.DropdownMenuTrigger = DropdownMenuTrigger;
|
|
46
|
+
const DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
47
|
+
exports.DropdownMenuGroup = DropdownMenuGroup;
|
|
48
|
+
const DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
49
|
+
exports.DropdownMenuPortal = DropdownMenuPortal;
|
|
50
|
+
const DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
51
|
+
exports.DropdownMenuSub = DropdownMenuSub;
|
|
52
|
+
const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
53
|
+
exports.DropdownMenuRadioGroup = DropdownMenuRadioGroup;
|
|
54
|
+
const DropdownMenuSubTrigger = React.forwardRef(({ className, inset, children, ...props }, ref) => ((0, jsx_runtime_1.jsxs)(DropdownMenuPrimitive.SubTrigger, { ref: ref, className: (0, cn_1.cn)("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-body-1 outline-none data-[state=open]:bg-accent focus:bg-accent", inset && "pl-8", className), ...props, children: [children, (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { className: "ml-auto h-4 w-4" })] })));
|
|
55
|
+
exports.DropdownMenuSubTrigger = DropdownMenuSubTrigger;
|
|
56
|
+
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
57
|
+
const DropdownMenuSubContent = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)(DropdownMenuPrimitive.SubContent, { ref: ref, className: (0, cn_1.cn)("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=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", className), ...props })));
|
|
58
|
+
exports.DropdownMenuSubContent = DropdownMenuSubContent;
|
|
59
|
+
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
60
|
+
const DropdownMenuContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => ((0, jsx_runtime_1.jsx)(DropdownMenuPrimitive.Portal, { children: (0, jsx_runtime_1.jsx)(DropdownMenuPrimitive.Content, { ref: ref, sideOffset: sideOffset, className: (0, cn_1.cn)("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=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", className), ...props }) })));
|
|
61
|
+
exports.DropdownMenuContent = DropdownMenuContent;
|
|
62
|
+
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
63
|
+
const DropdownMenuItem = React.forwardRef(({ className, inset, ...props }, ref) => ((0, jsx_runtime_1.jsx)(DropdownMenuPrimitive.Item, { ref: ref, className: (0, cn_1.cn)("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-body-1 outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground", inset && "pl-8", className), ...props })));
|
|
64
|
+
exports.DropdownMenuItem = DropdownMenuItem;
|
|
65
|
+
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
66
|
+
const DropdownMenuCheckboxItem = React.forwardRef(({ className, children, checked, ...props }, ref) => ((0, jsx_runtime_1.jsxs)(DropdownMenuPrimitive.CheckboxItem, { ref: ref, className: (0, cn_1.cn)("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-body-1 outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground", className), checked: checked, ...props, children: [(0, jsx_runtime_1.jsx)("span", { className: "absolute left-2 flex h-4 w-4 items-center justify-center", children: (0, jsx_runtime_1.jsx)(DropdownMenuPrimitive.ItemIndicator, { children: (0, jsx_runtime_1.jsx)(lucide_react_1.Check, { className: "h-4 w-4" }) }) }), children] })));
|
|
67
|
+
exports.DropdownMenuCheckboxItem = DropdownMenuCheckboxItem;
|
|
68
|
+
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
69
|
+
const DropdownMenuRadioItem = React.forwardRef(({ className, children, ...props }, ref) => ((0, jsx_runtime_1.jsxs)(DropdownMenuPrimitive.RadioItem, { ref: ref, className: (0, cn_1.cn)("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-body-1 outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground", className), ...props, children: [(0, jsx_runtime_1.jsx)("span", { className: "absolute left-2 flex h-4 w-4 items-center justify-center", children: (0, jsx_runtime_1.jsx)(DropdownMenuPrimitive.ItemIndicator, { children: (0, jsx_runtime_1.jsx)(lucide_react_1.Circle, { className: "h-2 w-2 fill-current" }) }) }), children] })));
|
|
70
|
+
exports.DropdownMenuRadioItem = DropdownMenuRadioItem;
|
|
71
|
+
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
72
|
+
const DropdownMenuLabel = React.forwardRef(({ className, inset, ...props }, ref) => ((0, jsx_runtime_1.jsx)(DropdownMenuPrimitive.Label, { ref: ref, className: (0, cn_1.cn)("px-2 py-1.5 text-body-1 font-semibold", inset && "pl-8", className), ...props })));
|
|
73
|
+
exports.DropdownMenuLabel = DropdownMenuLabel;
|
|
74
|
+
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
75
|
+
const DropdownMenuSeparator = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)(DropdownMenuPrimitive.Separator, { ref: ref, className: (0, cn_1.cn)("-mx-1 my-1 h-px bg-muted", className), ...props })));
|
|
76
|
+
exports.DropdownMenuSeparator = DropdownMenuSeparator;
|
|
77
|
+
DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
|
|
78
|
+
const DropdownMenuShortcut = ({ className, ...props }) => {
|
|
79
|
+
return (0, jsx_runtime_1.jsx)("span", { className: (0, cn_1.cn)("ml-auto text-body-1 tracking-widest opacity-60", className), ...props });
|
|
80
|
+
};
|
|
81
|
+
exports.DropdownMenuShortcut = DropdownMenuShortcut;
|
|
82
|
+
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
83
|
+
//# sourceMappingURL=dropdown-menu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dropdown-menu.js","sourceRoot":"","sources":["../../../src/ui/primitives/dropdown-menu.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qFAAuE;AACvE,+CAA2D;AAC3D,6CAA+B;AAE/B,8BAA2B;AAE3B,MAAM,YAAY,GAAG,qBAAqB,CAAC,IAAI,CAAC;AA6J9C,oCAAY;AA3Jd,MAAM,mBAAmB,G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EAAE,SAAS,EAAE,IAAA,OAAE,EAAC,0BAA0B,EAAE,SAAS,CAAC,KAAM,KAAK,GAAI,CAC/G,CAAC,CAAC;AAgBD,sDAAqB;AAfvB,qBAAqB,CAAC,WAAW,GAAG,qBAAqB,CAAC,SAAS,CAAC,WAAW,CAAC;AAEhF,MAAM,oBAAoB,GAAG,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAyC,EAAE,EAAE;IAC9F,OAAO,iCAAM,SAAS,EAAE,IAAA,OAAE,EAAC,gDAAgD,EAAE,SAAS,CAAC,KAAM,KAAK,GAAI,CAAC;AACzG,CAAC,CAAC;AAYA,oDAAoB;AAXtB,oBAAoB,CAAC,WAAW,GAAG,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare const Input: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
3
|
+
export { Input };
|
|
4
|
+
//# sourceMappingURL=input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../src/ui/primitives/input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,QAAA,MAAM,KAAK,8KAcV,CAAC;AAGF,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.Input = void 0;
|
|
37
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
|
+
const React = __importStar(require("react"));
|
|
39
|
+
const cn_1 = require("../cn");
|
|
40
|
+
const Input = React.forwardRef(({ className, type, ...props }, ref) => {
|
|
41
|
+
return ((0, jsx_runtime_1.jsx)("input", { type: type, className: (0, cn_1.cn)("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-body-1 file:font-medium file:text-foreground placeholder:text-ink-3 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-body-1", className), ref: ref, ...props }));
|
|
42
|
+
});
|
|
43
|
+
exports.Input = Input;
|
|
44
|
+
Input.displayName = "Input";
|
|
45
|
+
//# sourceMappingURL=input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input.js","sourceRoot":"","sources":["../../../src/ui/primitives/input.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA+B;AAE/B,8BAA2B;AAE3B,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAC5B,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IACrC,OAAO,CACL,kCACE,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,IAAA,OAAE,EACX,6XAA6X,EAC7X,SAAS,CACV,EACD,GAAG,EAAE,GAAG,KACJ,KAAK,GACT,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAGO,sBAAK;AAFd,KAAK,CAAC,WAAW,GAAG,OAAO,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: import("class-variance-authority/types").ClassProp | undefined) => string> & React.RefAttributes<HTMLLabelElement>>;
|
|
5
|
+
export { Label };
|
|
6
|
+
//# sourceMappingURL=label.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../../src/ui/primitives/label.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,cAAc,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,QAAA,MAAM,KAAK,4PAKT,CAAC;AAGH,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.Label = void 0;
|
|
37
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
|
+
const LabelPrimitive = __importStar(require("@radix-ui/react-label"));
|
|
39
|
+
const class_variance_authority_1 = require("class-variance-authority");
|
|
40
|
+
const React = __importStar(require("react"));
|
|
41
|
+
const cn_1 = require("../cn");
|
|
42
|
+
const labelVariants = (0, class_variance_authority_1.cva)("text-body-1 font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70");
|
|
43
|
+
const Label = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)(LabelPrimitive.Root, { ref: ref, className: (0, cn_1.cn)(labelVariants(), className), ...props })));
|
|
44
|
+
exports.Label = Label;
|
|
45
|
+
Label.displayName = LabelPrimitive.Root.displayName;
|
|
46
|
+
//# sourceMappingURL=label.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"label.js","sourceRoot":"","sources":["../../../src/ui/primitives/label.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sEAAwD;AACxD,uEAAkE;AAClE,6CAA+B;AAE/B,8BAA2B;AAE3B,MAAM,aAAa,GAAG,IAAA,8BAAG,EAAC,gGAAgG,CAAC,CAAC;AAE5H,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAG5B,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAClC,uBAAC,cAAc,CAAC,IAAI,IAAC,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,IAAA,OAAE,EAAC,aAAa,EAAE,EAAE,SAAS,CAAC,KAAM,KAAK,GAAI,CACxF,CAAC,CAAC;AAGM,sBAAK;AAFd,KAAK,CAAC,WAAW,GAAG,cAAc,CAAC,IAAI,CAAC,WAAW,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface OverflowTab {
|
|
2
|
+
readonly value: string;
|
|
3
|
+
readonly label: string;
|
|
4
|
+
readonly indicator?: boolean;
|
|
5
|
+
readonly count?: number;
|
|
6
|
+
}
|
|
7
|
+
interface OverflowTabsProps {
|
|
8
|
+
readonly tabs: readonly OverflowTab[];
|
|
9
|
+
readonly value: string;
|
|
10
|
+
readonly onChange: (value: string) => void;
|
|
11
|
+
readonly moreTriggerWidth?: number;
|
|
12
|
+
readonly className?: string;
|
|
13
|
+
readonly gap?: number;
|
|
14
|
+
readonly onClose?: (value: string) => void;
|
|
15
|
+
}
|
|
16
|
+
export declare function OverflowTabs({ tabs, value, onChange, moreTriggerWidth, className, gap, onClose, }: OverflowTabsProps): import("react").JSX.Element;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=overflow-tabs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"overflow-tabs.d.ts","sourceRoot":"","sources":["../../../src/ui/primitives/overflow-tabs.tsx"],"names":[],"mappings":"AA2BA,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAEvB,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAE7B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,UAAU,iBAAiB;IACzB,QAAQ,CAAC,IAAI,EAAE,SAAS,WAAW,EAAE,CAAC;IACtC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAE3C,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAE5B,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IAMtB,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAC5C;AAED,wBAAgB,YAAY,CAAC,EAC3B,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,gBAAqB,EACrB,SAAS,EACT,GAAO,EACP,OAAO,GACR,EAAE,iBAAiB,+BAyJnB"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OverflowTabs = OverflowTabs;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const lucide_react_1 = require("lucide-react");
|
|
6
|
+
const react_1 = require("react");
|
|
7
|
+
const dropdown_menu_1 = require("./dropdown-menu");
|
|
8
|
+
const cn_1 = require("../cn");
|
|
9
|
+
function OverflowTabs({ tabs, value, onChange, moreTriggerWidth = 88, className, gap = 4, onClose, }) {
|
|
10
|
+
const containerRef = (0, react_1.useRef)(null);
|
|
11
|
+
const measureRef = (0, react_1.useRef)(null);
|
|
12
|
+
const [containerWidth, setContainerWidth] = (0, react_1.useState)(0);
|
|
13
|
+
const [tabWidths, setTabWidths] = (0, react_1.useState)([]);
|
|
14
|
+
(0, react_1.useEffect)(() => {
|
|
15
|
+
const el = containerRef.current;
|
|
16
|
+
if (!el)
|
|
17
|
+
return;
|
|
18
|
+
const ro = new ResizeObserver((entries) => {
|
|
19
|
+
const w = entries[0]?.contentRect.width ?? el.clientWidth;
|
|
20
|
+
setContainerWidth(w);
|
|
21
|
+
});
|
|
22
|
+
ro.observe(el);
|
|
23
|
+
setContainerWidth(el.clientWidth);
|
|
24
|
+
return () => ro.disconnect();
|
|
25
|
+
}, []);
|
|
26
|
+
(0, react_1.useLayoutEffect)(() => {
|
|
27
|
+
const el = measureRef.current;
|
|
28
|
+
if (!el)
|
|
29
|
+
return;
|
|
30
|
+
const children = Array.from(el.children);
|
|
31
|
+
setTabWidths(children.map((c) => c.getBoundingClientRect().width));
|
|
32
|
+
}, [tabs]);
|
|
33
|
+
const { visible, overflow } = (0, react_1.useMemo)(() => {
|
|
34
|
+
if (tabWidths.length !== tabs.length || containerWidth === 0) {
|
|
35
|
+
return { visible: tabs, overflow: [] };
|
|
36
|
+
}
|
|
37
|
+
const totalNatural = tabWidths.reduce((s, w) => s + w, 0) + gap * Math.max(0, tabs.length - 1);
|
|
38
|
+
if (totalNatural <= containerWidth) {
|
|
39
|
+
return { visible: tabs, overflow: [] };
|
|
40
|
+
}
|
|
41
|
+
const budget = containerWidth - moreTriggerWidth;
|
|
42
|
+
const vis = [];
|
|
43
|
+
const over = [];
|
|
44
|
+
let used = 0;
|
|
45
|
+
for (let i = 0; i < tabs.length; i++) {
|
|
46
|
+
const w = tabWidths[i] + (vis.length > 0 ? gap : 0);
|
|
47
|
+
if (used + w <= budget) {
|
|
48
|
+
vis.push(tabs[i]);
|
|
49
|
+
used += w;
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
over.push(tabs[i]);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
const activeIdx = tabs.findIndex((t) => t.value === value);
|
|
56
|
+
if (activeIdx !== -1) {
|
|
57
|
+
const activeTab = tabs[activeIdx];
|
|
58
|
+
const inVisible = vis.some((t) => t.value === activeTab.value);
|
|
59
|
+
if (!inVisible) {
|
|
60
|
+
const dropped = vis.pop();
|
|
61
|
+
if (dropped)
|
|
62
|
+
over.unshift(dropped);
|
|
63
|
+
vis.push(activeTab);
|
|
64
|
+
const removeIdx = over.findIndex((t) => t.value === activeTab.value);
|
|
65
|
+
if (removeIdx !== -1)
|
|
66
|
+
over.splice(removeIdx, 1);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return { visible: vis, overflow: over };
|
|
70
|
+
}, [tabs, tabWidths, containerWidth, gap, moreTriggerWidth, value]);
|
|
71
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, cn_1.cn)('relative -mb-px flex items-end border-b border-rule', className), children: [(0, jsx_runtime_1.jsx)("div", { ref: measureRef, "aria-hidden": true, className: "pointer-events-none absolute left-0 top-0 flex items-center gap-1 opacity-0", style: { visibility: 'hidden' }, children: tabs.map((t) => ((0, jsx_runtime_1.jsx)(TabPill, { tab: t, active: false, onClick: () => undefined }, `measure-${t.value}`))) }), (0, jsx_runtime_1.jsx)("div", { ref: containerRef, role: "tablist", className: "flex flex-1 items-end gap-1 overflow-hidden", children: visible.map((t) => ((0, jsx_runtime_1.jsx)(TabPill, { tab: t, active: t.value === value, onClick: () => onChange(t.value), onClose: onClose ? () => onClose(t.value) : undefined }, t.value))) }), overflow.length > 0 && ((0, jsx_runtime_1.jsxs)(dropdown_menu_1.DropdownMenu, { children: [(0, jsx_runtime_1.jsx)(dropdown_menu_1.DropdownMenuTrigger, { asChild: true, children: (0, jsx_runtime_1.jsxs)("button", { type: "button", className: "ml-1 -mb-px inline-flex shrink-0 items-center gap-1 whitespace-nowrap px-2 py-2 text-body-1 text-ink-3 transition-colors hover:text-ink", "aria-label": "More tabs", children: ["More", (0, jsx_runtime_1.jsx)("span", { className: "rounded bg-paper-elev px-1 font-mono text-[10px] leading-4 text-ink-4", children: overflow.length }), (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronDown, { className: "h-3 w-3", strokeWidth: 1.6 })] }) }), (0, jsx_runtime_1.jsx)(dropdown_menu_1.DropdownMenuContent, { align: "end", className: "min-w-[180px]", children: overflow.map((t) => ((0, jsx_runtime_1.jsxs)(dropdown_menu_1.DropdownMenuItem, { onClick: () => onChange(t.value), className: (0, cn_1.cn)(t.value === value && 'bg-accent/60 text-foreground'), children: [(0, jsx_runtime_1.jsx)("span", { className: "flex-1 truncate", children: t.label }), t.count !== undefined && ((0, jsx_runtime_1.jsx)("span", { className: "ml-2 text-caption tabular-nums text-ink-4", children: t.count })), t.indicator && ((0, jsx_runtime_1.jsx)("span", { "aria-hidden": true, className: "ml-2 inline-block h-1.5 w-1.5 rounded-full bg-warning" })), onClose && ((0, jsx_runtime_1.jsx)("button", { type: "button", "aria-label": `Close ${t.label}`, className: "ml-2 rounded p-0.5 text-ink-4 hover:bg-paper-elev hover:text-ink", onClick: (e) => {
|
|
72
|
+
e.stopPropagation();
|
|
73
|
+
onClose(t.value);
|
|
74
|
+
}, children: (0, jsx_runtime_1.jsx)(lucide_react_1.X, { className: "h-3 w-3", strokeWidth: 1.8 }) }))] }, t.value))) })] }))] }));
|
|
75
|
+
}
|
|
76
|
+
function TabPill({ tab, active, onClick, onClose, }) {
|
|
77
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, cn_1.cn)('group relative -mb-px inline-flex items-center gap-1.5 whitespace-nowrap rounded-t-md border px-3 py-2 text-body-1 transition-colors', active
|
|
78
|
+
? 'border-rule border-b-transparent bg-paper-elev text-ink font-medium'
|
|
79
|
+
: 'border-transparent text-ink-3 hover:border-rule/40 hover:bg-paper-elev/60 hover:text-ink-2'), children: [(0, jsx_runtime_1.jsxs)("button", { type: "button", role: "tab", "aria-selected": active, onClick: onClick, className: "inline-flex items-center gap-2 outline-none", children: [tab.label, tab.count !== undefined && ((0, jsx_runtime_1.jsx)("span", { className: "rounded bg-paper-elev px-1 font-mono text-[10px] tabular-nums leading-4 text-ink-4", children: tab.count })), tab.indicator && ((0, jsx_runtime_1.jsx)("span", { "aria-hidden": true, className: "inline-block h-1.5 w-1.5 rounded-full bg-warning" }))] }), onClose && ((0, jsx_runtime_1.jsx)("button", { type: "button", "aria-label": `Close ${tab.label}`, onClick: (e) => {
|
|
80
|
+
e.stopPropagation();
|
|
81
|
+
onClose();
|
|
82
|
+
}, className: (0, cn_1.cn)('rounded p-0.5 text-ink-4 transition-opacity hover:bg-paper hover:text-ink', active ? 'opacity-70' : 'opacity-0 group-hover:opacity-70'), children: (0, jsx_runtime_1.jsx)(lucide_react_1.X, { className: "h-3 w-3", strokeWidth: 1.8 }) })), active && ((0, jsx_runtime_1.jsx)("span", { "aria-hidden": true, className: "absolute inset-x-2 bottom-[-1px] h-[2px] rounded-full bg-primary" }))] }));
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=overflow-tabs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"overflow-tabs.js","sourceRoot":"","sources":["../../../src/ui/primitives/overflow-tabs.tsx"],"names":[],"mappings":";;AAqDA,oCAiKC;;AAtMD,+CAA8C;AAC9C,iCAA8E;AAE9E,mDAKyB;AACzB,8BAA2B;AA4B3B,SAAgB,YAAY,CAAC,EAC3B,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,gBAAgB,GAAG,EAAE,EACrB,SAAS,EACT,GAAG,GAAG,CAAC,EACP,OAAO,GACW;IAClB,MAAM,YAAY,GAAG,IAAA,cAAM,EAAiB,IAAI,CAAC,CAAC;IAClD,MAAM,UAAU,GAAG,IAAA,cAAM,EAAiB,IAAI,CAAC,CAAC;IAChD,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,IAAA,gBAAQ,EAAC,CAAC,CAAC,CAAC;IACxD,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,IAAA,gBAAQ,EAAoB,EAAE,CAAC,CAAC;IAGlE,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,MAAM,EAAE,GAAG,YAAY,CAAC,OAAO,CAAC;QAChC,IAAI,CAAC,EAAE;YAAE,OAAO;QAChB,MAAM,EAAE,GAAG,IAAI,cAAc,CAAC,CAAC,OAAO,EAAE,EAAE;YACxC,MAAM,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,EAAE,WAAW,CAAC,KAAK,IAAI,EAAE,CAAC,WAAW,CAAC;YAC1D,iBAAiB,CAAC,CAAC,CAAC,CAAC;QACvB,CAAC,CAAC,CAAC;QACH,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QACf,iBAAiB,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC;QAClC,OAAO,GAAG,EAAE,CAAC,EAAE,CAAC,UAAU,EAAE,CAAC;IAC/B,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,CAAC,EACf,GAAG,EACH,MAAM,EACN,OAAO,EACP,OAAO,GAMP;IACA,OAAO,CACL,iCACE,SAAS,EAAE,IAAA,OAAE,EACX,sIAAsI,EACtI,MAAM;YACJ,CAAC,CAAC,qEAAqE;YACvE,CAAC,CAAC,4FAA4F,CACjG,aAED,oCACE,IAAI,EAAC,QAAQ,EACb,IAAI,EAAC,KAAK,mBACK,MAAM,EACrB,OAAO,EAAE,OAAO,EAChB,SAAS,EAAC,6CAA6C,aAEtD,GAAG,CAAC,KAAK,EACT,GAAG,CAAC,KAAK,KAAK,SAAS,IAAI,CAC1B,iCAAM,SAAS,EAAC,oFAAoF,YACjG,GAAG,CAAC,KAAK,GACL,CACR,EACA,GAAG,CAAC,SAAS,IAAI,CAChB,sDAEE,SAAS,EAAC,kDAAkD,GAC5D,CACH,IACM,EACR,OAAO,IAAI,CACV,mCACE,IAAI,EAAC,QAAQ,gBACD,SAAS,GAAG,CAAC,KAAK,EAAE,EAChC,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;oBACb,CAAC,CAAC,eAAe,EAAE,CAAC;oBACpB,OAAO,EAAE,CAAC;gBACZ,CAAC,EACD,SAAS,EAAE,IAAA,OAAE,EACX,2EAA2E,EAC3E,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,kCAAkC,CAC3D,YAED,uBAAC,gBAAC,IAAC,SAAS,EAAC,SAAS,EAAC,WAAW,EAAE,GAAG,GAAI,GACpC,CACV,EACA,MAAM,IAAI,CACT,sDAEE,SAAS,EAAC,kEAAkE,GAC5E,CACH,IACG,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
|
|
4
|
+
declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
6
|
+
container?: HTMLElement | null;
|
|
7
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
export { Popover, PopoverTrigger, PopoverContent };
|
|
9
|
+
//# sourceMappingURL=popover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../../src/ui/primitives/popover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,QAAA,MAAM,OAAO,yCAAwB,CAAC;AAEtC,QAAA,MAAM,cAAc,gHAA2B,CAAC;AAMhD,QAAA,MAAM,cAAc;gBAHN,WAAW,GAAG,IAAI;wCAmB9B,CAAC;AAGH,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.PopoverContent = exports.PopoverTrigger = exports.Popover = void 0;
|
|
37
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
|
+
const PopoverPrimitive = __importStar(require("@radix-ui/react-popover"));
|
|
39
|
+
const React = __importStar(require("react"));
|
|
40
|
+
const cn_1 = require("../cn");
|
|
41
|
+
const Popover = PopoverPrimitive.Root;
|
|
42
|
+
exports.Popover = Popover;
|
|
43
|
+
const PopoverTrigger = PopoverPrimitive.Trigger;
|
|
44
|
+
exports.PopoverTrigger = PopoverTrigger;
|
|
45
|
+
const PopoverContent = React.forwardRef(({ className, align = "center", sideOffset = 4, container, ...props }, ref) => ((0, jsx_runtime_1.jsx)(PopoverPrimitive.Portal, { container: container ?? undefined, children: (0, jsx_runtime_1.jsx)(PopoverPrimitive.Content, { ref: ref, align: align, sideOffset: sideOffset, className: (0, cn_1.cn)("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=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", className), ...props }) })));
|
|
46
|
+
exports.PopoverContent = PopoverContent;
|
|
47
|
+
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
48
|
+
//# sourceMappingURL=popover.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popover.js","sourceRoot":"","sources":["../../../src/ui/primitives/popover.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0EAA4D;AAC5D,6CAA+B;AAE/B,8BAA2B;AAE3B,MAAM,OAAO,GAAG,gBAAgB,CAAC,IAAI,CAAC;AA2B7B,0BAAO;AAzBhB,MAAM,cAAc,GAAG,gBAAgB,CAAC,OAAO,CAAC;AAyB9B,wCAAc;AAnBhC,MAAM,cAAc,GAAG,KAAK,CAAC,UAAU,CAGrC,CAAC,EAAE,SAAS,EAAE,KAAK,GAAG,QAAQ,EAAE,UAAU,GAAG,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAC/E,uBAAC,gBAAgB,CAAC,MAAM,IAAC,SAAS,EAAE,SAAS,IAAI,SAAS,YACxD,uBAAC,gBAAgB,CAAC,OAAO,IACvB,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,IAAA,OAAE,EACX,4aAA4a,EAC5a,SAAS,CACV,KACG,KAAK,GACT,GACsB,CAC3B,CAAC,CAAC;AAG+B,wCAAc;AAFhD,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC,OAAO,CAAC,WAAW,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare const RadioGroup: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
declare const RadioGroupItem: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
export { RadioGroup, RadioGroupItem };
|
|
6
|
+
//# sourceMappingURL=radio-group.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"radio-group.d.ts","sourceRoot":"","sources":["../../../src/ui/primitives/radio-group.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,mBAAmB,MAAM,6BAA6B,CAAC;AAEnE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,QAAA,MAAM,UAAU,+JAKd,CAAC;AAGH,QAAA,MAAM,cAAc,yKAkBlB,CAAC;AAGH,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,CAAC"}
|