Merge branch 'master' into feature/tracking

This commit is contained in:
Linus Flood
2024-11-18 12:20:13 +01:00
240 changed files with 5429 additions and 2717 deletions

View File

@@ -83,7 +83,7 @@ export default function DateSelect({ name, registerOptions = {} }: DateProps) {
.date(Number(day))
if (newDate.isValid()) {
setValue(name, newDate.format("YYYY-MM-D"), {
setValue(name, newDate.format("YYYY-MM-DD"), {
shouldDirty: true,
shouldTouch: true,
shouldValidate: true,

View File

@@ -1,7 +1,7 @@
import { useMemo } from "react"
import { useFormContext } from "react-hook-form"
import { HeartIcon } from "@/components/Icons"
import { HeartIcon, InfoCircleIcon } from "@/components/Icons"
import Caption from "@/components/TempDesignSystem/Text/Caption"
import styles from "./chip.module.css"
@@ -19,6 +19,7 @@ export default function FilterChip({
value,
selected,
disabled,
hasTooltip,
}: FilterChipProps) {
const { register } = useFormContext()
@@ -43,6 +44,11 @@ export default function FilterChip({
<Caption type="bold" color={color} className={styles.caption}>
{label}
</Caption>
{hasTooltip && (
<InfoCircleIcon color={color} height={iconHeight} width={iconWidth} />
)}
<input
aria-hidden
id={id || name}

View File

@@ -18,6 +18,12 @@ span.regular {
order: 1;
}
span.discreet {
color: var(--Base-Text-High-contrast);
font-weight: 500;
order: unset;
}
input:active ~ .label,
input:not(:placeholder-shown) ~ .label {
display: block;

View File

@@ -7,6 +7,7 @@ export const labelVariants = cva(styles.label, {
size: {
small: styles.small,
regular: styles.regular,
discreet: styles.discreet,
},
},
defaultVariants: {

View File

@@ -2,10 +2,12 @@ import { ChevronDownIcon } from "@/components/Icons"
import styles from "./chevron.module.css"
export default function SelectChevron() {
import type { IconProps } from "@/types/components/icon"
export default function SelectChevron(props: IconProps) {
return (
<span aria-hidden="true" className={styles.chevron}>
<ChevronDownIcon color="grey80" width={20} height={20} />
<ChevronDownIcon color="grey80" width={20} height={20} {...props} />
</span>
)
}