@nexub/react 1.1.0 → 1.2.0

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.
@@ -7,7 +7,7 @@ import {
7
7
  import * as React from "react";
8
8
  import { NexubMark } from "@nexub/icons";
9
9
  import { cva } from "class-variance-authority";
10
- import { jsx, jsxs } from "react/jsx-runtime";
10
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
11
11
  var logoVariants = cva("inline-flex items-center gap-2", {
12
12
  variants: {
13
13
  size: {
@@ -26,9 +26,9 @@ var logoVariants = cva("inline-flex items-center gap-2", {
26
26
  }
27
27
  });
28
28
  var iconSizeMap = {
29
- sm: "h-5 w-5",
30
- md: "h-7 w-7",
31
- lg: "h-9 w-9"
29
+ sm: "h-5 w-auto aspect-[78/56]",
30
+ md: "h-7 w-auto aspect-[78/56]",
31
+ lg: "h-9 w-auto aspect-[78/56]"
32
32
  };
33
33
  var wordmarkSizeMap = {
34
34
  sm: "text-base",
@@ -38,6 +38,8 @@ var wordmarkSizeMap = {
38
38
  var Logo = React.forwardRef(
39
39
  ({
40
40
  variant = "full",
41
+ mark = "color",
42
+ product,
41
43
  size = "md",
42
44
  tone = "default",
43
45
  className,
@@ -45,22 +47,25 @@ var Logo = React.forwardRef(
45
47
  }, ref) => {
46
48
  const resolvedSize = size ?? "md";
47
49
  const resolvedTone = tone ?? "default";
50
+ const full = variant === "full";
48
51
  return /* @__PURE__ */ jsxs(
49
52
  "span",
50
53
  {
51
54
  ref,
55
+ role: "img",
56
+ "aria-label": product ? `Nexub ${product}` : "Nexub",
52
57
  className: cn(logoVariants({ size: resolvedSize, tone: resolvedTone }), className),
53
- "aria-label": "Nexub",
54
58
  ...rest,
55
59
  children: [
56
60
  /* @__PURE__ */ jsx(
57
61
  NexubMark,
58
62
  {
63
+ variant: mark,
59
64
  className: cn(iconSizeMap[resolvedSize], "shrink-0"),
60
65
  "aria-hidden": "true"
61
66
  }
62
67
  ),
63
- variant === "full" && /* @__PURE__ */ jsx(
68
+ full && /* @__PURE__ */ jsx(
64
69
  "span",
65
70
  {
66
71
  className: cn(
@@ -69,7 +74,21 @@ var Logo = React.forwardRef(
69
74
  ),
70
75
  children: "nexub"
71
76
  }
72
- )
77
+ ),
78
+ full && product && /* @__PURE__ */ jsxs(Fragment, { children: [
79
+ /* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: "h-1/2 w-px shrink-0 bg-current opacity-25" }),
80
+ /* @__PURE__ */ jsx(
81
+ "span",
82
+ {
83
+ className: cn(
84
+ wordmarkSizeMap[resolvedSize],
85
+ "font-medium tracking-tight leading-none whitespace-nowrap",
86
+ resolvedTone === "inverse" ? "opacity-70" : "text-[var(--color-text-muted)]"
87
+ ),
88
+ children: product
89
+ }
90
+ )
91
+ ] })
73
92
  ]
74
93
  }
75
94
  );
@@ -49,7 +49,10 @@ var Content2 = React.forwardRef(
49
49
  ref,
50
50
  className: cn(
51
51
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-ring-default)] focus-visible:ring-offset-2 ring-offset-[var(--color-ring-offset)]",
52
- className
52
+ className,
53
+ // Radix hides inactive panels with the `hidden` attribute, which any
54
+ // display class (`flex`, `md:grid`…) overrides. !important always wins.
55
+ "data-[state=inactive]:!hidden"
53
56
  ),
54
57
  ...props
55
58
  }
@@ -10,7 +10,7 @@ import { Command } from "cmdk";
10
10
  import { Search } from "@nexub/icons";
11
11
  import { jsx, jsxs } from "react/jsx-runtime";
12
12
  var Root2 = React.forwardRef(({ children, ...props }, ref) => /* @__PURE__ */ jsx(RadixDialog.Root, { ...props, children: /* @__PURE__ */ jsxs(RadixDialog.Portal, { children: [
13
- /* @__PURE__ */ jsx(RadixDialog.Overlay, { className: "fixed inset-0 z-[var(--z-modal)] bg-black/50 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0" }),
13
+ /* @__PURE__ */ jsx(RadixDialog.Overlay, { className: "fixed inset-0 z-[var(--z-modal)] bg-[var(--color-overlay)] backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0" }),
14
14
  /* @__PURE__ */ jsx(
15
15
  RadixDialog.Content,
16
16
  {
@@ -21,7 +21,7 @@ var Overlay2 = React.forwardRef(
21
21
  {
22
22
  ref,
23
23
  className: cn(
24
- "fixed inset-0 z-[var(--z-modal)] bg-black/50 backdrop-blur-sm",
24
+ "fixed inset-0 z-[var(--z-modal)] bg-[var(--color-overlay)] backdrop-blur-sm",
25
25
  "data-[state=open]:animate-in data-[state=closed]:animate-out",
26
26
  "data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0",
27
27
  className