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

View File

@@ -1,4 +1,4 @@
import { NavigationItem } from "@/server/routers/contentstack/config/output"
import { NavigationItem } from "@/server/routers/contentstack/base/output"
export type FooterNavigationProps = {
linkGroups: NavigationItem[]

View File

@@ -1,4 +1,7 @@
export type IconProps = {
height?: number
width?: number
}
import { VariantProps } from "class-variance-authority"
import { iconVariants } from "@/components/Icons/variants"
export interface IconProps
extends Omit<React.SVGAttributes<HTMLOrSVGElement>, "color">,
VariantProps<typeof iconVariants> {}

View File

@@ -17,6 +17,7 @@ export type BlocksProps = {
export type DynamicContentProps = {
dynamicContent: DynamicContent["dynamic_content"]
firstItem: boolean
}
export type DynamicComponentProps = {

View File

@@ -1,14 +1,16 @@
import { ContactFields } from "@/server/routers/contentstack/config/output"
import { ContactFields } from "@/server/routers/contentstack/base/output"
import {
JoinLoyaltyContact,
Sidebar,
} from "@/server/routers/contentstack/loyaltyPage/output"
export type SidebarProps = {
import { LangParams } from "@/types/params"
export type SidebarProps = LangParams & {
blocks: Sidebar[]
}
export type JoinLoyaltyContactProps = {
export type JoinLoyaltyContactProps = LangParams & {
block: JoinLoyaltyContact["join_loyalty_contact"]
}

View File

@@ -1,5 +1,8 @@
export type HeaderProps = {
link?: { href: string; text: string }
link?: {
href: string
text: string
}
subtitle: string | null
title: string | null
topTitle?: boolean

View File

@@ -1,4 +1,5 @@
export type ShortcutsProps = {
firstItem?: boolean
openInNewTab?: boolean
shortcuts: {
url: string

View File

@@ -1,82 +0,0 @@
import { PageLinkEnum } from "../pageLinks"
import type { Lang } from "@/constants/languages"
import type { System } from "../system"
import type { AllRequestResponse } from "../utils/all"
import type { Edges } from "../utils/edges"
import type { TypenameInterface } from "../utils/typename"
export type MenuItem = {
lang: Lang
linkText: string
uid: string
url: string
originalUrl?: string
subItems?: MenuItem[]
}
interface NavigationLink {
system: {
locale: Lang
uid: string
}
title: string
url: string
web?: { original_url: string }
}
export interface AccountPageLink
extends NavigationLink,
TypenameInterface<PageLinkEnum.AccountPage> {}
export interface LoyaltyPageLink
extends NavigationLink,
TypenameInterface<PageLinkEnum.LoyaltyPage> {}
export interface ContentPageLink
extends NavigationLink,
TypenameInterface<PageLinkEnum.ContentPage> {}
export type PageLink = ContentPageLink | AccountPageLink | LoyaltyPageLink
interface Item {
link_text: string
pageConnection: Edges<PageLink>
}
interface ItemWithSubitem extends Item {
sub_items: NavigationItem[]
}
export type NavigationItem = {
item: Item | ItemWithSubitem
}
export type NavigationMyPages = {
items: NavigationItem[]
title: string
}
export type GetNavigationMyPagesData = {
all_navigation_my_pages: AllRequestResponse<NavigationMyPages>
}
/** Refs Request */
type NavigationItemRef = {
item: {
pageConnection: Edges<System>
sub_items: {
item: {
pageConnection: Edges<System>
}
}[]
}
}
interface NavigationMyPagesRefs extends System {
items: NavigationItemRef[]
}
export type GetNavigationMyPagesRefsData = {
all_navigation_my_pages: AllRequestResponse<NavigationMyPagesRefs>
}