@caqophony/ui 0.9.4 → 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 +20 -2
- package/dist/{chunk-KXI4UQPS.js → chunk-3K3AFMSH.js} +1 -0
- package/dist/{chunk-MRVYXQE3.js → chunk-G462BTOB.js} +1 -1
- package/dist/{chunk-A3GODQ6C.js → chunk-GUPC7YZ7.js} +1 -1
- package/dist/index.d.mts +3 -1
- package/dist/index.js +46 -34
- package/dist/marketing.js +2 -2
- package/dist/material.js +2 -2
- package/package.json +1 -1
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:
|
|
265
|
+
borderRadius: palette?.corner
|
|
248
266
|
}
|
|
249
267
|
]
|
|
250
268
|
};
|
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,
|
|
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;
|
|
@@ -992,6 +992,8 @@ declare const ActionCard: React.ForwardRefExoticComponent<ActionCardProps & Reac
|
|
|
992
992
|
* z-overlay -> zIndex.overlay (60)
|
|
993
993
|
* duration-default -> transition.duration.default
|
|
994
994
|
*
|
|
995
|
+
* A click outside the panel closes it (#7051).
|
|
996
|
+
*
|
|
995
997
|
* Issue #2628 — B-2: Modal Dialog + Drawer
|
|
996
998
|
* Authored by Caqophony
|
|
997
999
|
*/
|
package/dist/index.js
CHANGED
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
buttonVariants,
|
|
12
12
|
useModalSurface,
|
|
13
13
|
usePanelRef
|
|
14
|
-
} from "./chunk-
|
|
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-
|
|
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-
|
|
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-
|
|
1306
|
-
innerBg: "bg-
|
|
1307
|
-
iconColor: "text-
|
|
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-
|
|
1312
|
-
innerBg: "bg-
|
|
1313
|
-
iconColor: "text-
|
|
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-
|
|
1318
|
-
innerBg: "bg-
|
|
1319
|
-
iconColor: "text-
|
|
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-
|
|
1324
|
-
innerBg: "bg-
|
|
1325
|
-
iconColor: "text-
|
|
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-
|
|
1332
|
-
inner: "w-[48px] h-[48px] rounded-
|
|
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-
|
|
1337
|
-
inner: "w-[28px] h-[28px] rounded-
|
|
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-[
|
|
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: [
|
|
@@ -1608,7 +1608,7 @@ var StackedListItem = React8.forwardRef(
|
|
|
1608
1608
|
}
|
|
1609
1609
|
)
|
|
1610
1610
|
] }),
|
|
1611
|
-
meta && /* @__PURE__ */ jsx19("span", { className: "
|
|
1611
|
+
meta && /* @__PURE__ */ jsx19("span", { className: "min-w-0 max-w-full break-words text-sm text-muted-foreground", children: meta }),
|
|
1612
1612
|
action && /* @__PURE__ */ jsx19("div", { className: "flex-shrink-0", children: action })
|
|
1613
1613
|
] })
|
|
1614
1614
|
]
|
|
@@ -3040,22 +3040,34 @@ var ModalDialog = React18.forwardRef(
|
|
|
3040
3040
|
"aria-hidden": "true"
|
|
3041
3041
|
}
|
|
3042
3042
|
),
|
|
3043
|
-
/* @__PURE__ */ jsx29(
|
|
3043
|
+
/* @__PURE__ */ jsx29(
|
|
3044
3044
|
"div",
|
|
3045
3045
|
{
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
|
|
3046
|
+
className: "z-modal fixed inset-0 flex items-center justify-center p-4",
|
|
3047
|
+
"data-testid": "modal-dialog-outside",
|
|
3048
|
+
onClick: (e) => {
|
|
3049
|
+
if (e.target === e.currentTarget) onClose?.();
|
|
3050
|
+
},
|
|
3051
|
+
children: /* @__PURE__ */ jsx29(
|
|
3052
|
+
"div",
|
|
3053
|
+
{
|
|
3054
|
+
ref: setPanel,
|
|
3055
|
+
role: "dialog",
|
|
3056
|
+
"aria-modal": "true",
|
|
3057
|
+
className: cn(
|
|
3058
|
+
// #7263: a panel taller than the screen scrolls inside it, so
|
|
3059
|
+
// its footer (Cancel, Save) can always be reached
|
|
3060
|
+
"relative max-h-[calc(100dvh-2rem)] w-full overflow-y-auto rounded-lg border border-border bg-card shadow-lg",
|
|
3061
|
+
"animate-in fade-in-0 zoom-in-95",
|
|
3062
|
+
SIZE_CLASSES2[size],
|
|
3063
|
+
className
|
|
3064
|
+
),
|
|
3065
|
+
...props,
|
|
3066
|
+
children
|
|
3067
|
+
}
|
|
3068
|
+
)
|
|
3057
3069
|
}
|
|
3058
|
-
)
|
|
3070
|
+
)
|
|
3059
3071
|
] })
|
|
3060
3072
|
);
|
|
3061
3073
|
}
|
package/dist/marketing.js
CHANGED
package/dist/material.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
IntentBadge
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-G462BTOB.js";
|
|
5
5
|
import {
|
|
6
6
|
CONTENT_GUTTER,
|
|
7
7
|
Icon,
|
|
8
8
|
ScrollHintXMark
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-3K3AFMSH.js";
|
|
10
10
|
import {
|
|
11
11
|
cn
|
|
12
12
|
} from "./chunk-DP5WQAPO.js";
|