Not pushed: Bryan compares it with the current test version first. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
349 lines
14 KiB
TypeScript
349 lines
14 KiB
TypeScript
import { createSystem, defaultConfig, defineConfig } from '@chakra-ui/react';
|
|
import carouselControlRecipe from './recipes/carouselControl';
|
|
import containerRecipe from './recipes/container';
|
|
import filterControlRecipe from './recipes/filterControl';
|
|
import formControlRecipe from './recipes/formControl';
|
|
import iconControlRecipe from './recipes/iconControl';
|
|
import linkRecipe from './recipes/link';
|
|
import linkButtonRecipe from './recipes/linkButton';
|
|
import skipNavLinkRecipe from './recipes/skipNavLink';
|
|
|
|
const config = defineConfig({
|
|
cssVarsRoot: ':where(:root, :host)',
|
|
cssVarsPrefix: 'slp',
|
|
preflight: true,
|
|
globalCss: {
|
|
html: {
|
|
// Chakra-componenten met een eigen focusring lezen deze variabele
|
|
'--focus-ring-color': '{colors.focusRing}',
|
|
},
|
|
// Eén focusstijl voor de hele site (BR-THEME-02)
|
|
'*:focus-visible': {
|
|
outlineWidth: '2px',
|
|
outlineStyle: 'solid',
|
|
outlineColor: 'var(--focus-ring-color)',
|
|
outlineOffset: '2px',
|
|
},
|
|
// Programmatische focusdoelen (main na een paginawissel) krijgen geen ring
|
|
'[tabindex="-1"]:focus': {
|
|
outline: 'none',
|
|
},
|
|
// The plain HTML between the CMS markers (components/CmsRegion): what
|
|
// the CMS host writes, shown until the styled cards take over after
|
|
// hydration. Looks like the cards (white, hairline border, centred),
|
|
// rows of three from lg (62em), one column below.
|
|
'.cms-offerings': {
|
|
listStyle: 'none',
|
|
margin: '0 auto',
|
|
padding: 0,
|
|
display: 'flex',
|
|
flexDirection: 'column',
|
|
gap: '{spacing.gridGap}',
|
|
maxWidth: '460px',
|
|
'@media (min-width: 62em)': {
|
|
flexDirection: 'row',
|
|
flexWrap: 'wrap',
|
|
justifyContent: 'center',
|
|
maxWidth: 'none',
|
|
},
|
|
},
|
|
'.cms-offering': {
|
|
background: 'white',
|
|
border: '1px solid {colors.line}',
|
|
padding: '2.5rem 1.5rem',
|
|
textAlign: 'center',
|
|
'@media (min-width: 62em)': {
|
|
width: 'calc((100% - 2 * {spacing.gridGap}) / 3)',
|
|
},
|
|
'&[data-featured]': {
|
|
borderColor: '{colors.accent}',
|
|
boxShadow: 'inset 0 3px 0 {colors.accent}',
|
|
},
|
|
},
|
|
'.cms-offering h3': {
|
|
fontFamily: '{fonts.heading}',
|
|
fontSizeAdjust: '0.43',
|
|
fontWeight: '500',
|
|
fontSize: '1.5rem',
|
|
margin: '0 0 0.75rem',
|
|
},
|
|
'.cms-price': {
|
|
fontFamily: '{fonts.heading}',
|
|
fontSizeAdjust: '0.43',
|
|
fontVariantNumeric: 'lining-nums',
|
|
fontSize: '2.25rem',
|
|
lineHeight: 1,
|
|
color: '{colors.accent.deep}',
|
|
margin: '0 0 1.5rem',
|
|
},
|
|
'.cms-features': {
|
|
listStyle: 'none',
|
|
margin: '0 0 2rem',
|
|
padding: '1.5rem 0',
|
|
borderBlock: '1px solid {colors.line}',
|
|
color: '{colors.ink.soft}',
|
|
fontSize: '0.875rem',
|
|
},
|
|
'.cms-features li + li': { marginTop: '0.75rem' },
|
|
'.cms-offering a': {
|
|
color: '{colors.accent.deep}',
|
|
textDecoration: 'underline',
|
|
textUnderlineOffset: '3px',
|
|
},
|
|
'.cms-banner': {
|
|
display: 'block',
|
|
background: 'white',
|
|
border: '1px solid {colors.line}',
|
|
borderTop: '3px solid {colors.accent}',
|
|
padding: '1rem 1.5rem',
|
|
marginBlock: '{spacing.gridGap}',
|
|
textAlign: 'center',
|
|
color: '{colors.ink.soft}',
|
|
},
|
|
'.cms-banner strong': {
|
|
fontFamily: '{fonts.heading}',
|
|
fontSizeAdjust: '0.43',
|
|
fontWeight: '500',
|
|
letterSpacing: '0.14em',
|
|
textTransform: 'uppercase',
|
|
color: '{colors.ink}',
|
|
},
|
|
'.cms-banner a': {
|
|
color: '{colors.accent.deep}',
|
|
textDecoration: 'underline',
|
|
textUnderlineOffset: '3px',
|
|
},
|
|
},
|
|
theme: {
|
|
// Use default breakpoints from Chakra UI when breakpoints are commented out. Uncomment the breakpoints below for custom breakpoints.
|
|
// breakpoints: {
|
|
// sm: '480px',
|
|
// md: '768px',
|
|
// lg: '1024px',
|
|
// xl: '1280px',
|
|
// '2xl': '1536px',
|
|
// },
|
|
tokens: {
|
|
// Palet uit design/andreaslop-static (:root in style.css)
|
|
colors: {
|
|
paper: {
|
|
DEFAULT: { value: '#faf7f2' }, // hoofdachtergrond, warm papier
|
|
alt: { value: '#f1ebe2' }, // secundaire secties
|
|
deep: { value: '#e8e0d5' }, // randen van blokken, hover-vlakken
|
|
},
|
|
ink: {
|
|
DEFAULT: { value: '#232120' }, // koppen en hoofdtekst
|
|
soft: { value: '#55504b' }, // lopende tekst
|
|
muted: { value: '#8a827a' }, // bijschriften, meta
|
|
},
|
|
line: { value: '#e2dad0' }, // hairlines
|
|
accent: {
|
|
DEFAULT: { value: '#7f8b76' }, // heidegroen
|
|
// Text and buttons in heidegroen: white on it meets 4.5:1
|
|
deep: { value: '#5f6a58' },
|
|
// Hover on a deep-green button (deep at 75%)
|
|
deeper: { value: '#475042' },
|
|
},
|
|
sand: { value: '#d9cdbc' }, // zachte vlakken en decoratie
|
|
// Blocks behind the shoot photos, one per shoot type, taken
|
|
// from the live page. Decoration only, never behind text.
|
|
frame: {
|
|
stone: { value: '#aba699' },
|
|
rust: { value: '#975030' },
|
|
taupe: { value: '#a18679' },
|
|
olive: { value: '#84847c' },
|
|
},
|
|
// Form errors: the design's #a4443a, 5.7:1 on paper, 6.1:1 on white
|
|
error: { value: '#a4443a' },
|
|
},
|
|
fonts: {
|
|
heading: {
|
|
value: "'Cormorant Garamond', 'Cormorant Garamond Fallback', Georgia, 'Times New Roman', serif",
|
|
},
|
|
body: {
|
|
value: "'Mulish', 'Mulish Fallback', 'Helvetica Neue', Helvetica, Arial, sans-serif",
|
|
},
|
|
},
|
|
fontSizes: {
|
|
eyebrow: { value: '0.72rem' },
|
|
},
|
|
letterSpacings: {
|
|
caps: { value: '0.22em' }, // hoofdletterlabels: eyebrows, knoppen, nav
|
|
},
|
|
spacing: {
|
|
gutter: { value: 'clamp(1.25rem, 4vw, 3rem)' }, // zijmarge van de pagina
|
|
// Vertical rhythm of homepage sections (design --section-y)
|
|
sectionY: { value: 'clamp(4.5rem, 9vw, 8.5rem)' },
|
|
sectionYTight: { value: 'clamp(2.7rem, 5.4vw, 5.1rem)' },
|
|
// Space below a section heading (design .section__head)
|
|
sectionHeadGap: { value: 'clamp(2.5rem, 5vw, 4.5rem)' },
|
|
// Gap between grid items such as photos and cards (design --gap)
|
|
gridGap: { value: 'clamp(1rem, 2.2vw, 2rem)' },
|
|
},
|
|
easings: {
|
|
smooth: { value: 'cubic-bezier(.22, .61, .36, 1)' },
|
|
},
|
|
durations: {
|
|
interaction: { value: '0.45s' }, // hover, focus
|
|
fade: { value: '1.2s' }, // overvloeien van foto's
|
|
reveal: { value: '0.8s' }, // fade-in of sections on scroll
|
|
swap: { value: '0.3s' }, // crossfade between photos in the lightbox
|
|
},
|
|
// Stapelvolgorde van de vaste shell-onderdelen, van laag naar hoog
|
|
zIndex: {
|
|
backToTop: { value: 8 },
|
|
mobileNav: { value: 9 },
|
|
header: { value: 10 },
|
|
// Binnen de header: de hamburger boven het logo en menu
|
|
menuToggle: { value: 1 },
|
|
},
|
|
shadows: {
|
|
// Soft shadow under a floating panel (design --shadow-md)
|
|
panel: {
|
|
value: '0 12px 40px color-mix(in srgb, {colors.ink} 12%, transparent)',
|
|
},
|
|
},
|
|
gradients: {
|
|
// Donker verloop over hero-foto's, zodat witte tekst leesbaar blijft
|
|
scrim: {
|
|
value:
|
|
'linear-gradient(to bottom, ' +
|
|
'color-mix(in srgb, {colors.ink} 45%, transparent) 0%, ' +
|
|
'color-mix(in srgb, {colors.ink} 18%, transparent) 35%, ' +
|
|
'color-mix(in srgb, {colors.ink} 45%, transparent) 100%)',
|
|
},
|
|
},
|
|
},
|
|
semanticTokens: {
|
|
colors: {
|
|
bg: {
|
|
DEFAULT: {
|
|
value: {
|
|
_light: '{colors.paper}',
|
|
_dark: '{colors.gray.800}',
|
|
},
|
|
},
|
|
},
|
|
fg: {
|
|
DEFAULT: {
|
|
value: {
|
|
_light: '{colors.ink}',
|
|
_dark: '{colors.gray.50}',
|
|
},
|
|
},
|
|
},
|
|
// Kleur van de focusring; op foto's zet iconControl hem op wit
|
|
focusRing: {
|
|
value: {
|
|
_light: '{colors.accent.deep}',
|
|
_dark: '{colors.white}',
|
|
},
|
|
},
|
|
},
|
|
sizes: {
|
|
header: {
|
|
// Hoogte van de navigatiebalk (h="header")
|
|
DEFAULT: { value: { base: '66px', lg: '92px' } },
|
|
// Na scrollen; op mobiel krimpt de balk niet
|
|
sticky: { value: { base: '66px', lg: '68px' } },
|
|
},
|
|
// Maximale breedte van de content (Container en de to-top-knop)
|
|
content: { value: '{sizes.8xl}' },
|
|
// Narrow content column, e.g. the contact form (design --container-narrow)
|
|
contentNarrow: { value: '820px' },
|
|
},
|
|
spacing: {
|
|
// Zelfde waarde voor content die onder de balk begint (pt="header")
|
|
header: {
|
|
DEFAULT: { value: '{sizes.header}' },
|
|
// Waar een anker onder de (dan al gekrompen) balk landt
|
|
sticky: { value: '{sizes.header.sticky}' },
|
|
},
|
|
// Begin van de inhoud op een gewone pagina: onder de balk, met lucht
|
|
pageTop: {
|
|
value: 'calc({sizes.header} + clamp(3rem, 7vw, 6rem))',
|
|
},
|
|
},
|
|
},
|
|
textStyles: {
|
|
// Klein label in hoofdletters boven een kop
|
|
eyebrow: {
|
|
value: {
|
|
fontSize: 'eyebrow',
|
|
letterSpacing: 'caps',
|
|
textTransform: 'uppercase',
|
|
},
|
|
},
|
|
// Grote titel in de hero
|
|
display: {
|
|
value: {
|
|
fontFamily: 'heading',
|
|
fontSizeAdjust: '0.43',
|
|
fontSize: { base: '2.75rem', md: '3.75rem', xl: '5rem' },
|
|
lineHeight: '1',
|
|
},
|
|
},
|
|
// The h2 of a section block (SectionHeading): letter-spaced
|
|
// capitals, as on the live site. 26px on phones, 30px from md.
|
|
sectionHeading: {
|
|
value: {
|
|
fontFamily: 'heading',
|
|
fontSizeAdjust: '0.43',
|
|
fontSize: { base: '1.625rem', md: '1.875rem' },
|
|
lineHeight: '1.15',
|
|
letterSpacing: 'caps',
|
|
textTransform: 'uppercase',
|
|
},
|
|
},
|
|
// Plain h2 in blocks that do not use SectionHeading (call to
|
|
// action, packages, shoot and story blocks); smaller than the
|
|
// design's 2.5rem at the owner's request, 30px at every width
|
|
sectionTitle: {
|
|
value: {
|
|
fontFamily: 'heading',
|
|
fontSizeAdjust: '0.43',
|
|
fontSize: '1.875rem',
|
|
lineHeight: '1.15',
|
|
},
|
|
},
|
|
// Intro sentence below a section heading
|
|
lead: {
|
|
value: {
|
|
fontSize: '1.25rem',
|
|
fontWeight: '300',
|
|
lineHeight: '1.6',
|
|
},
|
|
},
|
|
// De h1 van een gewone pagina (PageIntro, StatusPage)
|
|
pageTitle: {
|
|
value: {
|
|
fontFamily: 'heading',
|
|
fontSizeAdjust: '0.43',
|
|
fontSize: { base: '2.25rem', md: '2.75rem', lg: '3.25rem' },
|
|
lineHeight: '1.15',
|
|
},
|
|
},
|
|
},
|
|
recipes: {
|
|
// Koppen zijn in het design niet vet en iets gespatieerd
|
|
heading: {
|
|
base: {
|
|
fontWeight: '500',
|
|
fontSizeAdjust: '0.43',
|
|
letterSpacing: '0.01em',
|
|
},
|
|
},
|
|
container: containerRecipe,
|
|
link: linkRecipe,
|
|
skipNavLink: skipNavLinkRecipe,
|
|
linkButton: linkButtonRecipe,
|
|
iconControl: iconControlRecipe,
|
|
carouselControl: carouselControlRecipe,
|
|
formControl: formControlRecipe,
|
|
filterControl: filterControlRecipe,
|
|
},
|
|
},
|
|
});
|
|
|
|
export default createSystem(defaultConfig, config);
|