ikoncomponents 1.1.6 → 1.1.7
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/hooks/use-mobile.js +2 -38
- package/dist/ikoncomponents/action-menu/index.js +15 -18
- package/dist/ikoncomponents/action-menu/type.js +1 -2
- package/dist/ikoncomponents/alert-dialog/index.js +6 -10
- package/dist/ikoncomponents/buttons/index.js +32 -23
- package/dist/ikoncomponents/combobox-input/index.js +14 -16
- package/dist/ikoncomponents/combobox-input/type.js +1 -2
- package/dist/ikoncomponents/data-table/datatable-column-filter/index.js +13 -16
- package/dist/ikoncomponents/data-table/datatable-faceted-filter/index.js +22 -58
- package/dist/ikoncomponents/data-table/datatable-filter-menu/index.js +18 -21
- package/dist/ikoncomponents/data-table/datatable-pagination/index.js +10 -13
- package/dist/ikoncomponents/data-table/datatable-toolbar/index.js +17 -19
- package/dist/ikoncomponents/data-table/function.js +4 -7
- package/dist/ikoncomponents/data-table/index.js +81 -116
- package/dist/ikoncomponents/data-table/type.js +1 -2
- package/dist/ikoncomponents/e-chart/index.js +32 -37
- package/dist/ikoncomponents/file-input/index.js +20 -11
- package/dist/ikoncomponents/glowing-effect/index.js +16 -18
- package/dist/ikoncomponents/icon/index.js +16 -40
- package/dist/ikoncomponents/loading-spinner/index.js +16 -8
- package/dist/ikoncomponents/multi-combobox/index.js +31 -30
- package/dist/ikoncomponents/no-data/index.js +4 -7
- package/dist/ikoncomponents/page-wrapper/index.js +5 -8
- package/dist/ikoncomponents/password-strength-meter/index.js +6 -13
- package/dist/ikoncomponents/phone-input/index.js +30 -54
- package/dist/ikoncomponents/resource-spreadsheet/index.js +11 -48
- package/dist/ikoncomponents/search-input/index.js +18 -9
- package/dist/ikoncomponents/sheet/index.js +5 -8
- package/dist/ikoncomponents/simple-widget/index.js +8 -11
- package/dist/ikoncomponents/tabs/index.js +20 -22
- package/dist/ikoncomponents/tabs/type.js +1 -2
- package/dist/ikoncomponents/theme-toggle-btn/index.js +8 -11
- package/dist/ikoncomponents/title-progress/index.js +4 -7
- package/dist/ikoncomponents/tooltip/index.js +4 -7
- package/dist/ikoncomponents/twolevel-dropdown/index.js +20 -53
- package/dist/ikoncomponents/widgets/index.js +10 -13
- package/dist/ikoncomponents/widgets/type.js +1 -2
- package/dist/index.d.ts +3 -3
- package/dist/index.js +70 -123
- package/dist/shadcn/accordion.js +28 -51
- package/dist/shadcn/alert-dialog.js +60 -70
- package/dist/shadcn/alert.d.ts +1 -1
- package/dist/shadcn/alert.js +25 -15
- package/dist/shadcn/avatar.js +24 -47
- package/dist/shadcn/badge.d.ts +1 -1
- package/dist/shadcn/badge.js +21 -13
- package/dist/shadcn/button.d.ts +1 -1
- package/dist/shadcn/button.js +21 -13
- package/dist/shadcn/calendar.js +42 -97
- package/dist/shadcn/card.js +35 -25
- package/dist/shadcn/checkbox.js +19 -42
- package/dist/shadcn/command.js +53 -43
- package/dist/shadcn/date-input.js +25 -60
- package/dist/shadcn/date-range-picker.js +14 -18
- package/dist/shadcn/dialog.js +56 -79
- package/dist/shadcn/dropdown-menu.js +61 -84
- package/dist/shadcn/hover-card.js +24 -47
- package/dist/shadcn/input.js +17 -7
- package/dist/shadcn/label.js +18 -41
- package/dist/shadcn/navigation-menu.d.ts +1 -1
- package/dist/shadcn/navigation-menu.js +43 -68
- package/dist/shadcn/popover.js +27 -50
- package/dist/shadcn/progress.js +19 -42
- package/dist/shadcn/radio-group.js +23 -45
- package/dist/shadcn/scroll-area.js +22 -45
- package/dist/shadcn/select.js +58 -81
- package/dist/shadcn/separator.js +18 -41
- package/dist/shadcn/sheet.js +52 -73
- package/dist/shadcn/sidebar.d.ts +1 -1
- package/dist/shadcn/sidebar.js +113 -141
- package/dist/shadcn/skeleton.js +17 -7
- package/dist/shadcn/slider.js +19 -42
- package/dist/shadcn/sonner.js +20 -11
- package/dist/shadcn/switch.js +18 -41
- package/dist/shadcn/table.js +46 -36
- package/dist/shadcn/tabs.js +27 -50
- package/dist/shadcn/textarea.js +17 -7
- package/dist/shadcn/tooltip.js +27 -50
- package/dist/shadcn/workflow.js +8 -8
- package/dist/utils/cn.js +4 -7
- package/dist/utils/theme-provider/index.js +16 -7
- package/package.json +2 -1
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/* eslint-disable max-lines */
|
|
3
2
|
'use client';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const react_icons_1 = require("@radix-ui/react-icons"); // Use these icons for the arrows in the header
|
|
11
|
-
const button_1 = require("./button");
|
|
3
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { useState, useEffect } from 'react';
|
|
5
|
+
import { Popover, PopoverContent, PopoverTrigger } from './popover';
|
|
6
|
+
import { Calendar } from './calendar';
|
|
7
|
+
import { ChevronRightIcon, ChevronLeftIcon } from '@radix-ui/react-icons'; // Use these icons for the arrows in the header
|
|
8
|
+
import { Button } from './button';
|
|
12
9
|
const getDateAdjustedForTimezone = (dateInput) => {
|
|
13
10
|
if (typeof dateInput === 'string') {
|
|
14
11
|
const parts = dateInput.split('-').map((part) => parseInt(part, 10));
|
|
@@ -20,9 +17,9 @@ const getDateAdjustedForTimezone = (dateInput) => {
|
|
|
20
17
|
}
|
|
21
18
|
};
|
|
22
19
|
/** The DateRangePicker component allows a user to select a range of dates */
|
|
23
|
-
const DateRangePicker = ({ initialDateFrom = new Date(new Date().setHours(0, 0, 0, 0)), initialDateTo, onUpdate, align = 'center', locale = 'en-US' }) => {
|
|
24
|
-
const [isOpen, setIsOpen] =
|
|
25
|
-
const [range, setRange] =
|
|
20
|
+
export const DateRangePicker = ({ initialDateFrom = new Date(new Date().setHours(0, 0, 0, 0)), initialDateTo, onUpdate, align = 'center', locale = 'en-US' }) => {
|
|
21
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
22
|
+
const [range, setRange] = useState({
|
|
26
23
|
from: initialDateFrom
|
|
27
24
|
? getDateAdjustedForTimezone(initialDateFrom)
|
|
28
25
|
: undefined,
|
|
@@ -32,18 +29,17 @@ const DateRangePicker = ({ initialDateFrom = new Date(new Date().setHours(0, 0,
|
|
|
32
29
|
? getDateAdjustedForTimezone(initialDateFrom)
|
|
33
30
|
: undefined
|
|
34
31
|
});
|
|
35
|
-
|
|
32
|
+
useEffect(() => {
|
|
36
33
|
// This effect will be triggered when a date is selected.
|
|
37
34
|
// We update the state of the component using the new range.
|
|
38
35
|
if (onUpdate) {
|
|
39
36
|
onUpdate({ range });
|
|
40
37
|
}
|
|
41
38
|
}, [range, onUpdate]);
|
|
42
|
-
return ((
|
|
43
|
-
setRange({ from: value
|
|
39
|
+
return (_jsxs(Popover, { modal: true, open: isOpen, onOpenChange: setIsOpen, children: [_jsx(PopoverTrigger, { asChild: true, children: _jsxs(Button, { size: 'lg', variant: "secondary", className: "w-auto px-3 py-2", children: [_jsx("div", { className: "flex-grow text-left font-normal", children: _jsx("span", { children: "Select a date range" }) }), _jsx("div", { className: "pl-1 opacity-60 -mr-2 scale-125", children: isOpen ? _jsx(ChevronLeftIcon, { width: 24 }) : _jsx(ChevronRightIcon, { width: 24 }) })] }) }), _jsx(PopoverContent, { align: align, className: "w-auto p-0", children: _jsx(Calendar, { mode: "range", onSelect: (value) => {
|
|
40
|
+
setRange({ from: value === null || value === void 0 ? void 0 : value.from, to: value === null || value === void 0 ? void 0 : value.to });
|
|
44
41
|
}, selected: range, numberOfMonths: 2, defaultMonth: new Date(new Date().setMonth(new Date().getMonth() - 1)) }) })] }));
|
|
45
42
|
};
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
exports.DateRangePicker.filePath =
|
|
43
|
+
DateRangePicker.displayName = 'DateRangePicker';
|
|
44
|
+
DateRangePicker.filePath =
|
|
49
45
|
'libs/shared/ui-kit/src/lib/date-range-picker/date-range-picker.tsx';
|
package/dist/shadcn/dialog.js
CHANGED
|
@@ -1,80 +1,57 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
"use client";
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
var
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
return
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
Object.
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
return (
|
|
53
|
-
}
|
|
54
|
-
function
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
function DialogClose({ ...props }) {
|
|
61
|
-
return (0, jsx_runtime_1.jsx)(DialogPrimitive.Close, { "data-slot": "dialog-close", ...props });
|
|
62
|
-
}
|
|
63
|
-
function DialogOverlay({ className, ...props }) {
|
|
64
|
-
return ((0, jsx_runtime_1.jsx)(DialogPrimitive.Overlay, { "data-slot": "dialog-overlay", className: (0, cn_1.cn)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50", className), ...props }));
|
|
65
|
-
}
|
|
66
|
-
function DialogContent({ className, children, showCloseButton = true, ...props }) {
|
|
67
|
-
return ((0, jsx_runtime_1.jsxs)(DialogPortal, { "data-slot": "dialog-portal", children: [(0, jsx_runtime_1.jsx)(DialogOverlay, {}), (0, jsx_runtime_1.jsxs)(DialogPrimitive.Content, { "data-slot": "dialog-content", className: (0, cn_1.cn)("bg-card 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg", className), ...props, children: [children, showCloseButton && ((0, jsx_runtime_1.jsxs)(DialogPrimitive.Close, { "data-slot": "dialog-close", className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.XIcon, {}), (0, jsx_runtime_1.jsx)("span", { className: "sr-only", children: "Close" })] }))] })] }));
|
|
68
|
-
}
|
|
69
|
-
function DialogHeader({ className, ...props }) {
|
|
70
|
-
return ((0, jsx_runtime_1.jsx)("div", { "data-slot": "dialog-header", className: (0, cn_1.cn)("flex flex-col gap-2 text-center sm:text-left", className), ...props }));
|
|
71
|
-
}
|
|
72
|
-
function DialogFooter({ className, ...props }) {
|
|
73
|
-
return ((0, jsx_runtime_1.jsx)("div", { "data-slot": "dialog-footer", className: (0, cn_1.cn)("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className), ...props }));
|
|
74
|
-
}
|
|
75
|
-
function DialogDescription({ className, ...props }) {
|
|
76
|
-
return ((0, jsx_runtime_1.jsx)(DialogPrimitive.Description, { "data-slot": "dialog-description", className: (0, cn_1.cn)("text-lg leading-none font-semibold", className), ...props }));
|
|
77
|
-
}
|
|
78
|
-
function DialogTitle({ className, ...props }) {
|
|
79
|
-
return ((0, jsx_runtime_1.jsx)(DialogPrimitive.Title, { "data-slot": "dialog-title", className: (0, cn_1.cn)("text-muted-foreground text-sm", className), ...props }));
|
|
80
|
-
}
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
15
|
+
import { XIcon } from "lucide-react";
|
|
16
|
+
import { cn } from "../utils/cn";
|
|
17
|
+
function Dialog(_a) {
|
|
18
|
+
var props = __rest(_a, []);
|
|
19
|
+
return _jsx(DialogPrimitive.Root, Object.assign({ "data-slot": "dialog" }, props));
|
|
20
|
+
}
|
|
21
|
+
function DialogTrigger(_a) {
|
|
22
|
+
var props = __rest(_a, []);
|
|
23
|
+
return _jsx(DialogPrimitive.Trigger, Object.assign({ "data-slot": "dialog-trigger" }, props));
|
|
24
|
+
}
|
|
25
|
+
function DialogPortal(_a) {
|
|
26
|
+
var props = __rest(_a, []);
|
|
27
|
+
return _jsx(DialogPrimitive.Portal, Object.assign({ "data-slot": "dialog-portal" }, props));
|
|
28
|
+
}
|
|
29
|
+
function DialogClose(_a) {
|
|
30
|
+
var props = __rest(_a, []);
|
|
31
|
+
return _jsx(DialogPrimitive.Close, Object.assign({ "data-slot": "dialog-close" }, props));
|
|
32
|
+
}
|
|
33
|
+
function DialogOverlay(_a) {
|
|
34
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
35
|
+
return (_jsx(DialogPrimitive.Overlay, Object.assign({ "data-slot": "dialog-overlay", className: cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50", className) }, props)));
|
|
36
|
+
}
|
|
37
|
+
function DialogContent(_a) {
|
|
38
|
+
var { className, children, showCloseButton = true } = _a, props = __rest(_a, ["className", "children", "showCloseButton"]);
|
|
39
|
+
return (_jsxs(DialogPortal, { "data-slot": "dialog-portal", children: [_jsx(DialogOverlay, {}), _jsxs(DialogPrimitive.Content, Object.assign({ "data-slot": "dialog-content", className: cn("bg-card 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg", className) }, props, { children: [children, showCloseButton && (_jsxs(DialogPrimitive.Close, { "data-slot": "dialog-close", className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", children: [_jsx(XIcon, {}), _jsx("span", { className: "sr-only", children: "Close" })] }))] }))] }));
|
|
40
|
+
}
|
|
41
|
+
function DialogHeader(_a) {
|
|
42
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
43
|
+
return (_jsx("div", Object.assign({ "data-slot": "dialog-header", className: cn("flex flex-col gap-2 text-center sm:text-left", className) }, props)));
|
|
44
|
+
}
|
|
45
|
+
function DialogFooter(_a) {
|
|
46
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
47
|
+
return (_jsx("div", Object.assign({ "data-slot": "dialog-footer", className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className) }, props)));
|
|
48
|
+
}
|
|
49
|
+
function DialogDescription(_a) {
|
|
50
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
51
|
+
return (_jsx(DialogPrimitive.Description, Object.assign({ "data-slot": "dialog-description", className: cn("text-lg leading-none font-semibold", className) }, props)));
|
|
52
|
+
}
|
|
53
|
+
function DialogTitle(_a) {
|
|
54
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
55
|
+
return (_jsx(DialogPrimitive.Title, Object.assign({ "data-slot": "dialog-title", className: cn("text-muted-foreground text-sm", className) }, props)));
|
|
56
|
+
}
|
|
57
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
|
|
@@ -1,100 +1,77 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
"use client";
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
var
|
|
20
|
-
|
|
21
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
-
var ar = [];
|
|
23
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
-
return ar;
|
|
25
|
-
};
|
|
26
|
-
return ownKeys(o);
|
|
27
|
-
};
|
|
28
|
-
return function (mod) {
|
|
29
|
-
if (mod && mod.__esModule) return mod;
|
|
30
|
-
var result = {};
|
|
31
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
-
__setModuleDefault(result, mod);
|
|
33
|
-
return result;
|
|
34
|
-
};
|
|
35
|
-
})();
|
|
36
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
-
exports.DropdownMenu = DropdownMenu;
|
|
38
|
-
exports.DropdownMenuPortal = DropdownMenuPortal;
|
|
39
|
-
exports.DropdownMenuTrigger = DropdownMenuTrigger;
|
|
40
|
-
exports.DropdownMenuContent = DropdownMenuContent;
|
|
41
|
-
exports.DropdownMenuGroup = DropdownMenuGroup;
|
|
42
|
-
exports.DropdownMenuLabel = DropdownMenuLabel;
|
|
43
|
-
exports.DropdownMenuItem = DropdownMenuItem;
|
|
44
|
-
exports.DropdownMenuCheckboxItem = DropdownMenuCheckboxItem;
|
|
45
|
-
exports.DropdownMenuRadioGroup = DropdownMenuRadioGroup;
|
|
46
|
-
exports.DropdownMenuRadioItem = DropdownMenuRadioItem;
|
|
47
|
-
exports.DropdownMenuSeparator = DropdownMenuSeparator;
|
|
48
|
-
exports.DropdownMenuShortcut = DropdownMenuShortcut;
|
|
49
|
-
exports.DropdownMenuSub = DropdownMenuSub;
|
|
50
|
-
exports.DropdownMenuSubTrigger = DropdownMenuSubTrigger;
|
|
51
|
-
exports.DropdownMenuSubContent = DropdownMenuSubContent;
|
|
52
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
53
|
-
const DropdownMenuPrimitive = __importStar(require("@radix-ui/react-dropdown-menu"));
|
|
54
|
-
const lucide_react_1 = require("lucide-react");
|
|
55
|
-
const cn_1 = require("../utils/cn");
|
|
56
|
-
function DropdownMenu({ ...props }) {
|
|
57
|
-
return (0, jsx_runtime_1.jsx)(DropdownMenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
+
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
15
|
+
import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
|
|
16
|
+
import { cn } from "../utils/cn";
|
|
17
|
+
function DropdownMenu(_a) {
|
|
18
|
+
var props = __rest(_a, []);
|
|
19
|
+
return _jsx(DropdownMenuPrimitive.Root, Object.assign({ "data-slot": "dropdown-menu" }, props));
|
|
58
20
|
}
|
|
59
|
-
function DropdownMenuPortal(
|
|
60
|
-
|
|
21
|
+
function DropdownMenuPortal(_a) {
|
|
22
|
+
var props = __rest(_a, []);
|
|
23
|
+
return (_jsx(DropdownMenuPrimitive.Portal, Object.assign({ "data-slot": "dropdown-menu-portal" }, props)));
|
|
61
24
|
}
|
|
62
|
-
function DropdownMenuTrigger(
|
|
63
|
-
|
|
25
|
+
function DropdownMenuTrigger(_a) {
|
|
26
|
+
var props = __rest(_a, []);
|
|
27
|
+
return (_jsx(DropdownMenuPrimitive.Trigger, Object.assign({ "data-slot": "dropdown-menu-trigger" }, props)));
|
|
64
28
|
}
|
|
65
|
-
function DropdownMenuContent(
|
|
66
|
-
|
|
29
|
+
function DropdownMenuContent(_a) {
|
|
30
|
+
var { className, sideOffset = 4 } = _a, props = __rest(_a, ["className", "sideOffset"]);
|
|
31
|
+
return (_jsx(DropdownMenuPrimitive.Portal, { children: _jsx(DropdownMenuPrimitive.Content, Object.assign({ "data-slot": "dropdown-menu-content", sideOffset: sideOffset, className: cn("bg-popover 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 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md", "bg-[var(--background)]", className) }, props)) }));
|
|
67
32
|
}
|
|
68
|
-
function DropdownMenuGroup(
|
|
69
|
-
|
|
33
|
+
function DropdownMenuGroup(_a) {
|
|
34
|
+
var props = __rest(_a, []);
|
|
35
|
+
return (_jsx(DropdownMenuPrimitive.Group, Object.assign({ "data-slot": "dropdown-menu-group" }, props)));
|
|
70
36
|
}
|
|
71
|
-
function DropdownMenuItem(
|
|
72
|
-
|
|
37
|
+
function DropdownMenuItem(_a) {
|
|
38
|
+
var { className, inset, variant = "default" } = _a, props = __rest(_a, ["className", "inset", "variant"]);
|
|
39
|
+
return (_jsx(DropdownMenuPrimitive.Item, Object.assign({ "data-slot": "dropdown-menu-item", "data-inset": inset, "data-variant": variant, className: cn("focus:bg-[var(--input)] dark:focus:bg-[var(--card)] keross:focus:bg-[var(--secondary)] focus:text-accent-foreground keross:text-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className) }, props)));
|
|
73
40
|
}
|
|
74
|
-
function DropdownMenuCheckboxItem(
|
|
75
|
-
|
|
41
|
+
function DropdownMenuCheckboxItem(_a) {
|
|
42
|
+
var { className, children, checked } = _a, props = __rest(_a, ["className", "children", "checked"]);
|
|
43
|
+
return (_jsxs(DropdownMenuPrimitive.CheckboxItem, Object.assign({ "data-slot": "dropdown-menu-checkbox-item", className: cn("focus:bg-[var(--input)] focus:text-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), checked: checked }, props, { children: [_jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(CheckIcon, { className: "size-4" }) }) }), children] })));
|
|
76
44
|
}
|
|
77
|
-
function DropdownMenuRadioGroup(
|
|
78
|
-
|
|
45
|
+
function DropdownMenuRadioGroup(_a) {
|
|
46
|
+
var props = __rest(_a, []);
|
|
47
|
+
return (_jsx(DropdownMenuPrimitive.RadioGroup, Object.assign({ "data-slot": "dropdown-menu-radio-group" }, props)));
|
|
79
48
|
}
|
|
80
|
-
function DropdownMenuRadioItem(
|
|
81
|
-
|
|
49
|
+
function DropdownMenuRadioItem(_a) {
|
|
50
|
+
var { className, children } = _a, props = __rest(_a, ["className", "children"]);
|
|
51
|
+
return (_jsxs(DropdownMenuPrimitive.RadioItem, Object.assign({ "data-slot": "dropdown-menu-radio-item", className: cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className) }, props, { children: [_jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(CircleIcon, { className: "size-2 fill-current" }) }) }), children] })));
|
|
82
52
|
}
|
|
83
|
-
function DropdownMenuLabel(
|
|
84
|
-
|
|
53
|
+
function DropdownMenuLabel(_a) {
|
|
54
|
+
var { className, inset } = _a, props = __rest(_a, ["className", "inset"]);
|
|
55
|
+
return (_jsx(DropdownMenuPrimitive.Label, Object.assign({ "data-slot": "dropdown-menu-label", "data-inset": inset, className: cn("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8", className) }, props)));
|
|
85
56
|
}
|
|
86
|
-
function DropdownMenuSeparator(
|
|
87
|
-
|
|
57
|
+
function DropdownMenuSeparator(_a) {
|
|
58
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
59
|
+
return (_jsx(DropdownMenuPrimitive.Separator, Object.assign({ "data-slot": "dropdown-menu-separator", className: cn("bg-border -mx-1 my-1 h-px", className) }, props)));
|
|
88
60
|
}
|
|
89
|
-
function DropdownMenuShortcut(
|
|
90
|
-
|
|
61
|
+
function DropdownMenuShortcut(_a) {
|
|
62
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
63
|
+
return (_jsx("span", Object.assign({ "data-slot": "dropdown-menu-shortcut", className: cn("text-muted-foreground ml-auto text-xs tracking-widest", className) }, props)));
|
|
91
64
|
}
|
|
92
|
-
function DropdownMenuSub(
|
|
93
|
-
|
|
65
|
+
function DropdownMenuSub(_a) {
|
|
66
|
+
var props = __rest(_a, []);
|
|
67
|
+
return _jsx(DropdownMenuPrimitive.Sub, Object.assign({ "data-slot": "dropdown-menu-sub" }, props));
|
|
94
68
|
}
|
|
95
|
-
function DropdownMenuSubTrigger(
|
|
96
|
-
|
|
69
|
+
function DropdownMenuSubTrigger(_a) {
|
|
70
|
+
var { className, inset, children } = _a, props = __rest(_a, ["className", "inset", "children"]);
|
|
71
|
+
return (_jsxs(DropdownMenuPrimitive.SubTrigger, Object.assign({ "data-slot": "dropdown-menu-sub-trigger", "data-inset": inset, className: cn("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8", className) }, props, { children: [children, _jsx(ChevronRightIcon, { className: "ml-auto size-4" })] })));
|
|
97
72
|
}
|
|
98
|
-
function DropdownMenuSubContent(
|
|
99
|
-
|
|
73
|
+
function DropdownMenuSubContent(_a) {
|
|
74
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
75
|
+
return (_jsx(DropdownMenuPrimitive.SubContent, Object.assign({ "data-slot": "dropdown-menu-sub-content", className: cn("bg-popover 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 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg", className) }, props)));
|
|
100
76
|
}
|
|
77
|
+
export { DropdownMenu, DropdownMenuPortal, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, };
|
|
@@ -1,51 +1,28 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
"use client";
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
var ownKeys = function(o) {
|
|
21
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
-
var ar = [];
|
|
23
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
-
return ar;
|
|
25
|
-
};
|
|
26
|
-
return ownKeys(o);
|
|
27
|
-
};
|
|
28
|
-
return function (mod) {
|
|
29
|
-
if (mod && mod.__esModule) return mod;
|
|
30
|
-
var result = {};
|
|
31
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
-
__setModuleDefault(result, mod);
|
|
33
|
-
return result;
|
|
34
|
-
};
|
|
35
|
-
})();
|
|
36
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
-
exports.HoverCard = HoverCard;
|
|
38
|
-
exports.HoverCardTrigger = HoverCardTrigger;
|
|
39
|
-
exports.HoverCardContent = HoverCardContent;
|
|
40
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
41
|
-
const HoverCardPrimitive = __importStar(require("@radix-ui/react-hover-card"));
|
|
42
|
-
const cn_1 = require("../utils/cn");
|
|
43
|
-
function HoverCard({ ...props }) {
|
|
44
|
-
return (0, jsx_runtime_1.jsx)(HoverCardPrimitive.Root, { "data-slot": "hover-card", ...props });
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
|
|
15
|
+
import { cn } from "../utils/cn";
|
|
16
|
+
function HoverCard(_a) {
|
|
17
|
+
var props = __rest(_a, []);
|
|
18
|
+
return _jsx(HoverCardPrimitive.Root, Object.assign({ "data-slot": "hover-card" }, props));
|
|
45
19
|
}
|
|
46
|
-
function HoverCardTrigger(
|
|
47
|
-
|
|
20
|
+
function HoverCardTrigger(_a) {
|
|
21
|
+
var props = __rest(_a, []);
|
|
22
|
+
return (_jsx(HoverCardPrimitive.Trigger, Object.assign({ "data-slot": "hover-card-trigger" }, props)));
|
|
48
23
|
}
|
|
49
|
-
function HoverCardContent(
|
|
50
|
-
|
|
24
|
+
function HoverCardContent(_a) {
|
|
25
|
+
var { className, align = "center", sideOffset = 4 } = _a, props = __rest(_a, ["className", "align", "sideOffset"]);
|
|
26
|
+
return (_jsx(HoverCardPrimitive.Portal, { "data-slot": "hover-card-portal", children: _jsx(HoverCardPrimitive.Content, Object.assign({ "data-slot": "hover-card-content", align: align, sideOffset: sideOffset, className: cn("bg-popover 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 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden", className) }, props)) }));
|
|
51
27
|
}
|
|
28
|
+
export { HoverCard, HoverCardTrigger, HoverCardContent };
|
package/dist/shadcn/input.js
CHANGED
|
@@ -1,8 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import { cn } from "../utils/cn";
|
|
14
|
+
function Input(_a) {
|
|
15
|
+
var { className, type } = _a, props = __rest(_a, ["className", "type"]);
|
|
16
|
+
return (_jsx("input", Object.assign({ type: type, "data-slot": "input", className: cn("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground border-input flex h-9 w-full min-w-0 rounded-md border-2 bg-secondary px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]", "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", className) }, props)));
|
|
8
17
|
}
|
|
18
|
+
export { Input };
|
package/dist/shadcn/label.js
CHANGED
|
@@ -1,43 +1,20 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
"use client";
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
var ownKeys = function(o) {
|
|
21
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
-
var ar = [];
|
|
23
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
-
return ar;
|
|
25
|
-
};
|
|
26
|
-
return ownKeys(o);
|
|
27
|
-
};
|
|
28
|
-
return function (mod) {
|
|
29
|
-
if (mod && mod.__esModule) return mod;
|
|
30
|
-
var result = {};
|
|
31
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
-
__setModuleDefault(result, mod);
|
|
33
|
-
return result;
|
|
34
|
-
};
|
|
35
|
-
})();
|
|
36
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
-
exports.Label = Label;
|
|
38
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
39
|
-
const LabelPrimitive = __importStar(require("@radix-ui/react-label"));
|
|
40
|
-
const cn_1 = require("../utils/cn");
|
|
41
|
-
function Label({ className, ...props }) {
|
|
42
|
-
return ((0, jsx_runtime_1.jsx)(LabelPrimitive.Root, { "data-slot": "label", className: (0, cn_1.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", className), ...props }));
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
15
|
+
import { cn } from "../utils/cn";
|
|
16
|
+
function Label(_a) {
|
|
17
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
18
|
+
return (_jsx(LabelPrimitive.Root, Object.assign({ "data-slot": "label", className: cn("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", className) }, props)));
|
|
43
19
|
}
|
|
20
|
+
export { Label };
|
|
@@ -7,7 +7,7 @@ declare function NavigationMenuList({ className, ...props }: React.ComponentProp
|
|
|
7
7
|
declare function NavigationMenuItem({ className, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Item>): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
declare const navigationMenuTriggerStyle: (props?: ({
|
|
9
9
|
variant?: "default" | null | undefined;
|
|
10
|
-
} & import("class-variance-authority/
|
|
10
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
11
11
|
declare function NavigationMenuTrigger({ className, children, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
declare function NavigationMenuContent({ className, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
declare function NavigationMenuViewport({ className, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Viewport>): import("react/jsx-runtime").JSX.Element;
|