Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React icons! #140

Merged
merged 37 commits into from
Dec 21, 2022
Merged

React icons! #140

merged 37 commits into from
Dec 21, 2022

Conversation

shawnbot
Copy link
Member

@shawnbot shawnbot commented Dec 6, 2022

This PR introduces first-class SVG icons pulled from Figma. There are a couple of moving parts here:

@sfgov/icons

This new package contains only the unstyled SVG icon assets exported from Figma in both raw .svg and .jsx component formats, as well as JSON indices that list them. These are all published to npm, as you can see on unpkg.

The Figma import logic lives entirely in .figmaexportrc.js, which is a configuration file for the figma-export tool. The files in the svg and react directories are rebuilt when you run:

npm run fetch
# which runs...
env-cmd ../../.env npx figma-export use-config

Which uses env-cmd to load environment variables from the repo root's .env file. And in order for that to work, you need to copy .env.sample and replace YOUR_FIGMA_TOKEN_HERE with your own Figma access token.

SVGIcon component

The SVGIcon component is the vehicle for our icons' styles (really just display: inline-flex). It's exported from @sfgov/react so that we can style other (custom, not-yet-released) SVG icons the same way, but probably doesn't need to be documented in its own right.

Icon<name> components

Every icon's React component is imported from @sfgov/icons/react, wrapped as Component => props => <SVGIcon {...props} as={Component} />, and re-exported with the original symbol name. I've built a table of the components in Storybook that also acts as documentation, but we'll probably want to move this to Docusaurus so that it's easier to find. The naming scheme for the icon components is Icon<name>, where <name> is the PascalCase version of the icon's name in Figma (accessibilityAccessibility; arrow upArrowUp, etc.). E.g.

import { IconAccessibility } from '@sfgov/react'
export default IconAccessibility

As we discussed in Slack (sorry, private), this not only makes for friendlier bundle sizes but also improves developer experience in IDEs that autocomplete import statements. In VS Code, typing Icon in your import { } from '@sfgov/react statement gives you an alphabetical list of the icon components:

If we decide to rename icons or want to create aliases, we can do that by just re-exporting them with different names:

export {
  IconAccessibility as IconA11y,
  IconArrowUp as IconUp,
  IconArrowDown as IconDown
} from './icons'

The move from a single <Icon> component with a symbol string prop (which matches the <sfgov-icon> custom element implementation) to the named export approach was done in #142.

⚠️ Hacks

The wrapping and re-exporting of the unstyled SVG icons is currently done in a kind of hacky way, using a JS script that reads @sfgov/icons/index.json and generates TSX from a tagged template literal. The script lints the resulting code with ESLint and should fail if it doesn't parse or can't be auto-fixed, so I think that's a good enough guard against generating invalid code. 😁

An outdated note on bundling and tree-shaking

Currently this bundles all of the icons in the react package, adding up to 22.8K if you import the Icon component or the iconsIndex object. This is so that we can map the string symbol names (e.g. 'accessibility') to the SVG components with a single import:

import { Icon } from '@sfgov/react'
export const A11y = () => <Icon symbol='accessibility' />
export const Toggle = ({ up }) => <Icon symbol={up ? 'chevron-up' : 'chevron-down' } />

@shawnbot shawnbot temporarily deployed to sfgov-design-system-pr-140 December 6, 2022 18:15 Inactive
@shawnbot shawnbot temporarily deployed to sfgov-design-system-pr-140 December 6, 2022 18:17 Inactive
@github-actions
Copy link

github-actions bot commented Dec 6, 2022

Size Change: +62.8 kB (+30%) 🚨

Total Size: 272 kB

Filename Size Change
packages/react/dist/index.js 65.7 kB +31.6 kB (+92%) 🆘
packages/react/dist/index.mjs 65.3 kB +31.2 kB (+91%) 🆘
ℹ️ View Unchanged
Filename Size
packages/sfgov-design-system/dist/css/base.css 273 B
packages/sfgov-design-system/dist/css/components.css 878 B
packages/sfgov-design-system/dist/css/fonts.css 170 B
packages/sfgov-design-system/dist/css/icons.css 140 B
packages/sfgov-design-system/dist/css/overrides.css 104 B
packages/sfgov-design-system/dist/css/sfds.css 48.4 kB
packages/sfgov-design-system/dist/css/typography.css 557 B
packages/sfgov-design-system/dist/css/utilities.css 46.9 kB
packages/sfgov-design-system/dist/icons/alert.svg 162 B
packages/sfgov-design-system/dist/icons/arrow-down.svg 150 B
packages/sfgov-design-system/dist/icons/arrow-left.svg 151 B
packages/sfgov-design-system/dist/icons/arrow-right.svg 155 B
packages/sfgov-design-system/dist/icons/arrow-up.svg 152 B
packages/sfgov-design-system/dist/icons/building.svg 298 B
packages/sfgov-design-system/dist/icons/calendar.svg 201 B
packages/sfgov-design-system/dist/icons/check.svg 146 B
packages/sfgov-design-system/dist/icons/chevron-down.svg 147 B
packages/sfgov-design-system/dist/icons/chevron-left.svg 152 B
packages/sfgov-design-system/dist/icons/chevron-right.svg 159 B
packages/sfgov-design-system/dist/icons/chevron-up.svg 151 B
packages/sfgov-design-system/dist/icons/clipboard.svg 697 B
packages/sfgov-design-system/dist/icons/clock.svg 180 B
packages/sfgov-design-system/dist/icons/close.svg 157 B
packages/sfgov-design-system/dist/icons/code.svg 1.05 kB
packages/sfgov-design-system/dist/icons/document.svg 193 B
packages/sfgov-design-system/dist/icons/globe.svg 297 B
packages/sfgov-design-system/dist/icons/info.svg 160 B
packages/sfgov-design-system/dist/icons/location.svg 188 B
packages/sfgov-design-system/dist/icons/mail.svg 179 B
packages/sfgov-design-system/dist/icons/menu.svg 96 B
packages/sfgov-design-system/dist/icons/minus.svg 92 B
packages/sfgov-design-system/dist/icons/pencil.svg 197 B
packages/sfgov-design-system/dist/icons/phone.svg 277 B
packages/sfgov-design-system/dist/icons/plus.svg 114 B
packages/sfgov-design-system/dist/icons/search.svg 145 B
packages/sfgov-design-system/dist/js/icons.js 9.32 kB
packages/sfgov-design-system/dist/js/icons.mjs 9.17 kB
packages/sfgov-design-system/dist/js/sfds.js 9.36 kB
packages/sfgov-design-system/dist/js/sfds.mjs 9.17 kB

compressed-size-action

@shawnbot shawnbot marked this pull request as ready for review December 6, 2022 18:31
@shawnbot shawnbot requested a review from joni-f-g December 6, 2022 18:31
@shawnbot shawnbot temporarily deployed to sfgov-design-system-pr-140 December 7, 2022 00:25 Inactive
argTypes: {
symbol: {
name: 'Symbol',
options: sortedKeys,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

currently this shows up as the index of each entry, would the iconsByName export work here instead?

Copy link

@joni-f-g joni-f-g left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks great!! just one small comment on the storybook portion

@shawnbot shawnbot mentioned this pull request Dec 14, 2022
* feat(icons): export better JSON indexes of SVG + JSX

* chore(react): export icon components, types

* chore(react): simplify Icon component

* feat: add Flex inline prop

* chore: clean up prop types

* feat: export icon symbols separately

* chore(deps): nix sfgov/icons dependency from storybook

* chore: refactor Icon + stories

* fix(icons): add fill="currentcolor" to all svg outputs

* fix(icons): add fill="currentcolor" to all svg outputs

* chore(icons): fix JSX linting bits

* chore(deps): add @sfgov/icons to root package-lock

* chore(build): use env-cmd instead of wrapper script

* chore(build): output readable generated timestamps

* chore(deps): rebuild lockfile

* chore(build): rebuild react when tsconfig.json changes

* chore(build): remove json import

* chore(icons): break out svgo config

* chore(icons): rename XIcon to IconX

* chore(icons): rename Icon to SVGIcon

* feat(icons): export styled IconX symbols for each SVG icon

* chore(ts): add moduleResolution:node, target:es2020

* chore(storybook): refactor icon stories
* chore(deps): install @lerna-lite/publish

* chore(npm): add {NPM_AUTH_TOKEN} placeholder to .npmrc

* chore(publish): refactor ci workflow to run lerna publish

* chore: Publish new release

 - @sfgov/[email protected]
 - @sfgov/[email protected]
 - [email protected]
 - [email protected]

* fix(ci): publish 0.0.0-${GITHUB_SHA::7} for canary releases

* Revert "chore: Publish new release"

This reverts commit a9645f3.

* chore(npm): fix package-lock.json

* fix(ci): publish prereleases to "next" dist-tag

* chore: debug actions steps

* chore: fix publish actions conditionals

* fix(ci): git config user

* fix: use "from-package" bump spec on main

* fix: use --canary instead of "canary" positional

* fix(ci): fix lerna publish args

* fix(ci): derp derp
@joni-f-g joni-f-g merged commit d6e5c4c into feature/react-package Dec 21, 2022
@joni-f-g joni-f-g deleted the feature/react-icons branch December 21, 2022 23:57
@shawnbot shawnbot mentioned this pull request Dec 22, 2022
5 tasks
joni-f-g pushed a commit that referenced this pull request Jan 18, 2023
* chore(deps): run sb upgrade

* chore(deps): upgrade storybook to react 18

* chore(deps): upgrade docusaurus to react 18

* feat(react): stub out react package

* chore(build): build esm + cjs, bundled and not

* chore(npm): add src to published files

* chore(build): rework babel + rollup configs

* chore(deps): update storybook deps + peer

* chore: export breakpointsByName

* chore: re-export Box from theme-ui

* chore: stub out hover, focus, hocus constants

* chore: create shared focus styles

* feat(components): create Button

* feat(theme): build out theme-ui theme

* chore(storybook): refactor preview config with theme

* feat(storybook): use @sfgov/react in Button stories

* chore(theme): rework colors

* chore(build): tweak wireit build:js task

* chore: rework hocus constants

* chore: don't export constants for now

* chore(Button): rename $hocus -> __simulatedHocus

* fix(styles): fix outline focus styles

* chore(theme): nix columns:6 from grids.responsive

* chore(types): attempt to make generic button story type-safe

* feat(ci): publish @sfgov/react to npm 🎉

* chore(ci): run reports on react package

* fix: lint

* fix: lint

* fix(react): add eslint config

* chore(deps): move eslint + react bits to root

* chore(lint): only disable no-undef and import/named in TS

* chore(deps): remove typescript, sfgov-design-system from @sfgov/react

* chore(build): add packages as build deps for storybook

* fix(lint): derp

* fix(build): parallelize with wireit

* Revert "fix(build): parallelize with wireit"

This reverts commit 3e4341e.

* Docs/department page (#121)

* chore(eslint): make react/prop-types warn, skipUndeclared

* docs: remove placeholder form fields doc list

* Updates beta version

* Adds a landing page description

* - Updates the footer content
- Updates the tagline
- Updates config to handle @apply and custom presets in css

* Updates the landing page design

* - Updates the font import to use variable font
- Updates nav logo styling

* Updates the top portion of the landing page

* fix regex for color swatch

* Adds the logo for use in the footer

* - Swizzles the footer layout and footer logo
- Styles the footer

* Updates the design of the top navigation

* Updates the design of the sidebar items

* Changes paddingleft to padding

* - Creates a BigLink component
- Includes BigLink component in icons and colors
- Changes icons file extension to mdx

* - Moves the color libraries to a color directory
- Updates the link to the color directory in the color doc
- Updates the names of the two color library names

* - Changes the file extension to mdx
- Uses the new type-focused components

* Adds mono import

* Creates new type-focused components

* Updates to use the CodeBlock from Docusaurus

* - Renames the "spacing" page to "layout"
- Adds the live editor to each of the examples

* Makes minor updates to deal with proptype errors

* - Updates to the 2.0.0-beta.22 release
- Updates an icon path in a swizzled file

* - Updates to the first RC
- Fixes an import being broken by the update

* fix broken links and add front end redirects

* mark unused filepath, keeping for reference tho

* Initial version of the tailwind class list

* Removes unused imports

* Removes unneeded escape characters from the regex

* test redirects fix

* chore(npm): npm audit fix

* chore(docs): update new css docs for Docusaurus

* fix(docs): update buttons docs for Docusaurus

* chore(lint): tidy up docs components

* fix(develop): nix develop command

* chore(deps): fix stylelint-config-tailwindcss version in package-lock

* chore(npm): rebuild package-lock

* fix(docs): fix <pre> whitespace

* chore(build): tweak wireit "clean" bits

* chore(tailwind): simplify content field

* feat(docs): add DoDont, Do and Dont components

* chore(docs): rewrite button docs with DoDont

* chore(eslint): allow trailing spaces in comments

* chore(docs): add doc comment in <DoDont>

* fix(docs): sort icons alphabetically

* fix(docs): fix action blue swatch label

* feat(tailwind): add gridAutoFlow plugin

* fix(docs): don't use wireit for build; serve from ./public

* fix(docs): fix button specs path

* chore(lint): remove unused border components

* fix(lint): detect react version in eslint config

* chore(lint): lint docs (theme) components

* fix(icons): tweak icon replace logic

* chore: nix "docs/**/*.md?" from tailwind content list

* chore(docs): freshen up the website readme

* fix(sfgov-icon): fix svg twiddling bits

* fix(sfgov-icon): another attempt at fixing this...

* feat(sfgov-icon): set window.SFGovIcon

* Installs 'use-bus' for dispatching in the utillist

* Adds a description to the tailwind class list page

* Completes the styling of the utilist page

* Splits up the components into separate files

* fix(eslint): nix no-unused-vars override

* chore(npm): fix engine versions

* chore(deps): enforce consistent shared dependency versions

* chore: comment out unused BorderColor + BorderWidth for now

* chore: add validate npm script to /

* chore(docs): normalize icon data interface

* chore(docs): fix tailwind content paths

* chore(docs): output paths to build.log

* fix(docs): fix utility class link

* fix: hush babel about named json imports

* chore(deps): npm audit fix

* Quick update to the json file

* fix(docs): use dedent for css code blocks

* feat(docs): throw on broken links!

* DESSYS-217 lint md and mdx files (#100)

* DESSYS-217 lint md and mdx files

* remove eslint-mdx for now

* fix package-lock.json conflicts

* fix lint job

* Updates Docusaurus to 2.0.1

* Updates links within the content

* Updates the landing page images

* Updates the landing page

* Adds a storybook test page

* Moves the forms landing page to the directory

* Creates a test storybook embed in md files

* chore(docs): remove background color from Do + Dont

* Removes unused import

* Removes the test page that contained storybook

* Adds some non-breaking spaces to the content

* Updates the landing page

* Fixes landing page links

* Docusaurus: add custom Playground component (#102)

* chore(docs): fix inline icons in details docs

* chore(eslint): suggest lines before function declarations

* feat(docs): build out styled code playground

* chore(deps): upgrade docusaurus to 2.0.1

* chore(docs): install react-shadow

* chore: tweak export style

* chore(docs): add EncapsulatedStyleRoot

* - Removes commented out code
- Adds a class to the github button to add icon

* Adds an icon instead of "github" for the link

* Adds support for the docusaurus dark mode

* Makes updates to allow for better dark mode

* Adds the new do/don't component

* fix(docs): fix edit links

* fix(docs): tweak spawnSync() signature

* script for tailwind classes

* fix build script for css-manifest

* another fix attempt

* sorry for all the spam everyone :sob emoji:

* chore(docs): add figma link to KBD docs

* - Splits the Feature component into a sep file
- Replaces landing images with svg components

* fix(build): fix circular build-css-manifest dependencies

* chore(build): nix docs.js bundle

* Removes a console log

* fix(build): make sure css builds before manifest

* Heroku: upgrade stack, switch to nginx buildpack (#103)

* chore(heroku): upgrade stack, switch to nginx buildpack

* chore(heroku): delete static.json

* chore(heroku): stub out nginx config

* chore(heroku): mv config/nginx.conf{,.erb}

* chore(heroku): use papertrail

* chore(heroku): add Procfile for nginx solo mode

* chore(heroku): rewrite nginx.conf.erb from example

* chore(vscode): add $schema to app.json

* Fixes the link destinations

* Corrects the padding to match quick links

* fix(docs): tweak DoDont component borders

* Fix icons (#105)

* fix(build): fix circular build-css-manifest dependencies

* chore(build): nix docs.js bundle

* feat(css): add icons.css bundle + import in sfds.css

* chore(docs): install raw-loader

* chore(docs): move sfds.js import to docusaurus config

* chore(docs): import sfds.css + fonts.css in custom stylesheet

* chore(docs): inline sfds styles in EncapsulatedStyleRoot

* feat(css): add icons.css bundle, import in sfds.css

* fix(build): fix manifest build dependencies

* chore(docs): add note about styling <sfgov-icon>

* chore(docs): nix build.log output

* fix(docs): add back ExecutionEnvironment.canUseDOM check

* chore(docs): wrap EncapsulatedStyleRoot in browser check

* Move redirects to nginx config (#104)

* chore(vscode): tell vscode how to treat nginx.conf.erb

* chore(docs): disable client redirects plugin

* chore(docs): rename "Forms and fields" dir → "forms"

* chore(nginx): nix most env vars, add redirect map

* fix(nginx): move redirect map out of server block

* fix broken links our build caught :)

Co-authored-by: jacksongonzales <[email protected]>

* chore: bump sfgov-design-system to 2.5.0

* fix components link on home page

* Fix <sfgov-icon> in Docusaurus/React (#106)

* fix(docs): use memoized icon component

* chore(deps): update wireit

* chore(build): improve --watch file coverage

* fix(SFGovIcon): fall back on any child <svg> if __svg is unset

* fix(docs): rework SFGovIconWrapper to re-render properly

* feat(storybook): bootstrap storybook

* chore: ignore storybook-static dir

* chore(docs): link storybook in website/public

* chore(lint): fix .eslintrc.js

* chore(eslint): globalize resolve extensions + react version

* chore(lint): fix storybook linting

* chore(eslint): tidy top-level eslintrc

* chore(storybook): rename output directory to storybook/public

* chore(docs): remove storybook stub page

* chore(docs): get smarter about broken docs links

* chore(docs): add Storybook navbar link

* chore(docs): symlink docs before running docusaurus

* chore(lint): be sure to lint storybook/.storybook

* chore(storybook): lint .storybook, add <base href=/storybook/>

* chore(docs): nix Storybook URL for now

* chore: document <base href> hack, lint

* fix(ci): try only building sfgov-design-system for reports

* fix(docs): use HEROKU_BRANCH if available

* chore(docs): configure ports for website + storybook development

* chore(docs): add Storybook link to Docusaurus

* chore(storybook): stub out theme, link to Docusaurus

* chore(develop): update top-level "start" script to run docusaurus + storybook in parallel

* fix: bad merge

* chore: nix storybook embed demo page

* fix(docs): try Storybook link with pathname://

* fix(docs): var cross-refs with NODE_ENV, not HEROKU_APP_NAME

* chore(storybook): get NODE_ENV right

* chore(deps): bump eslint

* chore(lint): remove unused disables

* chore(storybook): nix stock stories

* chore(storybook): delete static assets

* chore: stub out new storybook preview config

* chore: delete stock button stories

* chore: tidy up storybook configs

* chore: add (back) storybook intro page

* chore(deps): add sfgov-design-system to storybook

* fix: try recreating public dir before storybook build

* fix(lint): try disabling import/no-unresolved in storybook preview

* chore(ci): narrow node + npm engines semver range

* Revert "fix: try recreating public dir before storybook build"

This reverts commit 839687f.

* chore: pull favicon.ico from sf.gov

* fix(heroku): wtf

* chore: don't over-specify storybook story order

* chore: disable actions addon, tweak story paths, add designs addon

* chore: stub out storybook component utils

* feat: add Icon component stories

* feat: add Button component stories

* chore(deps): install clsx + storybook-addon-designs

* feat: add Alerts & Banners stories

* feat: add Icons stories

* chore(lint): whitespace

* chore: set design panel name to "Figma"

* chore(lint): unused vars

* chore: stub out Blocks component group

* fix(storybook): fix SVG class attr

* chore(lint): turn off react/prop-types rule

* chore(lint): eslint --fix + typescript annotations

* chore: storybook utils updates

* fix: use text-slate-4 in alerts

* feat: add Keyboard stories

* feat: add Containers stories

* chore(lint): fix linting of .storybook

* fix: sort icon symbols alphabetically

* chore: sort global parameter keys

* feat: tweak Icon story, add AllIcons

* chore: rename "Kbd" story to "<kbd>"

* feat(dev): add .tool-versions for asdf

* fix: wrap useBannerContent() children in <div>

* feat: add Tile component stories, polymorphic() util

* chore: add ts annotations

* feat: stub out Icon + Information lockups

* chore: rename Information stories

* chore: lint

* feat: stub out Locator Maps stories

* chore: set default parameters.design.type = 'figma'

* chore: stub out more component stories

* chore: lint

* chore: stub out form input stories

* chore: rename "Fields" to "Inputs"

* chore: stub out Tables, Lists, and Progress Indicators

* feat: add basic Step by Step stories

* chore: lint

* fix: fix context passing to withPropsTransform()

* chore: simplify button story components, table decorator

* chore(deps): install storysource addon

* fix: hide Storybook "Docs" tab

* feat: enable storysource addon

* feat: add StorybookLink component

* feat: add components index

* chore: add status column to components index

* chore: move StepByStep implementation to experiments

* chore: set titlePrefix for components + experiments dirs

* chore: move Alerts implementations to experiments

* chore: move Alerts implementations to experiments

* chore: fix up story titles

* chore: refactor TODOs with Stub.bind({})

* chore: move more implementations to experiments

* Fixes letter case of components/experiements paths

* chore(deps): install storybook-source-link, fix dev deps

* chore: set up storybook-source-link

* chore: add story source links for existing components

* fix: add missing <tr> in icon table

* chore: tidy

* chore: tidy button stories

* chore: lowercase stories/* directories

* fix: stop using argTypes..defaultValue

* chore(lint): fix

* fix(editor): set eslint.workingDirectories

* mock up a department page with styled components

* break up components

* fix linting errors

* another error grr

* add react to dev dependencies

* fix story directory name

* match docusaurus react version

* mock up data and add top-level prop for switching departments (#127)

* mock up data and add top-level prop for switching departments

* add section and tile components for page stories (#135)

* add section and tile components for page stories

* add contact and about sections (#138)

* add story and initial component for spotlights (#132)

* add story and initial component for spotlights

* simplify content ordering

* Create quick link component (#128)

* clean up dept page after merges

Co-authored-by: Shawn Allen <[email protected]>
Co-authored-by: Corey Hunt <[email protected]>

* chore(deps): upgrade storybook, nix reactd dev deps

* chore: nix react-specific .browserslistrc

* chore(docs): stub out react package readme

* chore(dx): add spellright.dict

* feat(build): build dist/bundled.mjs

* chore(vscode): recommend spellright extension

* fix(ci): actually build react package in CI

* Refactor with Stitches (#139)

* chore(lint): disable more rules when linting TS

* chore(deps): replace emotion/react + theme-ui with stitches/react

* chore(build): tweak rollup config for external deps

* chore: refactor for stitches

* chore: remove unused code

* feat: export Container component

* chore: lint

* feat: stub out Icon component

* fix: breakpoint viewports

* fix(theme): include theme.fonts

* chore: tidy up button story table styles

* chore(storybook): fix .bind() with styled components

* chore(storybook): bring back sfds.css for prototyping

* chore(ci): tighten up size reports (exclude .d.ts)

* fix(Button): don't export variant styles separately

* chore: add withFixedProps() utility

* feat(components): add Text component

* chore: tidy Button stories

* chore: flatten colors, nix sequential palette (for now)

* chore:update build script for top level running

* chore: bump storybook

* chore: bump docusaurus

* feat: add stories for Box, Container, Grid

* feat: stub out Flex stories

* chore(types): use VariantProps throughout

* fix: use VariantProps with Text variants

* React icons! (#140)

* chore(lint): disable more rules when linting TS

* chore(deps): replace emotion/react + theme-ui with stitches/react

* chore(build): tweak rollup config for external deps

* chore: refactor for stitches

* chore: remove unused code

* feat: export Container component

* chore: lint

* feat: stub out Icon component

* fix: breakpoint viewports

* fix(theme): include theme.fonts

* chore: tidy up button story table styles

* chore(storybook): fix .bind() with styled components

* chore(storybook): bring back sfds.css for prototyping

* chore(ci): tighten up size reports (exclude .d.ts)

* fix(Button): don't export variant styles separately

* chore: add withFixedProps() utility

* feat(components): add Text component

* chore: tidy Button stories

* chore: flatten colors, nix sequential palette (for now)

* feat(icons): stub out @sfgov/icons package

* chore: add generated SVG + React icons

* chore(deps): update types/node

* chore(deps): remove unused build configs from icons package, nix emotion/react

* chore(build): nix unused index.tsx from icons

* chore(build): rebuild icons with new svgo config

* feat(icons): rebuild Icon component

* feat(storybook): refactor icon stories, nix experiment

* feat(icons): generate better JSON indexes

* chore(ci): publish sfgov/icons from CI

* Feature/better icons (#142)

* feat(icons): export better JSON indexes of SVG + JSX

* chore(react): export icon components, types

* chore(react): simplify Icon component

* feat: add Flex inline prop

* chore: clean up prop types

* feat: export icon symbols separately

* chore(deps): nix sfgov/icons dependency from storybook

* chore: refactor Icon + stories

* fix(icons): add fill="currentcolor" to all svg outputs

* fix(icons): add fill="currentcolor" to all svg outputs

* chore(icons): fix JSX linting bits

* chore(deps): add @sfgov/icons to root package-lock

* chore(build): use env-cmd instead of wrapper script

* chore(build): output readable generated timestamps

* chore(deps): rebuild lockfile

* chore(build): rebuild react when tsconfig.json changes

* chore(build): remove json import

* chore(icons): break out svgo config

* chore(icons): rename XIcon to IconX

* chore(icons): rename Icon to SVGIcon

* feat(icons): export styled IconX symbols for each SVG icon

* chore(ts): add moduleResolution:node, target:es2020

* chore(storybook): refactor icon stories

* chore(publish): update package files list

* chore(build): export icon metadata with sizes

* chore: use icon sizes, nix regex when wrapping components

* Use Lerna to publish from Actions (#143)

* chore(deps): install @lerna-lite/publish

* chore(npm): add {NPM_AUTH_TOKEN} placeholder to .npmrc

* chore(publish): refactor ci workflow to run lerna publish

* chore: Publish new release

 - @sfgov/[email protected]
 - @sfgov/[email protected]
 - [email protected]
 - [email protected]

* fix(ci): publish 0.0.0-${GITHUB_SHA::7} for canary releases

* Revert "chore: Publish new release"

This reverts commit a9645f3.

* chore(npm): fix package-lock.json

* fix(ci): publish prereleases to "next" dist-tag

* chore: debug actions steps

* chore: fix publish actions conditionals

* fix(ci): git config user

* fix: use "from-package" bump spec on main

* fix: use --canary instead of "canary" positional

* fix(ci): fix lerna publish args

* fix(ci): derp derp

* fix(ci): run lerna publish --canary w/--force-publish

* fix(ci): try --preid canary w/lerna publish

* React global CSS and server-side rendering (#144)

* fix(react): export reset() function from createStitches()

* feat(next): add SSRStyle component

* feat(css): add GlobalStyle component with font imports

* chore: move fontFamily: "$body" to each text style

* chore(ts): tweak tsconfig.json

* chore(storybook): swap out imports for <GlobalStyle />

* chore(css): build out global + SSR style support

* chore(storybook): nix <GlobalStyle>, use SSR template in preview head

* chore(git): ignore .env

* chore(build): hush node import json warning

* feat(docs): use SSR preload links

* feat(ssr): add SSRStyle.getPreloadLinks()

* fix(storybook): use SSRStyle.getPreloadLinks() in preview head

* chore(docs): nix fonts.css import

* fix(css): over-specify Button color + backgroundColor

* chore: delete landingDesc from constants

* chore: delete unused index.module.css

* fix: add SSRStyle to swizzled DocPage

* fix: add missing m[trbl] and p[trbl] utils

* chore(docs): refactor SFGovIcon to TS, use styled()

* fix: add gap: 8 to Button styles

* chore(docs): move postcss config into sfgov plugin

* chore(docs): add typescript config

* chore(docs): swizzle Layout (wrapped)

* chore: refactor home page with sfgov/react

* chore: lint

* BREAKING: new font stack (#145)

* chore: refactor font specs, global + ssr styles

* chore: fixme note for injectHtmlTags() content

* chore: tidy up global + ssr + google font types

* chore(docs): build react package before docusaurus

* chore: lint

* chore(git): ignore .log files

* fix(ci): git fetch deeply to fix lerna publish

* fix(ci): don't lerna publish --force-publish

* We're pivoting to Stitches (#146)

* chore(react): refactor react components to use typescript and stitches

* uptake icon changes

* chore(storybook): fixup

* fix(ci): try using `git rev-parse` for canary release

* fix(ci): shorten SHA

* feat(react): stitch agency header and archive info

* fix(react): clean up dir path and typos

Co-authored-by: Shawn Allen <[email protected]>

* chore(refactor): move getPreloadLinks() out of SSRStyle

* chore(deps): bump wireit

* fix: lint

* fix(website): fix postcss config

* fix(docs): fix alignment class on editor header

* fix(editor): replace monospace for live editor compatibility

* Update .github/workflows/ci.yml

Co-authored-by: Shawn Allen <[email protected]>

* fix(ci): remove prerelease step

Co-authored-by: Jackson Flint-Gonzales <[email protected]>
Co-authored-by: Corey Hunt <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants