@brightlocal/ui-components 2.13.0 → 2.14.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.
- package/component-meta.json +5 -4
- package/dist/card.cjs +1 -1
- package/dist/card.d.ts +5 -1
- package/dist/card.d.ts.map +1 -1
- package/dist/card.js +48 -31
- package/dist/index.cjs +1 -1
- package/dist/index.js +452 -451
- package/package.json +2 -2
- package/src/components/card.tsx +23 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brightlocal/ui-components",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.14.0",
|
|
4
4
|
"description": "BrightLocal Design System UI Components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
@@ -185,7 +185,7 @@
|
|
|
185
185
|
"sonner": "^2.0.7",
|
|
186
186
|
"tailwind-merge": "^3.4.0",
|
|
187
187
|
"vaul": "^1.1.2",
|
|
188
|
-
"@brightlocal/icons": "2.
|
|
188
|
+
"@brightlocal/icons": "2.3.0"
|
|
189
189
|
},
|
|
190
190
|
"size-limit": [
|
|
191
191
|
{
|
package/src/components/card.tsx
CHANGED
|
@@ -228,6 +228,28 @@ const CardAction = React.forwardRef<HTMLDivElement, CardSubComponentProps>(
|
|
|
228
228
|
);
|
|
229
229
|
CardAction.displayName = "CardAction";
|
|
230
230
|
|
|
231
|
+
/**
|
|
232
|
+
* Media container for images, videos, or other visual content within the Card.
|
|
233
|
+
*/
|
|
234
|
+
const CardMedia = React.forwardRef<HTMLDivElement, CardSubComponentProps>(
|
|
235
|
+
({ className, children, ...props }, ref) => {
|
|
236
|
+
const { flush, density } = React.useContext(CardContext);
|
|
237
|
+
return (
|
|
238
|
+
<div
|
|
239
|
+
ref={ref}
|
|
240
|
+
className={cn(subPadding(flush, density), className)}
|
|
241
|
+
data-slot="card-media"
|
|
242
|
+
{...props}
|
|
243
|
+
>
|
|
244
|
+
<div className="overflow-hidden rounded-md" data-slot="card-media-clip">
|
|
245
|
+
{children}
|
|
246
|
+
</div>
|
|
247
|
+
</div>
|
|
248
|
+
);
|
|
249
|
+
}
|
|
250
|
+
);
|
|
251
|
+
CardMedia.displayName = "CardMedia";
|
|
252
|
+
|
|
231
253
|
/**
|
|
232
254
|
* Main content area of the Card.
|
|
233
255
|
*/
|
|
@@ -275,6 +297,7 @@ export {
|
|
|
275
297
|
CardTitle,
|
|
276
298
|
CardAction,
|
|
277
299
|
CardDescription,
|
|
300
|
+
CardMedia,
|
|
278
301
|
CardContent,
|
|
279
302
|
};
|
|
280
303
|
|