forked from adobe/react-spectrum
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
760 changed files
with
34,141 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"extends": "@parcel/config-default", | ||
"resolvers": ["@parcel/resolver-glob", "parcel-resolver-storybook", "..."], | ||
"transformers": { | ||
"packages/@react-spectrum/s2/{src,stories}/*.{js,mjs,jsm,jsx,es6,cjs,ts,tsx}": ["parcel-transformer-react-docgen-typescript", "..."], | ||
"packages/@react-spectrum/s2/s2wf-icons/*.svg": ["parcel-transformer-icon"], | ||
"packages/*/*/intl/*.json": ["parcel-transformer-intl"], | ||
// Disable PostCSS from running over style macro output | ||
"*.css": ["@parcel/transformer-css"], | ||
"*.{js,mjs,jsm,jsx,es6,cjs,ts,tsx}": [ | ||
"@parcel/transformer-js", | ||
"@parcel/transformer-react-refresh-wrap" | ||
], | ||
"*.svg": ["@parcel/transformer-svg-react"], | ||
"*.{mdx,md}": ["parcel-transformer-mdx-storybook"], | ||
"raw:*": ["@parcel/transformer-raw"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import icons from '@react-spectrum/s2/s2wf-icons/*.svg'; | ||
import { style } from '../../packages/@react-spectrum/s2/style/spectrum-theme' with {type: 'macro'}; | ||
import {ActionButton, Text} from '@react-spectrum/s2'; | ||
import {P, Code, Pre} from './typography'; | ||
import {highlight} from './highlight' with {type: 'macro'}; | ||
|
||
export function Icons() { | ||
return ( | ||
<div className={style({maxWidth: 'lg', marginX: 'auto', fontFamily: 'sans'})}> | ||
<div className={style({marginX: 48})}> | ||
<h1 className={style({fontSize: 'heading-2xl', color: 'heading', marginBottom: 48})}> | ||
Workflow icons | ||
</h1> | ||
<P>Spectrum 2 offers a subset of the icons currently available in React Spectrum v3. These icons can be imported from <Code>@react-spectrum/s2/icons</Code>.</P> | ||
<Pre>{highlight("import Add from '@react-spectrum/s2/icons/Add';")}</Pre> | ||
<P>See below for a full list of available icons. Click to copy import statement.</P> | ||
<div className={style({display: 'flex', flexWrap: 'wrap', gap: 4, marginTop: 48})}> | ||
{Object.keys(icons).map(icon => { | ||
let Icon = icons[icon].default; | ||
let name = icon.replace(/^S2_Icon_(.*?)_2.*/, '$1'); | ||
let importName = name.replace(/^(\d)/, '_$1'); | ||
return ( | ||
<ActionButton | ||
key={icon} | ||
onPress={() => navigator.clipboard.writeText(`import ${importName} from '@react-spectrum/s2/icons/${name}';`)}> | ||
<Icon /> | ||
<Text>{name}</Text> | ||
</ActionButton> | ||
); | ||
})} | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
} |
Oops, something went wrong.