feat(WEB-304): remaning UI from design system primitives

This commit is contained in:
Simon Emanuelsson
2024-06-07 10:36:23 +02:00
parent 6737970f54
commit 7c4b8401e9
228 changed files with 3516 additions and 3237 deletions
@@ -1,58 +0,0 @@
.gridContainer {
display: grid;
gap: 1.6rem;
}
.carousel {
display: grid;
grid-auto-columns: 80dvw;
grid-auto-flow: column;
gap: 1.6rem;
margin-left: -1.6rem;
margin-right: -1.6rem;
padding-left: 1.6rem;
overflow-x: scroll;
scroll-padding-left: 1.6rem;
scroll-snap-type: x mandatory;
scrollbar-width: none;
/* Hide scrollbar IE and Edge */
-ms-overflow-style: none;
/* Hide Scrollbar Firefox */
}
.carousel:last-child {
margin-right: 1.6rem;
}
.carousel > * {
scroll-snap-align: start;
}
/* Hide Scrollbar Chrome, Safari and Opera */
.gridContainer::-webkit-scrollbar {
display: none;
}
@media screen and (min-width: 1367px) {
.twoColumnGrid,
.twoPlusOne {
grid-template-columns: repeat(2, 1fr);
}
.threeColumnGrid {
grid-template-columns: repeat(3, 1fr);
}
.twoPlusOne > *:last-child {
grid-column: span 2;
}
.carousel {
grid-auto-flow: unset;
margin: 0;
padding: 0;
}
}
@@ -1,7 +0,0 @@
import { cardGridVariants } from "./variants"
import type { VariantProps } from "class-variance-authority"
export interface CardGridProps
extends React.HTMLAttributes<HTMLDivElement>,
VariantProps<typeof cardGridVariants> {}
@@ -1,23 +0,0 @@
import React, { PropsWithChildren } from "react"
import { CardGridProps } from "./cardGrid"
import { cardGridVariants } from "./variants"
export default function CardGrid({
children,
isMobileCarousel = false,
className,
variant,
}: PropsWithChildren<CardGridProps>) {
return (
<section
className={cardGridVariants({
className,
variant,
isMobileCarousel,
})}
>
{children}
</section>
)
}
@@ -1,19 +0,0 @@
import { cva } from "class-variance-authority"
import styles from "./cardGrid.module.css"
export const cardGridVariants = cva(styles.gridContainer, {
variants: {
isMobileCarousel: {
true: styles.carousel,
},
variant: {
twoColumnGrid: styles.twoColumnGrid,
threeColumnGrid: styles.threeColumnGrid,
twoPlusOne: styles.twoPlusOne,
},
},
defaultVariants: {
variant: "threeColumnGrid",
},
})