-
Notifications
You must be signed in to change notification settings - Fork 832
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
V4 (Kauri) #200
Merged
Merged
V4 (Kauri) #200
Conversation
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
Hi there, Thank you for the work on Evergreen, it's amazing ! Thanks. |
* overview images * wip * mdx integration wip * wip testing mdx * wip docs provider * overview images * wip * mdx integration wip * wip testing mdx * wip docs provider * layout primitives * fix css * typography * small cleanup * colors + icons * button docs * tab docs * badge and pill * avatar docs * TextInput docs * SearchInput docs * Textarea docs * Autocomplete docs * filepicker docs * Select docs * Select docs * Combobox docs * SelectMenu docs * more examples for SelectMenu * Popover docs * Menu docs * Checkbox docs * Radio docs * SegmentedControl docs * Switch docs * toaster docs * Alert docs * Spinner docs * Dialog docs * SideSheet docs * IconButton docs * remove example * CornerDialog docs * Table docs * Portal docs * FormField docs * broken wip * fix portal * get started back to normal * docs homepage * docs media items * add spectrum link * github button * docs update * ssr and improvements * fix aboslutePath * remove old docs * fix imports * clean docs * docs & readme improvements * update readme and remove unused code * remove old code
* upgrade deps * update snaphosts
* master: (25 commits) Remove storybook-deployer v3.2.7 Fix typo in Tooltip proptypes (#321) fix githubLink pathname on ComponentReadme (#310) Use `rm -rf` in prepublishOnly Run the babel builds concurrently circleci: fix the gh-pages ignore config circleci: fix the gh-pages ignore Migrate to circleci 2.0 Adding a link to Synapse Fix wording in Toaster docs (#294) v3.2.6 allow default TableRow keypress events (#221) (#276) Fix misspelling of ListItem component name (#268) 🌲 CI status image (#263) Add link to v4 docs and PR Add more spacing Add Hero image Add GitHub hero Add note to v4 ... # Conflicts: # README.md # docs/src/components/ComponentReadme.js # package.json # src/segmented-control/src/SegmentedControl.js # src/segmented-control/src/SegmentedControlRadio.js # src/segmented-control/src/styles/SegmentedControlAppearances.js # src/select-menu/src/OptionsList.js # src/select-menu/src/SelectMenuContent.js # src/table/src/TableRow.js # src/table/stories/index.stories.js # src/toaster/docs/index.js # yarn.lock
* add segment tracking * improve ssr * fix
@mytototo, at the moment you can publically use evergreen-v4! (though it's in beta)
|
This makes sure that all components have a `displayName`.
* Upgrade most of the dependencies * Fix evergreen version in ssr example * Add @babel/runtime * Fix excluding the stories and tests from the build * Revert test order change * Upgrade ava and sinon * Upgrade husky hooks config
* BREAKING: bubble event in radio onChange * comply with linter
prateekgoel
pushed a commit
to prateekgoel/evergreen
that referenced
this pull request
Oct 26, 2018
* Stack component and React 16.3 * improvements * typo * add default value * themer wip * create select appearance * create link appearance * theme * fix border * progress on buttons theming * using new icons * in flight progress * withTheme single line * default theme cleanup in folder * more controls use withTheme * getTextareaClassName * getRowAppearance * getSelectClassName * getSegmentedControlClassName * remove ButtonAppearances * themed avatar * fixes * fix icon Combobox * themed badges * sunset icons * themed switch * remove color refs from components * updated colors story * default theme cleanup * upgrade to gatsby v2 * color docs * typography docs improvements * improve layer docs * improve alert docs * improve button docs * add icon docs * Table improvements + Menu component added * advanced table example * advanced table example * table docs update * component status fix * fix theme export + text size 600 * fix * 4.0.0-0 * scales added * 4.0.0-1 * color mapping example * prop type fix Select * fix tooltip * 4.0.0-2 * fix autofocus => autoFocus in Select * alert improvements * 4.0.0-3 * support auto height table rows * 4.0.0-4 * support border false * 4.0.0-5 * unify intent API, deprecate info * 4.0.0-6 * icon button default color change * 4.0.0-7 * docs update * Fix popover not closed when toggle button has children (segmentio#219) * Fix popover when toggle button has children * Add a story for popover * Update snapshot and fix tests * Refactor onbody click check * Increase package size limit * add hint prop to TextInputField * 4.0.0-8 * 4.0.0-9 * set default TextInputField height to 32 * 4.0.0-10 * add cursor not-allowed to disabled button * use transparent color for button disabled * focus management * Remove intent requirement on button, add default "none" (segmentio#225) * Remove intent requirement on button, add default "none" * Update snapshots * support is prop MenuItem * 4.0.0-11 * allow passthrough props on menu item, and always bubble highjacked events (segmentio#231) * 4.0.0-12 * increase the contrast of n1-level colors and fix typo (segmentio#232) * increase the contrast of n1-level colors and fix typo * wip update snap and B1 color * wip. update more snaps * 4.0.0-13 * size in lists + icons (segmentio#234) * 4.0.0-14 * Bug/select icon margin (segmentio#237) * add padding for icon on Select, add SelectField, add docs * wip. include in docs * wip * 4.0.0-15 * add export for SelectField (segmentio#238) * [v4] Fix button margin top (segmentio#240) * fix margin top button * fix tests * add focus handling to segmented control (segmentio#241) * [V4] tooltip inside popover (segmentio#239) * size in lists + icons * clean up * fix typo and add children check * fix * clean up * fix typo and add children check * fix * 4.0.0-16 * fix docs blank page (segmentio#244) * enable passing `defaultValue` for uncontrolled select inputs (segmentio#245) * 4.0.0-17 * fix icon placement (segmentio#248) * 4.0.0-18 * Remove caret right icon from sidebartab (segmentio#250) * 4.0.0-19 * fix jitter positioner (segmentio#257) * 4.0.0-20 * improve positioner calculations (segmentio#259) * 4.0.0-21 * fix css ssr (segmentio#264) * Fix hiding <Tooltip> by explicitly setting `isShown` to `false` (segmentio#265) * 4.0.0-22 * support onCancel callback prop (segmentio#266) * 4.0.0-23 * [v4] Add Table.VirtualBody (segmentio#267) * wip virtual body * add Table.VirtualBody * remove warning (segmentio#269) * fix fixed height virtual body (segmentio#270) * 4.0.0-24 * improve virtual body (segmentio#271) * 4.0.0-25 * Fix broken blueprint link (segmentio#273) Fixes a broken link in the docs for icons. ``` http://blueprintjs.com/docs/v2/#icons -> http://blueprintjs.com/docs/versions/2/#icons ``` * [v4] Add Editable/SelectMenu Cell (segmentio#274) * add Editable/SelectMenu Cell * minor tweaks * cleanup stories + improve table row interaction * cleanup imports * 4.0.0-26 * [V4] EditableCell improvements (segmentio#278) * wip disabled editable cell * editable cell improvements * remove controlled usage * 4.0.0-27 * [v4] Improve (SelectMenu/Editable)Cell and SegmentedControl (segmentio#281) * improve select menu/editable cell and segmented control * remove border right from cell * 4.0.0-28 * [v4] Table.(Editable/SelectMenu)Cell Fixes (segmentio#284) * fix size and isSelectable={true} * fixes to size and isSelectable={true} * 4.0.0-29 * fix editable cell position + tiny pixel shift radio (segmentio#286) * 4.0.0-30 * fix virtual body height calculation (segmentio#289) * 4.0.0-31 * improve editable/selectmenu cells (segmentio#293) * 4.0.0-32 * add left, right, top, bottom anchors to side-sheet (segmentio#252) * add left, right, top, bottom anchors to side-sheet * use Position enum in Side-sheet and cache calls to generating sheetCloseClassName * move Position to constants and update imports * fix another Position import * change SheetClose animation name and make position a required prop * 4.0.0-33 * fix search (segmentio#304) * 4.0.0-34 * Migrate to circleci 2.0 * circleci: fix the gh-pages ignore * circleci: fix the gh-pages ignore config * Run the babel builds concurrently * Make the Dialog mobile friendly (segmentio#301) * Make the dialog mobile friendly This change makes the dialog resize gracefuly to fit the available viewport. It should be a non-breaking change and the dialog should behave the same on desktop as it did before. * Add sideOffset * Remove unnecessary sideOffsetWithUnit variable * Use `rm -rf` in prepublishOnly * v4.0.0-35 * add docs to badge and pill (segmentio#307) * fix prop warnings and make list components more flexible (segmentio#315) * dialog: add horizontal scrolling support (segmentio#314) This allows the Dialog to gracefully handle block level content that's too wide by scrolling, preventing the Dialog from overflowing the sides of the viewport. This should be a non-breaking change. * add iconSize to IconButton component. closes segmentio#316 (segmentio#317) * 4.0.0-36 * Add "indeterminate" prop to <Checkbox> (segmentio#313) * Add "indeterminate" prop to <Checkbox> * Delete extraneous line * Remove permutation function, use plain JSX * Fix label * Add ref callback to set indeterminate prop * Add indeterminate styles * Remove console.log * Make prop order consistent * Clean up story * Uncomment commented-out styles * Remove duplicate styles * add position relative (segmentio#318) * 4.0.0-37 * Allow grammarly to be disabled for Textarea (segmentio#323) * Allow grammarly to be disabled for Textarea * Destructure grammarly from props * Improve cancelation behavior for SideSheet, Dialog, and Overlay (segmentio#324) * Extend cancelation handling in Dialog and Overlay This adds: - `shouldCloseOnEscapePress` and `shouldCloseOnClick` to `Overlay` and `Dialog` - Fixes a bug where `Dialog`'s did not trigger the `onCancel` handler when the close button was clicked. * Add Stories and SideSheet support * 4.0.0-38 * add Positioner support for Position.LEFT and Position.RIGHT (segmentio#299) * add Position.LEFT and Position.RIGHT positions to Positioner, Tooltip, and Popover * alter y axis to keep popover in viewport * 4.0.0-39 * remove empty divs from positioner (segmentio#330) * 4.0.0-40 * fix conflict between v3 and v4 toaster init order (segmentio#332) * 4.0.0-41 * Remove storybook-deployer * V4 Docs (segmentio#335) * overview images * wip * mdx integration wip * wip testing mdx * wip docs provider * overview images * wip * mdx integration wip * wip testing mdx * wip docs provider * layout primitives * fix css * typography * small cleanup * colors + icons * button docs * tab docs * badge and pill * avatar docs * TextInput docs * SearchInput docs * Textarea docs * Autocomplete docs * filepicker docs * Select docs * Select docs * Combobox docs * SelectMenu docs * more examples for SelectMenu * Popover docs * Menu docs * Checkbox docs * Radio docs * SegmentedControl docs * Switch docs * toaster docs * Alert docs * Spinner docs * Dialog docs * SideSheet docs * IconButton docs * remove example * CornerDialog docs * Table docs * Portal docs * FormField docs * broken wip * fix portal * get started back to normal * docs homepage * docs media items * add spectrum link * github button * docs update * ssr and improvements * fix aboslutePath * remove old docs * fix imports * clean docs * docs & readme improvements * update readme and remove unused code * remove old code * Upgrade dependencies v4 (segmentio#336) * upgrade deps * update snaphosts * add segment tracking (segmentio#337) * Tracking fix (segmentio#338) * add segment tracking * improve ssr * fix * Bug/radio indeterminate (segmentio#340) * v4.0.0-42 * Add babel-plugin-add-react-displayname This makes sure that all components have a `displayName`. * v4.0.0-43 * Add displayName to withTheme * v4.0.0-44 * Upgrade most of the dependencies (segmentio#344) * Upgrade most of the dependencies * Fix evergreen version in ssr example * Add @babel/runtime * Fix excluding the stories and tests from the build * Revert test order change * Upgrade ava and sinon * Upgrade husky hooks config * remove unused TableCell props (segmentio#342) * BREAKING: bubble event in radio onChange (segmentio#341) * BREAKING: bubble event in radio onChange * comply with linter * 4.0.0-45
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🎉 This is the biggest major release so far 🎉
High Level Improvements
v16.3
.Icon
component using BlueprintJS iconsButton
,IconButton
,Alert
,InlineAlert
,Dialog
,CornerDialog
,Table.Row
andMenu.Item
.intent
property that accepts:none
,success
,danger
,warning
appearance
property changed to accept:default
,minimal
,primary
Pane
APIs changed.appearance
is deprecated forbackground
.z-index
management with the newStack
component.Table
componentTable
directly.Table.TextCell
,Table.Row
etc.Table.Row
and default is48
Table.EditableCell
component.Table.SelectMenuCell
component.Table.VirtualBody
component.minorScale
andmajorScale
exported.Menu
componentReact.createContext
.Themer
object for help with generating styles.Deprecated Components and Styles
Components with Breaking Changes
Upgrade Guide
Theme
One of the biggest changes in Evergreen v4 is the addition of a theming layer. The goal of this theming layer in this version is not to offer a simple theming mechanism, but rather create a flexible foundational API we can simplify in the future. Although Evergreen exposes theming capabilities. It's still considered a private API. Breaking changes may occur in minor releases.
Theme Utilities
The theming API uses the
React.createContext
API added in Reactv16.3.0
. Evergreen exports the following utilities for theming:ThemeProvider
The
ThemeProvider
is used to provide a new theme to all childThemeConsumer
s. Please refer to the code to learn how this works.ThemeConsumer
The
ThemeConsumer
is the best way to access the current theme object. This is primarily useful for documentation. To create components that rely on thetheme
object, thewithTheme
HoC is the preferred method to access the theme object.withTheme
To create components that rely on the
theme
object, use thewithTheme
HoC. You will see the following pattern being used within Evergreen:defaultTheme
The recommended way to access the theme should be through the
ThemeConsumer
. However, the default theme is also directly exported to help with migration fromv3
tov4
. The main use case is to migrate places in which you importcolors
andTextStyles
directly.Colors
The color system in Evergreen is located in the theme and is used throughout the theme. There is no real dependency on any of the colors directly within components. Components always access a theme color or property through a get function. For example,
theme.getTextColor
is a required function in the Evergreen theme,theme.colors
is not a required property and not directly used.Colors are no longer directly exported from Evergreen. They are available on the
defaultTheme
or through aThemeConsumer
preferably.To help with the upgrade process, some useful variables are available on the
defaultTheme
:defaultTheme.colors
— functional theme colors.defaultTheme.palette
— palette colors. Each color group has 4 variations:lightest
,light
,base
,dark
.defaultTheme.scales
— blue and neutral have a more advanced scale of 10 colors.defaultTheme.fills
— colors used for Avatars, Badges, Pills.Palette
Mapping old colors
turquoise
is renamed toteal
.pink
colors is deprecated.orange
color is addedyellow
for the warning intent. Please use the orangewarning
color instead.Mapping base
500
colors to thedefaultTheme.palette
The easiest colors to map to the new colors are base colors. Which previously were labeled as
500
.colors.turquoise['500']
defaultTheme.teal.base
colors.red['500']
defaultTheme.red.base
colors.yellow['500']
defaultTheme.yellow.base
colors.red['500']
defaultTheme.red.base
colors.blue['500']
defaultTheme.blue.base
colors.neutral['500']
defaultTheme.neutral.base
colors.green['500']
defaultTheme.green.base
colors.purple['500']
defaultTheme.purple.base
colors.pink['500']
defaultTheme.orange.base
Mapping dark
1000
colors to thedefaultTheme.palette
You can map any color that is
900
or1000
to the dark variant.colors.turquoise['1000']
defaultTheme.teal.dark
colors.red['1000']
defaultTheme.red.dark
colors.yellow['1000']
defaultTheme.yellow.dark
colors.red['1000']
defaultTheme.red.dark
colors.blue['1000']
defaultTheme.blue.dark
colors.neutral['1000']
defaultTheme.neutral.dark
colors.green['1000']
defaultTheme.green.dark
colors.purple['1000']
defaultTheme.purple.dark
colors.pink['1000']
defaultTheme.orange.dark
Mapping light
30
colors to thedefaultTheme.palette
You can colors that are around
30
to thelight
variant.If you need different colors for different states use a lighten/darken function.
colors.turquoise['30']
defaultTheme.teal.light
colors.red['30']
defaultTheme.red.light
colors.yellow['30']
defaultTheme.yellow.light
colors.red['30']
defaultTheme.red.light
colors.blue['30']
defaultTheme.blue.light
colors.neutral['30']
defaultTheme.neutral.light
colors.green['30']
defaultTheme.green.light
colors.purple['30']
defaultTheme.purple.light
colors.pink['30']
defaultTheme.orange.light
Mapping lightest
5
colors to thedefaultTheme.palette
You can map colors that are around
5
to thelightest
variant.If you need different colors for different states use a lighten/darken function.
colors.turquoise['5']
defaultTheme.teal.lightest
colors.red['5']
defaultTheme.red.lightest
colors.yellow['5']
defaultTheme.yellow.lightest
colors.red['5']
defaultTheme.red.lightest
colors.blue['5']
defaultTheme.blue.lightest
colors.neutral['5']
defaultTheme.neutral.lightest
colors.green['5']
defaultTheme.green.lightest
colors.purple['5']
defaultTheme.purple.lightest
colors.pink['5']
defaultTheme.orange.lightest
Exact Mapping
3A–400A
colors withtinycolor2
color['3A']
tinycolor(color).setAlpha(0.025).toString()
color['5A']
tinycolor(color).setAlpha(0.041).toString()
color['7A']
tinycolor(color).setAlpha(0.057).toString()
color['10A']
tinycolor(color).setAlpha(0.079).toString()
color['15A']
tinycolor(color).setAlpha(0.114).toString()
color['20A']
tinycolor(color).setAlpha(0.146).toString()
color['30A']
tinycolor(color).setAlpha(0.204).toString()
color['40A']
tinycolor(color).setAlpha(0.255).toString()
color['50A']
tinycolor(color).setAlpha(0.301).toString()
color['60A']
tinycolor(color).setAlpha(0.342).toString()
color['70A']
tinycolor(color).setAlpha(0.38).toString()
color['80A']
tinycolor(color).setAlpha(0.415).toString()
color['90A']
tinycolor(color).setAlpha(0.447).toString()
color['100A']
tinycolor(color).setAlpha(0.477).toString()
color['125A']
tinycolor(color).setAlpha(0.544).toString()
color['150A']
tinycolor(color).setAlpha(0.602).toString()
color['175A']
tinycolor(color).setAlpha(0.653).toString()
color['200A']
tinycolor(color).setAlpha(0.699).toString()
color['300A']
tinycolor(color).setAlpha(0.845).toString()
color['400A']
tinycolor(color).setAlpha(0.954).toString()
Exact Mapping
3–400
colors withtinycolor2
color['3A']
tinycolor.mix('white', color, 0.025 * 100).toString()
color['5A']
tinycolor.mix('white', color, 0.041 * 100).toString()
color['7A']
tinycolor.mix('white', color, 0.057 * 100).toString()
color['10A']
tinycolor.mix('white', color, 0.079 * 100).toString()
color['15A']
tinycolor.mix('white', color, 0.114 * 100).toString()
color['20A']
tinycolor.mix('white', color, 0.146 * 100).toString()
color['30A']
tinycolor.mix('white', color, 0.204 * 100).toString()
color['40A']
tinycolor.mix('white', color, 0.255 * 100).toString()
color['50A']
tinycolor.mix('white', color, 0.301 * 100).toString()
color['60A']
tinycolor.mix('white', color, 0.342 * 100).toString()
color['70A']
tinycolor.mix('white', color, 0.38 * 100).toString()
color['80A']
tinycolor.mix('white', color, 0.415 * 100).toString()
color['90A']
tinycolor.mix('white', color, 0.447 * 100).toString()
color['100A']
tinycolor.mix('white', color, 0.477 * 100).toString()
color['125A']
tinycolor.mix('white', color, 0.544 * 100).toString()
color['150A']
tinycolor.mix('white', color, 0.602 * 100).toString()
color['175A']
tinycolor.mix('white', color, 0.653 * 100).toString()
color['200A']
tinycolor.mix('white', color, 0.699 * 100).toString()
color['300A']
tinycolor.mix('white', color, 0.845 * 100).toString()
color['400A']
tinycolor.mix('white', color, 0.954 * 100).toString()
Almost Exact Mapping
600–1000
colors withtinycolor2
There is currently no longer any colors for
600, 700, 800, 900
colors forpalette
colors.We do export a new
defaultTheme.scales
property that exports some extra shades forblue
andneutral
. However, if you need a almost exact match to the old colors usetinycolor2
.colors.green['600']
tinycolor(palette.green.base).darken(3).toString()
colors.green['700']
tinycolor(palette.green.base).darken(5).toString()
colors.green['800']
tinycolor(palette.green.base).darken(9).toString()
colors.green['900']
tinycolor(palette.green.base).darken(13).toString()
colors.green['1000']
tinycolor(palette.green.base).darken(20).toString()
Mapping Icon example
<WarningIcon color={colors.yellow['500']} />
<Icon icon="warning-sign" color="warning" />
Pane + Card
Appearance is now background.
Pane
component no longer accepts theappearance
property. Use thebackground
property instead.appearance="selected"
is deprecated.appearance="dark"
is deprecated.appearance="tint3"
is deprecated. Usebackground="tint2"
instead.<Pane appearance="tint1" />
<Pane background="tint1" />
<Pane appearance="tint2" />
<Pane background="tint2" />
<Pane appearance="tint3" />
<Pane background="tint2" />
<Card appearance="tint1" />
<Card background="tint1" />
<Card appearance="tint2" />
<Card background="tint2" />
<Card appearance="tint3" />
<Card background="tint2" />
Borders are different.
extraMuted
is deprecated.extraMuted
property anymore. Usemuted
instead.BorderColors.muted
in v3 isdefault
in v4BorderColors.extraMuted
in v3 ismuted
in v4BorderColors.default
is deprecated<Pane borderRight
<Pane borderRight />
<Pane borderRight="muted" />
<Pane borderRight="default" />
<Pane borderRight="extraMuted" />
<Pane borderRight="muted" />
<Pane borderRight="default" />
<Pane borderRight="default" />
Button
intent
property that accepts:none
,success
,danger
,warning
appearance
property changed to accept:default
,minimal
,primary
cursor: not-allowed;
when buttons are disabledmarginTop
on theButton
component. [v4] Fix button margin top #240Before / After
<Button appearance="green" />
<Button appearance="primary" intent="success" />
<Button appearance="blue" />
<Button appearance="primary" />
<Button appearance="danger" />
<Button appearance="primary" intent="danger" />
<Button appearance="ghostBlue" />
<Button appearance="minimal" />
<Button appearance="ghost" />
<Button appearance="minimal" />
IconButton
intent
property that accepts:none
,success
,danger
,warning
appearance
property changed to accept:default
,minimal
,primary
iconSize
prop to IconButton component. add iconSize to IconButton component. closes #316 #317Icon
Box
.size
property.aim
prop deprecatediconWidth
prop deprecatediconHeight
prop deprecated<AddIcon />
<Icon icon="plus" />
<CheckCircleIcon />
<Icon icon="tick-circle" />
<CloseIcon />
<Icon icon="cross" />
<CogIcon />
<Icon icon="cog" />
<DangerIcon />
<Icon icon="error" />
<QuestionIcon />
<Icon icon="info-sign" />
<SearchIcon />
<Icon icon="search" />
<WarningIcon />
<Icon icon="warning-sign" />
Icons with aim
v4 no longer supports the aim property on icons. Instead use the icon for it.
<ArrowIcon />
<Icon icon="arrow-up" />
<ArrowIcon aim="right" />
<Icon icon="arrow-right" />
<ArrowIcon aim="left" />
<Icon icon="arrow-left" />
<ArrowIcon aim="bottom" />
<Icon icon="arrow-bottom" />
<TriangleIcon />
<Icon icon="caret-up" />
<TriangleIcon aim="right" />
<Icon icon="caret-right" />
<TriangleIcon aim="left" />
<Icon icon="caret-left" />
<TriangleIcon aim="down" />
<Icon icon="caret-down" />
Avatar
appearance
is deprecated. Usecolor
prop instead.<Avatar appearance="green" />
<Avatar color="green" />
Badge + Pills
appearance
is deprecated. Usecolor
prop instead.<Badge appearance="green" />
<Badge color="green" />
<Pill appearance="green" />
<Pill color="green" />
Dialog
intent
API.type
prop deprecated. Useintent
instead.<Dialog type="danger" {...otherProps} />
<Dialog intent="danger" {...otherProps} />
Alert
intent
API.type
prop deprecated. Useintent
instead.Heading
andParagraph
instead ofText
<Alert type="none" {...otherProps} />
<Alert intent="none" {...otherProps} />
<Alert type="danger" {...otherProps} />
<Alert intent="danger" {...otherProps} />
<Alert type="warning" {...otherProps} />
<Alert intent="warning" {...otherProps} />
<Alert type="success" {...otherProps} />
<Alert intent="success" {...otherProps} />
Typography
All typography information is now passed through the theme.
The following documentation describes the default theme settings.
SubHeading
component is deprecated.marginTop="default"
Typography - Text
size={300 | 400 | 500 | 600}
.400
Link
component that can be used as a big breadcrumb in some cases and is based on theText
componentDeprecated
color="extraMuted"
is deprecated. Usecolor="muted"
instead.isUppercase
prop is deprecated.textStyles
prop is deprecated.textUppercaseStyles
prop is deprecated.Typography - Paragraph
Paragraph no longer implements the
Text
component......instead paragraph styles are passed through the theme independently.
Paragraph only supports
size={300 | 400 | 500}
. Not 600!400
inherited props from Text are deprecated
isUppercase
prop is deprecated.textStyles
prop is deprecated.textUppercaseStyles
prop is deprecated.Typography - Heading
Heading no longer implements the
Text
component......instead heading styles are passed through the theme independently.
Font family
display
is used for text sizes above and including20px
.Font family
ui
is used for text sizes below20px
Heading sizes support
size={100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900}
.size={100}
is uppercaseisUppercase
prop is deprecated.inherited props from Text are deprecated
textStyles
prop is deprecated.textUppercaseStyles
prop is deprecated.Typography - Link
appearance
deprecated forcolor
.Link
acceptssize={300 | 400 | 500 | 600}
.<Link />
<Link color="green" />
<Link appearance="blue" />
<Link />
<Link appearance="neutral" />
<Link color="neutral" />
Table
Table
directly.Table.TextCell
,Table.Row
etc.borderRight
on table cells.Table.Row
and default is48
.intent
prop added toTable.Row
.TableBody
Table.Body
TableHead
Table.Head
TableHeaderCell
Table.HeaderCell
TextTableHeaderCell
Table.TextHeaderCell
SearchTableHeaderCell
Table.SearchHeaderCell
TableRow
Table.Row
TableCell
Table.Cell
TextTableCell
Table.TextCell
Table.Cell
rightView
property, mainly for icons + icon buttons. [V4] EditableCell improvements #278Table.Row
height="auto"
for Table.Row heightTable.Row
uses keyboard navigation (ArrowUp/Down) instead of tabbed navigation. [v4] Add Editable/SelectMenu Cell #274mainRef
[v4] TypeError: n.mainRef.blur is not a function #303 .Table.VirtualBody (new)
Table.VirtualBody
component. [v4] Add Table.VirtualBody #267overscanAmount
propertyitemSize
whenallowAutoHeights
isfalse
.Table.SelectMenuCell (new)
Table.SelectMenuCell
— editable table cell component. [v4] Add Editable/SelectMenu Cell #274caret-down
icon for therightView
property. [V4] EditableCell improvements #278Table.EditableCell
acceptstextProps
properly. [v4] Table.SelectMenuCell support disabled and isSelectable and textProps #280disabled
property. [v4] Table.SelectMenuCell support disabled and isSelectable and textProps #280placeholder
property. [v4] Table.SelectMenuCell support disabled and isSelectable and textProps #280isSelectable
property. [v4] Table.SelectMenuCell support disabled and isSelectable and textProps #280isSelectable
default prop is nowtrue
. [v4] Table.SelectMenuCell isSelectable default should be true #283Table.SelectMenuCell
now toggles the SelectMenu on single click when focused. [v4] Table.SelectMenuCell should open on click when focused #291Table.SelectMenuCell
now hascursor: pointer;
when selected. [v4] Table.SelectMenuCell should open on click when focused #291Table.EditableCell (new)
Table.EditableCell
— table cell that implements a SelectMenu. [v4] Add Editable/SelectMenu Cell #274disabled
property. [V4] EditableCell improvements #278placeholder
property. [V4] EditableCell improvements #278isSelectable
prop optional. [V4] EditableCell improvements #278Table.EditableCell
acceptstextProps
properly. [v4] Table.EditableCell accept textProps #279Button
focusAndActive
state ingetButtonClassName
[v4] Fix missing state in getButtonClassName #269Scales
minorScale
andmajorScale
Evergreen now exports two helper methods to conform to the 4 (px) minor scale and 8 (px) major scale.
Both scales only except integers as input and will otherwise throw a
TypeError
.Stack
component and StackingV4 ships a fix for nesting Popovers, SelectMenu and Combobox in Dialogs and SideSheets. And layering Dialogs on top of Dialogs. Essentially allowing infinite layering anything that uses a
Stack
component.Changes
createContext
APIStackingContext
fromevergreen-ui
Stack
component fromevergreen-ui
StackingOrder
object with z-index presets fromevergreen-ui
.zIndex
props from Popover, Combobox and Positioner.StackingContext
The StackingContext is a React context with a default value (z-index) of
10
. The StackingContext is currently only used within theStack
component within Evergreen.Stack component
The Stack component uses the StackingContext which accepts a function as children. That function takes in the zIndex and should return a React node:
Inside of the render function the Stack component first looks for the current value. Passing a value to the component will make sure the highest of the two are used. This is useful because Overlays start at a
z-index
of 20. See more info below aboutStackingOrder
. The Stack component will pass the current value to the current children, and increment the value for the next consumer.Stack component usage
In most cases Stack will be an internal component, we are exposing it if you want to build custom components on top of this logic.
StackingOrder
The values here are somewhat random, the reason why POSITIONER and OVERLAY are 10 apart is that in between the Stack component can increment the z-index — giving a head room of 10 z-indexes.
StackingOrder Example
I tweeted about this with a video attached. Click the link below to see.
Toaster
toaster.info
is deprecated. Usetoaster.notify
instead.SelectMenu
isMultiSelect
prop added to SelectMenu. Use when using multi select.SelectMenu
selection now skips filtered items. Only visible items are selected.SelectMenu
scrolls to the selected item by settingscrollToIndex
onVirtualList
.Tooltip
getTooltipProps
from theme (bug)isShown={false}
Fix hiding <Tooltip> by explicitly settingisShown
tofalse
#265Select
autoFocus
prop instead ofautofocus
[v4] Invalid DOM propertyautofocus
fromBox
#213string.required
=>string.isRequired
[v4]Select
prop-type appearance warning #212<Select />
when placed inside flex containers or when allowed to have an unconstrained width (width: auto
) by includingpaddingRight={sizeOfIconPlusPaddingX}
. Bug/select icon margin #237TextInputField / FormField
hint
property toTextInputField
which is under the input element.FormFieldHint
FormFieldValidationMessage
TextInputField
32
instead of36
[v4] TextInputField has different input font-size than TextInput #220.SegmentedControl
boolean
,number
andstring
values now all properly supported. [v4] Improve (SelectMenu/Editable)Cell and SegmentedControl #281Select / SelectField
SelectField
add export for SelectField #238defaultValue
prop to Select [v4] enable passingdefaultValue
for uncontrolled select inputs #245Menu (new)
Menu.Item
componentMenu.Group
componentMenu.Divider
componentMenu.Option
componentMenu.OptionsGroup
componentMenu
componentHome
andEnd
key to jump to first and last component[role="menuitem"]
and[role="menuitemradio"]
elements within the Menu.UnorderedList, OrderedList, ListItem
size
prop toOrderedList
andUnorderedList
iconColor
andicon
prop toOrderedList
andListItem
icon/iconColor
inOrderedList
andListItem
,ListItem
will override the propertySidebarTab
SidebarTab
component Remove sidebar tab icon #250Popover
Popover
content.Positioner
Positioner
which affectsPopover
andTooltip
. [v4] Fix jitter in Positioner (Popover and Tooltip) #257Positioner
calculations andtransform-origin
. [v4] Improve Positioner calculations #259Position.LEFT
andPosition.RIGHT
. add Positioner support for Position.LEFT and Position.RIGHT #299Positioner
Portal. [v4] Remove empty divs from Positioner Portal #330Position
Position constant values updated throughout Evergreen.
SideSheet
Dialog
onCancel
when cancel button is triggered Bug/on cancel #266sideOffset
property was also added which controls the space on the left/right sides of the Dialog when there isn't enough horizontal space available on screen. Make the Dialog mobile friendly #301Dialog + Overlay + SideSheet
shouldCloseOnEscapePress
andshouldCloseOnClick
toOverlay
,Dialog
, andSideSheet
Improve cancelation behavior for SideSheet, Dialog, and Overlay #324Dialog
's did not trigger theonCancel
handler when the close button was clicked. Improve cancelation behavior for SideSheet, Dialog, and Overlay #324Checkbox
Checkbox
component. Add "indeterminate" prop to <Checkbox> #313Radio
Other Changes
Docs