lecom-ui 5.2.51 → 5.2.52

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.
@@ -89,14 +89,16 @@ function Combobox({
89
89
  key: opt.value,
90
90
  value: opt.label + " " + opt.value,
91
91
  onSelect: () => {
92
+ if (opt.disabled) return;
92
93
  onChange(opt.value === value?.value ? null : opt);
93
94
  setOpen(false);
94
95
  },
95
96
  className: cn(
96
97
  value?.value === opt.value ? "bg-blue-100 font-semibold text-black" : "hover:bg-gray-100",
97
- // hover leve
98
+ opt.disabled && "opacity-50 pointer-events-none",
98
99
  "transition-colors"
99
- )
100
+ ),
101
+ "aria-disabled": opt.disabled
100
102
  },
101
103
  opt.label
102
104
  ))) : /* @__PURE__ */ React.createElement(
@@ -105,13 +107,16 @@ function Combobox({
105
107
  key: item.value,
106
108
  value: item.label + " " + item.value,
107
109
  onSelect: () => {
110
+ if (item.disabled) return;
108
111
  onChange(item.value === value?.value ? null : item);
109
112
  setOpen(false);
110
113
  },
111
114
  className: cn(
112
115
  value?.value === item.value ? "bg-blue-100 font-semibold text-black" : "hover:bg-gray-100",
116
+ item.disabled && "opacity-50 pointer-events-none",
113
117
  "transition-colors"
114
- )
118
+ ),
119
+ "aria-disabled": item.disabled
115
120
  },
116
121
  item.label
117
122
  )
package/dist/index.d.ts CHANGED
@@ -1101,6 +1101,7 @@ declare const SheetDescription: React$1.ForwardRefExoticComponent<Omit<DialogPri
1101
1101
  type ComboboxOption = {
1102
1102
  label: string;
1103
1103
  value: string;
1104
+ disabled?: boolean;
1104
1105
  };
1105
1106
  type ComboboxGroup = {
1106
1107
  label: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lecom-ui",
3
- "version": "5.2.51",
3
+ "version": "5.2.52",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",