feat: guest information form enter details
This commit is contained in:
@@ -0,0 +1,70 @@
|
||||
.checkbox {
|
||||
background-color: var(--Base-Surface-Primary-light-Normal);
|
||||
border: 1px solid var(--Base-Border-Subtle);
|
||||
border-radius: var(--Corner-radius-Large);
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--Spacing-x1);
|
||||
padding: var(--Spacing-x-one-and-half) var(--Spacing-x2);
|
||||
transition: all 200ms ease;
|
||||
width: min(100%, 600px);
|
||||
}
|
||||
|
||||
.checkbox:hover {
|
||||
background-color: var(--Base-Surface-Secondary-light-Hover);
|
||||
}
|
||||
|
||||
.checkbox:has(:checked) {
|
||||
background-color: var(--Primary-Light-Surface-Normal);
|
||||
border-color: var(--Base-Border-Hover);
|
||||
}
|
||||
|
||||
.header {
|
||||
align-items: center;
|
||||
display: grid;
|
||||
gap: 0px var(--Spacing-x1);
|
||||
grid-template-areas:
|
||||
"title icon"
|
||||
"subtitle icon";
|
||||
}
|
||||
|
||||
.icon {
|
||||
grid-area: icon;
|
||||
justify-self: flex-end;
|
||||
transition: fill 200ms ease;
|
||||
}
|
||||
|
||||
.checkbox:hover .icon,
|
||||
.checkbox:hover .icon *,
|
||||
.checkbox:has(:checked) .icon,
|
||||
.checkbox:has(:checked) .icon * {
|
||||
fill: var(--Base-Text-Medium-contrast);
|
||||
}
|
||||
|
||||
.checkbox[data-declined="true"]:hover .icon,
|
||||
.checkbox[data-declined="true"]:hover .icon *,
|
||||
.checkbox[data-declined="true"]:has(:checked) .icon,
|
||||
.checkbox[data-declined="true"]:has(:checked) .icon * {
|
||||
fill: var(--Base-Text-Disabled);
|
||||
}
|
||||
|
||||
.subtitle {
|
||||
grid-area: subtitle;
|
||||
}
|
||||
|
||||
.title {
|
||||
grid-area: title;
|
||||
}
|
||||
|
||||
.list {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.listItem {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
gap: var(--Spacing-x-quarter);
|
||||
}
|
||||
14
components/TempDesignSystem/Form/Checkbox/Card/card.ts
Normal file
14
components/TempDesignSystem/Form/Checkbox/Card/card.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import type { IconProps } from "@/types/components/icon"
|
||||
|
||||
export interface CheckboxCardProps {
|
||||
Icon?: (props: IconProps) => JSX.Element
|
||||
declined?: boolean
|
||||
list?: {
|
||||
title: string
|
||||
}[]
|
||||
name?: string
|
||||
saving?: boolean
|
||||
subtitle?: string
|
||||
text?: string
|
||||
title: string
|
||||
}
|
||||
65
components/TempDesignSystem/Form/Checkbox/Card/index.tsx
Normal file
65
components/TempDesignSystem/Form/Checkbox/Card/index.tsx
Normal file
@@ -0,0 +1,65 @@
|
||||
"use client"
|
||||
|
||||
import { CheckIcon, CloseIcon, HeartIcon } from "@/components/Icons"
|
||||
import Caption from "@/components/TempDesignSystem/Text/Caption"
|
||||
import Footnote from "@/components/TempDesignSystem/Text/Footnote"
|
||||
|
||||
import styles from "./card.module.css"
|
||||
|
||||
import type { CheckboxCardProps } from "./card"
|
||||
|
||||
export default function CheckboxCard({
|
||||
Icon = HeartIcon,
|
||||
declined = false,
|
||||
list,
|
||||
name = "join",
|
||||
saving = false,
|
||||
subtitle,
|
||||
text,
|
||||
title,
|
||||
}: CheckboxCardProps) {
|
||||
return (
|
||||
<label className={styles.checkbox} data-declined={declined} htmlFor={name}>
|
||||
<header className={styles.header}>
|
||||
<Caption className={styles.title} textTransform="bold" uppercase>
|
||||
{title}
|
||||
</Caption>
|
||||
{subtitle ? (
|
||||
<Caption
|
||||
className={styles.subtitle}
|
||||
color={saving ? "baseTextAccent" : "uiTextHighContrast"}
|
||||
textTransform="bold"
|
||||
>
|
||||
{subtitle}
|
||||
</Caption>
|
||||
) : null}
|
||||
<Icon
|
||||
className={styles.icon}
|
||||
color="uiTextHighContrast"
|
||||
height={32}
|
||||
width={32}
|
||||
/>
|
||||
</header>
|
||||
{list ? (
|
||||
<ul className={styles.list}>
|
||||
{list.map((listItem) => (
|
||||
<li key={listItem.title} className={styles.listItem}>
|
||||
{declined ? (
|
||||
<CloseIcon
|
||||
color="uiTextMediumContrast"
|
||||
height={20}
|
||||
width={20}
|
||||
/>
|
||||
) : (
|
||||
<CheckIcon color="baseIconLowContrast" height={20} width={20} />
|
||||
)}
|
||||
<Footnote color="uiTextMediumContrast">{listItem.title}</Footnote>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
) : null}
|
||||
{text ? <Footnote color="uiTextMediumContrast">{text}</Footnote> : null}
|
||||
<input aria-hidden id={name} hidden name={name} type="checkbox" />
|
||||
</label>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user