lecom-ui 5.3.71 → 5.3.73

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.
@@ -67,11 +67,17 @@ const comboboxItemVariants = cva(
67
67
  disabled: {
68
68
  true: "text-grey-400 pointer-events-none",
69
69
  false: ""
70
+ },
71
+ // nova variante para destacar o item selecionado
72
+ selected: {
73
+ true: "bg-grey-100 font-medium text-grey-900",
74
+ false: ""
70
75
  }
71
76
  },
72
77
  defaultVariants: {
73
78
  size: "medium",
74
- disabled: false
79
+ disabled: false,
80
+ selected: false
75
81
  }
76
82
  }
77
83
  );
@@ -103,12 +109,21 @@ const ComboboxItemContent = ({
103
109
  className: cn(
104
110
  comboboxItemVariants({
105
111
  size,
106
- disabled: isDisabled
112
+ disabled: isDisabled,
113
+ selected: isSelected
107
114
  }),
108
115
  itemsClassName
109
- )
116
+ ),
117
+ "aria-current": isSelected ? "true" : void 0
110
118
  },
111
- /* @__PURE__ */ React.createElement(Typography, { className: "w-4 h-4 flex items-center justify-center shrink-0 py-1" }, option.value === value && /* @__PURE__ */ React.createElement(Check, { className: textColor, size: checkIconSize, strokeWidth: 2 })),
119
+ /* @__PURE__ */ React.createElement(Typography, { className: "w-4 h-4 flex items-center justify-center shrink-0 py-1" }, option.value === value && /* @__PURE__ */ React.createElement(
120
+ Check,
121
+ {
122
+ className: cn(textColor, isSelected ? "text-primary-600" : ""),
123
+ size: checkIconSize,
124
+ strokeWidth: isSelected ? 2.5 : 2
125
+ }
126
+ )),
112
127
  option.prefix && /* @__PURE__ */ React.createElement(
113
128
  Typography,
114
129
  {
@@ -285,7 +300,6 @@ function Combobox({
285
300
  `[data-combobox-value="${value}"]`
286
301
  );
287
302
  if (el) {
288
- el.focus();
289
303
  el.scrollIntoView({ block: "nearest" });
290
304
  }
291
305
  });
@@ -325,7 +339,7 @@ function Combobox({
325
339
  onValueChange: setSearch
326
340
  }
327
341
  ), /* @__PURE__ */ React.createElement(
328
- CommandList,
342
+ "div",
329
343
  {
330
344
  ref: commandListRef,
331
345
  key: search,
@@ -339,8 +353,7 @@ function Combobox({
339
353
  contentClassName
340
354
  )
341
355
  },
342
- /* @__PURE__ */ React.createElement(CommandEmpty, null, notFoundContent),
343
- /* @__PURE__ */ React.createElement(
356
+ /* @__PURE__ */ React.createElement(CommandList, null, /* @__PURE__ */ React.createElement(CommandEmpty, null, notFoundContent), /* @__PURE__ */ React.createElement(
344
357
  ComboboxOptionsList,
345
358
  {
346
359
  items: filteredOptions,
@@ -350,7 +363,7 @@ function Combobox({
350
363
  itemsClassName,
351
364
  size
352
365
  }
353
- )
366
+ ))
354
367
  ))
355
368
  ));
356
369
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lecom-ui",
3
- "version": "5.3.71",
3
+ "version": "5.3.73",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",