hazo_ui 2.4.3 → 2.4.4

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.cjs CHANGED
@@ -361,7 +361,7 @@ var CommandGroup = React27__namespace.forwardRef(({ className, heading, children
361
361
  }
362
362
  ));
363
363
  CommandGroup.displayName = "CommandGroup";
364
- var CommandItem = React27__namespace.forwardRef(({ className, onSelect, value, ...props }, ref) => {
364
+ var CommandItem = React27__namespace.forwardRef(({ className, onSelect, value, style, ...props }, ref) => {
365
365
  const handleClick = () => {
366
366
  if (onSelect && value) {
367
367
  onSelect(value);
@@ -372,9 +372,15 @@ var CommandItem = React27__namespace.forwardRef(({ className, onSelect, value, .
372
372
  {
373
373
  ref,
374
374
  className: cn(
375
+ "cls_command_item",
375
376
  "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",
376
377
  className
377
378
  ),
379
+ style: {
380
+ // Ensure items have opaque background (inherit from popover container)
381
+ backgroundColor: "inherit",
382
+ ...style
383
+ },
378
384
  onClick: handleClick,
379
385
  ...props
380
386
  }
@@ -4700,7 +4706,11 @@ var CommandPopover = ({
4700
4706
  position: "fixed",
4701
4707
  top: position.top,
4702
4708
  left: position.left,
4703
- zIndex: 9999
4709
+ zIndex: 9999,
4710
+ // Fallback background for consuming apps that may use hex CSS variables
4711
+ // (Tailwind's bg-popover generates hsl(var(--popover)) which fails with hex values)
4712
+ backgroundColor: "var(--popover, hsl(0 0% 100%))",
4713
+ color: "var(--popover-foreground, hsl(222.2 84% 4.9%))"
4704
4714
  },
4705
4715
  children: /* @__PURE__ */ jsxRuntime.jsxs(Command, { className: "rounded-md", children: [
4706
4716
  query && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-3 py-2 text-xs text-muted-foreground border-b", children: [
@@ -5864,7 +5874,10 @@ var HazoUiTextarea = ({
5864
5874
  position: "fixed",
5865
5875
  top: edit_context.rect.y,
5866
5876
  left: edit_context.rect.x,
5867
- zIndex: 9999
5877
+ zIndex: 9999,
5878
+ // Fallback background for consuming apps that may use hex CSS variables
5879
+ backgroundColor: "var(--popover, #ffffff)",
5880
+ color: "var(--popover-foreground, #0f172a)"
5868
5881
  },
5869
5882
  children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "py-1", children: [
5870
5883
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-3 py-2 text-xs text-muted-foreground border-b", children: "Change command" }),
@@ -5878,6 +5891,10 @@ var HazoUiTextarea = ({
5878
5891
  idx === edit_selected_index && "bg-accent",
5879
5892
  cmd.action === edit_context.command.action && "font-medium"
5880
5893
  ),
5894
+ style: {
5895
+ // Inherit background from parent, use accent color when selected
5896
+ backgroundColor: idx === edit_selected_index ? "var(--accent, #f1f5f9)" : "inherit"
5897
+ },
5881
5898
  onClick: () => handle_command_update(cmd),
5882
5899
  children: [
5883
5900
  cmd.icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-shrink-0 text-muted-foreground", children: cmd.icon }),
@@ -5901,6 +5918,10 @@ var HazoUiTextarea = ({
5901
5918
  "hover:bg-destructive/10",
5902
5919
  edit_selected_index === edit_commands.length && "bg-destructive/10"
5903
5920
  ),
5921
+ style: {
5922
+ // Inherit background from parent, use light destructive color when selected
5923
+ backgroundColor: edit_selected_index === edit_commands.length ? "rgba(239, 68, 68, 0.1)" : "inherit"
5924
+ },
5904
5925
  onClick: handle_command_remove,
5905
5926
  children: /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Remove" })
5906
5927
  }