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
|
-
|
|
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