@nadicodeai/ui 5.3.2 → 5.3.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.
@@ -91,11 +91,7 @@ function ChartTooltipContent({ active, payload, className, indicator = "dot", hi
91
91
  const key = `${nameKey ?? item.name ?? item.dataKey ?? "value"}`;
92
92
  const itemConfig = getPayloadConfigFromPayload(config, item, key);
93
93
  const indicatorColor = color ?? item.payload?.fill ?? item.color;
94
- return (
95
- // eslint-disable-next-line nadicodeai/no-paired-size-utility -- stock Recharts tooltip swatch, sized by upstream.
96
- _jsx("div", { className: cn("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground", indicator === "dot" && "items-center"), children: formatter && item?.value !== undefined && item.name ? (formatter(item.value, item.name, item, index, item.payload)) : (_jsxs(_Fragment, { children: [itemConfig?.icon ? (_jsx(itemConfig.icon, {})) : (!hideIndicator && (
97
- // eslint-disable-next-line nadicodeai/no-paired-size-utility -- stock Recharts tooltip indicator, sized by upstream.
98
- _jsx("div", { className: cn("shrink-0 rounded-xs border-(--color-border) bg-(--color-bg)", {
94
+ return (_jsx("div", { className: cn("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground", indicator === "dot" && "items-center"), children: formatter && item?.value !== undefined && item.name ? (formatter(item.value, item.name, item, index, item.payload)) : (_jsxs(_Fragment, { children: [itemConfig?.icon ? (_jsx(itemConfig.icon, {})) : (!hideIndicator && (_jsx("div", { className: cn("shrink-0 rounded-xs border-(--color-border) bg-(--color-bg)", {
99
95
  "h-2.5 w-2.5": indicator === "dot",
100
96
  "w-1": indicator === "line",
101
97
  "w-0 border-[1.5px] border-dashed bg-transparent": indicator === "dashed",
@@ -119,11 +115,7 @@ function ChartLegendContent({ className, hideIcon = false, payload, placement =
119
115
  .map((item, index) => {
120
116
  const key = `${nameKey ?? item.dataKey ?? "value"}`;
121
117
  const itemConfig = getPayloadConfigFromPayload(config, item, key);
122
- return (
123
- // eslint-disable-next-line nadicodeai/no-paired-size-utility -- stock Recharts legend item, sized by upstream.
124
- _jsxs("div", { className: cn("flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"), children: [itemConfig?.icon && !hideIcon ? (_jsx(itemConfig.icon, {})) : (
125
- // eslint-disable-next-line nadicodeai/no-paired-size-utility -- stock Recharts legend swatch, sized by upstream.
126
- _jsx("div", { className: "h-2 w-2 shrink-0 rounded-xs", style: {
118
+ return (_jsxs("div", { className: cn("flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"), children: [itemConfig?.icon && !hideIcon ? (_jsx(itemConfig.icon, {})) : (_jsx("div", { className: "h-2 w-2 shrink-0 rounded-xs", style: {
127
119
  backgroundColor: item.color,
128
120
  } })), itemConfig?.label] }, index));
129
121
  }) }));
@@ -22,9 +22,7 @@ const inputGroupAddonVariants = cva("flex h-auto cursor-text items-center justif
22
22
  },
23
23
  });
24
24
  function InputGroupAddon({ className, align = "inline-start", ...props }) {
25
- return (
26
- // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions -- Clicking non-button addon content is a pointer convenience that focuses the already keyboard-accessible input; the group may also contain buttons.
27
- _jsx("div", { role: "group", "data-slot": "input-group-addon", "data-align": align, className: cn(inputGroupAddonVariants({ align }), className), onClick: (e) => {
25
+ return (_jsx("div", { role: "group", "data-slot": "input-group-addon", "data-align": align, className: cn(inputGroupAddonVariants({ align }), className), onClick: (e) => {
28
26
  if (e.target.closest("button")) {
29
27
  return;
30
28
  }
@@ -36,10 +36,7 @@ function MenubarRadioItem({ className, children, inset, ...props }) {
36
36
  return (_jsxs(MenuPrimitive.RadioItem, { "data-slot": "menubar-radio-item", "data-inset": inset, className: cn("relative flex min-h-touch-target cursor-default items-center gap-1.5 rounded-md py-1 pr-1.5 pl-7 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [@media(hover:hover)_and_(pointer:fine)]:min-h-0 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), ...props, children: [_jsx("span", { className: "pointer-events-none absolute left-1.5 flex size-4 items-center justify-center [&_svg:not([class*='size-'])]:size-4", children: _jsx(MenuPrimitive.RadioItemIndicator, { children: _jsx(CheckIcon, {}) }) }), children] }));
37
37
  }
38
38
  function MenubarLabel({ className, inset, ...props }) {
39
- return (
40
- // Base UI's MenuGroupLabel throws outside Menu.Group, so the label wraps
41
- // itself in a Group even though stock base-nova renders it bare.
42
- _jsx(DropdownMenuGroup, { children: _jsx(DropdownMenuLabel, { "data-slot": "menubar-label", "data-inset": inset, className: cn("px-1.5 py-1 text-sm font-medium data-inset:pl-7", className), ...props }) }));
39
+ return (_jsx(DropdownMenuGroup, { children: _jsx(DropdownMenuLabel, { "data-slot": "menubar-label", "data-inset": inset, className: cn("px-1.5 py-1 text-sm font-medium data-inset:pl-7", className), ...props }) }));
43
40
  }
44
41
  function MenubarSeparator({ className, ...props }) {
45
42
  return (_jsx(DropdownMenuSeparator, { "data-slot": "menubar-separator", className: cn("-mx-1 my-1 h-px bg-border", className), ...props }));
@@ -3,9 +3,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import * as ResizablePrimitive from "react-resizable-panels";
4
4
  import { cn } from "../lib/utils.js";
5
5
  function ResizablePanelGroup({ className, ...props }) {
6
- return (
7
- // eslint-disable-next-line nadicodeai/no-paired-size-utility -- stock fill on the panel group: the pair fills its track, it is not a square.
8
- _jsx(ResizablePrimitive.Group, { "data-slot": "resizable-panel-group", className: cn("flex h-full w-full aria-[orientation=vertical]:flex-col", className), ...props }));
6
+ return (_jsx(ResizablePrimitive.Group, { "data-slot": "resizable-panel-group", className: cn("flex h-full w-full aria-[orientation=vertical]:flex-col", className), ...props }));
9
7
  }
10
8
  function ResizablePanel({ ...props }) {
11
9
  return _jsx(ResizablePrimitive.Panel, { "data-slot": "resizable-panel", ...props });
@@ -20,10 +20,7 @@ const columnClasses = {
20
20
  4: "grid-cols-2 lg:grid-cols-4",
21
21
  };
22
22
  function SecurityGrid({ className, columns = 4, ...props }) {
23
- return (
24
- // `dark` on the root flips every role below to its night value; SeamGrid
25
- // keeps sole ownership of the seams (its `bg-border` resolves dark here).
26
- _jsx(SeamGrid, { "data-slot": "security-grid", className: cn("dark", columnClasses[columns], className), ...props }));
23
+ return (_jsx(SeamGrid, { "data-slot": "security-grid", className: cn("dark", columnClasses[columns], className), ...props }));
27
24
  }
28
25
  function SecurityCell({ className, icon, title, body, ...props }) {
29
26
  return (_jsxs("div", { "data-slot": "security-cell", className: cn("nc-panel-cell content-start bg-card", className), ...props, children: [_jsx("span", { "data-slot": "security-cell-glyph", className: "grid size-[34px] place-items-center border border-border text-primary", "aria-hidden": icon ? undefined : true, children: icon }), _jsx("h3", { "data-slot": "security-cell-title", className: "nc-type-body-md-strong text-foreground", children: title }), _jsx("p", { "data-slot": "security-cell-body", className: "nc-type-body-sm text-muted-foreground", children: body })] }));
@@ -27,8 +27,6 @@ function StatsBand({ className, columns = 4, surface = "canvas", ...props }) {
27
27
  // night carries the plain canvas seam and lets the `dark` root flip its colour;
28
28
  // ink/canvas pass straight through to the surface-driven seam colour.
29
29
  const seamSurface = surface === "night" ? "canvas" : surface;
30
- return (
31
- // single-owner seam: SeamGrid owns every divider; ink/night flip only colour.
32
- _jsx(SeamGrid, { "data-slot": "stats-band", "data-surface": surface, surface: seamSurface, className: cn("h-full", surface === "night" && "dark", STATS_BAND_COLUMNS[columns], className), ...props }));
30
+ return (_jsx(SeamGrid, { "data-slot": "stats-band", "data-surface": surface, surface: seamSurface, className: cn("h-full", surface === "night" && "dark", STATS_BAND_COLUMNS[columns], className), ...props }));
33
31
  }
34
32
  export { StatsBand };
@@ -3,8 +3,6 @@ import * as React from "react";
3
3
  import { cn } from "../lib/utils.js";
4
4
  function UsageMeter({ className, fields = [], trailing, usage, children, ...props }) {
5
5
  const hasMeta = fields.length > 0 || trailing != null || children != null;
6
- return (_jsxs("div", { "data-slot": "usage-meter", className: cn("nc-usage-meter", className), ...props, children: [hasMeta && (_jsxs("div", { className: "nc-usage-meter-meta", children: [fields.map((field, index) => (
7
- // biome-ignore lint/suspicious/noArrayIndexKey: meta fields are a fixed positional list
8
- _jsxs(React.Fragment, { children: [index > 0 && _jsx("span", { className: "nc-usage-meter-sep", children: "/" }), _jsx("span", { children: field })] }, index))), trailing != null && (_jsxs(_Fragment, { children: [_jsx("span", { className: "nc-usage-meter-spacer" }), _jsx("span", { children: trailing })] })), children != null && _jsx("span", { "data-slot": "usage-meter-slot", children: children })] })), usage != null && (_jsx("div", { className: "nc-usage-meter-track", children: _jsx("div", { className: "nc-usage-meter-fill", style: { "--nc-usage": typeof usage === "number" ? `${usage}%` : usage } }) }))] }));
6
+ return (_jsxs("div", { "data-slot": "usage-meter", className: cn("nc-usage-meter", className), ...props, children: [hasMeta && (_jsxs("div", { className: "nc-usage-meter-meta", children: [fields.map((field, index) => (_jsxs(React.Fragment, { children: [index > 0 && _jsx("span", { className: "nc-usage-meter-sep", children: "/" }), _jsx("span", { children: field })] }, index))), trailing != null && (_jsxs(_Fragment, { children: [_jsx("span", { className: "nc-usage-meter-spacer" }), _jsx("span", { children: trailing })] })), children != null && _jsx("span", { "data-slot": "usage-meter-slot", children: children })] })), usage != null && (_jsx("div", { className: "nc-usage-meter-track", children: _jsx("div", { className: "nc-usage-meter-fill", style: { "--nc-usage": typeof usage === "number" ? `${usage}%` : usage } }) }))] }));
9
7
  }
10
8
  export { UsageMeter };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nadicodeai/ui",
3
- "version": "5.3.2",
3
+ "version": "5.3.4",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -70,7 +70,7 @@
70
70
  "@assistant-ui/react": "0.15.18",
71
71
  "@assistant-ui/react-markdown": "0.14.14",
72
72
  "@base-ui/react": "^1.8.0",
73
- "@nadicodeai/design-system": "5.3.2",
73
+ "@nadicodeai/design-system": "5.3.4",
74
74
  "@paper-design/shaders": "0.0.80",
75
75
  "class-variance-authority": "^0.7.1",
76
76
  "clsx": "^2.1.1",
@@ -100,7 +100,7 @@
100
100
  },
101
101
  "devDependencies": {
102
102
  "@iconify-json/logos": "^1.2.13",
103
- "@iconify/utils": "^3.1.5",
103
+ "@iconify/utils": "^3.1.7",
104
104
  "@nadicodeai/eslint-plugin": "*",
105
105
  "@stryker-mutator/core": "10.0.0",
106
106
  "@stryker-mutator/vitest-runner": "10.0.0",
@@ -116,7 +116,7 @@
116
116
  "react-dom": "19.2.8",
117
117
  "shadcn": "4.13.0",
118
118
  "tailwindcss": "^4.3.1",
119
- "typescript": "^5",
119
+ "typescript": "^6",
120
120
  "vitest": "^5.0.0"
121
121
  }
122
122
  }