ikoncomponents 1.2.6 → 1.2.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.
@@ -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 dFormMultiComboboxInput({ formControl, name, label, placeholder, formDescription, items, disabled, onSelect, defaultValue, defaultOptions, }: FormComboboxInputProps): import("react/jsx-runtime").JSX.Element;
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 dFormMultiComboboxInput({ formControl, name, label, placeholder, formDescription, items = [], disabled, onSelect, defaultValue = [], defaultOptions = 2, }) {
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
package/dist/index.d.ts CHANGED
@@ -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 { dFormMultiComboboxInput } from "./ikoncomponents/form-fields/multi-combobox-input";
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
@@ -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 { dFormMultiComboboxInput } from "./ikoncomponents/form-fields/multi-combobox-input";
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: string;
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({ title, steps, onDropdownSelect, style, }: WorkflowProps): import("react/jsx-runtime").JSX.Element;
19
+ export declare function Workflow({ name, steps, style }: WorkflowProps): import("react/jsx-runtime").JSX.Element;
19
20
  export {};
@@ -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({ title = "Deal Workflow", steps, onDropdownSelect, style, }) {
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
- const [openDropdown, setOpenDropdown] = React.useState(null);
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: title }), steps.map((step) => (_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("div", { className: "relative inline-block", children: [_jsx("button", { type: "button", onClick: () => setOpenDropdown((prev) => prev === step.id ? null : step.id), className: "p-1", children: _jsx(ChevronDown, { className: `w-4 h-4 cursor-pointer transition-transform duration-200 ${openDropdown === step.id ? "rotate-180" : ""}` }) }), openDropdown === step.id && (_jsx("div", { className: "absolute mt-2 w-40 dark:bg-neutral-800 bg-background shadow-lg dark:border-neutral-700 rounded-md z-20 p-1 space-y-1", children: step.dropdownOptions.map((optionNode, index) => (_jsx("div", { onClick: () => setOpenDropdown(null), className: "w-full", children: optionNode }, 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 }) })] }, step.id))), _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}%` } }) })] }));
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-40 {
740
- width: calc(var(--spacing) * 40);
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);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ikoncomponents",
3
- "version": "1.2.6",
3
+ "version": "1.2.7",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "css": "dist/styles.css",