hazo_ui 2.4.4 → 2.4.5

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/dist/index.js CHANGED
@@ -302,7 +302,7 @@ var CommandGroup = React27.forwardRef(({ className, heading, children, ...props
302
302
  }
303
303
  ));
304
304
  CommandGroup.displayName = "CommandGroup";
305
- var CommandItem = React27.forwardRef(({ className, onSelect, value, style, ...props }, ref) => {
305
+ var CommandItem = React27.forwardRef(({ className, onSelect, value, selected, style, ...props }, ref) => {
306
306
  const handleClick = () => {
307
307
  if (onSelect && value) {
308
308
  onSelect(value);
@@ -315,13 +315,16 @@ var CommandItem = React27.forwardRef(({ className, onSelect, value, style, ...pr
315
315
  className: cn(
316
316
  "cls_command_item",
317
317
  "relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none hover:bg-accent hover:text-accent-foreground aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
318
+ // When selected, apply accent background and ensure all text is visible
319
+ selected && "bg-accent text-accent-foreground [&_.text-muted-foreground]:text-accent-foreground/70",
318
320
  className
319
321
  ),
320
- style: {
321
- // Ensure items have opaque background (inherit from popover container)
322
- backgroundColor: "inherit",
322
+ style: selected ? {
323
+ // Explicit inline styles as fallback for consumers with non-HSL CSS variables
324
+ backgroundColor: "var(--accent, #f1f5f9)",
325
+ color: "var(--accent-foreground, #0f172a)",
323
326
  ...style
324
- },
327
+ } : style,
325
328
  onClick: handleClick,
326
329
  ...props
327
330
  }
@@ -4681,9 +4684,7 @@ var CommandPopover = ({
4681
4684
  {
4682
4685
  value: cmd.action,
4683
4686
  onSelect: () => on_select(cmd),
4684
- className: cn(
4685
- flat_idx === selected_index && "bg-accent"
4686
- ),
4687
+ selected: flat_idx === selected_index,
4687
4688
  children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 w-full", children: [
4688
4689
  cmd.icon && /* @__PURE__ */ jsx("span", { className: "flex-shrink-0 text-muted-foreground", children: cmd.icon }),
4689
4690
  /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [