@obosbbl/grunnmuren-react 3.1.2 → 3.1.3
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 +3 -3
- package/dist/index.mjs +29 -26
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -167,7 +167,7 @@ declare function Breadcrumbs(props: BreadcrumbsProps): react_jsx_runtime.JSX.Ele
|
|
|
167
167
|
*/
|
|
168
168
|
declare const buttonVariants: (props?: ({
|
|
169
169
|
variant?: "primary" | "secondary" | "tertiary" | undefined;
|
|
170
|
-
color?: "
|
|
170
|
+
color?: "blue" | "mint" | "white" | undefined;
|
|
171
171
|
isIconOnly?: boolean | undefined;
|
|
172
172
|
isPending?: boolean | undefined;
|
|
173
173
|
} & ({
|
|
@@ -194,7 +194,7 @@ type CardProps = VariantProps<typeof cardVariants> & HTMLAttributes<HTMLDivEleme
|
|
|
194
194
|
};
|
|
195
195
|
declare const cardVariants: (props?: ({
|
|
196
196
|
variant?: "subtle" | "outlined" | undefined;
|
|
197
|
-
layout?: "
|
|
197
|
+
layout?: "vertical" | "horizontal" | undefined;
|
|
198
198
|
} & ({
|
|
199
199
|
class?: cva.ClassValue;
|
|
200
200
|
className?: never;
|
|
@@ -351,7 +351,7 @@ type MediaProps = HTMLProps<HTMLDivElement> & VariantProps<typeof mediaVariant>
|
|
|
351
351
|
ref?: Ref<HTMLDivElement>;
|
|
352
352
|
};
|
|
353
353
|
declare const mediaVariant: (props?: ({
|
|
354
|
-
fit?: "
|
|
354
|
+
fit?: "cover" | "contain" | undefined;
|
|
355
355
|
} & ({
|
|
356
356
|
class?: cva.ClassValue;
|
|
357
357
|
className?: never;
|
package/dist/index.mjs
CHANGED
|
@@ -492,7 +492,7 @@ function isLinkProps$1(props) {
|
|
|
492
492
|
}
|
|
493
493
|
function Backlink(props) {
|
|
494
494
|
const { className, style, children, withUnderline, ref, ...restProps } = props;
|
|
495
|
-
const _className = cx(className, 'group flex
|
|
495
|
+
const _className = cx(className, 'group flex max-w-fit cursor-pointer items-center gap-3 rounded-md p-2.5 font-normal no-underline focus-visible:outline-focus');
|
|
496
496
|
const content = /*#__PURE__*/ jsxs(Fragment, {
|
|
497
497
|
children: [
|
|
498
498
|
/*#__PURE__*/ jsx(ChevronLeft, {
|
|
@@ -1079,33 +1079,36 @@ const Carousel = ({ className, children, onChange, ...rest })=>{
|
|
|
1079
1079
|
}
|
|
1080
1080
|
}, 150);
|
|
1081
1081
|
const handlePrevious = ()=>{
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1082
|
+
setScrollTargetIndex((currentTargetIndex)=>{
|
|
1083
|
+
const targetIndex = currentTargetIndex - 1;
|
|
1084
|
+
if (targetIndex < 0) {
|
|
1085
|
+
return currentTargetIndex;
|
|
1086
|
+
}
|
|
1087
|
+
if (isScrollingProgrammatically.current) {
|
|
1088
|
+
// If we're already scrolling, queue this action
|
|
1089
|
+
scrollQueue.current = [
|
|
1090
|
+
targetIndex
|
|
1091
|
+
];
|
|
1092
|
+
return currentTargetIndex;
|
|
1093
|
+
}
|
|
1094
|
+
return targetIndex;
|
|
1095
|
+
});
|
|
1094
1096
|
};
|
|
1095
1097
|
const handleNext = ()=>{
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1098
|
+
setScrollTargetIndex((currentTargetIndex)=>{
|
|
1099
|
+
const targetIndex = currentTargetIndex + 1;
|
|
1100
|
+
if (!carouselItemsRef.current || targetIndex >= carouselItemsRef.current.children.length) {
|
|
1101
|
+
return currentTargetIndex;
|
|
1102
|
+
}
|
|
1103
|
+
if (isScrollingProgrammatically.current) {
|
|
1104
|
+
// If we're already scrolling, queue this action
|
|
1105
|
+
scrollQueue.current = [
|
|
1106
|
+
targetIndex
|
|
1107
|
+
];
|
|
1108
|
+
return currentTargetIndex;
|
|
1109
|
+
}
|
|
1110
|
+
return targetIndex;
|
|
1111
|
+
});
|
|
1109
1112
|
};
|
|
1110
1113
|
return /*#__PURE__*/ jsx("div", {
|
|
1111
1114
|
"data-slot": "carousel",
|