🎆 Highlights: new Popover2/Tooltip2 components in labs, TagInput gets 5 new props, Table now supports frozen/sticky columns/rows, new Icon component, new IconName typings
📖 Latest docs: blueprintjs.com/docs
General
- 😭 This is my (@giladgray) last release as the Blueprint lead. I'm moving on to other frontend projects inside Palantir, but I'll always be connected to Blueprint (and just an at-mention away), and I may very well be back in a few months!
@blueprintjs/core 1.25.0
💎 New features
-
#1427 🌟
Iconcomponent is the CSS shorthand you've always dreamed of:private maybeRenderLeftIcon() { - const { leftIconName } = this.props; - if (leftIconName == null) { - return undefined; - } - const iconClass = Classes.iconClass(leftIconName); - return <span className={classNames(Classes.ICON_LARGE, iconClass)} />; + return <Icon iconName={leftIconName} iconSize={20} /> }- We've also added typings for
iconNamethroughout the library with a new string literal union type,IconName, that includes every short and long icon:addandpt-icon-add. you know what this means: editor autocomplete 😱
- ⚠️ In introducing this new
IconNametype, we've done our best to ensure compatibility with existing use cases (it supports both short and long names, for instance), but it is likely thattscwill complain lightly about a few usages in your codebase- If your component accepts
iconNameas a prop to pass to<Icon />, you'll need to change the type fromstringtoIconName
- If your component accepts
- We've also added typings for
-
#1373 🌟 much improving scrolling support for
Overlayand centering forDialog- We refactored
.pt-overlayCSS to ensure that it sets the correctpositionat all times, whether inline or scrollable Dialogcomponent now renders a.pt-dialog-containerwrapper as its root element which centers the.pt-dialogin a viewport-covering flex container. This provides super reliable centering behavior (#552) and much improved scrolling support (#1313) (though some issues are still present like #1008)- ⚠️ If you're rendering the
.pt-dialogmarkup by hand, you may want to add the.pt-dialog-containerparent element for perfect screen centering (and probably remove any custom styles you had); see the CSS API markup in the docs - ⚠️ If you're using the
Dialogcomponent, the new container element will be added automatically and you can likely remove any custom positioning styles you've written
- ⚠️ If you're rendering the
- We refactored
🐛 Bug fixes
- #1421 Remove small font-size from small buttons to improve legibility and fix icon centering
- #1434 Move
$output-bourbon-deprecation-warningsvariable to_variables.scssto globally disable Bourbon's deprecation warnings in any package that imports Blueprint Sass code
@blueprintjs/datetime 1.20.0
🐛 Bug fixes
- #1429 Pass locale to
moment()for parsing and formatting - #1424 Speed up the test suite by a full 30 seconds!
@blueprintjs/table 1.22.0
- #1445 🌟
Tablenow supports frozen/sticky columns and rows! Use thenumFrozenColumnsandnumFrozenRowsprops and you're set.
@blueprintjs/labs 0.6.0
💎 New features
-
#1364 🌟
Popover2uses a new positioning engine that resolves our "smart positioning" bugs
- Popper.js is a massive improvement over Tether in almost every way!
- all the fancy flipping behavior you could want enabled by default
- endlessly customizable if it isn't perfect enough for you
- look, it puts the arrow exactly where it's supposed to be. every time. what more could a blueprint dev want??
- All the classic
Popoverfeatures are still supported with the same names except...- 🔥
isModal→hasBackdropto match corresponding prop onOverlay - 🔥
isDisabled→disabledfor consistency with HTML elements
- 🔥
- ...and the handful of Tether-specific props are now Popper.js-specific:
- 🔥
position: Position→placement: PopperJS.Placement - 🔥
tetherOptions: ITetherOptions→modifiers: PopperJS.Modifiers
- 🔥
- ...and one special addition:
minimal: booleanapplies minimal styles, which includes removing the arrow and minimizing the transition
- This new iteration of the
PopoverAPI will live in labs until our eventual 2.0 release, when it will be merged into core and will replace Tether entirely
- Popper.js is a massive improvement over Tether in almost every way!
-
#1438 🌟
Tooltip2exposes the same API asTooltipbut is backed byPopover2(and has the same API changes noted above) -
#1418, #1419, #1420 🌟
TagInputgets a lot of love this week!
- new
separatorprop allows adding multiple values at once - new
onChangecallback prop handlesonAddandonRemovearray manipulation for you. great for simple use cases! - new
placeholderprop disappears whenvaluesis not empty, like an input placeholder normally does - new
leftIconNameandrightElementprops work exactly likeInputGroup(with newIconNametypings!) valuesaccepts any valid JSX, from strings to elements to fragments!- #1432 falsy values are ignored appropriately, like normal JSX
- 🔥 API BREAK:
onAddnow receivesstring[]instead of singlestring- private handleAdd = (value: string) => this.setState([...this.state.values, value]) + private handleAdd = (values: string[]) => this.setState([...this.state.values, ...values])
- new
🐛 Bug fixes
- #1403
QueryListonKeyDownis invoked for all keys (🎩 @paulpooch) - #1422
MultiSelectplaceholder can be overridden throughinputProps.placeholder(🎩 @sushain97)
Documentation
- "Tabs 2.0" section has been renamed to "Tabs2" to match the component name