@alpic-ai/ui 1.152.0 → 1.153.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 { cva } from "class-variance-authority";
7
7
  import * as React$1 from "react";
8
8
  import { Area, AreaChart, ResponsiveContainer } from "recharts";
9
9
  //#region src/components/stat.tsx
10
- const statDeltaVariants = cva("inline-flex items-center gap-0.5 rounded-md px-1.5 py-0.5 font-mono text-[11px] font-medium leading-none", {
10
+ const statDeltaVariants = cva("inline-flex items-center gap-0.5 rounded-md px-2 py-1 font-mono text-xs font-medium leading-none", {
11
11
  variants: { sentiment: {
12
12
  positive: "text-success bg-success/12",
13
13
  negative: "text-destructive bg-destructive/12"
@@ -51,7 +51,7 @@ function Stat({ value, unit, delta, sparkline, semantic, className, ...props })
51
51
  delta && /* @__PURE__ */ jsxs(DeltaPill, {
52
52
  sentiment,
53
53
  className: "mb-0.5",
54
- children: [delta.direction === "up" ? /* @__PURE__ */ jsx(ArrowUp, { className: "size-3" }) : /* @__PURE__ */ jsx(ArrowDown, { className: "size-3" }), delta.label ?? `${delta.value}%`]
54
+ children: [delta.direction === "up" ? /* @__PURE__ */ jsx(ArrowUp, { className: "size-3.5" }) : /* @__PURE__ */ jsx(ArrowDown, { className: "size-3.5" }), delta.label ?? `${delta.value}%`]
55
55
  })
56
56
  ]
57
57
  }), hasSpark && /* @__PURE__ */ jsx("div", {
@@ -1,10 +1,14 @@
1
1
  import * as React$1 from "react";
2
2
 
3
3
  //#region src/components/table.d.ts
4
+ interface TableProps extends React$1.ComponentProps<"table"> {
5
+ containerClassName?: string;
6
+ }
4
7
  declare function Table({
5
8
  className,
9
+ containerClassName,
6
10
  ...props
7
- }: React$1.ComponentProps<"table">): React$1.JSX.Element;
11
+ }: TableProps): React$1.JSX.Element;
8
12
  declare function TableHeader({
9
13
  className,
10
14
  ...props
@@ -2,9 +2,9 @@
2
2
  import { cn } from "../lib/cn.mjs";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
  //#region src/components/table.tsx
5
- function Table({ className, ...props }) {
5
+ function Table({ className, containerClassName, ...props }) {
6
6
  return /* @__PURE__ */ jsx("div", {
7
- className: "relative w-full overflow-auto rounded-xl border border-border-secondary bg-background",
7
+ className: cn("relative w-full overflow-auto rounded-xl border border-border-secondary bg-background", containerClassName),
8
8
  children: /* @__PURE__ */ jsx("table", {
9
9
  "data-slot": "table",
10
10
  className: cn("w-full caption-bottom type-text-sm", className),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alpic-ai/ui",
3
- "version": "1.152.0",
3
+ "version": "1.153.0",
4
4
  "description": "Alpic design system — shared UI components",
5
5
  "type": "module",
6
6
  "exports": {
@@ -9,7 +9,7 @@ import { cn } from "../lib/cn";
9
9
  import { useChartContext } from "./chart-container";
10
10
 
11
11
  const statDeltaVariants = cva(
12
- "inline-flex items-center gap-0.5 rounded-md px-1.5 py-0.5 font-mono text-[11px] font-medium leading-none",
12
+ "inline-flex items-center gap-0.5 rounded-md px-2 py-1 font-mono text-xs font-medium leading-none",
13
13
  {
14
14
  variants: {
15
15
  sentiment: {
@@ -63,7 +63,7 @@ function Stat({ value, unit, delta, sparkline, semantic, className, ...props }:
63
63
  {unit && <span className="font-mono text-[11px] leading-none text-quaternary-foreground mb-0.5">{unit}</span>}
64
64
  {delta && (
65
65
  <DeltaPill sentiment={sentiment} className="mb-0.5">
66
- {delta.direction === "up" ? <ArrowUp className="size-3" /> : <ArrowDown className="size-3" />}
66
+ {delta.direction === "up" ? <ArrowUp className="size-3.5" /> : <ArrowDown className="size-3.5" />}
67
67
  {delta.label ?? `${delta.value}%`}
68
68
  </DeltaPill>
69
69
  )}
@@ -4,9 +4,18 @@ import type * as React from "react";
4
4
 
5
5
  import { cn } from "../lib/cn";
6
6
 
7
- function Table({ className, ...props }: React.ComponentProps<"table">) {
7
+ interface TableProps extends React.ComponentProps<"table"> {
8
+ containerClassName?: string;
9
+ }
10
+
11
+ function Table({ className, containerClassName, ...props }: TableProps) {
8
12
  return (
9
- <div className="relative w-full overflow-auto rounded-xl border border-border-secondary bg-background">
13
+ <div
14
+ className={cn(
15
+ "relative w-full overflow-auto rounded-xl border border-border-secondary bg-background",
16
+ containerClassName,
17
+ )}
18
+ >
10
19
  <table data-slot="table" className={cn("w-full caption-bottom type-text-sm", className)} {...props} />
11
20
  </div>
12
21
  );