@momo-webplatform/mobase 0.0.3
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/README.md +23 -0
- package/package.json +154 -0
- package/publish/cjs/components/ui/button.js +60 -0
- package/publish/cjs/components/utils/SpinerIcon.js +7 -0
- package/publish/cjs/lib/utils.js +9 -0
- package/publish/cjs/src/components/Accordion/Accordion.js +44 -0
- package/publish/cjs/src/components/Accordion/index.js +8 -0
- package/publish/cjs/src/components/Alert/Alert.js +50 -0
- package/publish/cjs/src/components/AlertDialog/AlertDialog.js +62 -0
- package/publish/cjs/src/components/AlertDialog/index.js +14 -0
- package/publish/cjs/src/components/Avatar/Avatar.js +74 -0
- package/publish/cjs/src/components/Avatar/index.js +7 -0
- package/publish/cjs/src/components/Badge/Badge.js +24 -0
- package/publish/cjs/src/components/Button/Button.js +74 -0
- package/publish/cjs/src/components/Button/index.js +5 -0
- package/publish/cjs/src/components/Calendar/calendar.js +39 -0
- package/publish/cjs/src/components/Card/Card.js +47 -0
- package/publish/cjs/src/components/Checkbox/Checkbox.js +67 -0
- package/publish/cjs/src/components/Checkbox/index.js +9 -0
- package/publish/cjs/src/components/Collapsible/collapsible.js +33 -0
- package/publish/cjs/src/components/Command/command.js +62 -0
- package/publish/cjs/src/components/Dialog/dialog.js +57 -0
- package/publish/cjs/src/components/Drawer/drawer.js +57 -0
- package/publish/cjs/src/components/DropdownMenu/dropdownmenu.js +75 -0
- package/publish/cjs/src/components/HoverCard/hover-card.js +38 -0
- package/publish/cjs/src/components/IconButton/IconButton.js +67 -0
- package/publish/cjs/src/components/IconButton/index.js +5 -0
- package/publish/cjs/src/components/Input/input.js +34 -0
- package/publish/cjs/src/components/Label/Label.js +35 -0
- package/publish/cjs/src/components/Menubar/menubar.js +77 -0
- package/publish/cjs/src/components/NavigationMenu/navigation-menu.js +102 -0
- package/publish/cjs/src/components/Pagination/Pagination.js +52 -0
- package/publish/cjs/src/components/Popover/popover.js +37 -0
- package/publish/cjs/src/components/Progress/Progress.js +33 -0
- package/publish/cjs/src/components/RadioGroup/Radio.js +110 -0
- package/publish/cjs/src/components/RadioGroup/RadioGroup.js +53 -0
- package/publish/cjs/src/components/RadioGroup/index.js +6 -0
- package/publish/cjs/src/components/Select/Select.js +61 -0
- package/publish/cjs/src/components/Sheet/sheet.js +71 -0
- package/publish/cjs/src/components/Skeleton/skeleton.js +9 -0
- package/publish/cjs/src/components/Slider/slider.js +33 -0
- package/publish/cjs/src/components/Switch/Switch.js +54 -0
- package/publish/cjs/src/components/Switch/index.js +6 -0
- package/publish/cjs/src/components/Table/Table.js +53 -0
- package/publish/cjs/src/components/Tabs/Tabs.js +42 -0
- package/publish/cjs/src/components/Textarea/Textarea.js +14 -0
- package/publish/cjs/src/components/Toast/Toast.js +65 -0
- package/publish/cjs/src/components/Toast/toaster.js +14 -0
- package/publish/cjs/src/components/Toast/use-toast.js +155 -0
- package/publish/cjs/src/components/Tooltip/Tooltip.js +41 -0
- package/publish/cjs/src/helpers/clone-deep.js +15 -0
- package/publish/cjs/src/helpers/clone-deep.spec.js +22 -0
- package/publish/cjs/src/helpers/generic-forward-ref.js +5 -0
- package/publish/cjs/src/helpers/http.js +10 -0
- package/publish/cjs/src/helpers/is-client.js +7 -0
- package/publish/cjs/src/helpers/is-object.js +12 -0
- package/publish/cjs/src/helpers/is-object.spec.js +24 -0
- package/publish/cjs/src/helpers/merge-deep.js +29 -0
- package/publish/cjs/src/helpers/merge-deep.spec.js +56 -0
- package/publish/cjs/src/helpers/omit.js +16 -0
- package/publish/cjs/src/helpers/omit.spec.js +9 -0
- package/publish/cjs/src/index.js +19 -0
- package/publish/cjs/src/types/index.js +2 -0
- package/publish/cjs/tsconfig.lib.tsbuildinfo +1 -0
- package/publish/esm/components/ui/button.d.ts +11 -0
- package/publish/esm/components/ui/button.js +33 -0
- package/publish/esm/components/utils/SpinerIcon.d.ts +6 -0
- package/publish/esm/components/utils/SpinerIcon.js +5 -0
- package/publish/esm/lib/utils.d.ts +2 -0
- package/publish/esm/lib/utils.js +5 -0
- package/publish/esm/src/components/Accordion/Accordion.d.ts +20 -0
- package/publish/esm/src/components/Accordion/Accordion.js +15 -0
- package/publish/esm/src/components/Accordion/index.d.ts +2 -0
- package/publish/esm/src/components/Accordion/index.js +1 -0
- package/publish/esm/src/components/Alert/Alert.d.ts +8 -0
- package/publish/esm/src/components/Alert/Alert.js +22 -0
- package/publish/esm/src/components/AlertDialog/AlertDialog.d.ts +49 -0
- package/publish/esm/src/components/AlertDialog/AlertDialog.js +26 -0
- package/publish/esm/src/components/AlertDialog/index.d.ts +2 -0
- package/publish/esm/src/components/AlertDialog/index.js +5 -0
- package/publish/esm/src/components/Avatar/Avatar.d.ts +33 -0
- package/publish/esm/src/components/Avatar/Avatar.js +46 -0
- package/publish/esm/src/components/Avatar/index.d.ts +2 -0
- package/publish/esm/src/components/Avatar/index.js +1 -0
- package/publish/esm/src/components/Badge/Badge.d.ts +9 -0
- package/publish/esm/src/components/Badge/Badge.js +20 -0
- package/publish/esm/src/components/Button/Button.d.ts +26 -0
- package/publish/esm/src/components/Button/Button.js +44 -0
- package/publish/esm/src/components/Button/index.d.ts +2 -0
- package/publish/esm/src/components/Button/index.js +1 -0
- package/publish/esm/src/components/Calendar/calendar.d.ts +8 -0
- package/publish/esm/src/components/Calendar/calendar.js +36 -0
- package/publish/esm/src/components/Card/Card.d.ts +8 -0
- package/publish/esm/src/components/Card/Card.js +16 -0
- package/publish/esm/src/components/Checkbox/Checkbox.d.ts +40 -0
- package/publish/esm/src/components/Checkbox/Checkbox.js +36 -0
- package/publish/esm/src/components/Checkbox/index.d.ts +2 -0
- package/publish/esm/src/components/Checkbox/index.js +4 -0
- package/publish/esm/src/components/Collapsible/collapsible.d.ts +5 -0
- package/publish/esm/src/components/Collapsible/collapsible.js +5 -0
- package/publish/esm/src/components/Command/command.d.ts +50 -0
- package/publish/esm/src/components/Command/command.js +28 -0
- package/publish/esm/src/components/Dialog/dialog.d.ts +19 -0
- package/publish/esm/src/components/Dialog/dialog.js +22 -0
- package/publish/esm/src/components/Drawer/drawer.d.ts +24 -0
- package/publish/esm/src/components/Drawer/drawer.js +22 -0
- package/publish/esm/src/components/DropdownMenu/dropdownmenu.d.ts +27 -0
- package/publish/esm/src/components/DropdownMenu/dropdownmenu.js +35 -0
- package/publish/esm/src/components/HoverCard/hover-card.d.ts +6 -0
- package/publish/esm/src/components/HoverCard/hover-card.js +10 -0
- package/publish/esm/src/components/IconButton/IconButton.d.ts +22 -0
- package/publish/esm/src/components/IconButton/IconButton.js +40 -0
- package/publish/esm/src/components/IconButton/index.d.ts +2 -0
- package/publish/esm/src/components/IconButton/index.js +1 -0
- package/publish/esm/src/components/Input/input.d.ts +5 -0
- package/publish/esm/src/components/Input/input.js +8 -0
- package/publish/esm/src/components/Label/Label.d.ts +5 -0
- package/publish/esm/src/components/Label/Label.js +9 -0
- package/publish/esm/src/components/Menubar/menubar.d.ts +31 -0
- package/publish/esm/src/components/Menubar/menubar.js +36 -0
- package/publish/esm/src/components/NavigationMenu/navigation-menu.d.ts +13 -0
- package/publish/esm/src/components/NavigationMenu/navigation-menu.js +64 -0
- package/publish/esm/src/components/Pagination/Pagination.d.ts +19 -0
- package/publish/esm/src/components/Pagination/Pagination.js +20 -0
- package/publish/esm/src/components/Popover/popover.d.ts +6 -0
- package/publish/esm/src/components/Popover/popover.js +9 -0
- package/publish/esm/src/components/Progress/Progress.d.ts +4 -0
- package/publish/esm/src/components/Progress/Progress.js +7 -0
- package/publish/esm/src/components/RadioGroup/Radio.d.ts +22 -0
- package/publish/esm/src/components/RadioGroup/Radio.js +84 -0
- package/publish/esm/src/components/RadioGroup/RadioGroup.d.ts +44 -0
- package/publish/esm/src/components/RadioGroup/RadioGroup.js +25 -0
- package/publish/esm/src/components/RadioGroup/index.d.ts +2 -0
- package/publish/esm/src/components/RadioGroup/index.js +1 -0
- package/publish/esm/src/components/Select/Select.d.ts +13 -0
- package/publish/esm/src/components/Select/Select.js +26 -0
- package/publish/esm/src/components/Sheet/sheet.d.ts +25 -0
- package/publish/esm/src/components/Sheet/sheet.js +36 -0
- package/publish/esm/src/components/Skeleton/skeleton.d.ts +2 -0
- package/publish/esm/src/components/Skeleton/skeleton.js +6 -0
- package/publish/esm/src/components/Slider/slider.d.ts +4 -0
- package/publish/esm/src/components/Slider/slider.js +7 -0
- package/publish/esm/src/components/Switch/Switch.d.ts +37 -0
- package/publish/esm/src/components/Switch/Switch.js +26 -0
- package/publish/esm/src/components/Switch/index.d.ts +2 -0
- package/publish/esm/src/components/Switch/index.js +1 -0
- package/publish/esm/src/components/Table/Table.d.ts +10 -0
- package/publish/esm/src/components/Table/Table.js +20 -0
- package/publish/esm/src/components/Tabs/Tabs.d.ts +7 -0
- package/publish/esm/src/components/Tabs/Tabs.js +13 -0
- package/publish/esm/src/components/Textarea/Textarea.d.ts +5 -0
- package/publish/esm/src/components/Textarea/Textarea.js +8 -0
- package/publish/esm/src/components/Toast/Toast.d.ts +15 -0
- package/publish/esm/src/components/Toast/Toast.js +33 -0
- package/publish/esm/src/components/Toast/toaster.d.ts +1 -0
- package/publish/esm/src/components/Toast/toaster.js +10 -0
- package/publish/esm/src/components/Toast/use-toast.d.ts +44 -0
- package/publish/esm/src/components/Toast/use-toast.js +127 -0
- package/publish/esm/src/components/Tooltip/Tooltip.d.ts +8 -0
- package/publish/esm/src/components/Tooltip/Tooltip.js +11 -0
- package/publish/esm/src/helpers/clone-deep.d.ts +1 -0
- package/publish/esm/src/helpers/clone-deep.js +11 -0
- package/publish/esm/src/helpers/clone-deep.spec.d.ts +1 -0
- package/publish/esm/src/helpers/clone-deep.spec.js +20 -0
- package/publish/esm/src/helpers/generic-forward-ref.d.ts +5 -0
- package/publish/esm/src/helpers/generic-forward-ref.js +3 -0
- package/publish/esm/src/helpers/http.d.ts +1 -0
- package/publish/esm/src/helpers/http.js +6 -0
- package/publish/esm/src/helpers/is-client.d.ts +1 -0
- package/publish/esm/src/helpers/is-client.js +3 -0
- package/publish/esm/src/helpers/is-object.d.ts +6 -0
- package/publish/esm/src/helpers/is-object.js +8 -0
- package/publish/esm/src/helpers/is-object.spec.d.ts +1 -0
- package/publish/esm/src/helpers/is-object.spec.js +22 -0
- package/publish/esm/src/helpers/merge-deep.d.ts +7 -0
- package/publish/esm/src/helpers/merge-deep.js +25 -0
- package/publish/esm/src/helpers/merge-deep.spec.d.ts +1 -0
- package/publish/esm/src/helpers/merge-deep.spec.js +54 -0
- package/publish/esm/src/helpers/omit.d.ts +1 -0
- package/publish/esm/src/helpers/omit.js +12 -0
- package/publish/esm/src/helpers/omit.spec.d.ts +1 -0
- package/publish/esm/src/helpers/omit.spec.js +7 -0
- package/publish/esm/src/index.d.ts +3 -0
- package/publish/esm/src/index.js +3 -0
- package/publish/esm/src/types/index.d.ts +3 -0
- package/publish/esm/src/types/index.js +1 -0
- package/publish/esm/tsconfig.lib.tsbuildinfo +1 -0
|
@@ -0,0 +1,35 @@
|
|
|
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 (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.Label = void 0;
|
|
27
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
28
|
+
const React = __importStar(require("react"));
|
|
29
|
+
const LabelPrimitive = __importStar(require("@radix-ui/react-label"));
|
|
30
|
+
const class_variance_authority_1 = require("class-variance-authority");
|
|
31
|
+
const utils_1 = require("@/lib/utils");
|
|
32
|
+
const labelVariants = (0, class_variance_authority_1.cva)("text-sm font-normal leading-none disabled:opacity-50 text-gray-900 peer-disabled:cursor-not-allowed peer-disabled:opacity-50");
|
|
33
|
+
const Label = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)(LabelPrimitive.Root, { ref: ref, className: (0, utils_1.cn)(labelVariants(), className), ...props })));
|
|
34
|
+
exports.Label = Label;
|
|
35
|
+
Label.displayName = LabelPrimitive.Root.displayName;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
20
|
+
if (mod && mod.__esModule) return mod;
|
|
21
|
+
var result = {};
|
|
22
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
23
|
+
__setModuleDefault(result, mod);
|
|
24
|
+
return result;
|
|
25
|
+
};
|
|
26
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
+
exports.MenubarShortcut = exports.MenubarSub = exports.MenubarGroup = exports.MenubarSubTrigger = exports.MenubarSubContent = exports.MenubarPortal = exports.MenubarRadioItem = exports.MenubarRadioGroup = exports.MenubarCheckboxItem = exports.MenubarLabel = exports.MenubarSeparator = exports.MenubarItem = exports.MenubarContent = exports.MenubarTrigger = exports.MenubarMenu = exports.Menubar = void 0;
|
|
28
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
29
|
+
const React = __importStar(require("react"));
|
|
30
|
+
const MenubarPrimitive = __importStar(require("@radix-ui/react-menubar"));
|
|
31
|
+
const lucide_react_1 = require("lucide-react");
|
|
32
|
+
const utils_1 = require("@/lib/utils");
|
|
33
|
+
const MenubarMenu = MenubarPrimitive.Menu;
|
|
34
|
+
exports.MenubarMenu = MenubarMenu;
|
|
35
|
+
const MenubarGroup = MenubarPrimitive.Group;
|
|
36
|
+
exports.MenubarGroup = MenubarGroup;
|
|
37
|
+
const MenubarPortal = MenubarPrimitive.Portal;
|
|
38
|
+
exports.MenubarPortal = MenubarPortal;
|
|
39
|
+
const MenubarSub = MenubarPrimitive.Sub;
|
|
40
|
+
exports.MenubarSub = MenubarSub;
|
|
41
|
+
const MenubarRadioGroup = MenubarPrimitive.RadioGroup;
|
|
42
|
+
exports.MenubarRadioGroup = MenubarRadioGroup;
|
|
43
|
+
const Menubar = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)(MenubarPrimitive.Root, { ref: ref, className: (0, utils_1.cn)("flex h-10 items-center space-x-1 rounded-md border bg-background p-1", className), ...props })));
|
|
44
|
+
exports.Menubar = Menubar;
|
|
45
|
+
Menubar.displayName = MenubarPrimitive.Root.displayName;
|
|
46
|
+
const MenubarTrigger = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)(MenubarPrimitive.Trigger, { ref: ref, className: (0, utils_1.cn)("flex cursor-default select-none items-center rounded-sm px-3 py-1.5 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground", className), ...props })));
|
|
47
|
+
exports.MenubarTrigger = MenubarTrigger;
|
|
48
|
+
MenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName;
|
|
49
|
+
const MenubarSubTrigger = React.forwardRef(({ className, inset, children, ...props }, ref) => ((0, jsx_runtime_1.jsxs)(MenubarPrimitive.SubTrigger, { ref: ref, className: (0, utils_1.cn)("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground", inset && "pl-8", className), ...props, children: [children, (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { className: "ml-auto h-4 w-4" })] })));
|
|
50
|
+
exports.MenubarSubTrigger = MenubarSubTrigger;
|
|
51
|
+
MenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName;
|
|
52
|
+
const MenubarSubContent = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)(MenubarPrimitive.SubContent, { ref: ref, className: (0, utils_1.cn)("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground 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 })));
|
|
53
|
+
exports.MenubarSubContent = MenubarSubContent;
|
|
54
|
+
MenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName;
|
|
55
|
+
const MenubarContent = React.forwardRef(({ className, align = "start", alignOffset = -4, sideOffset = 8, ...props }, ref) => ((0, jsx_runtime_1.jsx)(MenubarPrimitive.Portal, { children: (0, jsx_runtime_1.jsx)(MenubarPrimitive.Content, { ref: ref, align: align, alignOffset: alignOffset, sideOffset: sideOffset, className: (0, utils_1.cn)("z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in 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 }) })));
|
|
56
|
+
exports.MenubarContent = MenubarContent;
|
|
57
|
+
MenubarContent.displayName = MenubarPrimitive.Content.displayName;
|
|
58
|
+
const MenubarItem = React.forwardRef(({ className, inset, ...props }, ref) => ((0, jsx_runtime_1.jsx)(MenubarPrimitive.Item, { ref: ref, className: (0, utils_1.cn)("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", inset && "pl-8", className), ...props })));
|
|
59
|
+
exports.MenubarItem = MenubarItem;
|
|
60
|
+
MenubarItem.displayName = MenubarPrimitive.Item.displayName;
|
|
61
|
+
const MenubarCheckboxItem = React.forwardRef(({ className, children, checked, ...props }, ref) => ((0, jsx_runtime_1.jsxs)(MenubarPrimitive.CheckboxItem, { ref: ref, className: (0, utils_1.cn)("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className), checked: checked, ...props, children: [(0, jsx_runtime_1.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: (0, jsx_runtime_1.jsx)(MenubarPrimitive.ItemIndicator, { children: (0, jsx_runtime_1.jsx)(lucide_react_1.Check, { className: "h-4 w-4" }) }) }), children] })));
|
|
62
|
+
exports.MenubarCheckboxItem = MenubarCheckboxItem;
|
|
63
|
+
MenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName;
|
|
64
|
+
const MenubarRadioItem = React.forwardRef(({ className, children, ...props }, ref) => ((0, jsx_runtime_1.jsxs)(MenubarPrimitive.RadioItem, { ref: ref, className: (0, utils_1.cn)("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className), ...props, children: [(0, jsx_runtime_1.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: (0, jsx_runtime_1.jsx)(MenubarPrimitive.ItemIndicator, { children: (0, jsx_runtime_1.jsx)(lucide_react_1.Circle, { className: "h-2 w-2 fill-current" }) }) }), children] })));
|
|
65
|
+
exports.MenubarRadioItem = MenubarRadioItem;
|
|
66
|
+
MenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName;
|
|
67
|
+
const MenubarLabel = React.forwardRef(({ className, inset, ...props }, ref) => ((0, jsx_runtime_1.jsx)(MenubarPrimitive.Label, { ref: ref, className: (0, utils_1.cn)("px-2 py-1.5 text-sm font-semibold", inset && "pl-8", className), ...props })));
|
|
68
|
+
exports.MenubarLabel = MenubarLabel;
|
|
69
|
+
MenubarLabel.displayName = MenubarPrimitive.Label.displayName;
|
|
70
|
+
const MenubarSeparator = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)(MenubarPrimitive.Separator, { ref: ref, className: (0, utils_1.cn)("-mx-1 my-1 h-px bg-muted", className), ...props })));
|
|
71
|
+
exports.MenubarSeparator = MenubarSeparator;
|
|
72
|
+
MenubarSeparator.displayName = MenubarPrimitive.Separator.displayName;
|
|
73
|
+
const MenubarShortcut = ({ className, ...props }) => {
|
|
74
|
+
return ((0, jsx_runtime_1.jsx)("span", { className: (0, utils_1.cn)("ml-auto text-xs tracking-widest text-muted-foreground", className), ...props }));
|
|
75
|
+
};
|
|
76
|
+
exports.MenubarShortcut = MenubarShortcut;
|
|
77
|
+
MenubarShortcut.displayname = "MenubarShortcut";
|
|
@@ -0,0 +1,102 @@
|
|
|
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 (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.NavigationMenuDemo = exports.NavigationMenuViewport = exports.NavigationMenuIndicator = exports.NavigationMenuLink = exports.NavigationMenuTrigger = exports.NavigationMenuContent = exports.NavigationMenuItem = exports.NavigationMenuList = exports.NavigationMenu = exports.navigationMenuTriggerStyle = void 0;
|
|
30
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
31
|
+
const React = __importStar(require("react"));
|
|
32
|
+
const NavigationMenuPrimitive = __importStar(require("@radix-ui/react-navigation-menu"));
|
|
33
|
+
const class_variance_authority_1 = require("class-variance-authority");
|
|
34
|
+
const lucide_react_1 = require("lucide-react");
|
|
35
|
+
const link_1 = __importDefault(require("next/link"));
|
|
36
|
+
const utils_1 = require("@/lib/utils");
|
|
37
|
+
const NavigationMenu = React.forwardRef(({ className, children, ...props }, ref) => ((0, jsx_runtime_1.jsxs)(NavigationMenuPrimitive.Root, { ref: ref, className: (0, utils_1.cn)("relative z-10 flex max-w-max flex-1 items-center justify-center", className), ...props, children: [children, (0, jsx_runtime_1.jsx)(NavigationMenuViewport, {})] })));
|
|
38
|
+
exports.NavigationMenu = NavigationMenu;
|
|
39
|
+
NavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName;
|
|
40
|
+
const NavigationMenuList = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)(NavigationMenuPrimitive.List, { ref: ref, className: (0, utils_1.cn)("group flex flex-1 list-none items-center justify-center space-x-1", className), ...props })));
|
|
41
|
+
exports.NavigationMenuList = NavigationMenuList;
|
|
42
|
+
NavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName;
|
|
43
|
+
const NavigationMenuItem = NavigationMenuPrimitive.Item;
|
|
44
|
+
exports.NavigationMenuItem = NavigationMenuItem;
|
|
45
|
+
const navigationMenuTriggerStyle = (0, class_variance_authority_1.cva)("group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50");
|
|
46
|
+
exports.navigationMenuTriggerStyle = navigationMenuTriggerStyle;
|
|
47
|
+
const NavigationMenuTrigger = React.forwardRef(({ className, children, ...props }, ref) => ((0, jsx_runtime_1.jsxs)(NavigationMenuPrimitive.Trigger, { ref: ref, className: (0, utils_1.cn)(navigationMenuTriggerStyle(), "group", className), ...props, children: [children, " ", (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronDown, { className: "relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180", "aria-hidden": "true" })] })));
|
|
48
|
+
exports.NavigationMenuTrigger = NavigationMenuTrigger;
|
|
49
|
+
NavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName;
|
|
50
|
+
const NavigationMenuContent = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)(NavigationMenuPrimitive.Content, { ref: ref, className: (0, utils_1.cn)("left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto ", className), ...props })));
|
|
51
|
+
exports.NavigationMenuContent = NavigationMenuContent;
|
|
52
|
+
NavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName;
|
|
53
|
+
const NavigationMenuLink = NavigationMenuPrimitive.Link;
|
|
54
|
+
exports.NavigationMenuLink = NavigationMenuLink;
|
|
55
|
+
const NavigationMenuViewport = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)("div", { className: (0, utils_1.cn)("absolute left-0 top-full flex justify-center"), children: (0, jsx_runtime_1.jsx)(NavigationMenuPrimitive.Viewport, { className: (0, utils_1.cn)("origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]", className), ref: ref, ...props }) })));
|
|
56
|
+
exports.NavigationMenuViewport = NavigationMenuViewport;
|
|
57
|
+
NavigationMenuViewport.displayName =
|
|
58
|
+
NavigationMenuPrimitive.Viewport.displayName;
|
|
59
|
+
const NavigationMenuIndicator = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)(NavigationMenuPrimitive.Indicator, { ref: ref, className: (0, utils_1.cn)("top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in", className), ...props, children: (0, jsx_runtime_1.jsx)("div", { className: "relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" }) })));
|
|
60
|
+
exports.NavigationMenuIndicator = NavigationMenuIndicator;
|
|
61
|
+
NavigationMenuIndicator.displayName =
|
|
62
|
+
NavigationMenuPrimitive.Indicator.displayName;
|
|
63
|
+
const components = [
|
|
64
|
+
{
|
|
65
|
+
title: "Alert Dialog",
|
|
66
|
+
href: "/docs/primitives/alert-dialog",
|
|
67
|
+
description: "A modal dialog that interrupts the user with important content and expects a response.",
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
title: "Hover Card",
|
|
71
|
+
href: "/docs/primitives/hover-card",
|
|
72
|
+
description: "For sighted users to preview content available behind a link.",
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
title: "Progress",
|
|
76
|
+
href: "/docs/primitives/progress",
|
|
77
|
+
description: "Displays an indicator showing the completion progress of a task, typically displayed as a progress bar.",
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
title: "Scroll-area",
|
|
81
|
+
href: "/docs/primitives/scroll-area",
|
|
82
|
+
description: "Visually or semantically separates content.",
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
title: "Tabs",
|
|
86
|
+
href: "/docs/primitives/tabs",
|
|
87
|
+
description: "A set of layered sections of content—known as tab panels—that are displayed one at a time.",
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
title: "Tooltip",
|
|
91
|
+
href: "/docs/primitives/tooltip",
|
|
92
|
+
description: "A popup that displays information related to an element when the element receives keyboard focus or the mouse hovers over it.",
|
|
93
|
+
},
|
|
94
|
+
];
|
|
95
|
+
function NavigationMenuDemo() {
|
|
96
|
+
return ((0, jsx_runtime_1.jsx)(NavigationMenu, { children: (0, jsx_runtime_1.jsxs)(NavigationMenuList, { children: [(0, jsx_runtime_1.jsxs)(NavigationMenuItem, { children: [(0, jsx_runtime_1.jsx)(NavigationMenuTrigger, { children: "Getting started" }), (0, jsx_runtime_1.jsx)(NavigationMenuContent, { children: (0, jsx_runtime_1.jsxs)("ul", { className: "grid gap-3 p-6 md:w-[400px] lg:w-[500px] lg:grid-cols-[.75fr_1fr]", children: [(0, jsx_runtime_1.jsx)("li", { className: "row-span-3", children: (0, jsx_runtime_1.jsx)(NavigationMenuLink, { asChild: true, children: (0, jsx_runtime_1.jsxs)("a", { className: "flex h-full w-full select-none flex-col justify-end rounded-md bg-gradient-to-b from-muted/50 to-muted p-6 no-underline outline-none focus:shadow-md", href: "/", children: [(0, jsx_runtime_1.jsx)("div", { className: "mb-2 mt-4 text-lg font-medium", children: "shadcn/ui" }), (0, jsx_runtime_1.jsx)("p", { className: "text-sm leading-tight text-muted-foreground", children: "Beautifully designed components that you can copy and paste into your apps. Accessible. Customizable. Open Source." })] }) }) }), (0, jsx_runtime_1.jsx)(ListItem, { href: "/docs", title: "Introduction", children: "Re-usable components built using Radix UI and Tailwind CSS." }), (0, jsx_runtime_1.jsx)(ListItem, { href: "/docs/installation", title: "Installation", children: "How to install dependencies and structure your app." }), (0, jsx_runtime_1.jsx)(ListItem, { href: "/docs/primitives/typography", title: "Typography", children: "Styles for headings, paragraphs, lists...etc" })] }) })] }), (0, jsx_runtime_1.jsxs)(NavigationMenuItem, { children: [(0, jsx_runtime_1.jsx)(NavigationMenuTrigger, { children: "Components" }), (0, jsx_runtime_1.jsx)(NavigationMenuContent, { children: (0, jsx_runtime_1.jsx)("ul", { className: "grid w-[400px] gap-3 p-4 md:w-[500px] md:grid-cols-2 lg:w-[600px] ", children: components.map((component) => ((0, jsx_runtime_1.jsx)(ListItem, { title: component.title, href: component.href, children: component.description }, component.title))) }) })] }), (0, jsx_runtime_1.jsx)(NavigationMenuItem, { children: (0, jsx_runtime_1.jsx)(link_1.default, { href: "/docs", legacyBehavior: true, passHref: true, children: (0, jsx_runtime_1.jsx)(NavigationMenuLink, { className: navigationMenuTriggerStyle(), children: "Documentation" }) }) })] }) }));
|
|
97
|
+
}
|
|
98
|
+
exports.NavigationMenuDemo = NavigationMenuDemo;
|
|
99
|
+
const ListItem = React.forwardRef(({ className, title, children, ...props }, ref) => {
|
|
100
|
+
return ((0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsx)(NavigationMenuLink, { asChild: true, children: (0, jsx_runtime_1.jsxs)("a", { ref: ref, className: (0, utils_1.cn)("block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground", className), ...props, children: [(0, jsx_runtime_1.jsx)("div", { className: "text-sm font-medium leading-none", children: title }), (0, jsx_runtime_1.jsx)("p", { className: "line-clamp-2 text-sm leading-snug text-muted-foreground", children: children })] }) }) }));
|
|
101
|
+
});
|
|
102
|
+
ListItem.displayName = "ListItem";
|
|
@@ -0,0 +1,52 @@
|
|
|
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 (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.PaginationPrevious = exports.PaginationNext = exports.PaginationLink = exports.PaginationItem = exports.PaginationEllipsis = exports.PaginationContent = exports.Pagination = void 0;
|
|
27
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
28
|
+
const React = __importStar(require("react"));
|
|
29
|
+
const lucide_react_1 = require("lucide-react");
|
|
30
|
+
const utils_1 = require("@/lib/utils");
|
|
31
|
+
const button_1 = require("@/components/ui/button");
|
|
32
|
+
const Pagination = ({ className, ...props }) => ((0, jsx_runtime_1.jsx)("nav", { role: "navigation", "aria-label": "pagination", className: (0, utils_1.cn)("mx-auto flex w-full justify-center", className), ...props }));
|
|
33
|
+
exports.Pagination = Pagination;
|
|
34
|
+
const PaginationContent = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)("ul", { ref: ref, className: (0, utils_1.cn)("flex flex-row items-center gap-1", className), ...props })));
|
|
35
|
+
exports.PaginationContent = PaginationContent;
|
|
36
|
+
PaginationContent.displayName = "PaginationContent";
|
|
37
|
+
const PaginationItem = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)("li", { ref: ref, className: (0, utils_1.cn)("", className), ...props })));
|
|
38
|
+
exports.PaginationItem = PaginationItem;
|
|
39
|
+
PaginationItem.displayName = "PaginationItem";
|
|
40
|
+
const PaginationLink = ({ className, isActive, size = "icon", ...props }) => ((0, jsx_runtime_1.jsx)(PaginationItem, { children: (0, jsx_runtime_1.jsx)("a", { "aria-current": isActive ? "page" : undefined, className: (0, utils_1.cn)((0, button_1.buttonVariants)({
|
|
41
|
+
variant: isActive ? "outline" : "ghost",
|
|
42
|
+
size,
|
|
43
|
+
}), className), ...props }) }));
|
|
44
|
+
exports.PaginationLink = PaginationLink;
|
|
45
|
+
PaginationLink.displayName = "PaginationLink";
|
|
46
|
+
const PaginationPrevious = ({ className, ...props }) => ((0, jsx_runtime_1.jsxs)(PaginationLink, { "aria-label": "Go to previous page", size: "default", className: (0, utils_1.cn)("gap-1 pl-2.5", className), ...props, children: [(0, jsx_runtime_1.jsx)(lucide_react_1.ChevronLeft, { className: "h-4 w-4" }), (0, jsx_runtime_1.jsx)("span", { children: "Previous" })] }));
|
|
47
|
+
exports.PaginationPrevious = PaginationPrevious;
|
|
48
|
+
PaginationPrevious.displayName = "PaginationPrevious";
|
|
49
|
+
const PaginationNext = ({ className, ...props }) => ((0, jsx_runtime_1.jsxs)(PaginationLink, { "aria-label": "Go to next page", size: "default", className: (0, utils_1.cn)("gap-1 pr-2.5", className), ...props, children: [(0, jsx_runtime_1.jsx)("span", { children: "Next" }), (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { className: "h-4 w-4" })] }));
|
|
50
|
+
exports.PaginationNext = PaginationNext;
|
|
51
|
+
const PaginationEllipsis = ({ className, ...props }) => ((0, jsx_runtime_1.jsxs)("span", { "aria-hidden": true, className: (0, utils_1.cn)("flex h-9 w-9 items-center justify-center", className), ...props, children: [(0, jsx_runtime_1.jsx)(lucide_react_1.MoreHorizontal, { className: "h-4 w-4" }), (0, jsx_runtime_1.jsx)("span", { className: "sr-only", children: "More pages" })] }));
|
|
52
|
+
exports.PaginationEllipsis = PaginationEllipsis;
|
|
@@ -0,0 +1,37 @@
|
|
|
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 (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.PopoverContent = exports.PopoverTrigger = exports.Popover = void 0;
|
|
27
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
28
|
+
const React = __importStar(require("react"));
|
|
29
|
+
const PopoverPrimitive = __importStar(require("@radix-ui/react-popover"));
|
|
30
|
+
const utils_1 = require("@/lib/utils");
|
|
31
|
+
const Popover = PopoverPrimitive.Root;
|
|
32
|
+
exports.Popover = Popover;
|
|
33
|
+
const PopoverTrigger = PopoverPrimitive.Trigger;
|
|
34
|
+
exports.PopoverTrigger = PopoverTrigger;
|
|
35
|
+
const PopoverContent = React.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => ((0, jsx_runtime_1.jsx)(PopoverPrimitive.Portal, { children: (0, jsx_runtime_1.jsx)(PopoverPrimitive.Content, { ref: ref, align: align, sideOffset: sideOffset, className: (0, utils_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 }) })));
|
|
36
|
+
exports.PopoverContent = PopoverContent;
|
|
37
|
+
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
@@ -0,0 +1,33 @@
|
|
|
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 (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.Progress = void 0;
|
|
27
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
28
|
+
const React = __importStar(require("react"));
|
|
29
|
+
const ProgressPrimitive = __importStar(require("@radix-ui/react-progress"));
|
|
30
|
+
const utils_1 = require("@/lib/utils");
|
|
31
|
+
const Progress = React.forwardRef(({ className, value, ...props }, ref) => ((0, jsx_runtime_1.jsx)(ProgressPrimitive.Root, { ref: ref, className: (0, utils_1.cn)("relative h-4 w-full overflow-hidden rounded-full bg-secondary", className), ...props, children: (0, jsx_runtime_1.jsx)(ProgressPrimitive.Indicator, { className: "h-full w-full flex-1 bg-primary transition-all", style: { transform: `translateX(-${100 - (value || 0)}%)` } }) })));
|
|
32
|
+
exports.Progress = Progress;
|
|
33
|
+
Progress.displayName = ProgressPrimitive.Root.displayName;
|
|
@@ -0,0 +1,110 @@
|
|
|
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 (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.RadioIndicator = exports.Radio = exports.createRadioScope = void 0;
|
|
27
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
28
|
+
const React = __importStar(require("react"));
|
|
29
|
+
const primitive_1 = require("@radix-ui/primitive");
|
|
30
|
+
const react_compose_refs_1 = require("@radix-ui/react-compose-refs");
|
|
31
|
+
const react_context_1 = require("@radix-ui/react-context");
|
|
32
|
+
const react_use_size_1 = require("@radix-ui/react-use-size");
|
|
33
|
+
const react_use_previous_1 = require("@radix-ui/react-use-previous");
|
|
34
|
+
const react_presence_1 = require("@radix-ui/react-presence");
|
|
35
|
+
const react_primitive_1 = require("@radix-ui/react-primitive");
|
|
36
|
+
/* -------------------------------------------------------------------------------------------------
|
|
37
|
+
* Radio
|
|
38
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
39
|
+
const RADIO_NAME = "Radio";
|
|
40
|
+
const [createRadioContext, createRadioScope] = (0, react_context_1.createContextScope)(RADIO_NAME);
|
|
41
|
+
exports.createRadioScope = createRadioScope;
|
|
42
|
+
const [RadioProvider, useRadioContext] = createRadioContext(RADIO_NAME);
|
|
43
|
+
const Radio = React.forwardRef((props, forwardedRef) => {
|
|
44
|
+
const { __scopeRadio, name, checked = false, required, disabled, value = "on", onCheck, ...radioProps } = props;
|
|
45
|
+
const [button, setButton] = React.useState(null);
|
|
46
|
+
const composedRefs = (0, react_compose_refs_1.useComposedRefs)(forwardedRef, (node) => setButton(node));
|
|
47
|
+
const hasConsumerStoppedPropagationRef = React.useRef(false);
|
|
48
|
+
// We set this to true by default so that events bubble to forms without JS (SSR)
|
|
49
|
+
const isFormControl = button ? Boolean(button.closest("form")) : true;
|
|
50
|
+
return ((0, jsx_runtime_1.jsxs)(RadioProvider, { scope: __scopeRadio, checked: checked, disabled: disabled, children: [(0, jsx_runtime_1.jsx)(react_primitive_1.Primitive.button, { type: "button", role: "radio", "aria-checked": checked, "data-state": getState(checked), "data-disabled": disabled ? "" : undefined, disabled: disabled, value: value, ...radioProps, ref: composedRefs, onClick: (0, primitive_1.composeEventHandlers)(props.onClick, (event) => {
|
|
51
|
+
// radios cannot be unchecked so we only communicate a checked state
|
|
52
|
+
if (!checked)
|
|
53
|
+
onCheck?.();
|
|
54
|
+
if (isFormControl) {
|
|
55
|
+
hasConsumerStoppedPropagationRef.current =
|
|
56
|
+
event.isPropagationStopped();
|
|
57
|
+
// if radio is in a form, stop propagation from the button so that we only propagate
|
|
58
|
+
// one click event (from the input). We propagate changes from an input so that native
|
|
59
|
+
// form validation works and form events reflect radio updates.
|
|
60
|
+
if (!hasConsumerStoppedPropagationRef.current)
|
|
61
|
+
event.stopPropagation();
|
|
62
|
+
}
|
|
63
|
+
}) }), isFormControl && ((0, jsx_runtime_1.jsx)(BubbleInput, { control: button, bubbles: !hasConsumerStoppedPropagationRef.current, name: name, value: value, checked: checked, required: required, disabled: disabled,
|
|
64
|
+
// We transform because the input is absolutely positioned but we have
|
|
65
|
+
// rendered it **after** the button. This pulls it back to sit on top
|
|
66
|
+
// of the button.
|
|
67
|
+
style: { transform: "translateX(-100%)" } }))] }));
|
|
68
|
+
});
|
|
69
|
+
exports.Radio = Radio;
|
|
70
|
+
Radio.displayName = RADIO_NAME;
|
|
71
|
+
/* -------------------------------------------------------------------------------------------------
|
|
72
|
+
* RadioIndicator
|
|
73
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
74
|
+
const INDICATOR_NAME = "RadioIndicator";
|
|
75
|
+
const RadioIndicator = React.forwardRef((props, forwardedRef) => {
|
|
76
|
+
const { __scopeRadio, forceMount, ...indicatorProps } = props;
|
|
77
|
+
const context = useRadioContext(INDICATOR_NAME, __scopeRadio);
|
|
78
|
+
return ((0, jsx_runtime_1.jsx)(react_presence_1.Presence, { present: forceMount || context.checked, children: (0, jsx_runtime_1.jsx)(react_primitive_1.Primitive.span, { "data-state": getState(context.checked), "data-disabled": context.disabled ? "" : undefined, ...indicatorProps, ref: forwardedRef }) }));
|
|
79
|
+
});
|
|
80
|
+
exports.RadioIndicator = RadioIndicator;
|
|
81
|
+
RadioIndicator.displayName = INDICATOR_NAME;
|
|
82
|
+
const BubbleInput = (props) => {
|
|
83
|
+
const { control, checked, bubbles = true, ...inputProps } = props;
|
|
84
|
+
const ref = React.useRef(null);
|
|
85
|
+
const prevChecked = (0, react_use_previous_1.usePrevious)(checked);
|
|
86
|
+
const controlSize = (0, react_use_size_1.useSize)(control);
|
|
87
|
+
// Bubble checked change to parents (e.g form change event)
|
|
88
|
+
React.useEffect(() => {
|
|
89
|
+
const input = ref.current;
|
|
90
|
+
const inputProto = window.HTMLInputElement.prototype;
|
|
91
|
+
const descriptor = Object.getOwnPropertyDescriptor(inputProto, "checked");
|
|
92
|
+
const setChecked = descriptor.set;
|
|
93
|
+
if (prevChecked !== checked && setChecked) {
|
|
94
|
+
const event = new Event("click", { bubbles });
|
|
95
|
+
setChecked.call(input, checked);
|
|
96
|
+
input.dispatchEvent(event);
|
|
97
|
+
}
|
|
98
|
+
}, [prevChecked, checked, bubbles]);
|
|
99
|
+
return ((0, jsx_runtime_1.jsx)("input", { type: "radio", "aria-hidden": true, defaultChecked: checked, ...inputProps, tabIndex: -1, ref: ref, style: {
|
|
100
|
+
...props.style,
|
|
101
|
+
...controlSize,
|
|
102
|
+
position: "absolute",
|
|
103
|
+
pointerEvents: "none",
|
|
104
|
+
opacity: 0,
|
|
105
|
+
margin: 0,
|
|
106
|
+
} }));
|
|
107
|
+
};
|
|
108
|
+
function getState(checked) {
|
|
109
|
+
return checked ? "checked" : "unchecked";
|
|
110
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
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 (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var _a;
|
|
26
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
+
exports.RadioGroupItem = exports.RadioGroup = exports.createRadioGroupScope = exports.createRadioGroupContext = void 0;
|
|
28
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
29
|
+
const React = __importStar(require("react"));
|
|
30
|
+
const RadioGroupPrimitive = __importStar(require("@radix-ui/react-radio-group"));
|
|
31
|
+
const lucide_react_1 = require("lucide-react");
|
|
32
|
+
const react_context_1 = require("@radix-ui/react-context");
|
|
33
|
+
const react_roving_focus_1 = require("@radix-ui/react-roving-focus");
|
|
34
|
+
const utils_1 = require("@/lib/utils");
|
|
35
|
+
const Radio_1 = require("./Radio");
|
|
36
|
+
/* -------------------------------------------------------------------------------------------------
|
|
37
|
+
* RadioGroup
|
|
38
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
39
|
+
const RADIO_GROUP_NAME = "RadioGroup";
|
|
40
|
+
_a = (0, react_context_1.createContextScope)(RADIO_GROUP_NAME, [
|
|
41
|
+
react_roving_focus_1.createRovingFocusGroupScope,
|
|
42
|
+
Radio_1.createRadioScope,
|
|
43
|
+
]), exports.createRadioGroupContext = _a[0], exports.createRadioGroupScope = _a[1];
|
|
44
|
+
const RadioGroup = React.forwardRef(({ className, ...props }, ref) => {
|
|
45
|
+
return ((0, jsx_runtime_1.jsx)(RadioGroupPrimitive.Root, { className: (0, utils_1.cn)("grid gap-4 text-base", props?.orientation === "horizontal" ? "grid-cols-2" : "", className), ...props, ref: ref }));
|
|
46
|
+
});
|
|
47
|
+
exports.RadioGroup = RadioGroup;
|
|
48
|
+
RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;
|
|
49
|
+
const RadioGroupItem = React.forwardRef(({ className, ...props }, ref) => {
|
|
50
|
+
return ((0, jsx_runtime_1.jsx)(RadioGroupPrimitive.Item, { ref: ref, className: (0, utils_1.cn)("aspect-square h-4 w-4 data-[state=checked]:text-white disabled:data-[state=checked]:text-gray-500 disabled:bg-gray-300 disabled:border-none rounded-full border-2 disabled:data-[state=checked]:bg-gray-300 data-[state=checked]:bg-pink-500 border-gray-300 data-[state=checked]:border-none text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-default disabled:opacity-40", className), ...props, children: (0, jsx_runtime_1.jsx)(RadioGroupPrimitive.Indicator, { className: "flex items-center justify-center w-full h-full rounded-full", children: (0, jsx_runtime_1.jsx)(lucide_react_1.Circle, { className: "h-2 w-2 fill-current text-current" }) }) }));
|
|
51
|
+
});
|
|
52
|
+
exports.RadioGroupItem = RadioGroupItem;
|
|
53
|
+
RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RadioGroupItem = exports.RadioGroup = void 0;
|
|
4
|
+
var RadioGroup_1 = require("./RadioGroup");
|
|
5
|
+
Object.defineProperty(exports, "RadioGroup", { enumerable: true, get: function () { return RadioGroup_1.RadioGroup; } });
|
|
6
|
+
Object.defineProperty(exports, "RadioGroupItem", { enumerable: true, get: function () { return RadioGroup_1.RadioGroupItem; } });
|
|
@@ -0,0 +1,61 @@
|
|
|
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 (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.SelectScrollDownButton = exports.SelectScrollUpButton = exports.SelectSeparator = exports.SelectItem = exports.SelectLabel = exports.SelectContent = exports.SelectTrigger = exports.SelectValue = exports.SelectGroup = exports.Select = void 0;
|
|
27
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
28
|
+
const React = __importStar(require("react"));
|
|
29
|
+
const solid_1 = require("@heroicons/react/solid");
|
|
30
|
+
const SelectPrimitive = __importStar(require("@radix-ui/react-select"));
|
|
31
|
+
const utils_1 = require("@/lib/utils");
|
|
32
|
+
const Select = SelectPrimitive.Root;
|
|
33
|
+
exports.Select = Select;
|
|
34
|
+
const SelectGroup = SelectPrimitive.Group;
|
|
35
|
+
exports.SelectGroup = SelectGroup;
|
|
36
|
+
const SelectValue = SelectPrimitive.Value;
|
|
37
|
+
exports.SelectValue = SelectValue;
|
|
38
|
+
const SelectTrigger = React.forwardRef(({ className, children, ...props }, ref) => ((0, jsx_runtime_1.jsxs)(SelectPrimitive.Trigger, { ref: ref, className: (0, utils_1.cn)("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-gray-300 bg-white px-3 py-2 text-sm ring-offset-white placeholder:text-gray-500 focus:outline-none focus:ring-1 focus:ring-pink-200 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 text-gray-900", className), ...props, children: [children, (0, jsx_runtime_1.jsx)(SelectPrimitive.Icon, { asChild: true, children: (0, jsx_runtime_1.jsx)(solid_1.ChevronDownIcon, { className: "h-4 w-4 opacity-50" }) })] })));
|
|
39
|
+
exports.SelectTrigger = SelectTrigger;
|
|
40
|
+
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
41
|
+
const SelectScrollUpButton = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)(SelectPrimitive.ScrollUpButton, { ref: ref, className: (0, utils_1.cn)("flex cursor-default items-center justify-center py-1", className), ...props, children: (0, jsx_runtime_1.jsx)(solid_1.ChevronUpIcon, {}) })));
|
|
42
|
+
exports.SelectScrollUpButton = SelectScrollUpButton;
|
|
43
|
+
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
44
|
+
const SelectScrollDownButton = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)(SelectPrimitive.ScrollDownButton, { ref: ref, className: (0, utils_1.cn)("flex cursor-default items-center justify-center py-1", className), ...props, children: (0, jsx_runtime_1.jsx)(solid_1.ChevronDownIcon, {}) })));
|
|
45
|
+
exports.SelectScrollDownButton = SelectScrollDownButton;
|
|
46
|
+
SelectScrollDownButton.displayName =
|
|
47
|
+
SelectPrimitive.ScrollDownButton.displayName;
|
|
48
|
+
const SelectContent = React.forwardRef(({ className, children, position = "popper", ...props }, ref) => ((0, jsx_runtime_1.jsx)(SelectPrimitive.Portal, { children: (0, jsx_runtime_1.jsxs)(SelectPrimitive.Content, { ref: ref, className: (0, utils_1.cn)("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-gray-300 bg-white text-gray-900 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", position === "popper" &&
|
|
49
|
+
"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", className), position: position, ...props, children: [(0, jsx_runtime_1.jsx)(SelectScrollUpButton, {}), (0, jsx_runtime_1.jsx)(SelectPrimitive.Viewport, { className: (0, utils_1.cn)("p-1", position === "popper" &&
|
|
50
|
+
"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"), children: children }), (0, jsx_runtime_1.jsx)(SelectScrollDownButton, {})] }) })));
|
|
51
|
+
exports.SelectContent = SelectContent;
|
|
52
|
+
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
53
|
+
const SelectLabel = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)(SelectPrimitive.Label, { ref: ref, className: (0, utils_1.cn)("px-2 py-1.5 text-sm font-semibold", className), ...props })));
|
|
54
|
+
exports.SelectLabel = SelectLabel;
|
|
55
|
+
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
56
|
+
const SelectItem = React.forwardRef(({ className, children, ...props }, ref) => ((0, jsx_runtime_1.jsxs)(SelectPrimitive.Item, { ref: ref, className: (0, utils_1.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-gray-100 focus:text-gray-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className), ...props, children: [(0, jsx_runtime_1.jsx)("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: (0, jsx_runtime_1.jsx)(SelectPrimitive.ItemIndicator, { children: (0, jsx_runtime_1.jsx)(solid_1.CheckIcon, { className: "h-4 w-4" }) }) }), (0, jsx_runtime_1.jsx)(SelectPrimitive.ItemText, { children: children })] })));
|
|
57
|
+
exports.SelectItem = SelectItem;
|
|
58
|
+
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
59
|
+
const SelectSeparator = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)(SelectPrimitive.Separator, { ref: ref, className: (0, utils_1.cn)("-mx-1 my-1 h-px bg-muted", className), ...props })));
|
|
60
|
+
exports.SelectSeparator = SelectSeparator;
|
|
61
|
+
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|