@nadicodeai/ui 12.1.28 → 12.1.29
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/components/card.js +1 -1
- package/dist/components/drawer.d.ts +5 -0
- package/dist/components/drawer.d.ts.map +1 -1
- package/dist/components/drawer.js +7 -2
- package/dist/eslint/index.js +3 -0
- package/dist/eslint/rules/drawer-owns-its-edges.js +66 -0
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -1
- package/dist/styles/components.css +23 -0
- package/package.json +2 -2
- package/dist/components/fact-cell.d.ts +0 -21
- package/dist/components/fact-cell.d.ts.map +0 -1
- package/dist/components/fact-cell.js +0 -29
package/dist/components/card.js
CHANGED
|
@@ -20,7 +20,7 @@ function CardHeader({ className, ...props }) {
|
|
|
20
20
|
// `minmax(0,1fr)`, not `1fr`, because a `1fr` track never shrinks below
|
|
21
21
|
// its content and a long title or an unbreakable figure would push the
|
|
22
22
|
// action past the card's edge, where the card's clipping cuts it.
|
|
23
|
-
"group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-md px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[minmax(0,1fr)_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)", className), ...props }));
|
|
23
|
+
"group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-md px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[minmax(0,1fr)_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] *:data-[slot=card-description]:col-start-1 *:data-[slot=card-title]:col-start-1 [.border-b]:pb-(--card-spacing)", className), ...props }));
|
|
24
24
|
}
|
|
25
25
|
function CardTitle({ className, focusTarget = false, ...props }) {
|
|
26
26
|
return (_jsx("div", { "data-slot": "card-title", "data-focus-target": focusTarget || undefined, className: cn("text-base font-medium group-data-[size=sm]/card:text-sm", focusTarget && "rounded-sm", className), ...props }));
|
|
@@ -9,6 +9,11 @@ declare function DrawerClose({ ...props }: DrawerPrimitive.Close.Props): React.J
|
|
|
9
9
|
declare function DrawerOverlay({ className, ...props }: DrawerPrimitive.Backdrop.Props): React.JSX.Element;
|
|
10
10
|
declare function DrawerSwipeHandle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
11
11
|
declare function DrawerContent({ className, children, ...props }: DrawerPrimitive.Popup.Props): React.JSX.Element;
|
|
12
|
+
/**
|
|
13
|
+
* The header and the footer stay in place while the body scrolls between them,
|
|
14
|
+
* so each draws the one hairline that separates it from the body; a caller
|
|
15
|
+
* adds no edge of its own.
|
|
16
|
+
*/
|
|
12
17
|
declare function DrawerHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
13
18
|
/**
|
|
14
19
|
* The part of a drawer that scrolls, between its header and footer, which stay
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../src/components/drawer.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAuBlE,iBAAS,MAAM,CAAC,EACd,KAAY,EACZ,eAAuB,EACvB,UAAU,EACV,cAAuB,EACvB,GAAG,KAAK,EACT,EAAE,eAAe,CAAC,IAAI,CAAC,KAAK,GAAG;IAC9B,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,qBAkBA;AAED,iBAAS,aAAa,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,CAAC,OAAO,CAAC,KAAK,qBAEjE;AAED,iBAAS,YAAY,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,CAAC,MAAM,CAAC,KAAK,qBAE/D;AAED,iBAAS,WAAW,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,CAAC,KAAK,CAAC,KAAK,qBAE7D;AAED,iBAAS,aAAa,CAAC,EAAE,S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data-[swipe-direction=right]:right-0 data-[swipe-direction=right]:origin-right data-[swipe-direction=right]:[--closed-transform:translate3d(calc(100%+var(--drawer-inset,0px)+2px),0,0)] data-[swipe-direction=right]:[--translate-x:calc(var(--drawer-swipe-movement-x)-var(--stack-peek-offset)-(var(--stack-shrink)*100%))]", className), ...props, children: [showSwipeHandle && _jsx(DrawerSwipeHandle, {}), _jsx(DrawerPrimitive.Content, { "data-slot": "drawer-content", className: cn("flex min-h-0 flex-1 flex-col overflow-hidden overscroll-contain rounded-[inherit] transition-opacity duration-[var(--nc-duration-open)] ease-[var(--nc-ease-out-strong)] select-text group-data-nested-drawer-open/drawer-popup:opacity-0 group-data-nested-drawer-swiping/drawer-popup:opacity-100 group-data-swiping/drawer-popup:select-none"), children: children })] }) })] }));
|
|
62
62
|
}
|
|
63
|
+
/**
|
|
64
|
+
* The header and the footer stay in place while the body scrolls between them,
|
|
65
|
+
* so each draws the one hairline that separates it from the body; a caller
|
|
66
|
+
* adds no edge of its own.
|
|
67
|
+
*/
|
|
63
68
|
function DrawerHeader({ className, ...props }) {
|
|
64
|
-
return (_jsx("div", { "data-slot": "drawer-header", className: cn("flex shrink-0 flex-col gap-0.5 p-nadicode-lg pb-
|
|
69
|
+
return (_jsx("div", { "data-slot": "drawer-header", className: cn("flex shrink-0 flex-col gap-0.5 border-b border-border p-nadicode-lg pb-nadicode-md group-data-[swipe-axis=y]/drawer-popup:text-center md:gap-0.5 md:text-left", className), ...props }));
|
|
65
70
|
}
|
|
66
71
|
/**
|
|
67
72
|
* The part of a drawer that scrolls, between its header and footer, which stay
|
|
@@ -71,7 +76,7 @@ function DrawerBody({ className, ...props }) {
|
|
|
71
76
|
return (_jsx("div", { "data-slot": "drawer-body", className: cn("flex min-h-0 flex-1 flex-col gap-nadicode-md overflow-y-auto p-nadicode-lg", className), ...props }));
|
|
72
77
|
}
|
|
73
78
|
function DrawerFooter({ className, ...props }) {
|
|
74
|
-
return (_jsx("div", { "data-slot": "drawer-footer", className: cn("mt-auto flex shrink-0 flex-col gap-2 p-nadicode-
|
|
79
|
+
return (_jsx("div", { "data-slot": "drawer-footer", className: cn("mt-auto flex shrink-0 flex-col gap-2 border-t border-border p-nadicode-md", className), ...props }));
|
|
75
80
|
}
|
|
76
81
|
function DrawerTitle({ className, ...props }) {
|
|
77
82
|
return (_jsx(DrawerPrimitive.Title, { "data-slot": "drawer-title", className: cn("text-base font-medium text-foreground", className), ...props }));
|
package/dist/eslint/index.js
CHANGED
|
@@ -4,6 +4,7 @@ import { readdirSync, readFileSync } from "node:fs";
|
|
|
4
4
|
import { menuCommandOwner } from "./rules/menu-command-owner.js";
|
|
5
5
|
import { cardRowOwner } from "./rules/card-row-owner.js";
|
|
6
6
|
import { confirmDestructiveAction } from "./rules/confirm-destructive-action.js";
|
|
7
|
+
import { drawerOwnsItsEdges } from "./rules/drawer-owns-its-edges.js";
|
|
7
8
|
import { iconControlAccessibleName } from "./rules/icon-control-accessible-name.js";
|
|
8
9
|
import { noAppFeatureComponent } from "./rules/no-app-feature-component.js";
|
|
9
10
|
import { noElevatedEdge } from "./rules/no-elevated-edge.js";
|
|
@@ -89,6 +90,7 @@ function digestOf(paths) {
|
|
|
89
90
|
|
|
90
91
|
export const strictDesignSystemRules = {
|
|
91
92
|
"nadicodeai/card-row-owner": "error",
|
|
93
|
+
"nadicodeai/drawer-owns-its-edges": "error",
|
|
92
94
|
"nadicodeai/icon-control-accessible-name": "error",
|
|
93
95
|
"nadicodeai/no-invalid-token-utility": "error",
|
|
94
96
|
"nadicodeai/no-native-visible-control": "error",
|
|
@@ -114,6 +116,7 @@ const plugin = {
|
|
|
114
116
|
"card-row-owner": cardRowOwner,
|
|
115
117
|
"menu-command-owner": menuCommandOwner,
|
|
116
118
|
"confirm-destructive-action": confirmDestructiveAction,
|
|
119
|
+
"drawer-owns-its-edges": drawerOwnsItsEdges,
|
|
117
120
|
"icon-control-accessible-name": iconControlAccessibleName,
|
|
118
121
|
"no-app-feature-component": noAppFeatureComponent,
|
|
119
122
|
"no-elevated-edge": noElevatedEdge,
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Standard tool checked first: `better-tailwindcss/no-restricted-classes` bans a
|
|
3
|
+
* class everywhere and cannot ask which element it sits on or what that element
|
|
4
|
+
* wraps, so the relationship is read here on the shared readers.
|
|
5
|
+
*/
|
|
6
|
+
import { jsxComponentName, openingElementClassUtilities } from "./jsx-class-utility.js";
|
|
7
|
+
|
|
8
|
+
const SLOTS = new Set(["DrawerHeader", "DrawerBody", "DrawerFooter"]);
|
|
9
|
+
|
|
10
|
+
const EDGE = /^border(?:-[tby])?(?:-\d+)?$/;
|
|
11
|
+
|
|
12
|
+
function edgeUtility(node, context) {
|
|
13
|
+
return openingElementClassUtilities(node, context).find((utility) =>
|
|
14
|
+
EDGE.test(utility.split(":").at(-1).replace(/^!/, "")),
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function wrappedSlot(element, context) {
|
|
19
|
+
for (const child of element.children) {
|
|
20
|
+
if (child.type !== "JSXElement") continue;
|
|
21
|
+
const name = jsxComponentName(child.openingElement, context);
|
|
22
|
+
if (name && SLOTS.has(name)) return name;
|
|
23
|
+
}
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export const drawerOwnsItsEdges = {
|
|
28
|
+
meta: {
|
|
29
|
+
type: "problem",
|
|
30
|
+
docs: {
|
|
31
|
+
description: "Keep the edges between a drawer's header, body and footer with the drawer",
|
|
32
|
+
},
|
|
33
|
+
schema: [],
|
|
34
|
+
messages: {
|
|
35
|
+
slotEdge:
|
|
36
|
+
'"{{utility}}" gives <{{slot}}> a second edge. The drawer draws the hairline between its header, its body and its footer; drop the border class (rule/drawer-owns-its-edges).',
|
|
37
|
+
wrapperEdge:
|
|
38
|
+
'"{{utility}}" draws an edge around <{{slot}}>. The drawer draws the hairline between its header, its body and its footer; render the slot without this wrapper (rule/drawer-owns-its-edges).',
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
create(context) {
|
|
42
|
+
return {
|
|
43
|
+
JSXElement(element) {
|
|
44
|
+
const utility = edgeUtility(element.openingElement, context);
|
|
45
|
+
if (!utility) return;
|
|
46
|
+
const own = jsxComponentName(element.openingElement, context);
|
|
47
|
+
if (own && SLOTS.has(own)) {
|
|
48
|
+
context.report({
|
|
49
|
+
node: element.openingElement,
|
|
50
|
+
messageId: "slotEdge",
|
|
51
|
+
data: { utility, slot: own },
|
|
52
|
+
});
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
const slot = wrappedSlot(element, context);
|
|
56
|
+
if (slot) {
|
|
57
|
+
context.report({
|
|
58
|
+
node: element.openingElement,
|
|
59
|
+
messageId: "wrapperEdge",
|
|
60
|
+
data: { utility, slot },
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
},
|
|
66
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -52,7 +52,6 @@ export * from "./components/drawer.js";
|
|
|
52
52
|
export * from "./components/dropdown-menu.js";
|
|
53
53
|
export * from "./components/empty.js";
|
|
54
54
|
export * from "./components/expandable-block.js";
|
|
55
|
-
export * from "./components/fact-cell.js";
|
|
56
55
|
export * from "./components/feedback-state.js";
|
|
57
56
|
export * from "./components/field.js";
|
|
58
57
|
export * from "./components/file-diff.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cA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CAAC;AAC5C,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kCAAkC,CAAC;AACjD,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -52,7 +52,6 @@ export * from "./components/drawer.js";
|
|
|
52
52
|
export * from "./components/dropdown-menu.js";
|
|
53
53
|
export * from "./components/empty.js";
|
|
54
54
|
export * from "./components/expandable-block.js";
|
|
55
|
-
export * from "./components/fact-cell.js";
|
|
56
55
|
export * from "./components/feedback-state.js";
|
|
57
56
|
export * from "./components/field.js";
|
|
58
57
|
export * from "./components/file-diff.js";
|
|
@@ -128,3 +128,26 @@
|
|
|
128
128
|
@source "../components";
|
|
129
129
|
@source "../internal";
|
|
130
130
|
@source "../lib";
|
|
131
|
+
|
|
132
|
+
@container card-header (width < 28rem) {
|
|
133
|
+
[data-slot="card-action"]:not(:empty):not(
|
|
134
|
+
:has(
|
|
135
|
+
> :only-child:is(
|
|
136
|
+
[data-slot="badge"],
|
|
137
|
+
[data-slot="trend-badge"],
|
|
138
|
+
[data-slot="button"][aria-label],
|
|
139
|
+
[data-slot="dropdown-menu-trigger"][aria-label]
|
|
140
|
+
)
|
|
141
|
+
)
|
|
142
|
+
) {
|
|
143
|
+
grid-column: 1;
|
|
144
|
+
grid-row: auto;
|
|
145
|
+
justify-self: start;
|
|
146
|
+
justify-content: flex-start;
|
|
147
|
+
margin-top: var(--spacing-nadicode-xs);
|
|
148
|
+
|
|
149
|
+
& > div {
|
|
150
|
+
justify-content: flex-start;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nadicodeai/ui",
|
|
3
|
-
"version": "12.1.
|
|
3
|
+
"version": "12.1.29",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"@assistant-ui/react": "0.15.21",
|
|
77
77
|
"@assistant-ui/react-markdown": "0.14.16",
|
|
78
78
|
"@base-ui/react": "^1.8.0",
|
|
79
|
-
"@nadicodeai/design-system": "12.1.
|
|
79
|
+
"@nadicodeai/design-system": "12.1.29",
|
|
80
80
|
"class-variance-authority": "^0.7.1",
|
|
81
81
|
"clsx": "^2.1.1",
|
|
82
82
|
"cmdk": "^1.1.1",
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
/**
|
|
3
|
-
* fact-cell — mono-kicker + claim content fill (replaces the retired `.nc-fact-cell`).
|
|
4
|
-
*
|
|
5
|
-
* A seam-free fill: it drops into a seam-owning grid (which paints the hairline gaps
|
|
6
|
-
* between cells), so it draws NO border and is square-cornered. It carries the canvas
|
|
7
|
-
* surface, a mono label, and a claim. `surface="ink"` inverts onto the ink role;
|
|
8
|
-
* `size="sm"` is the compact 86px action-card rhythm.
|
|
9
|
-
*
|
|
10
|
-
* Server-renderable: the ink inversion + sm claim sizing are applied by the parent
|
|
11
|
-
* to its descendants via `data-slot` descendant selectors (the retired CSS-cascade
|
|
12
|
-
* model), so sub-components stay style-light. Token-only; no `dark:` styling.
|
|
13
|
-
*/
|
|
14
|
-
declare function FactCell({ className, surface, size, ...props }: React.ComponentProps<"div"> & {
|
|
15
|
-
surface?: "canvas" | "ink";
|
|
16
|
-
size?: "default" | "sm";
|
|
17
|
-
}): React.JSX.Element;
|
|
18
|
-
declare function FactCellLabel({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
19
|
-
declare function FactCellClaim({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
20
|
-
export { FactCell, FactCellLabel, FactCellClaim };
|
|
21
|
-
//# sourceMappingURL=fact-cell.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fact-cell.d.ts","sourceRoot":"","sources":["../../src/components/fact-cell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B;;;;;;;;;;;GAWG;AAEH,iBAAS,QAAQ,CAAC,EAChB,SAAS,EACT,OAAkB,EAClB,IAAgB,EAChB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAC/B,OAAO,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC;IAC3B,IAAI,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;CACzB,qBAsBA;AAED,iBAAS,aAAa,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQ1E;AAED,iBAAS,aAAa,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQ1E;AAED,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { cn } from "../lib/utils.js";
|
|
3
|
-
/**
|
|
4
|
-
* fact-cell — mono-kicker + claim content fill (replaces the retired `.nc-fact-cell`).
|
|
5
|
-
*
|
|
6
|
-
* A seam-free fill: it drops into a seam-owning grid (which paints the hairline gaps
|
|
7
|
-
* between cells), so it draws NO border and is square-cornered. It carries the canvas
|
|
8
|
-
* surface, a mono label, and a claim. `surface="ink"` inverts onto the ink role;
|
|
9
|
-
* `size="sm"` is the compact 86px action-card rhythm.
|
|
10
|
-
*
|
|
11
|
-
* Server-renderable: the ink inversion + sm claim sizing are applied by the parent
|
|
12
|
-
* to its descendants via `data-slot` descendant selectors (the retired CSS-cascade
|
|
13
|
-
* model), so sub-components stay style-light. Token-only; no `dark:` styling.
|
|
14
|
-
*/
|
|
15
|
-
function FactCell({ className, surface = "canvas", size = "default", ...props }) {
|
|
16
|
-
return (_jsx("div", { "data-slot": "fact-cell", "data-surface": surface, "data-size": size, className: cn("grid content-center gap-1.5", size === "default" ? "min-h-24 p-6" : "min-h-[86px] p-4", surface === "canvas" && "bg-card", surface === "ink" && [
|
|
17
|
-
"bg-primary",
|
|
18
|
-
"[&_[data-slot=fact-cell-label]]:text-primary-foreground",
|
|
19
|
-
"[&_[data-slot=fact-cell-claim]]:text-primary-foreground",
|
|
20
|
-
], size === "sm" &&
|
|
21
|
-
"[&_[data-slot=fact-cell-claim]]:text-[15px] [&_[data-slot=fact-cell-claim]]:leading-5", className), ...props }));
|
|
22
|
-
}
|
|
23
|
-
function FactCellLabel({ className, ...props }) {
|
|
24
|
-
return (_jsx("div", { "data-slot": "fact-cell-label", className: cn("font-mono text-xs uppercase text-muted-foreground", className), ...props }));
|
|
25
|
-
}
|
|
26
|
-
function FactCellClaim({ className, ...props }) {
|
|
27
|
-
return (_jsx("div", { "data-slot": "fact-cell-claim", className: cn("text-lg leading-[1.2] text-foreground", className), ...props }));
|
|
28
|
-
}
|
|
29
|
-
export { FactCell, FactCellLabel, FactCellClaim };
|