@sfgov/design-system 0.0.0-0969b8a

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (157) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +7 -0
  3. package/css/base.css +2 -0
  4. package/css/base.css.map +1 -0
  5. package/css/components.css +2 -0
  6. package/css/components.css.map +1 -0
  7. package/css/fonts.css +2 -0
  8. package/css/fonts.css.map +1 -0
  9. package/css/icons.css +2 -0
  10. package/css/icons.css.map +1 -0
  11. package/css/overrides.css +2 -0
  12. package/css/overrides.css.map +1 -0
  13. package/css/sfds.css +2 -0
  14. package/css/sfds.css.map +1 -0
  15. package/css/src/base.css +26 -0
  16. package/css/src/components/button.css +61 -0
  17. package/css/src/components/details.css +10 -0
  18. package/css/src/components/grid.css +12 -0
  19. package/css/src/components/index.css +4 -0
  20. package/css/src/components/kbd.css +5 -0
  21. package/css/src/components.css +1 -0
  22. package/css/src/fonts.css +1 -0
  23. package/css/src/icons.css +7 -0
  24. package/css/src/overrides.css +3 -0
  25. package/css/src/sfds.css +6 -0
  26. package/css/src/theme.js +104 -0
  27. package/css/src/tokens/breakpoints.js +5 -0
  28. package/css/src/tokens/colors.js +116 -0
  29. package/css/src/tokens/index.js +8 -0
  30. package/css/src/tokens/spacing.js +27 -0
  31. package/css/src/tokens/typography.js +66 -0
  32. package/css/src/tokens/widths.js +11 -0
  33. package/css/src/typography.css +103 -0
  34. package/css/src/utilities.css +1 -0
  35. package/css/typography.css +2 -0
  36. package/css/typography.css.map +1 -0
  37. package/css/utilities.css +2 -0
  38. package/css/utilities.css.map +1 -0
  39. package/css/utilities.json +7350 -0
  40. package/elements/index.d.mts +30 -0
  41. package/elements/index.d.mts.map +1 -0
  42. package/elements/index.d.ts +30 -0
  43. package/elements/index.d.ts.map +1 -0
  44. package/elements/index.js +1 -0
  45. package/elements/index.mjs +1 -0
  46. package/elements/src/index.js +7 -0
  47. package/elements/src/sfgov-icon.js +109 -0
  48. package/icons/index.json +439 -0
  49. package/icons/svg/accessibility.svg +4 -0
  50. package/icons/svg/alert.svg +5 -0
  51. package/icons/svg/archive.svg +4 -0
  52. package/icons/svg/arrow-down.svg +3 -0
  53. package/icons/svg/arrow-left.svg +3 -0
  54. package/icons/svg/arrow-right.svg +3 -0
  55. package/icons/svg/arrow-up.svg +3 -0
  56. package/icons/svg/building.svg +7 -0
  57. package/icons/svg/calendar.svg +3 -0
  58. package/icons/svg/caution.svg +3 -0
  59. package/icons/svg/chart.svg +6 -0
  60. package/icons/svg/check.svg +3 -0
  61. package/icons/svg/chevron-down.svg +3 -0
  62. package/icons/svg/chevron-left.svg +3 -0
  63. package/icons/svg/chevron-right.svg +3 -0
  64. package/icons/svg/chevron-up.svg +3 -0
  65. package/icons/svg/clock.svg +4 -0
  66. package/icons/svg/close.svg +3 -0
  67. package/icons/svg/document.svg +3 -0
  68. package/icons/svg/globe.svg +3 -0
  69. package/icons/svg/hamburger-button.svg +5 -0
  70. package/icons/svg/index.json +346 -0
  71. package/icons/svg/info.svg +5 -0
  72. package/icons/svg/location.svg +4 -0
  73. package/icons/svg/mail.svg +3 -0
  74. package/icons/svg/minus.svg +3 -0
  75. package/icons/svg/pencil.svg +3 -0
  76. package/icons/svg/phone.svg +3 -0
  77. package/icons/svg/plus.svg +3 -0
  78. package/icons/svg/question.svg +4 -0
  79. package/icons/svg/search.svg +3 -0
  80. package/icons/svg/wip.svg +3 -0
  81. package/lib/markdownlint/frontmatter.js +51 -0
  82. package/lib/markdownlint/no-empty.js +19 -0
  83. package/lib/tailwind/details.js +14 -0
  84. package/package.json +359 -0
  85. package/react/README.md +36 -0
  86. package/react/index.d.mts +5725 -0
  87. package/react/index.d.mts.map +1 -0
  88. package/react/index.d.ts +5725 -0
  89. package/react/index.d.ts.map +1 -0
  90. package/react/index.js +1 -0
  91. package/react/index.mjs +1 -0
  92. package/react/src/components/Box.tsx +6 -0
  93. package/react/src/components/Button.tsx +94 -0
  94. package/react/src/components/Container.tsx +19 -0
  95. package/react/src/components/Flex.tsx +16 -0
  96. package/react/src/components/GlobalStyle.tsx +35 -0
  97. package/react/src/components/GoogleFonts.tsx +67 -0
  98. package/react/src/components/Grid.tsx +15 -0
  99. package/react/src/components/SSRStyle.tsx +47 -0
  100. package/react/src/components/SVGIcon.tsx +42 -0
  101. package/react/src/components/Text.tsx +78 -0
  102. package/react/src/components/Tile.tsx +93 -0
  103. package/react/src/components/index.ts +11 -0
  104. package/react/src/components/page/AboutSection.tsx +90 -0
  105. package/react/src/components/page/AgencyHeader.tsx +56 -0
  106. package/react/src/components/page/ArchiveInformation.tsx +43 -0
  107. package/react/src/components/page/ContactSection.tsx +92 -0
  108. package/react/src/components/page/Section.tsx +53 -0
  109. package/react/src/components/page/Spotlight.tsx +70 -0
  110. package/react/src/components/page/index.ts +6 -0
  111. package/react/src/constants.ts +48 -0
  112. package/react/src/icons/IconAccessibility.jsx +3 -0
  113. package/react/src/icons/IconAlert.jsx +3 -0
  114. package/react/src/icons/IconArchive.jsx +3 -0
  115. package/react/src/icons/IconArrowDown.jsx +3 -0
  116. package/react/src/icons/IconArrowLeft.jsx +3 -0
  117. package/react/src/icons/IconArrowRight.jsx +3 -0
  118. package/react/src/icons/IconArrowUp.jsx +3 -0
  119. package/react/src/icons/IconBuilding.jsx +3 -0
  120. package/react/src/icons/IconCalendar.jsx +3 -0
  121. package/react/src/icons/IconCaution.jsx +3 -0
  122. package/react/src/icons/IconChart.jsx +3 -0
  123. package/react/src/icons/IconCheck.jsx +3 -0
  124. package/react/src/icons/IconChevronDown.jsx +3 -0
  125. package/react/src/icons/IconChevronLeft.jsx +3 -0
  126. package/react/src/icons/IconChevronRight.jsx +3 -0
  127. package/react/src/icons/IconChevronUp.jsx +3 -0
  128. package/react/src/icons/IconClock.jsx +3 -0
  129. package/react/src/icons/IconClose.jsx +3 -0
  130. package/react/src/icons/IconDocument.jsx +3 -0
  131. package/react/src/icons/IconGlobe.jsx +3 -0
  132. package/react/src/icons/IconHamburgerButton.jsx +3 -0
  133. package/react/src/icons/IconInfo.jsx +3 -0
  134. package/react/src/icons/IconLocation.jsx +3 -0
  135. package/react/src/icons/IconMail.jsx +3 -0
  136. package/react/src/icons/IconMinus.jsx +3 -0
  137. package/react/src/icons/IconPencil.jsx +3 -0
  138. package/react/src/icons/IconPhone.jsx +3 -0
  139. package/react/src/icons/IconPlus.jsx +3 -0
  140. package/react/src/icons/IconQuestion.jsx +3 -0
  141. package/react/src/icons/IconSearch.jsx +3 -0
  142. package/react/src/icons/IconWIP.jsx +3 -0
  143. package/react/src/icons/index.js +31 -0
  144. package/react/src/icons/index.json +346 -0
  145. package/react/src/icons.tsx +34 -0
  146. package/react/src/index.ts +4 -0
  147. package/react/src/stitches.config.ts +85 -0
  148. package/react/src/theme/breakpoints.ts +14 -0
  149. package/react/src/theme/colors.ts +34 -0
  150. package/react/src/theme/index.tsx +31 -0
  151. package/react/src/theme/space.ts +16 -0
  152. package/react/src/theme/typography.ts +136 -0
  153. package/react/src/types.ts +31 -0
  154. package/react/src/utils.tsx +25 -0
  155. package/svgo.config.js +27 -0
  156. package/tailwind.config.js +5 -0
  157. package/tailwind.preset.js +128 -0
@@ -0,0 +1,78 @@
1
+ import type { ComponentProps, ComponentType } from 'react'
2
+ import { textStyles } from '../theme/typography'
3
+ import { CSS, styled } from '../stitches.config'
4
+ import { withFixedProps, VariantProps } from '../utils'
5
+
6
+ export type TextVariant =
7
+ 'body' | 'small' | 'bigDesc' |
8
+ 'titleXs' | 'titleSm' | 'titleMd' | 'titleLg' | 'titleXl' |
9
+ 'displaySm' | 'displayLg' | 'mono'
10
+
11
+ export const Text = styled('div', {
12
+ m: 0,
13
+ // Chinese text should be rendered in Noto Sans TC,
14
+ // with bold font weights at 500 (not 600)
15
+ '&:lang(zh)': {
16
+ fontFamily: '$chinese',
17
+ $fontWeights$bold: '$fontWeights$boldChinese',
18
+ letterSpacing: '0 !important'
19
+ },
20
+ variants: {
21
+ variant: {
22
+ body: textStyles.body,
23
+ small: textStyles.small,
24
+ bigDesc: {
25
+ ...textStyles.bigDesc,
26
+ '@lg': textStyles.bigDescDesktop
27
+ },
28
+ titleXs: textStyles.titleXs,
29
+ titleSm: textStyles.titleSm,
30
+ titleMd: {
31
+ ...textStyles.titleMd,
32
+ '@lg': textStyles.titleMdDesktop
33
+ },
34
+ titleLg: {
35
+ ...textStyles.titleLg,
36
+ '@lg': textStyles.titleLgDesktop
37
+ },
38
+ titleXl: {
39
+ ...textStyles.titleXl,
40
+ '@lg': textStyles.titleXlDesktop
41
+ },
42
+ displaySm: {
43
+ ...textStyles.displaySm,
44
+ '@lg': textStyles.displaySmDesktop
45
+ },
46
+ displayLg: {
47
+ ...textStyles.displayLg,
48
+ '@lg': textStyles.displayLgDesktop
49
+ },
50
+ mono: {
51
+ ...textStyles.body,
52
+ fontFamily: '$monospace'
53
+ }
54
+ } as Record<TextVariant, CSS>
55
+ },
56
+ defaultVariants: {
57
+ variant: 'body'
58
+ }
59
+ })
60
+
61
+ export type TextProps = VariantProps<ComponentProps<typeof Text>>
62
+ type TextPropsNoVariant = Omit<TextProps, 'variant'>
63
+
64
+ export const BodyText = createVariant('body')
65
+ export const SmallText = createVariant('small')
66
+ export const BigDesc = createVariant('bigDesc')
67
+ export const TitleXs = createVariant('titleXs')
68
+ export const TitleSm = createVariant('titleSm')
69
+ export const TitleMd = createVariant('titleMd')
70
+ export const TitleLg = createVariant('titleLg')
71
+ export const TitleXl = createVariant('titleXl')
72
+ export const DisplaySm = createVariant('displaySm')
73
+ export const DisplayLg = createVariant('displayLg')
74
+ export const Monospace = createVariant('mono')
75
+
76
+ function createVariant (variant: TextVariant) {
77
+ return withFixedProps(Text, { variant }) as ComponentType<TextPropsNoVariant>
78
+ }
@@ -0,0 +1,93 @@
1
+ import React, { ReactNode } from 'react'
2
+ import { Flex } from './Flex'
3
+ import { Grid } from './Grid'
4
+ import { SmallText, TitleLg, TitleMd, TitleXs } from './Text'
5
+ import { styled } from '../stitches.config'
6
+ import { IconArrowRight, IconCalendar, IconDocument } from '../icons'
7
+
8
+ type TileProps = {
9
+ title: string;
10
+ body: string;
11
+ href: string;
12
+ };
13
+
14
+ interface EventTileProps extends TileProps {
15
+ imgSrc?: string;
16
+ eventType: string;
17
+ }
18
+
19
+ export const TileSection = styled(Grid, {
20
+ mb: 60,
21
+ gridTemplateColumns: 'repeat(1, minmax(0, 1fr))',
22
+ '@md': {
23
+ gridTemplateColumns: 'repeat(3, minmax(0, 1fr))'
24
+ }
25
+ })
26
+
27
+ const TileContainer = styled(Flex, {
28
+ justifyContent: 'space-between',
29
+ overflow: 'hidden',
30
+ flexDirection: 'column',
31
+ color: '$slateL3',
32
+ textDecorationLine: 'none',
33
+ '@md': {
34
+ flexDirection: 'row'
35
+ }
36
+ })
37
+
38
+ const ContentWrapper = styled('div', {
39
+ p: 20
40
+ })
41
+
42
+ const TileTitle = styled(TitleXs, {
43
+ mb: 20
44
+ })
45
+
46
+ const BaseTile = ({ href, children }) => (
47
+ <TileContainer as='a' href={href}>
48
+ <ContentWrapper>{children}</ContentWrapper>
49
+ </TileContainer>
50
+ )
51
+
52
+ export const NewsTile = ({ title, body, href }: TileProps) => (
53
+ <BaseTile href={href}>
54
+ <TileTitle>{title}</TileTitle>
55
+ <div>{body}</div>
56
+ </BaseTile>
57
+ )
58
+
59
+ export const ContentTile = ({ title, body, href }: TileProps) => (
60
+ <BaseTile href={href}>
61
+ <TileTitle>{title}</TileTitle>
62
+ <div>{body}</div>
63
+ <IconArrowRight />
64
+ </BaseTile>
65
+ )
66
+
67
+ export const QuickLink = ({ title, body, href }: TileProps) => (
68
+ <BaseTile href={href}>
69
+ <IconDocument />
70
+ <TitleLg css={{ my: 12 }}>{title}</TitleLg>
71
+ <div>{body}</div>
72
+ <IconArrowRight />
73
+ </BaseTile>
74
+ )
75
+
76
+ export const EventTile = ({
77
+ title,
78
+ body,
79
+ href,
80
+ imgSrc,
81
+ eventType
82
+ }: EventTileProps) => (
83
+ <BaseTile href={href}>
84
+ {/* <img src={imgSrc ? imgSrc : placeholder} /> */}
85
+ <div>an image will go here</div>
86
+ <Flex>
87
+ <IconCalendar />
88
+ <SmallText>{eventType}</SmallText>
89
+ </Flex>
90
+ <TitleMd css={{ my: 12 }}>{title}</TitleMd>
91
+ <div>{body}</div>
92
+ </BaseTile>
93
+ )
@@ -0,0 +1,11 @@
1
+ export * from './Box'
2
+ export * from './Button'
3
+ export * from './Container'
4
+ export * from './Flex'
5
+ export * from './GlobalStyle'
6
+ export * from './Grid'
7
+ export * from './page'
8
+ export * from './SVGIcon'
9
+ export * from './SSRStyle'
10
+ export * from './Text'
11
+ export * from './Tile'
@@ -0,0 +1,90 @@
1
+ import React, { ReactNode } from 'react'
2
+ import { Flex } from '../Flex'
3
+ import { Grid } from '../Grid'
4
+ import { Section, SectionTitle } from './Section'
5
+ import { SmallText, TitleLg, TitleMd, TitleXs } from '../Text'
6
+ import { styled } from '../../stitches.config'
7
+
8
+ interface RelatedBodiesType {
9
+ id: number;
10
+ href: string;
11
+ title: string;
12
+ }
13
+
14
+ export type AboutSectionProps = {
15
+ about: string;
16
+ ctaTitle: string;
17
+ ctaComponent: React.ReactNode | string;
18
+ divisions?: RelatedBodiesType[];
19
+ relatedDivisions?: RelatedBodiesType[];
20
+ };
21
+
22
+ const AboutContainer = styled(Flex, {
23
+ justifyContent: 'space-between',
24
+ flexDirection: 'column',
25
+ marginBottom: 60,
26
+ gap: 60,
27
+ '@md': {
28
+ flexDirection: 'row',
29
+ '& > *': {
30
+ width: '50%'
31
+ }
32
+ }
33
+ })
34
+
35
+ const FlexColumn = styled(Flex, {
36
+ flexDirection: 'column',
37
+ gap: 40
38
+ })
39
+
40
+ const BodiesSection = ({ sectionTitle, divisions }) => (
41
+ <div>
42
+ <TitleXs>{sectionTitle}</TitleXs>
43
+ <Flex css={{ flexWrap: 'wrap', gap: 28, marginTop: 20 }}>
44
+ {divisions.map((division) => (
45
+ <a key={division.id} href={division.href}>
46
+ {division.title}
47
+ </a>
48
+ ))}
49
+ </Flex>
50
+ </div>
51
+ )
52
+
53
+ export const AboutSection = (args: AboutSectionProps) => (
54
+ <Section>
55
+ <SectionTitle title='About' />
56
+ <AboutContent {...args} />
57
+ </Section>
58
+ )
59
+
60
+ const AboutContent = ({
61
+ about,
62
+ ctaTitle,
63
+ ctaComponent,
64
+ divisions,
65
+ relatedDivisions
66
+ }: AboutSectionProps) => (
67
+ <AboutContainer>
68
+ <FlexColumn>
69
+ <TitleXs>{about}</TitleXs>
70
+ <div>
71
+ <TitleXs>{ctaTitle}</TitleXs>
72
+ {/*
73
+ For the call to action below, we should probably define
74
+ a series of variants (e.g. Button | SignUp | ...) to choose
75
+ from that are implemented in this component. We'll need to
76
+ know possible values from the CMS, then an API can be designed on our end.
77
+ */}
78
+ {ctaComponent}
79
+ </div>
80
+ </FlexColumn>
81
+ <FlexColumn>
82
+ {!!divisions?.length && (
83
+ <BodiesSection sectionTitle='Divisions' divisions={divisions} />
84
+ )}
85
+ {!!relatedDivisions?.length && (
86
+ <BodiesSection sectionTitle='Related' divisions={relatedDivisions} />
87
+ )}
88
+ </FlexColumn>
89
+ </AboutContainer>
90
+ )
@@ -0,0 +1,56 @@
1
+ import React from 'react'
2
+ import { Container } from '../Container'
3
+ import { Flex } from '../Flex'
4
+ import { TitleXl } from '../Text'
5
+ import { IconLocation, IconPhone } from '../../icons'
6
+
7
+ interface ParentAgencyFragment {
8
+ id: number;
9
+ title: string;
10
+ href: string;
11
+ }
12
+
13
+ interface ContactFragment {
14
+ address: string;
15
+ phone: string;
16
+ }
17
+
18
+ export type AgencyHeaderProps = {
19
+ title: string;
20
+ subtitle: string;
21
+ parentAgencies?: ParentAgencyFragment[];
22
+ contact: ContactFragment;
23
+ };
24
+
25
+ export const AgencyHeader = ({
26
+ title,
27
+ subtitle,
28
+ parentAgencies,
29
+ contact
30
+ }: AgencyHeaderProps) => (
31
+ <Container css={{ px: 20, '@md': { px: 96 } }}>
32
+ <TitleXl>{title}</TitleXl>
33
+ <div>{subtitle}</div>
34
+ {!!parentAgencies && (
35
+ <div>
36
+ Part of{' '}
37
+ {parentAgencies.map((agency, i) => [
38
+ i > 0 && ', ',
39
+ <a key={agency.id} href='#'>
40
+ {agency.title}
41
+ </a>
42
+ ])}
43
+ </div>
44
+ )}
45
+ <Flex>
46
+ <div>
47
+ <IconLocation />
48
+ {contact.address}
49
+ </div>
50
+ <div>
51
+ <IconPhone />
52
+ {contact.phone}
53
+ </div>
54
+ </Flex>
55
+ </Container>
56
+ )
@@ -0,0 +1,43 @@
1
+ import React from 'react'
2
+ import { Container } from '../Container'
3
+ import { Flex } from '../Flex'
4
+ import { TitleMd } from '../Text'
5
+
6
+ export type ArchiveInformationProps = {
7
+ agencyName: string;
8
+ email: string;
9
+ archiveURL: string;
10
+ };
11
+
12
+ export const ArchiveInformation = ({
13
+ agencyName,
14
+ email,
15
+ archiveURL
16
+ }: ArchiveInformationProps) => (
17
+ <Container css={{ bg: '$greyL1', p: 40 }}>
18
+ <Flex css={{ gap: 20 }}>
19
+ <div>
20
+ <TitleMd>Request public record</TitleMd>
21
+ <p>
22
+ <a href={ `mailto:${email}` }>
23
+ Email {email}
24
+ </a>{' '}
25
+ to submit a request to {agencyName}
26
+ </p>
27
+ </div>
28
+ <div>
29
+ <TitleMd>Archived website</TitleMd>
30
+ <p>
31
+ <a
32
+ target='_blank'
33
+ href={archiveURL}
34
+ rel='noreferrer'
35
+ >
36
+ See previous website
37
+ </a>{' '}
38
+ archived August 2022.
39
+ </p>
40
+ </div>
41
+ </Flex>
42
+ </Container>
43
+ )
@@ -0,0 +1,92 @@
1
+ import React from 'react'
2
+ import { Flex } from '../Flex'
3
+ import { Section, SectionTitle } from './Section'
4
+ import { styled } from '../../stitches.config'
5
+ import { IconGlobe, IconLocation, IconMail, IconPhone } from '../../icons'
6
+ import { TitleXs } from '../Text'
7
+
8
+ type ContactContentProps = {
9
+ // TODO: Refine these types when we get more clarity on a JSON object model
10
+ address?: any;
11
+ phone?: any;
12
+ email?: any;
13
+ social?: any;
14
+ };
15
+
16
+ export const ContactSection = (args) => (
17
+ <Section>
18
+ <SectionTitle title='Contact' />
19
+ <ContactContent {...args} />
20
+ </Section>
21
+ )
22
+
23
+ const InnerSectionTitle = styled(Flex, {
24
+ alignItems: 'center',
25
+ gap: 8,
26
+ marginBottom: 30
27
+ })
28
+
29
+ const ContactContent = ({
30
+ address,
31
+ phone,
32
+ email,
33
+ social
34
+ }: ContactContentProps) => (
35
+ <Flex css={{ justifyContent: 'space-between' }}>
36
+ {address && (
37
+ <div>
38
+ <InnerSectionTitle>
39
+ <IconLocation />
40
+ <TitleXs>Visit</TitleXs>
41
+ </InnerSectionTitle>
42
+ <div>
43
+ <div>{address.address_line1}</div>
44
+ <div>{address.address_line2}</div>
45
+ <div>{`${address.locality}, ${address.administrative_area} ${address.postal_code}`}</div>
46
+ <a
47
+ href='https://www.google.com/maps/dir/?api=1&amp;destination=1+Dr.+Carlton+B.+Goodlett+Place%2CCity+Hall+Room+362%2C+San+Francisco%2CCA+94102'
48
+ target='_blank'
49
+ rel='noreferrer'
50
+ >
51
+ Get directions
52
+ </a>
53
+ </div>
54
+ </div>
55
+ )}
56
+ {!!phone?.length && (
57
+ <div>
58
+ <InnerSectionTitle>
59
+ <IconPhone />
60
+ <TitleXs>Call</TitleXs>
61
+ </InnerSectionTitle>
62
+ {phone.map((p) => (
63
+ <div key={p.tel}>
64
+ {p.owner && <div>{p.owner}</div>}
65
+ <a href={`tel:${p.tel}`}>{p.tel}</a>
66
+ </div>
67
+ ))}
68
+ </div>
69
+ )}
70
+ {email && (
71
+ <div>
72
+ <InnerSectionTitle>
73
+ <IconMail />
74
+ <TitleXs>Email</TitleXs>
75
+ </InnerSectionTitle>
76
+ <div>
77
+ {email.owner && <div>{email.owner}</div>}
78
+ <a href={`mailto:${email.email}`}>{email.email}</a>
79
+ </div>
80
+ </div>
81
+ )}
82
+ {social && (
83
+ <div>
84
+ <InnerSectionTitle>
85
+ <IconGlobe />
86
+ <TitleXs>Social</TitleXs>
87
+ </InnerSectionTitle>
88
+ <div>{/* TODO */}</div>
89
+ </div>
90
+ )}
91
+ </Flex>
92
+ )
@@ -0,0 +1,53 @@
1
+ import React from 'react'
2
+ import { Container } from '../Container'
3
+ import { Flex } from '../Flex'
4
+ import { TitleXs, TitleXl } from '../Text'
5
+ import { styled } from '../../stitches.config'
6
+ import { IconChevronRight } from '../../icons'
7
+
8
+ type SectionTitleProps = {
9
+ title: string;
10
+ type?: string;
11
+ hasMore?: boolean;
12
+ };
13
+
14
+ export const SectionTitle = ({ title, type, hasMore }: SectionTitleProps) => (
15
+ <Flex
16
+ css={{
17
+ paddingBottom: 16,
18
+ marginBottom: 32,
19
+ justifyContent: 'space-between',
20
+ alignItems: 'flex-end',
21
+ borderBottom: '1px solid $slateL3'
22
+ }}
23
+ >
24
+ <TitleXl>{title}</TitleXl>
25
+ {hasMore && (
26
+ <Flex as='a' css={{ color: '$slateL3' }}>
27
+ <TitleXs>More {type}</TitleXs>
28
+ <IconChevronRight />
29
+ </Flex>
30
+ )}
31
+ </Flex>
32
+ )
33
+
34
+ const SectionContainer = styled('section', {
35
+ py: 80,
36
+ backgroundColor: '$white',
37
+ color: '$slateL3',
38
+ variants: {
39
+ variant: {
40
+ grey: {
41
+ backgroundColor: '$greyL1'
42
+ }
43
+ }
44
+ }
45
+ })
46
+
47
+ export const Section = ({ children, ...props }) => (
48
+ <SectionContainer {...props}>
49
+ <Container>{children}</Container>
50
+ </SectionContainer>
51
+ )
52
+
53
+ export type SectionProps = React.PropsWithRef<typeof Section>;
@@ -0,0 +1,70 @@
1
+ import React from 'react'
2
+ import { Button } from '../Button'
3
+ import { Container } from '../Container'
4
+ import { TitleLg } from '../Text'
5
+ import { styled } from '../../stitches.config'
6
+
7
+ export type SpotlightProps = {
8
+ title: string;
9
+ body: string;
10
+ buttonContent: string;
11
+ image: string;
12
+ isFullWidth?: boolean;
13
+ isTitleFirst?: boolean;
14
+ };
15
+
16
+ const SpotlightContainer = styled(Container, {
17
+ bg: '$greyL1',
18
+ display: 'flex',
19
+ flexDirection: 'column',
20
+ marginBottom: 60,
21
+ gap: 12,
22
+ '@md': {
23
+ flexDirection: 'row',
24
+ alignItems: 'center',
25
+ '& > *': {
26
+ width: '50%'
27
+ }
28
+ },
29
+ variants: {
30
+ full: {
31
+ true: {
32
+ '@md': {
33
+ flexWrap: 'wrap',
34
+ '& > *': { width: '100%' },
35
+ '& > img': { maxHeight: '300px' }
36
+ }
37
+ }
38
+ },
39
+ reverse: {
40
+ true: {
41
+ flexDirection: 'column-reverse',
42
+ '@md': {
43
+ flexDirection: 'row-reverse'
44
+ }
45
+ }
46
+ }
47
+ }
48
+ })
49
+
50
+ const SpotlightImage = styled('img', {
51
+ objectFit: 'cover'
52
+ })
53
+
54
+ export const Spotlight = ({
55
+ title,
56
+ body,
57
+ buttonContent,
58
+ image,
59
+ isFullWidth = false,
60
+ isTitleFirst = false
61
+ }: SpotlightProps) => (
62
+ <SpotlightContainer full={isFullWidth} reverse={isTitleFirst}>
63
+ <SpotlightImage src={image} />
64
+ <div>
65
+ <TitleLg>{title}</TitleLg>
66
+ <div>{body}</div>
67
+ <Button>{buttonContent}</Button>
68
+ </div>
69
+ </SpotlightContainer>
70
+ )
@@ -0,0 +1,6 @@
1
+ export * from './AboutSection'
2
+ export * from './AgencyHeader'
3
+ export * from './ArchiveInformation'
4
+ export * from './ContactSection'
5
+ export * from './Section'
6
+ export * from './Spotlight'
@@ -0,0 +1,48 @@
1
+ import type { FontSpec } from './types'
2
+
3
+ export const HOCUS_SELECTOR = '&:hover, &:focus'
4
+
5
+ export const defaultFonts: FontSpec[] = [
6
+ {
7
+ name: 'Noto Sans TC',
8
+ fallbacks: ['ui-sans-serif', 'sans-serif'],
9
+ weights: {
10
+ light: 300,
11
+ normal: 400,
12
+ bold: 500
13
+ }
14
+ },
15
+ {
16
+ name: 'Roboto Flex',
17
+ fallbacks: ['ui-sans-serif', 'sans-serif'],
18
+ weights: {
19
+ light: 300,
20
+ normal: 400,
21
+ bold: 700
22
+ },
23
+ googleFont: {
24
+ optical: true,
25
+ weights: {
26
+ light: [[8, 144], 300],
27
+ normal: [[8, 144], 400],
28
+ bold: [[8, 144], 700]
29
+ }
30
+ }
31
+ },
32
+ {
33
+ name: 'Roboto Slab',
34
+ fallbacks: ['ui-serif', 'serif'],
35
+ weights: {
36
+ light: 300,
37
+ normal: 400,
38
+ bold: 700
39
+ }
40
+ },
41
+ {
42
+ name: 'Roboto Mono',
43
+ fallbacks: ['ui-monospace', 'monospace'],
44
+ weights: {
45
+ normal: 400
46
+ }
47
+ }
48
+ ]
@@ -0,0 +1,3 @@
1
+ import * as React from 'react'
2
+ const IconAccessibility = props => <svg viewBox='0 0 20 20' fill='currentcolor' {...props}><path d='M10.116 3.93507C11.2026 3.93507 12.0835 3.05417 12.0835 1.96753C12.0835 0.880895 11.2026 0 10.116 0C9.02933 0 8.14844 0.880895 8.14844 1.96753C8.14844 3.05417 9.02933 3.93507 10.116 3.93507Z' /><path d='M17.0024 5.90259H3.22971C2.90357 5.90259 2.59079 6.03215 2.36017 6.26276C2.12956 6.49338 2 6.80616 2 7.1323C2 7.45844 2.12956 7.77122 2.36017 8.00183C2.59079 8.23245 2.90357 8.36201 3.22971 8.36201H8.14855V10.9395L5.9695 18.4259C5.87818 18.739 5.91498 19.0756 6.0718 19.3615C6.22862 19.6475 6.49261 19.8595 6.8057 19.9508C6.91745 19.984 7.03346 20.0005 7.15002 20C7.4159 19.9992 7.67441 19.9126 7.88711 19.7531C8.09981 19.5935 8.25534 19.3696 8.33054 19.1146L10.1161 12.9808L11.9016 19.1146C11.9768 19.3696 12.1323 19.5935 12.345 19.7531C12.5577 19.9126 12.8163 19.9992 13.0821 20C13.1987 20.0005 13.3147 19.984 13.4265 19.9508C13.7395 19.8595 14.0035 19.6475 14.1604 19.3615C14.3172 19.0756 14.354 18.739 14.2627 18.4259L12.0836 10.9395V8.36201H17.0024C17.3286 8.36201 17.6414 8.23245 17.872 8.00183C18.1026 7.77122 18.2322 7.45844 18.2322 7.1323C18.2322 6.80616 18.1026 6.49338 17.872 6.26276C17.6414 6.03215 17.3286 5.90259 17.0024 5.90259Z' /></svg>
3
+ export default IconAccessibility
@@ -0,0 +1,3 @@
1
+ import * as React from 'react'
2
+ const IconAlert = props => <svg viewBox='0 0 20 20' fill='currentcolor' {...props}><path d='M10 10.9399C10.1642 10.9399 10.3267 10.9076 10.4784 10.8448C10.63 10.782 10.7678 10.6899 10.8839 10.5738C11 10.4578 11.092 10.32 11.1548 10.1683C11.2177 10.0166 11.25 9.85409 11.25 9.68994V5.93994C11.25 5.60842 11.1183 5.29048 10.8839 5.05606C10.6495 4.82164 10.3315 4.68994 10 4.68994C9.66848 4.68994 9.35054 4.82164 9.11612 5.05606C8.8817 5.29048 8.75 5.60842 8.75 5.93994V9.68994C8.75 9.85409 8.78233 10.0166 8.84515 10.1683C8.90797 10.32 9.00004 10.4578 9.11612 10.5738C9.23219 10.6899 9.36999 10.782 9.52165 10.8448C9.6733 10.9076 9.83585 10.9399 10 10.9399Z' /><path d='M10 15.5C10.8284 15.5 11.5 14.8284 11.5 14C11.5 13.1716 10.8284 12.5 10 12.5C9.17157 12.5 8.5 13.1716 8.5 14C8.5 14.8284 9.17157 15.5 10 15.5Z' /><path d='M10 0C8.02219 0 6.08879 0.58649 4.4443 1.6853C2.79981 2.78412 1.51809 4.34591 0.761209 6.17317C0.00433284 8.00043 -0.193701 10.0111 0.192152 11.9509C0.578004 13.8907 1.53041 15.6725 2.92894 17.0711C4.32746 18.4696 6.10929 19.422 8.0491 19.8079C9.98891 20.1937 11.9996 19.9957 13.8268 19.2388C15.6541 18.4819 17.2159 17.2002 18.3147 15.5557C19.4135 13.9112 20 11.9778 20 10C20 7.34784 18.9464 4.8043 17.0711 2.92893C15.1957 1.05357 12.6522 0 10 0V0ZM10 17.5C8.51664 17.5 7.0666 17.0601 5.83323 16.236C4.59986 15.4119 3.63857 14.2406 3.07091 12.8701C2.50325 11.4997 2.35473 9.99168 2.64411 8.53682C2.9335 7.08197 3.64781 5.74559 4.6967 4.6967C5.7456 3.64781 7.08197 2.9335 8.53683 2.64411C9.99168 2.35472 11.4997 2.50325 12.8701 3.0709C14.2406 3.63856 15.4119 4.59986 16.236 5.83322C17.0601 7.06659 17.5 8.51664 17.5 10C17.5 10.9849 17.306 11.9602 16.9291 12.8701C16.5522 13.7801 15.9997 14.6069 15.3033 15.3033C14.6069 15.9997 13.7801 16.5522 12.8701 16.9291C11.9602 17.306 10.9849 17.5 10 17.5Z' /></svg>
3
+ export default IconAlert
@@ -0,0 +1,3 @@
1
+ import * as React from 'react'
2
+ const IconArchive = props => <svg viewBox='0 0 20 20' fill='currentcolor' {...props}><path fillRule='evenodd' clipRule='evenodd' d='M2.5 5.8125V3.1875H17.5V5.8125H2.5ZM0 1.875C0 1.39175 0.447715 1 1 1H19C19.5523 1 20 1.39175 20 1.875V7.125C20 7.60825 19.5523 8 19 8H18V18.1429C18 18.6162 17.5523 19 17 19H3C2.44772 19 2 18.6162 2 18.1429V8H1C0.447716 8 0 7.60825 0 7.125V1.875ZM4.5 8V16.8571H15.5V8H4.5Z' /><rect x={7} y={9} width={6} height={2} rx={1} /></svg>
3
+ export default IconArchive
@@ -0,0 +1,3 @@
1
+ import * as React from 'react'
2
+ const IconArrowDown = props => <svg viewBox='0 0 20 20' fill='currentcolor' {...props}><path d='M10.8849 19.635L17.2499 13.27C17.3846 13.1598 17.4947 13.0226 17.5733 12.8674C17.6519 12.7121 17.6972 12.5422 17.7063 12.3684C17.7154 12.1947 17.6882 12.0209 17.6263 11.8583C17.5644 11.6957 17.4692 11.5477 17.3469 11.424C17.2246 11.3003 17.0777 11.2034 16.9158 11.1397C16.7539 11.076 16.5805 11.0468 16.4066 11.0539C16.2328 11.0611 16.0623 11.1044 15.9062 11.1813C15.7501 11.2581 15.6117 11.3666 15.4999 11.5L11.2499 15.73V1.25C11.2499 0.918479 11.1182 0.600537 10.8838 0.366117C10.6494 0.131696 10.3314 0 9.99993 0C9.66841 0 9.35046 0.131696 9.11604 0.366117C8.88162 0.600537 8.74993 0.918479 8.74993 1.25V15.75L4.49993 11.5C4.25907 11.3028 3.9533 11.2025 3.64243 11.2189C3.33157 11.2352 3.03798 11.3669 2.81912 11.5883C2.60025 11.8097 2.47186 12.1047 2.45907 12.4158C2.44627 12.7268 2.54999 13.0314 2.74993 13.27L9.11493 19.635C9.35009 19.8689 9.66826 20.0002 9.99993 20.0002C10.3316 20.0002 10.6498 19.8689 10.8849 19.635Z' /></svg>
3
+ export default IconArrowDown
@@ -0,0 +1,3 @@
1
+ import * as React from 'react'
2
+ const IconArrowLeft = props => <svg viewBox='0 0 20 20' fill='currentcolor' {...props}><path d='M0.36468 10.8849L6.72968 17.2499C6.83992 17.3846 6.97705 17.4947 7.13229 17.5733C7.28754 17.6519 7.45749 17.6972 7.63125 17.7063C7.80501 17.7154 7.97877 17.6882 8.14139 17.6263C8.30402 17.5644 8.45193 17.4692 8.57567 17.3469C8.69941 17.2246 8.79624 17.0777 8.85997 16.9158C8.9237 16.7539 8.95292 16.5805 8.94577 16.4066C8.93861 16.2328 8.89524 16.0623 8.81843 15.9062C8.74161 15.7501 8.63305 15.6117 8.49968 15.4999L4.26968 11.2499H18.7697C19.1012 11.2499 19.4191 11.1182 19.6536 10.8838C19.888 10.6494 20.0197 10.3314 20.0197 9.99993C20.0197 9.66841 19.888 9.35046 19.6536 9.11604C19.4191 8.88162 19.1012 8.74993 18.7697 8.74993H4.26968L8.49968 4.49993C8.6969 4.25907 8.79715 3.9533 8.78082 3.64243C8.76449 3.33157 8.63275 3.03798 8.41138 2.81912C8.19002 2.60025 7.89495 2.47186 7.58392 2.45907C7.27289 2.44627 6.96828 2.54999 6.72968 2.74993L0.36468 9.11493C0.130798 9.35009 -0.000488281 9.66826 -0.000488281 9.99993C-0.000488281 10.3316 0.130798 10.6498 0.36468 10.8849Z' /></svg>
3
+ export default IconArrowLeft
@@ -0,0 +1,3 @@
1
+ import * as React from 'react'
2
+ const IconArrowRight = props => <svg viewBox='0 0 20 20' fill='currentcolor' {...props}><path d='M19.635 9.11493L13.27 2.74993C13.0314 2.54999 12.7268 2.44627 12.4158 2.45907C12.1047 2.47186 11.8097 2.60025 11.5883 2.81912C11.3669 3.03798 11.2352 3.33157 11.2189 3.64243C11.2025 3.9533 11.3028 4.25907 11.5 4.49993L15.73 8.72993H1.25C0.918479 8.72993 0.600537 8.86162 0.366117 9.09604C0.131696 9.33046 0 9.64841 0 9.97993C0 10.3114 0.131696 10.6294 0.366117 10.8638C0.600537 11.0982 0.918479 11.2299 1.25 11.2299H15.75L11.5 15.4999C11.2653 15.7346 11.1334 16.053 11.1334 16.3849C11.1334 16.7169 11.2653 17.0352 11.5 17.2699C11.7347 17.5046 12.0531 17.6365 12.385 17.6365C12.7169 17.6365 13.0353 17.5046 13.27 17.2699L19.635 10.8849C19.8689 10.6498 20.0002 10.3316 20.0002 9.99993C20.0002 9.66826 19.8689 9.35009 19.635 9.11493Z' /></svg>
3
+ export default IconArrowRight