@caqophony/ui 0.9.5 → 0.9.6

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/charts.js CHANGED
@@ -197,6 +197,23 @@ var BAR_TOKENS = {
197
197
  text: "--muted-foreground",
198
198
  grid: "--border"
199
199
  };
200
+ function cornerOf(el) {
201
+ if (getComputedStyle(el).getPropertyValue("--radius").trim() === "")
202
+ throw new Error(
203
+ "BarChart: the token --radius is not set on the page: the chart draws in the kit's tokens, so the page loads @caqophony/ui/styles.css"
204
+ );
205
+ const probe = document.createElement("span");
206
+ probe.style.borderTopLeftRadius = "calc(var(--radius) * 0.5)";
207
+ el.appendChild(probe);
208
+ const computed = getComputedStyle(probe).borderTopLeftRadius;
209
+ el.removeChild(probe);
210
+ const px = parseFloat(computed);
211
+ if (!Number.isFinite(px))
212
+ throw new Error(
213
+ `BarChart: the bars' corner did not compute to a length from --radius (${computed || "empty"})`
214
+ );
215
+ return px;
216
+ }
200
217
  function paletteOf(el) {
201
218
  const style = getComputedStyle(el);
202
219
  const read = (name) => {
@@ -210,7 +227,8 @@ function paletteOf(el) {
210
227
  return {
211
228
  bar: read(BAR_TOKENS.bar),
212
229
  text: read(BAR_TOKENS.text),
213
- grid: read(BAR_TOKENS.grid)
230
+ grid: read(BAR_TOKENS.grid),
231
+ corner: cornerOf(el)
214
232
  };
215
233
  }
216
234
  var valueTick = (unit) => (tickValue) => formatValue(
@@ -244,7 +262,7 @@ function BarChart({
244
262
  data: data.map((d) => d.value),
245
263
  backgroundColor: fill,
246
264
  borderWidth: 0,
247
- borderRadius: 4
265
+ borderRadius: palette?.corner
248
266
  }
249
267
  ]
250
268
  };
@@ -163,6 +163,7 @@ function watchScrollHintX(mark, write) {
163
163
  }
164
164
  let last;
165
165
  const update = () => {
166
+ if (!scroller.isConnected || !mark.isConnected) return;
166
167
  const state = scrollHintXState(
167
168
  scroller,
168
169
  scrollHintXSlotWidth(mark, scroller)
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  import {
3
3
  Icon
4
- } from "./chunk-KXI4UQPS.js";
4
+ } from "./chunk-3K3AFMSH.js";
5
5
  import {
6
6
  cn
7
7
  } from "./chunk-DP5WQAPO.js";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  CONTENT_GUTTER,
4
4
  Icon
5
- } from "./chunk-KXI4UQPS.js";
5
+ } from "./chunk-3K3AFMSH.js";
6
6
  import {
7
7
  cn
8
8
  } from "./chunk-DP5WQAPO.js";
package/dist/index.d.mts CHANGED
@@ -569,7 +569,7 @@ interface SkeletonRowProps {
569
569
  /**
570
570
  * SkeletonRow — a row loading placeholder with avatar and text lines.
571
571
  *
572
- * Mirrors the Figma skeletonRow helper: card bg, border, rounded-[10px],
572
+ * Mirrors the Figma skeletonRow helper: card bg, border, corners at 1.25x the project --radius (10px at the default 0.5rem),
573
573
  * padding 14px/18px, gap 14px, with 36px circle avatar + 2 bars (200x12, 140x10).
574
574
  */
575
575
  declare function SkeletonRow({ className }: SkeletonRowProps): react_jsx_runtime.JSX.Element;
package/dist/index.js CHANGED
@@ -11,7 +11,7 @@ import {
11
11
  buttonVariants,
12
12
  useModalSurface,
13
13
  usePanelRef
14
- } from "./chunk-A3GODQ6C.js";
14
+ } from "./chunk-GUPC7YZ7.js";
15
15
  import {
16
16
  Alert,
17
17
  EMPTY_VALUE_GLYPH,
@@ -19,7 +19,7 @@ import {
19
19
  INTENT_SUBTLE_STYLES,
20
20
  IntentBadge,
21
21
  isEmptyValue
22
- } from "./chunk-MRVYXQE3.js";
22
+ } from "./chunk-G462BTOB.js";
23
23
  import {
24
24
  CONTENT_GUTTER,
25
25
  ICONS,
@@ -28,7 +28,7 @@ import {
28
28
  SCROLL_HINT_X,
29
29
  ScrollHintXMark,
30
30
  ScrollHintYMark
31
- } from "./chunk-KXI4UQPS.js";
31
+ } from "./chunk-3K3AFMSH.js";
32
32
  import {
33
33
  cn
34
34
  } from "./chunk-DP5WQAPO.js";
@@ -1302,39 +1302,39 @@ import { Check, AlertTriangle, X, Info } from "lucide-react";
1302
1302
  import { jsx as jsx12 } from "react/jsx-runtime";
1303
1303
  var intentConfig = {
1304
1304
  success: {
1305
- outerBg: "bg-[rgba(33,196,93,0.10)] dark:bg-[rgba(33,196,93,0.10)]",
1306
- innerBg: "bg-[rgba(33,196,93,0.20)] dark:bg-[rgba(33,196,93,0.20)]",
1307
- iconColor: "text-[#21c45d] dark:text-[#21c45d]",
1305
+ outerBg: "bg-intent-success/10",
1306
+ innerBg: "bg-intent-success/20",
1307
+ iconColor: "text-intent-success",
1308
1308
  Icon: Check
1309
1309
  },
1310
1310
  warning: {
1311
- outerBg: "bg-[rgba(245,159,10,0.10)] dark:bg-[rgba(245,159,10,0.10)]",
1312
- innerBg: "bg-[rgba(245,159,10,0.20)] dark:bg-[rgba(245,159,10,0.20)]",
1313
- iconColor: "text-[#f59f0a] dark:text-[#f59f0a]",
1311
+ outerBg: "bg-intent-warning/10",
1312
+ innerBg: "bg-intent-warning/20",
1313
+ iconColor: "text-intent-warning",
1314
1314
  Icon: AlertTriangle
1315
1315
  },
1316
1316
  error: {
1317
- outerBg: "bg-[rgba(239,67,67,0.10)] dark:bg-[rgba(239,67,67,0.10)]",
1318
- innerBg: "bg-[rgba(239,67,67,0.20)] dark:bg-[rgba(239,67,67,0.20)]",
1319
- iconColor: "text-[#ef4343] dark:text-[#ef4343]",
1317
+ outerBg: "bg-intent-error/10",
1318
+ innerBg: "bg-intent-error/20",
1319
+ iconColor: "text-intent-error",
1320
1320
  Icon: X
1321
1321
  },
1322
1322
  info: {
1323
- outerBg: "bg-[rgba(60,131,246,0.10)] dark:bg-[rgba(60,131,246,0.10)]",
1324
- innerBg: "bg-[rgba(60,131,246,0.20)] dark:bg-[rgba(60,131,246,0.20)]",
1325
- iconColor: "text-[#3c83f6] dark:text-[#3c83f6]",
1323
+ outerBg: "bg-intent-info/10",
1324
+ innerBg: "bg-intent-info/20",
1325
+ iconColor: "text-intent-info",
1326
1326
  Icon: Info
1327
1327
  }
1328
1328
  };
1329
1329
  var sizeConfig = {
1330
1330
  md: {
1331
- outer: "w-[80px] h-[80px] rounded-[40px]",
1332
- inner: "w-[48px] h-[48px] rounded-[24px]",
1331
+ outer: "w-[80px] h-[80px] rounded-full",
1332
+ inner: "w-[48px] h-[48px] rounded-full",
1333
1333
  iconSize: 24
1334
1334
  },
1335
1335
  sm: {
1336
- outer: "w-[48px] h-[48px] rounded-[24px]",
1337
- inner: "w-[28px] h-[28px] rounded-[14px]",
1336
+ outer: "w-[48px] h-[48px] rounded-full",
1337
+ inner: "w-[28px] h-[28px] rounded-full",
1338
1338
  iconSize: 14
1339
1339
  }
1340
1340
  };
@@ -1521,7 +1521,7 @@ function SkeletonRow({ className = "" }) {
1521
1521
  {
1522
1522
  "data-testid": "skeleton-row",
1523
1523
  className: cn(
1524
- "flex w-full items-center gap-3.5 rounded-[10px] border border-border bg-card px-[18px] py-[14px] dark:border-border dark:bg-card",
1524
+ "flex w-full items-center gap-3.5 rounded-[calc(var(--radius)*1.25)] border border-border bg-card px-[18px] py-[14px] dark:border-border dark:bg-card",
1525
1525
  className
1526
1526
  ),
1527
1527
  children: [
package/dist/marketing.js CHANGED
@@ -3,10 +3,10 @@ import {
3
3
  Button,
4
4
  Container,
5
5
  NavbarMenu
6
- } from "./chunk-A3GODQ6C.js";
6
+ } from "./chunk-GUPC7YZ7.js";
7
7
  import {
8
8
  ScrollHintXMark
9
- } from "./chunk-KXI4UQPS.js";
9
+ } from "./chunk-3K3AFMSH.js";
10
10
  import {
11
11
  cn
12
12
  } from "./chunk-DP5WQAPO.js";
package/dist/material.js CHANGED
@@ -1,12 +1,12 @@
1
1
  'use client';
2
2
  import {
3
3
  IntentBadge
4
- } from "./chunk-MRVYXQE3.js";
4
+ } from "./chunk-G462BTOB.js";
5
5
  import {
6
6
  CONTENT_GUTTER,
7
7
  Icon,
8
8
  ScrollHintXMark
9
- } from "./chunk-KXI4UQPS.js";
9
+ } from "./chunk-3K3AFMSH.js";
10
10
  import {
11
11
  cn
12
12
  } from "./chunk-DP5WQAPO.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@caqophony/ui",
3
- "version": "0.9.5",
3
+ "version": "0.9.6",
4
4
  "description": "Generic, optional React UI reuse library (Gossamer tokens). Centrally maintained by Caqophony.",
5
5
  "license": "MIT",
6
6
  "author": "Caqophony",