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 +24 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +24 -3
- package/dist/index.js.map +1 -1
- package/dist/styles.css +46 -0
- package/package.json +1 -1
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, ...props }, ref) => {
|
|
305
|
+
var CommandItem = React27.forwardRef(({ className, onSelect, value, style, ...props }, ref) => {
|
|
306
306
|
const handleClick = () => {
|
|
307
307
|
if (onSelect && value) {
|
|
308
308
|
onSelect(value);
|
|
@@ -313,9 +313,15 @@ var CommandItem = React27.forwardRef(({ className, onSelect, value, ...props },
|
|
|
313
313
|
{
|
|
314
314
|
ref,
|
|
315
315
|
className: cn(
|
|
316
|
+
"cls_command_item",
|
|
316
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",
|
|
317
318
|
className
|
|
318
319
|
),
|
|
320
|
+
style: {
|
|
321
|
+
// Ensure items have opaque background (inherit from popover container)
|
|
322
|
+
backgroundColor: "inherit",
|
|
323
|
+
...style
|
|
324
|
+
},
|
|
319
325
|
onClick: handleClick,
|
|
320
326
|
...props
|
|
321
327
|
}
|
|
@@ -4641,7 +4647,11 @@ var CommandPopover = ({
|
|
|
4641
4647
|
position: "fixed",
|
|
4642
4648
|
top: position.top,
|
|
4643
4649
|
left: position.left,
|
|
4644
|
-
zIndex: 9999
|
|
4650
|
+
zIndex: 9999,
|
|
4651
|
+
// Fallback background for consuming apps that may use hex CSS variables
|
|
4652
|
+
// (Tailwind's bg-popover generates hsl(var(--popover)) which fails with hex values)
|
|
4653
|
+
backgroundColor: "var(--popover, hsl(0 0% 100%))",
|
|
4654
|
+
color: "var(--popover-foreground, hsl(222.2 84% 4.9%))"
|
|
4645
4655
|
},
|
|
4646
4656
|
children: /* @__PURE__ */ jsxs(Command, { className: "rounded-md", children: [
|
|
4647
4657
|
query && /* @__PURE__ */ jsxs("div", { className: "px-3 py-2 text-xs text-muted-foreground border-b", children: [
|
|
@@ -5805,7 +5815,10 @@ var HazoUiTextarea = ({
|
|
|
5805
5815
|
position: "fixed",
|
|
5806
5816
|
top: edit_context.rect.y,
|
|
5807
5817
|
left: edit_context.rect.x,
|
|
5808
|
-
zIndex: 9999
|
|
5818
|
+
zIndex: 9999,
|
|
5819
|
+
// Fallback background for consuming apps that may use hex CSS variables
|
|
5820
|
+
backgroundColor: "var(--popover, #ffffff)",
|
|
5821
|
+
color: "var(--popover-foreground, #0f172a)"
|
|
5809
5822
|
},
|
|
5810
5823
|
children: /* @__PURE__ */ jsxs("div", { className: "py-1", children: [
|
|
5811
5824
|
/* @__PURE__ */ jsx("div", { className: "px-3 py-2 text-xs text-muted-foreground border-b", children: "Change command" }),
|
|
@@ -5819,6 +5832,10 @@ var HazoUiTextarea = ({
|
|
|
5819
5832
|
idx === edit_selected_index && "bg-accent",
|
|
5820
5833
|
cmd.action === edit_context.command.action && "font-medium"
|
|
5821
5834
|
),
|
|
5835
|
+
style: {
|
|
5836
|
+
// Inherit background from parent, use accent color when selected
|
|
5837
|
+
backgroundColor: idx === edit_selected_index ? "var(--accent, #f1f5f9)" : "inherit"
|
|
5838
|
+
},
|
|
5822
5839
|
onClick: () => handle_command_update(cmd),
|
|
5823
5840
|
children: [
|
|
5824
5841
|
cmd.icon && /* @__PURE__ */ jsx("span", { className: "flex-shrink-0 text-muted-foreground", children: cmd.icon }),
|
|
@@ -5842,6 +5859,10 @@ var HazoUiTextarea = ({
|
|
|
5842
5859
|
"hover:bg-destructive/10",
|
|
5843
5860
|
edit_selected_index === edit_commands.length && "bg-destructive/10"
|
|
5844
5861
|
),
|
|
5862
|
+
style: {
|
|
5863
|
+
// Inherit background from parent, use light destructive color when selected
|
|
5864
|
+
backgroundColor: edit_selected_index === edit_commands.length ? "rgba(239, 68, 68, 0.1)" : "inherit"
|
|
5865
|
+
},
|
|
5845
5866
|
onClick: handle_command_remove,
|
|
5846
5867
|
children: /* @__PURE__ */ jsx("span", { children: "Remove" })
|
|
5847
5868
|
}
|