@obosbbl/grunnmuren-react 3.0.6 → 3.0.8
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/index.d.mts +1 -1
- package/dist/index.mjs +12 -10
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -458,7 +458,7 @@ declare const cardVariants: (props?: ({
|
|
|
458
458
|
class?: never;
|
|
459
459
|
className?: cva.ClassValue;
|
|
460
460
|
})) | undefined) => string;
|
|
461
|
-
declare const Card: ({ children, className
|
|
461
|
+
declare const Card: ({ children, className, variant, layout, ...restProps }: CardProps) => react_jsx_runtime.JSX.Element;
|
|
462
462
|
type CardLinkWrapperProps = {
|
|
463
463
|
children?: React.ReactNode;
|
|
464
464
|
className?: string;
|
package/dist/index.mjs
CHANGED
|
@@ -1117,7 +1117,8 @@ function Backlink(props) {
|
|
|
1117
1117
|
const cardVariants = cva({
|
|
1118
1118
|
base: [
|
|
1119
1119
|
'group/card',
|
|
1120
|
-
'rounded-
|
|
1120
|
+
'rounded-[inherit]',
|
|
1121
|
+
'border p-3',
|
|
1121
1122
|
'flex flex-col gap-y-4',
|
|
1122
1123
|
'relative',
|
|
1123
1124
|
// **** Content ****
|
|
@@ -1229,17 +1230,18 @@ const cardVariants = cva({
|
|
|
1229
1230
|
}
|
|
1230
1231
|
]
|
|
1231
1232
|
});
|
|
1232
|
-
const Card = ({ children, className
|
|
1233
|
-
const
|
|
1234
|
-
className: _className,
|
|
1233
|
+
const Card = ({ children, className, variant, layout, ...restProps })=>{
|
|
1234
|
+
const cardClassName = cardVariants({
|
|
1235
1235
|
variant,
|
|
1236
1236
|
layout
|
|
1237
1237
|
});
|
|
1238
|
-
return
|
|
1239
|
-
|
|
1238
|
+
return(// The border-radius is set on the outer container to make it act as an invisible wrapper, only used for container queries
|
|
1239
|
+
// Since passing the className prop to this container is necessary to make custom styles behave as expected, we need to apply the border-radius here incase the consumer passes a custom background color
|
|
1240
|
+
/*#__PURE__*/ jsx("div", {
|
|
1241
|
+
...restProps,
|
|
1242
|
+
className: cx(className, '@container rounded-2xl'),
|
|
1240
1243
|
children: /*#__PURE__*/ jsx("div", {
|
|
1241
|
-
className:
|
|
1242
|
-
...restProps,
|
|
1244
|
+
className: cardClassName,
|
|
1243
1245
|
children: /*#__PURE__*/ jsx(Provider, {
|
|
1244
1246
|
values: [
|
|
1245
1247
|
[
|
|
@@ -1272,7 +1274,7 @@ const Card = ({ children, className: _className, variant, layout, ...restProps }
|
|
|
1272
1274
|
children: children
|
|
1273
1275
|
})
|
|
1274
1276
|
})
|
|
1275
|
-
});
|
|
1277
|
+
}));
|
|
1276
1278
|
};
|
|
1277
1279
|
const cardLinkVariants = cva({
|
|
1278
1280
|
base: 'w-fit max-w-full',
|
|
@@ -2513,7 +2515,7 @@ const LinkList = ({ className, children, ...restProps })=>{
|
|
|
2513
2515
|
'grid auto-rows-max gap-y-0.25', // Gaps for when the list is displayed in multiple columns
|
|
2514
2516
|
'@lg:gap-x-12 @md:gap-x-9 @sm:gap-x-4 @xl:gap-x-16', numberofLinks > 5 && [
|
|
2515
2517
|
'@xl:grid-cols-2',
|
|
2516
|
-
numberofLinks > 10 && '@4xl:grid-cols-3'
|
|
2518
|
+
(numberofLinks === 9 || numberofLinks > 10) && '@4xl:grid-cols-3'
|
|
2517
2519
|
]),
|
|
2518
2520
|
children: children
|
|
2519
2521
|
})
|