-
Notifications
You must be signed in to change notification settings - Fork 814
V4 (Kauri) #200
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
Merged
Merged
V4 (Kauri) #200
Conversation
This file contains hidden or 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
Contributor
|
@mytototo, at the moment you can publically use evergreen-v4! (though it's in beta) |
Contributor
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.Iconcomponent using BlueprintJS iconsButton,IconButton,Alert,InlineAlert,Dialog,CornerDialog,Table.RowandMenu.Item.intentproperty that accepts:none,success,danger,warningappearanceproperty changed to accept:default,minimal,primaryPaneAPIs changed.appearanceis deprecated forbackground.z-indexmanagement with the newStackcomponent.TablecomponentTabledirectly.Table.TextCell,Table.Rowetc.Table.Rowand default is48Table.EditableCellcomponent.Table.SelectMenuCellcomponent.Table.VirtualBodycomponent.minorScaleandmajorScaleexported.MenucomponentReact.createContext.Themerobject 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.createContextAPI added in Reactv16.3.0. Evergreen exports the following utilities for theming:ThemeProvider
The
ThemeProvideris used to provide a new theme to all childThemeConsumers. Please refer to the code to learn how this works.ThemeConsumer
The
ThemeConsumeris the best way to access the current theme object. This is primarily useful for documentation. To create components that rely on thethemeobject, thewithThemeHoC is the preferred method to access the theme object.withTheme
To create components that rely on the
themeobject, use thewithThemeHoC. 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 fromv3tov4. The main use case is to migrate places in which you importcolorsandTextStylesdirectly.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.getTextColoris a required function in the Evergreen theme,theme.colorsis not a required property and not directly used.Colors are no longer directly exported from Evergreen. They are available on the
defaultThemeor through aThemeConsumerpreferably.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
turquoiseis renamed toteal.pinkcolors is deprecated.orangecolor is addedyellowfor the warning intent. Please use the orangewarningcolor instead.Mapping base
500colors to thedefaultTheme.paletteThe easiest colors to map to the new colors are base colors. Which previously were labeled as
500.colors.turquoise['500']defaultTheme.teal.basecolors.red['500']defaultTheme.red.basecolors.yellow['500']defaultTheme.yellow.basecolors.red['500']defaultTheme.red.basecolors.blue['500']defaultTheme.blue.basecolors.neutral['500']defaultTheme.neutral.basecolors.green['500']defaultTheme.green.basecolors.purple['500']defaultTheme.purple.basecolors.pink['500']defaultTheme.orange.baseMapping dark
1000colors to thedefaultTheme.paletteYou can map any color that is
900or1000to the dark variant.colors.turquoise['1000']defaultTheme.teal.darkcolors.red['1000']defaultTheme.red.darkcolors.yellow['1000']defaultTheme.yellow.darkcolors.red['1000']defaultTheme.red.darkcolors.blue['1000']defaultTheme.blue.darkcolors.neutral['1000']defaultTheme.neutral.darkcolors.green['1000']defaultTheme.green.darkcolors.purple['1000']defaultTheme.purple.darkcolors.pink['1000']defaultTheme.orange.darkMapping light
30colors to thedefaultTheme.paletteYou can colors that are around
30to thelightvariant.If you need different colors for different states use a lighten/darken function.
colors.turquoise['30']defaultTheme.teal.lightcolors.red['30']defaultTheme.red.lightcolors.yellow['30']defaultTheme.yellow.lightcolors.red['30']defaultTheme.red.lightcolors.blue['30']defaultTheme.blue.lightcolors.neutral['30']defaultTheme.neutral.lightcolors.green['30']defaultTheme.green.lightcolors.purple['30']defaultTheme.purple.lightcolors.pink['30']defaultTheme.orange.lightMapping lightest
5colors to thedefaultTheme.paletteYou can map colors that are around
5to thelightestvariant.If you need different colors for different states use a lighten/darken function.
colors.turquoise['5']defaultTheme.teal.lightestcolors.red['5']defaultTheme.red.lightestcolors.yellow['5']defaultTheme.yellow.lightestcolors.red['5']defaultTheme.red.lightestcolors.blue['5']defaultTheme.blue.lightestcolors.neutral['5']defaultTheme.neutral.lightestcolors.green['5']defaultTheme.green.lightestcolors.purple['5']defaultTheme.purple.lightestcolors.pink['5']defaultTheme.orange.lightestExact Mapping
3A–400Acolors withtinycolor2color['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–400colors withtinycolor2color['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–1000colors withtinycolor2There is currently no longer any colors for
600, 700, 800, 900colors forpalettecolors.We do export a new
defaultTheme.scalesproperty that exports some extra shades forblueandneutral. 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.
Panecomponent no longer accepts theappearanceproperty. Use thebackgroundproperty 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.
extraMutedis deprecated.extraMutedproperty anymore. Usemutedinstead.BorderColors.mutedin v3 isdefaultin v4BorderColors.extraMutedin v3 ismutedin v4BorderColors.defaultis deprecated<Pane borderRight<Pane borderRight /><Pane borderRight="muted" /><Pane borderRight="default" /><Pane borderRight="extraMuted" /><Pane borderRight="muted" /><Pane borderRight="default" /><Pane borderRight="default" />Button
intentproperty that accepts:none,success,danger,warningappearanceproperty changed to accept:default,minimal,primarycursor: not-allowed;when buttons are disabledmarginTopon theButtoncomponent. [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
intentproperty that accepts:none,success,danger,warningappearanceproperty changed to accept:default,minimal,primaryiconSizeprop to IconButton component. add iconSize to IconButton component. closes #316 #317Icon
Box.sizeproperty.aimprop deprecatediconWidthprop deprecatediconHeightprop 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
appearanceis deprecated. Usecolorprop instead.<Avatar appearance="green" /><Avatar color="green" />Badge + Pills
appearanceis deprecated. Usecolorprop instead.<Badge appearance="green" /><Badge color="green" /><Pill appearance="green" /><Pill color="green" />Dialog
intentAPI.typeprop deprecated. Useintentinstead.<Dialog type="danger" {...otherProps} /><Dialog intent="danger" {...otherProps} />Alert
intentAPI.typeprop deprecated. Useintentinstead.HeadingandParagraphinstead 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.
SubHeadingcomponent is deprecated.marginTop="default"Typography - Text
size={300 | 400 | 500 | 600}.400Linkcomponent that can be used as a big breadcrumb in some cases and is based on theTextcomponentDeprecated
color="extraMuted"is deprecated. Usecolor="muted"instead.isUppercaseprop is deprecated.textStylesprop is deprecated.textUppercaseStylesprop is deprecated.Typography - Paragraph
Paragraph no longer implements the
Textcomponent......instead paragraph styles are passed through the theme independently.
Paragraph only supports
size={300 | 400 | 500}. Not 600!400inherited props from Text are deprecated
isUppercaseprop is deprecated.textStylesprop is deprecated.textUppercaseStylesprop is deprecated.Typography - Heading
Heading no longer implements the
Textcomponent......instead heading styles are passed through the theme independently.
Font family
displayis used for text sizes above and including20px.Font family
uiis used for text sizes below20pxHeading sizes support
size={100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900}.size={100}is uppercaseisUppercaseprop is deprecated.inherited props from Text are deprecated
textStylesprop is deprecated.textUppercaseStylesprop is deprecated.Typography - Link
appearancedeprecated forcolor.Linkacceptssize={300 | 400 | 500 | 600}.<Link /><Link color="green" /><Link appearance="blue" /><Link /><Link appearance="neutral" /><Link color="neutral" />Table
Tabledirectly.Table.TextCell,Table.Rowetc.borderRighton table cells.Table.Rowand default is48.intentprop added toTable.Row.TableBodyTable.BodyTableHeadTable.HeadTableHeaderCellTable.HeaderCellTextTableHeaderCellTable.TextHeaderCellSearchTableHeaderCellTable.SearchHeaderCellTableRowTable.RowTableCellTable.CellTextTableCellTable.TextCellTable.Cell
rightViewproperty, mainly for icons + icon buttons. [V4] EditableCell improvements #278Table.Row
height="auto"for Table.Row heightTable.Rowuses 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.VirtualBodycomponent. [v4] Add Table.VirtualBody #267overscanAmountpropertyitemSizewhenallowAutoHeightsisfalse.Table.SelectMenuCell (new)
Table.SelectMenuCell— editable table cell component. [v4] Add Editable/SelectMenu Cell #274caret-downicon for therightViewproperty. [V4] EditableCell improvements #278Table.EditableCellacceptstextPropsproperly. [v4] Table.SelectMenuCell support disabled and isSelectable and textProps #280disabledproperty. [v4] Table.SelectMenuCell support disabled and isSelectable and textProps #280placeholderproperty. [v4] Table.SelectMenuCell support disabled and isSelectable and textProps #280isSelectableproperty. [v4] Table.SelectMenuCell support disabled and isSelectable and textProps #280isSelectabledefault prop is nowtrue. [v4] Table.SelectMenuCell isSelectable default should be true #283Table.SelectMenuCellnow toggles the SelectMenu on single click when focused. [v4] Table.SelectMenuCell should open on click when focused #291Table.SelectMenuCellnow 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 #274disabledproperty. [V4] EditableCell improvements #278placeholderproperty. [V4] EditableCell improvements #278isSelectableprop optional. [V4] EditableCell improvements #278Table.EditableCellacceptstextPropsproperly. [v4] Table.EditableCell accept textProps #279Button
focusAndActivestate ingetButtonClassName[v4] Fix missing state in getButtonClassName #269Scales
minorScaleandmajorScaleEvergreen 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.Stackcomponent 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
Stackcomponent.Changes
createContextAPIStackingContextfromevergreen-uiStackcomponent fromevergreen-uiStackingOrderobject with z-index presets fromevergreen-ui.zIndexprops 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 theStackcomponent 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-indexof 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.infois deprecated. Usetoaster.notifyinstead.SelectMenu
isMultiSelectprop added to SelectMenu. Use when using multi select.SelectMenuselection now skips filtered items. Only visible items are selected.SelectMenuscrolls to the selected item by settingscrollToIndexonVirtualList.Tooltip
getTooltipPropsfrom theme (bug)isShown={false}Fix hiding <Tooltip> by explicitly settingisShowntofalse#265Select
autoFocusprop instead ofautofocus[v4] Invalid DOM propertyautofocusfromBox#213string.required=>string.isRequired[v4]Selectprop-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
hintproperty toTextInputFieldwhich is under the input element.FormFieldHintFormFieldValidationMessageTextInputField
32instead of36[v4] TextInputField has different input font-size than TextInput #220.SegmentedControl
boolean,numberandstringvalues now all properly supported. [v4] Improve (SelectMenu/Editable)Cell and SegmentedControl #281Select / SelectField
SelectFieldadd export for SelectField #238defaultValueprop to Select [v4] enable passingdefaultValuefor uncontrolled select inputs #245Menu (new)
Menu.ItemcomponentMenu.GroupcomponentMenu.DividercomponentMenu.OptioncomponentMenu.OptionsGroupcomponentMenucomponentHomeandEndkey to jump to first and last component[role="menuitem"]and[role="menuitemradio"]elements within the Menu.UnorderedList, OrderedList, ListItem
sizeprop toOrderedListandUnorderedListiconColorandiconprop toOrderedListandListItemicon/iconColorinOrderedListandListItem,ListItemwill override the propertySidebarTab
SidebarTabcomponent Remove sidebar tab icon #250Popover
Popovercontent.Positioner
Positionerwhich affectsPopoverandTooltip. [v4] Fix jitter in Positioner (Popover and Tooltip) #257Positionercalculations andtransform-origin. [v4] Improve Positioner calculations #259Position.LEFTandPosition.RIGHT. add Positioner support for Position.LEFT and Position.RIGHT #299PositionerPortal. [v4] Remove empty divs from Positioner Portal #330Position
Position constant values updated throughout Evergreen.
SideSheet
Dialog
onCancelwhen cancel button is triggered Bug/on cancel #266sideOffsetproperty 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
shouldCloseOnEscapePressandshouldCloseOnClicktoOverlay,Dialog, andSideSheetImprove cancelation behavior for SideSheet, Dialog, and Overlay #324Dialog's did not trigger theonCancelhandler when the close button was clicked. Improve cancelation behavior for SideSheet, Dialog, and Overlay #324Checkbox
Checkboxcomponent. Add "indeterminate" prop to <Checkbox> #313Radio
Other Changes
Docs