ikoncomponents 1.2.6 → 1.2.8
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/ikoncomponents/activity-sheet/index.js +2 -2
- package/dist/ikoncomponents/form-fields/multi-combobox-input/index.d.ts +1 -1
- package/dist/ikoncomponents/form-fields/multi-combobox-input/index.js +1 -1
- package/dist/ikoncomponents/tabs/index.d.ts +1 -1
- package/dist/ikoncomponents/tabs/index.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/shadcn/workflow.d.ts +3 -2
- package/dist/shadcn/workflow.js +8 -4
- package/dist/styles.css +5 -21
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { AlignJustify } from "lucide-react";
|
|
4
|
-
import {
|
|
4
|
+
import { CustomTabs } from "../tabs";
|
|
5
5
|
import { NoDataComponent } from "../no-data";
|
|
6
6
|
import { UploadTab } from "../upload-tab";
|
|
7
7
|
import { SheetComponent } from "../sheet";
|
|
@@ -19,5 +19,5 @@ export function ActivitySheet({ activityLogs = [] }) {
|
|
|
19
19
|
tabContent: _jsx(UploadTab, {})
|
|
20
20
|
}
|
|
21
21
|
];
|
|
22
|
-
return (_jsx(SheetComponent, { buttonText: "", buttonIcon: _jsx(AlignJustify, {}), sheetTitle: "", sheetContent: _jsx(
|
|
22
|
+
return (_jsx(SheetComponent, { buttonText: "", buttonIcon: _jsx(AlignJustify, {}), sheetTitle: "", sheetContent: _jsx(CustomTabs, { tabArray: tabArray, tabListClass: '' }), closeButton: true }));
|
|
23
23
|
}
|
|
@@ -2,5 +2,5 @@ import { FormComboboxInputProps as BaseFormComboboxInputProps } from "../../form
|
|
|
2
2
|
interface FormComboboxInputProps extends BaseFormComboboxInputProps {
|
|
3
3
|
defaultOptions?: number;
|
|
4
4
|
}
|
|
5
|
-
export declare function
|
|
5
|
+
export declare function FormMultiComboboxInput({ formControl, name, label, placeholder, formDescription, items, disabled, onSelect, defaultValue, defaultOptions, }: FormComboboxInputProps): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export {};
|
|
@@ -262,7 +262,7 @@ import { ChevronsUpDown, X } from "lucide-react";
|
|
|
262
262
|
import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, } from "../../../shadcn/command";
|
|
263
263
|
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "../../../shadcn/tooltip";
|
|
264
264
|
import { Checkbox } from "../../../shadcn/checkbox";
|
|
265
|
-
export function
|
|
265
|
+
export function FormMultiComboboxInput({ formControl, name, label, placeholder, formDescription, items = [], disabled, onSelect, defaultValue = [], defaultOptions = 2, }) {
|
|
266
266
|
const [search, setSearch] = useState("");
|
|
267
267
|
const containerRef = useRef(null);
|
|
268
268
|
// Removed triggerRef and popoverWidth state, as we'll rely on CSS variables for sizing
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { TabProps } from "./type";
|
|
2
|
-
export declare function
|
|
2
|
+
export declare function CustomTabs({ children, tabArray, pathName, tabListClass, tabListInnerClass, tabListButtonClass, tabContentClass, headerEndComponent, onTabChange, isSeperatePage, }: TabProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -7,7 +7,7 @@ import { TextButton } from "../buttons";
|
|
|
7
7
|
import { Card } from "../../shadcn/card";
|
|
8
8
|
import { useEffect, useState } from "react";
|
|
9
9
|
import { useIsMobile } from "../../hooks/use-mobile";
|
|
10
|
-
export function
|
|
10
|
+
export function CustomTabs({ children, tabArray, pathName, tabListClass = "", tabListInnerClass = "", tabListButtonClass = "", tabContentClass = "", headerEndComponent, onTabChange, isSeperatePage = false, }) {
|
|
11
11
|
var _a, _b;
|
|
12
12
|
// const pathName = usePathname();
|
|
13
13
|
const [itemToDisplay, setItemToDisplay] = useState(5);
|
package/dist/index.d.ts
CHANGED
|
@@ -71,7 +71,7 @@ export { PhoneInput } from "./ikoncomponents/phone-input";
|
|
|
71
71
|
export { SearchInput } from "./ikoncomponents/search-input";
|
|
72
72
|
export { SheetComponent } from "./ikoncomponents/sheet";
|
|
73
73
|
export { SimpleWidget } from "./ikoncomponents/simple-widget";
|
|
74
|
-
export {
|
|
74
|
+
export { CustomTabs } from "./ikoncomponents/tabs";
|
|
75
75
|
export type { TabArray, TabProps } from "./ikoncomponents/tabs/type";
|
|
76
76
|
export { ThemeToggleBtn } from "./ikoncomponents/theme-toggle-btn";
|
|
77
77
|
export { TitleProgress } from "./ikoncomponents/title-progress";
|
|
@@ -90,7 +90,7 @@ export { FormComboboxInputWithValue } from "./ikoncomponents/form-fields/combobo
|
|
|
90
90
|
export { FormDateInput } from "./ikoncomponents/form-fields/date-input";
|
|
91
91
|
export { FormFileInput } from "./ikoncomponents/form-fields/file-input";
|
|
92
92
|
export { FormInput } from "./ikoncomponents/form-fields/input";
|
|
93
|
-
export {
|
|
93
|
+
export { FormMultiComboboxInput } from "./ikoncomponents/form-fields/multi-combobox-input";
|
|
94
94
|
export { FormOtpInput } from "./ikoncomponents/form-fields/otp-input";
|
|
95
95
|
export { FormPhoneInput } from "./ikoncomponents/form-fields/phone-input";
|
|
96
96
|
export { FormTextarea } from "./ikoncomponents/form-fields/textarea";
|
package/dist/index.js
CHANGED
|
@@ -66,7 +66,7 @@ export { PhoneInput } from "./ikoncomponents/phone-input";
|
|
|
66
66
|
export { SearchInput } from "./ikoncomponents/search-input";
|
|
67
67
|
export { SheetComponent } from "./ikoncomponents/sheet";
|
|
68
68
|
export { SimpleWidget } from "./ikoncomponents/simple-widget";
|
|
69
|
-
export {
|
|
69
|
+
export { CustomTabs } from "./ikoncomponents/tabs";
|
|
70
70
|
export { ThemeToggleBtn } from "./ikoncomponents/theme-toggle-btn";
|
|
71
71
|
export { TitleProgress } from "./ikoncomponents/title-progress";
|
|
72
72
|
export { TooltipComponent } from "./ikoncomponents/tooltip";
|
|
@@ -80,7 +80,7 @@ export { FormComboboxInputWithValue } from "./ikoncomponents/form-fields/combobo
|
|
|
80
80
|
export { FormDateInput } from "./ikoncomponents/form-fields/date-input";
|
|
81
81
|
export { FormFileInput } from "./ikoncomponents/form-fields/file-input";
|
|
82
82
|
export { FormInput } from "./ikoncomponents/form-fields/input";
|
|
83
|
-
export {
|
|
83
|
+
export { FormMultiComboboxInput } from "./ikoncomponents/form-fields/multi-combobox-input";
|
|
84
84
|
export { FormOtpInput } from "./ikoncomponents/form-fields/otp-input";
|
|
85
85
|
export { FormPhoneInput } from "./ikoncomponents/form-fields/phone-input";
|
|
86
86
|
export { FormTextarea } from "./ikoncomponents/form-fields/textarea";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
export type StepStatus = "OUTSTANDING" | "IN PROGRESS" | "COMPLETED";
|
|
3
3
|
export type WorkflowStep = {
|
|
4
|
-
id
|
|
4
|
+
id?: string;
|
|
5
5
|
title: string;
|
|
6
6
|
status: StepStatus;
|
|
7
7
|
dropdownOptions?: React.ReactNode[];
|
|
@@ -10,10 +10,11 @@ export type WorkflowStep = {
|
|
|
10
10
|
createdAt?: string;
|
|
11
11
|
};
|
|
12
12
|
type WorkflowProps = {
|
|
13
|
+
name: string;
|
|
13
14
|
title?: string;
|
|
14
15
|
steps: WorkflowStep[];
|
|
15
16
|
onDropdownSelect?: (stepId: string, value: string) => void;
|
|
16
17
|
style?: React.CSSProperties;
|
|
17
18
|
};
|
|
18
|
-
export declare function Workflow({
|
|
19
|
+
export declare function Workflow({ name, steps, style }: WorkflowProps): import("react/jsx-runtime").JSX.Element;
|
|
19
20
|
export {};
|
package/dist/shadcn/workflow.js
CHANGED
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
import { Badge } from "./badge";
|
|
5
4
|
import { ChevronDown } from "lucide-react";
|
|
5
|
+
import { DropdownMenu, DropdownMenuContent, DropdownMenuTrigger } from "./dropdown-menu";
|
|
6
|
+
import { Badge } from "./badge";
|
|
6
7
|
const statusColors = {
|
|
7
8
|
OUTSTANDING: "bg-[#FFDE721A] text-[#FBB125] border border-[#FBB12533]",
|
|
8
9
|
"IN PROGRESS": "bg-[#6A77D91A] text-[#6A77D9]",
|
|
9
10
|
COMPLETED: "bg-[#519E591A] text-[#519E59] border border-[#FBB12533]",
|
|
10
11
|
};
|
|
11
|
-
export function Workflow({
|
|
12
|
+
export function Workflow({ name, steps, style }) {
|
|
12
13
|
const completedCount = steps.filter((s) => s.status === "COMPLETED").length;
|
|
13
14
|
const progressPercent = (completedCount / steps.length) * 100;
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
return (_jsxs("div", { style: style, className: "p-4 space-y-2 rounded-lg border dark:bg-[#171717] text-primary blue-dark:bg-[#1B2336]", children: [_jsx("h2", { className: "text-sm font-semibold mb-4 m-3", children: name }), steps.map((step) => {
|
|
16
|
+
var _a;
|
|
17
|
+
const stepId = (_a = step.id) !== null && _a !== void 0 ? _a : "";
|
|
18
|
+
return (_jsxs("div", { className: "flex flex-col sm:flex-row justify-between items-start sm:items-center p-5 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-2 w-full sm:w-auto", children: [_jsx("div", { className: "w-7 h-7 sm:w-9 sm:h-9 dark:bg-neutral-800 bg-[var(--keross-skeleton-bg)] rounded-sm flex-shrink-0" }), _jsxs("div", { className: "flex flex-col text-md", children: [_jsxs("div", { className: "flex items-center gap-1", children: [_jsx("span", { className: "font-semibold", children: step.title }), step.status === "IN PROGRESS" && step.dropdownOptions && (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx("button", { className: "p-1", children: _jsx(ChevronDown, { className: "w-4 h-4 cursor-pointer" }) }) }), _jsx(DropdownMenuContent, { className: "w-50 ml-40", children: step.dropdownOptions.map((node, index) => (_jsx(React.Fragment, { children: node }, index))) })] }))] }), step.owner && (_jsx("span", { className: "text-sm text-neutral-400", children: step.owner })), step.createdAt && (_jsxs("span", { className: "text-sm text-neutral-500", children: ["Created on ", step.createdAt] }))] })] }), _jsx("div", { className: "mt-1 sm:mt-0 flex-shrink-0", children: _jsx(Badge, { className: statusColors[step.status], children: step.status }) })] }, stepId));
|
|
19
|
+
}), _jsxs("div", { className: "text-xs flex flex-col sm:flex-row justify-between items-start sm:items-center pt-1", 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: "h-1 bg-blue-500 dark:bg-blue-400 transition-all", style: { width: `${progressPercent}%` } }) })] }));
|
|
16
20
|
}
|
package/dist/styles.css
CHANGED
|
@@ -22,7 +22,6 @@
|
|
|
22
22
|
--color-neutral-400: oklch(70.8% 0 0);
|
|
23
23
|
--color-neutral-500: oklch(55.6% 0 0);
|
|
24
24
|
--color-neutral-600: oklch(43.9% 0 0);
|
|
25
|
-
--color-neutral-700: oklch(37.1% 0 0);
|
|
26
25
|
--color-neutral-800: oklch(26.9% 0 0);
|
|
27
26
|
--color-black: #000;
|
|
28
27
|
--color-white: #fff;
|
|
@@ -439,6 +438,9 @@
|
|
|
439
438
|
.ml-12 {
|
|
440
439
|
margin-left: calc(var(--spacing) * 12);
|
|
441
440
|
}
|
|
441
|
+
.ml-40 {
|
|
442
|
+
margin-left: calc(var(--spacing) * 40);
|
|
443
|
+
}
|
|
442
444
|
.ml-auto {
|
|
443
445
|
margin-left: auto;
|
|
444
446
|
}
|
|
@@ -469,12 +471,6 @@
|
|
|
469
471
|
.hidden {
|
|
470
472
|
display: none;
|
|
471
473
|
}
|
|
472
|
-
.inline {
|
|
473
|
-
display: inline;
|
|
474
|
-
}
|
|
475
|
-
.inline-block {
|
|
476
|
-
display: inline-block;
|
|
477
|
-
}
|
|
478
474
|
.inline-flex {
|
|
479
475
|
display: inline-flex;
|
|
480
476
|
}
|
|
@@ -736,8 +732,8 @@
|
|
|
736
732
|
.w-36 {
|
|
737
733
|
width: calc(var(--spacing) * 36);
|
|
738
734
|
}
|
|
739
|
-
.w-
|
|
740
|
-
width: calc(var(--spacing) *
|
|
735
|
+
.w-50 {
|
|
736
|
+
width: calc(var(--spacing) * 50);
|
|
741
737
|
}
|
|
742
738
|
.w-55 {
|
|
743
739
|
width: calc(var(--spacing) * 55);
|
|
@@ -1051,13 +1047,6 @@
|
|
|
1051
1047
|
margin-block-end: calc(calc(var(--spacing) * -2) * calc(1 - var(--tw-space-y-reverse)));
|
|
1052
1048
|
}
|
|
1053
1049
|
}
|
|
1054
|
-
.space-y-1 {
|
|
1055
|
-
:where(& > :not(:last-child)) {
|
|
1056
|
-
--tw-space-y-reverse: 0;
|
|
1057
|
-
margin-block-start: calc(calc(var(--spacing) * 1) * var(--tw-space-y-reverse));
|
|
1058
|
-
margin-block-end: calc(calc(var(--spacing) * 1) * calc(1 - var(--tw-space-y-reverse)));
|
|
1059
|
-
}
|
|
1060
|
-
}
|
|
1061
1050
|
.space-y-2 {
|
|
1062
1051
|
:where(& > :not(:last-child)) {
|
|
1063
1052
|
--tw-space-y-reverse: 0;
|
|
@@ -4030,11 +4019,6 @@
|
|
|
4030
4019
|
padding-inline: calc(var(--spacing) * 4);
|
|
4031
4020
|
}
|
|
4032
4021
|
}
|
|
4033
|
-
.dark\:border-neutral-700 {
|
|
4034
|
-
&:is(.dark *) {
|
|
4035
|
-
border-color: var(--color-neutral-700);
|
|
4036
|
-
}
|
|
4037
|
-
}
|
|
4038
4022
|
.dark\:border-white {
|
|
4039
4023
|
&:is(.dark *) {
|
|
4040
4024
|
border-color: var(--color-white);
|