next-helios-fe 1.8.66 → 1.8.67

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-helios-fe",
3
- "version": "1.8.66",
3
+ "version": "1.8.67",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -49,7 +49,7 @@ export const Dropdown: DropdownComponent = ({
49
49
  base: `min-w-40 w-full my-0.5 rounded-md text-sm text-left text-default ${
50
50
  childrenList.length > 0 && !header && itemList.length === 0
51
51
  ? ""
52
- : "px-4 py-2 hover:bg-secondary-light"
52
+ : "px-4 py-2"
53
53
  }`,
54
54
  },
55
55
  },
@@ -59,7 +59,7 @@ export const Dropdown: DropdownComponent = ({
59
59
  {header}
60
60
  {itemList}
61
61
  {childrenList.length > 0 && !header && itemList.length === 0 && (
62
- <Dd.Item className="grid cursor-default" as="div">
62
+ <Dd.Item className="flex flex-col cursor-default" as="div">
63
63
  {children}
64
64
  </Dd.Item>
65
65
  )}
@@ -5,15 +5,28 @@ import { Dropdown as Dd } from "flowbite-react";
5
5
  export interface ItemProps {
6
6
  children: React.ReactNode;
7
7
  active?: boolean;
8
+ as?: "button" | "title";
9
+ disabled?: boolean;
8
10
  onClick?: () => void;
9
11
  }
10
12
 
11
- export const Item: React.FC<ItemProps> = ({ children, active, onClick }) => {
13
+ export const Item: React.FC<ItemProps> = ({
14
+ children,
15
+ active,
16
+ as,
17
+ disabled,
18
+ onClick,
19
+ }) => {
12
20
  return (
13
21
  <Dd.Item
14
22
  className={`${
15
- active && "bg-primary-transparent text-primary pointer-events-none"
23
+ active
24
+ ? "disabled:bg-primary-transparent disabled:text-primary"
25
+ : `disabled:text-disabled ${
26
+ as === "title" ? "" : "hover:bg-secondary-light"
27
+ }`
16
28
  }`}
29
+ disabled={active ? true : (disabled || as === "title") ?? false}
17
30
  onClick={onClick}
18
31
  >
19
32
  {children}
@@ -8,6 +8,7 @@ export interface SelectProps
8
8
  menus: {
9
9
  label: string;
10
10
  value: string;
11
+ variant?: "button" | "title";
11
12
  disabled?: boolean;
12
13
  [key: string]: any;
13
14
  }[];
@@ -167,6 +168,8 @@ export const Select: React.FC<SelectProps> = ({
167
168
  <Dropdown.Item
168
169
  key={index}
169
170
  active={tempValue === item.value ? true : false}
171
+ as={item.variant || "button"}
172
+ disabled={item.disabled ?? false}
170
173
  onClick={() => {
171
174
  setTempValue(item.value);
172
175
  if (rest.onChange) {