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
package/dist/shadcn/table.js
CHANGED
|
@@ -1,37 +1,47 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
"use client";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
return ((
|
|
19
|
-
}
|
|
20
|
-
function
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
return ((
|
|
31
|
-
}
|
|
32
|
-
function
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
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 { cn } from "../utils/cn";
|
|
15
|
+
function Table(_a) {
|
|
16
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
17
|
+
return (_jsx("div", { "data-slot": "table-container", className: "relative w-full overflow-x-auto", children: _jsx("table", Object.assign({ "data-slot": "table", className: cn("w-full caption-bottom text-sm", className) }, props)) }));
|
|
18
|
+
}
|
|
19
|
+
function TableHeader(_a) {
|
|
20
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
21
|
+
return (_jsx("thead", Object.assign({ "data-slot": "table-header", className: cn("[&_tr]:border-b", className) }, props)));
|
|
22
|
+
}
|
|
23
|
+
function TableBody(_a) {
|
|
24
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
25
|
+
return (_jsx("tbody", Object.assign({ "data-slot": "table-body", className: cn("[&_tr:last-child]:border-0", className) }, props)));
|
|
26
|
+
}
|
|
27
|
+
function TableFooter(_a) {
|
|
28
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
29
|
+
return (_jsx("tfoot", Object.assign({ "data-slot": "table-footer", className: cn("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0", className) }, props)));
|
|
30
|
+
}
|
|
31
|
+
function TableRow(_a) {
|
|
32
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
33
|
+
return (_jsx("tr", Object.assign({ "data-slot": "table-row", className: cn("hover:bg-[var(--hover-back)] data-[state=selected]:bg-muted border-b transition-colors", className) }, props)));
|
|
34
|
+
}
|
|
35
|
+
function TableHead(_a) {
|
|
36
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
37
|
+
return (_jsx("th", Object.assign({ "data-slot": "table-head", className: cn("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", className) }, props)));
|
|
38
|
+
}
|
|
39
|
+
function TableCell(_a) {
|
|
40
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
41
|
+
return (_jsx("td", Object.assign({ "data-slot": "table-cell", className: cn("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", className) }, props)));
|
|
42
|
+
}
|
|
43
|
+
function TableCaption(_a) {
|
|
44
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
45
|
+
return (_jsx("caption", Object.assign({ "data-slot": "table-caption", className: cn("text-muted-foreground mt-4 text-sm", className) }, props)));
|
|
46
|
+
}
|
|
47
|
+
export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, };
|
package/dist/shadcn/tabs.js
CHANGED
|
@@ -1,55 +1,32 @@
|
|
|
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.Tabs = Tabs;
|
|
38
|
-
exports.TabsList = TabsList;
|
|
39
|
-
exports.TabsTrigger = TabsTrigger;
|
|
40
|
-
exports.TabsContent = TabsContent;
|
|
41
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
42
|
-
const TabsPrimitive = __importStar(require("@radix-ui/react-tabs"));
|
|
43
|
-
const cn_1 = require("../utils/cn");
|
|
44
|
-
function Tabs({ className, ...props }) {
|
|
45
|
-
return ((0, jsx_runtime_1.jsx)(TabsPrimitive.Root, { "data-slot": "tabs", className: (0, cn_1.cn)("flex flex-col gap-2", 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 TabsPrimitive from "@radix-ui/react-tabs";
|
|
15
|
+
import { cn } from "../utils/cn";
|
|
16
|
+
function Tabs(_a) {
|
|
17
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
18
|
+
return (_jsx(TabsPrimitive.Root, Object.assign({ "data-slot": "tabs", className: cn("flex flex-col gap-2", className) }, props)));
|
|
46
19
|
}
|
|
47
|
-
function TabsList(
|
|
48
|
-
|
|
20
|
+
function TabsList(_a) {
|
|
21
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
22
|
+
return (_jsx(TabsPrimitive.List, Object.assign({ "data-slot": "tabs-list", className: cn("bg-background text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]", className) }, props)));
|
|
49
23
|
}
|
|
50
|
-
function TabsTrigger(
|
|
51
|
-
|
|
24
|
+
function TabsTrigger(_a) {
|
|
25
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
26
|
+
return (_jsx(TabsPrimitive.Trigger, Object.assign({ "data-slot": "tabs-trigger", className: cn("text-muted-foreground data-[state=active]:bg-background data-[state=active]:text-foreground dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 keross:data-[state=active]:border-input keross:data-[state=active]:bg-input/30 dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className) }, props)));
|
|
52
27
|
}
|
|
53
|
-
function TabsContent(
|
|
54
|
-
|
|
28
|
+
function TabsContent(_a) {
|
|
29
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
30
|
+
return (_jsx(TabsPrimitive.Content, Object.assign({ "data-slot": "tabs-content", className: cn("flex-1 outline-none", className) }, props)));
|
|
55
31
|
}
|
|
32
|
+
export { Tabs, TabsList, TabsTrigger, TabsContent };
|
package/dist/shadcn/textarea.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 Textarea(_a) {
|
|
15
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
16
|
+
return (_jsx("textarea", Object.assign({ "data-slot": "textarea", className: cn("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive flex field-sizing-content min-h-16 w-full rounded-md border px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm bg-[var(--secondary)] dark:bg-[var(--input-background-custom)]", className) }, props)));
|
|
8
17
|
}
|
|
18
|
+
export { Textarea };
|
package/dist/shadcn/tooltip.js
CHANGED
|
@@ -1,55 +1,32 @@
|
|
|
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.Tooltip = Tooltip;
|
|
38
|
-
exports.TooltipTrigger = TooltipTrigger;
|
|
39
|
-
exports.TooltipContent = TooltipContent;
|
|
40
|
-
exports.TooltipProvider = TooltipProvider;
|
|
41
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
42
|
-
const TooltipPrimitive = __importStar(require("@radix-ui/react-tooltip"));
|
|
43
|
-
const cn_1 = require("../utils/cn");
|
|
44
|
-
function TooltipProvider({ delayDuration = 0, ...props }) {
|
|
45
|
-
return ((0, jsx_runtime_1.jsx)(TooltipPrimitive.Provider, { "data-slot": "tooltip-provider", delayDuration: delayDuration, ...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 TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
15
|
+
import { cn } from "../utils/cn";
|
|
16
|
+
function TooltipProvider(_a) {
|
|
17
|
+
var { delayDuration = 0 } = _a, props = __rest(_a, ["delayDuration"]);
|
|
18
|
+
return (_jsx(TooltipPrimitive.Provider, Object.assign({ "data-slot": "tooltip-provider", delayDuration: delayDuration }, props)));
|
|
46
19
|
}
|
|
47
|
-
function Tooltip(
|
|
48
|
-
|
|
20
|
+
function Tooltip(_a) {
|
|
21
|
+
var props = __rest(_a, []);
|
|
22
|
+
return (_jsx(TooltipProvider, { children: _jsx(TooltipPrimitive.Root, Object.assign({ "data-slot": "tooltip" }, props)) }));
|
|
49
23
|
}
|
|
50
|
-
function TooltipTrigger(
|
|
51
|
-
|
|
24
|
+
function TooltipTrigger(_a) {
|
|
25
|
+
var props = __rest(_a, []);
|
|
26
|
+
return _jsx(TooltipPrimitive.Trigger, Object.assign({ "data-slot": "tooltip-trigger", className: cn("inline-flex w-[80px] items-center justify-center whitespace-nowrap rounded-md border border-input bg-white py-2 text-sm font-medium text-black shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50") }, props));
|
|
52
27
|
}
|
|
53
|
-
function TooltipContent(
|
|
54
|
-
|
|
28
|
+
function TooltipContent(_a) {
|
|
29
|
+
var { className, sideOffset = 0, children } = _a, props = __rest(_a, ["className", "sideOffset", "children"]);
|
|
30
|
+
return (_jsx(TooltipPrimitive.Portal, { children: _jsxs(TooltipPrimitive.Content, Object.assign({ "data-slot": "tooltip-content", sideOffset: sideOffset, className: cn("bg-[var(--secondary)] dark:bg-[var(--input-background-custom)] text-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance", className) }, props, { children: [children, _jsx(TooltipPrimitive.Arrow, { className: "bg-[var(--secondary)] dark:bg-[var(--input-background-custom)] fill-[var(--secondary)] dark:fill-[var(--input-background-custom)] z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })] })) }));
|
|
55
31
|
}
|
|
32
|
+
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
|
package/dist/shadcn/workflow.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
"use client";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const badge_1 = require("./badge");
|
|
7
|
-
const select_1 = require("./select");
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Badge } from "./badge";
|
|
4
|
+
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from "./select";
|
|
8
5
|
const statusColors = {
|
|
9
6
|
OUTSTANDING: "bg-[#FFDE721A] text-[#FBB125] border border-[#FBB12533]",
|
|
10
7
|
"IN PROGRESS": "bg-[#6A77D91A] text-[#6A77D9]",
|
|
11
8
|
COMPLETED: "bg-[#519E591A] text-[#519E59] border border-[#FBB12533]",
|
|
12
9
|
};
|
|
13
|
-
function Workflow({ title = "Deal Workflow", steps }) {
|
|
10
|
+
export function Workflow({ title = "Deal Workflow", steps }) {
|
|
14
11
|
const completedCount = steps.filter((s) => s.status === "COMPLETED").length;
|
|
15
12
|
const progressPercent = (completedCount / steps.length) * 100;
|
|
16
|
-
return ((
|
|
13
|
+
return (_jsxs("div", { className: "p-4 space-y-2 rounded-lg border dark:bg-[#171717] text-primary keross:bg-[#1B2336]", children: [_jsx("h2", { className: "text-sm font-semibold mb-4 m-2", children: title }), steps.map((step) => {
|
|
14
|
+
var _a;
|
|
15
|
+
return (_jsxs("div", { className: "flex flex-col sm:flex-row justify-between items-start sm:items-center p-2 border border-neutral-600 rounded-md gap-1 sm:gap-2 m-2", children: [_jsxs("div", { className: "flex flex-col sm:flex-row items-start sm:items-center gap-1 sm:gap-2 w-full sm:w-auto", children: [_jsx("div", { className: "w-6 h-6 sm:w-6 sm:h-6 dark:bg-neutral-800 bg-[var(--keross-skeleton-bg)] rounded-sm flex-shrink-0" }), _jsx("span", { className: "font-medium text-md max-w-[120px]", children: step.title }), step.dropdownOptions && (_jsxs(Select, { defaultValue: step.selectedOption, children: [_jsx(SelectTrigger, { className: "w-full sm:w-24 mt-1 sm:mt-0 text-xs hover:cursor-pointer", children: _jsx(SelectValue, { placeholder: "Select" }) }), _jsx(SelectContent, { children: (_a = step.dropdownOptions) === null || _a === void 0 ? void 0 : _a.map((opt) => (_jsx(SelectItem, { value: opt.value, className: "text-xs hover:cursor-pointer dark:hover:bg-neutral-700", children: opt.label }, opt.value))) })] }))] }), _jsx("div", { className: "mt-1 sm:mt-0 flex-shrink-0", children: _jsx(Badge, { className: statusColors[step.status], children: step.status }) })] }, step.id));
|
|
16
|
+
}), _jsxs("div", { className: "text-xs flex flex-col sm:flex-row justify-between items-start sm:items-center pt-1 gap-1 sm:gap-0", children: [_jsxs("span", { children: [steps.length, " steps total"] }), _jsxs("span", { children: [completedCount, " completed"] })] }), _jsx("div", { className: "w-full bg-gray-300 dark:bg-gray-700 h-1 rounded-full overflow-hidden mt-1", children: _jsx("div", { className: "bg-blue-500 dark:bg-blue-400 h-1 transition-all", style: { width: `${progressPercent}%` } }) })] }));
|
|
17
17
|
}
|
package/dist/utils/cn.js
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const tailwind_merge_1 = require("tailwind-merge");
|
|
6
|
-
function cn(...inputs) {
|
|
7
|
-
return (0, tailwind_merge_1.twMerge)((0, clsx_1.clsx)(inputs));
|
|
1
|
+
import { clsx } from "clsx";
|
|
2
|
+
import { twMerge } from "tailwind-merge";
|
|
3
|
+
export function cn(...inputs) {
|
|
4
|
+
return twMerge(clsx(inputs));
|
|
8
5
|
}
|
|
@@ -1,9 +1,18 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
"use client";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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 { ThemeProvider as NextThemesProvider } from "next-themes";
|
|
15
|
+
export function ThemeProvider(_a) {
|
|
16
|
+
var { children } = _a, props = __rest(_a, ["children"]);
|
|
17
|
+
return _jsx(NextThemesProvider, Object.assign({}, props, { children: children }));
|
|
9
18
|
}
|