- Add hook and forwardRef support (#1027)
- Radium now requires [email protected]+ (#1027)
- Bump handlebars from 4.0.6 to 4.1.2 (#1026)
- Fixed bug with undefined _extraRadiumStateKeys (#1025)
- Update unitless CSS property list and licensing (#1020)
- Pass
snapshot
argument to `componentDidUpdate (#1013)
- Fix console warnings when running examples (#1002)
- Upgrade karma to 3.0 (#1003)
- Refactor enhancer for readability (#1004)
- Replace Isparta with Istanbul (#1011)
- Prettier (#1012)
- Use
Reflect
to construct es native classes in a way that preserves the value ofthis
used in the constructor. (#999, #1001) - Handle multiple animationName props (#909)
- Make
<StyleSheet>
manually update<style>
tag DOM, fixing media queries on component level flickering. (#626, #950)
- Fix
render
methods that return array of children orReact.Fragment
. (#950) - Upgrade tests to React 16.2 (for
Fragment
support)
- Support ES7 arrow functions for React class methods. (#738)
- Fix
keyframes
bug from prefixed inline styles. (#973)
- Radium now exports defaults as
.default
, so for runtimes like Node.js for all files inlib/**
. We have changedpackage.json:main
to point to/index.js
instead of/lib/index.js
as a convenience wrapper to expose mostly what was there before so behavior ofconst Radium = require('radium');
works mostly as it did before. Caveats:- When using webpack2+ to build code with
require('radium')
in it you will need to change that to becomerequire('radium').default
. - Any imports of a default export from a file in lib like
const Enhancer = require('radium/lib/enhancer');
will need to be changed toconst Enhancer = require('radium/lib/enhancer').default;
. - We have a full examples repository of how imports work in all likely scenarios that should come up. https://github.com/FormidableLabs/radium-experiments-v0.22
- When using webpack2+ to build code with
- Add
es
ESM module export files.
- Fix
package.json:scripts.postinstall
task to correctly work for git-based dependencies.
- Fix multiple-value prefixed inline styles. (#962, #958, #951)
- Call
componentDidUpdate()
inherited method (#957).
- Automatically clear browser state of elements when unmounting and remounting (#956).
resolveStyles
returns{ extraRadiumStateKeys, element }
instead of justelement
.
- Fix
v0.20.0
build.
- Upgrade
inline-style-prefixer
to version^4.0.0
.
- Allow native ES classes to be used with the Radium enhancer.
- Enable React 16 in
peerDependencies
and update tests to React 16.
- Remove
.babelrc
from published npm registry package.
- Remove
publishr
from proddependencies
in npm registry package.
- Switch to
publishr
workflow. (#894, #731, #900) - Remove
rimraf
from proddependencies
in npm registry package. - Remove
postinstall
fromscripts
in npm registry package. (#794)
- Makes
prop-types
adependencies
instead of apeerDependencies
inpackage.json
per theprop-types
integration guide.
- Unreverts PropTypes-related diff, which is now a minor version instead of a patch
- Reverts PropTypes-related diff, which should have been a minor version instead of a patch
- Update dependencies
- Update deprecated React syntax in examples
- Use React "prop-types" package
- Update
inline-style-prefixer
to v2.0.5 (#880). - Use
React.PureComponent
to avoid unnecessary rendering (#868). - Update all dependencies
- Fix unused props warning when passing
radiumConfig
toStyleRoot
(#787).
- Revert
content
auto-quoting inStyle
component (#783).
- Silence React 15.2 unused props deprecation warning (#782).
- Fix
content
values inStyle
component (#719). - Improve stateless component check to work with native arrow functions (#771).
- Add support for
:disabled
pseudo-class (#689). - Add plugin to remove nested style objects and prevent
[Object object]
from rendering in the DOM (#703).
- Remove babel modules accidentally published as dependencies.
- Add support for
scopeSelector
without nested selectors inStyle
component.
- Upgrade
inline-style-prefixer
to version1.0.3
with a fix fordisplay
values being removed in IE10.
- Add
TestMode
for controlling internal Radium state and behavior during tests.
inline-style-prefixer
has updated vendor prefixes, removing some outdated prefixes like-moz-transform
.
- The
lib/
directory did not get built property in 0.16.6.lib/
now contains all changes from 0.16.5.
- Don't merge media query styles, fixes #550
- Don't add className if empty, fixes #539
- Passing
'all'
as theuserAgent
will add all prefixes, useful for caching server-rendered pages, thanks @oliviertassinari (this applies to inline styles and style rendered as CSS, but does not yet include adding all the prefixed versions ofkeyframes
) - Add support for
:visited
styles:
const url = 'https://github.com/formidablelabs/radium';
const VisitedLink = Radium(() => (
<a href={url} style={{color: 'gray', ':visited': {color: 'black'}}}>
{url}
</a>
));
- Add
px
suffix if needed before prefixing, since the list inappendPxIfNeeded
does not include prefixed variants - Radium now calls
toString
on values itself, instead of relying oninline-style-prefixer
or React to do so (they don't)
- Much lighter
npm install radium
by removingbabel
& co fromdependencies
before publishing - Radium now ignores children or props that are themselves Radium enhanced components, for a nice perf gain. Thanks @spacenick
- Published under the
test
tag, so not installable via npm latest - Forgot to add
-test
to the version - See changelog for 0.16.4 instead
<StyleSheet/> Component:
- Bind the private method _onChange to the class instance
- Wrap setState in setTimeout and keep track of isMounted, #500
- Remove duplicate declaration of componentWillUnmount and move
this._isMounted = true
insidecomponentDidMount
- Clear up docs around StyleRoot props, clear up issues in #496
- Properly prefix keyframes: Use
inline-style-prefixer
’sprefixedKeyframes
, #488 - Ensure unique classname is generated for media query rules (hash on query and ruleCSS string)
<StyleRoot>
no longer throws an error on unmount
- Server-side rendering for media queries and keyframes!
- To use keyframes and media queries, you must wrap your components in the
<StyleRoot>
component, typically in<App>
: https://github.com/FormidableLabs/radium/tree/master/docs/api#styleroot-component - The result of Radium.keyframes is the animation name, and should be assigned to the
animationName
prop: https://github.com/FormidableLabs/radium/tree/master/docs/api#keyframes - printStyles have been removed, in favor of '@media print' media queries, which are now rendered as CSS so they work correctly: https://github.com/FormidableLabs/radium/tree/master/docs/guides#media-queries
- Don't add extra media query listeners
- Append px to numeric values on properties that don't accept unitless values
- Upgrade
inline-style-prefixer
to version 0.6.2 (Edge support) - Better error on duplicate keys
- Upgrade to Babel 6
<Style>
adds thescopeSelector
to comma separated selectors<Style>
now acceptsradiumConfig
directly with theuserAgent
field
- Fix
"files"
section inpackage.json
, should fixnpm install issues
- IE vender prefix (ms) is now converted to dash-case correctly (-ms), thanks @PallasKatze, fixes #413
- Super getChildContext is no longer ignored, thanks @richardfickling, fixes #412
- Update to inline-style-prefixer v0.5.1 and changed the userAgent error to a console.warning
- Fix bug where active styles on multiple elements in the same component were not being removed on mouse up, fixes #410
- Radium now uses inline-style-prefixer to do all prefixing. Because
inline-style-prefixer
relies on the userAgent (similar to autoprefixer), it produces the same prefixes on both the client and the server. This is a huge step in making Radium truly universal (see example). Thanks much to @rofrischmann for putting up with my API suggestions and requests! - Any Radium component can also be configured at render time via a
radiumConfig
. This was mainly required for passing theuserAgent
during a server-side render.
- Style component no longer supports the
prefix
prop. It automatically gets the correct userAgent to pass to the prefixer fromradiumConfig
context
- Radium wrapper now replaces the
style
propType, if defined, with array or object, fixing #396 - Stateless components now support context, thanks @ThomWright
- Static fields on stateless components are now transferred to the Radium wrapper (
defualtProps
,propTypes
, etc)
- Code has been ES2015-ified: const and let, import/export, fat arrows,
- Code has moved from
modules
tosrc
- camelCasePropsToDashCase handles uppercase first character correctly, fixing #387
:active
styles now triggered by space or enter- Callback
ref
s are now ignored, fixing #346 - Heavy use of media queries no longer causes setState on an unmounted component, fixing #382
- Stateless components (function taking props) are now supported
- Updated examples to for React 0.14.0
- Allow replacing the prefixer used by
Radium.keyframes
and<Style>
- Don't require object-assign, which wasn't in normal dependencies
Config.setMatchMedia
has been replaced by thematchMedia
field in the config passed to@Radium
(see documentation)
- Plugin system, via the config passed to
@Radium
(see docs forconfig.plugins
and the plugin API)
- Flatten nested arrays in
style
, #344, thanks @almost - Universal/isomorphic example
npm run universal
, thanks @jurgob and @moret
- Static properties are now copied again in IE < 10, #349, thanks @bobbyrenwick
- Fix static class methods disappearing in IE10, #313
- Fix bug when using spread operator to pass props to a DOM element, #322
- Fix double resolving bug on props.children, #307
- Resolve styles on elements found in props and children as function, #298
- <PrintStyleSheet> component and
printStyles
property to add print styles to your components, #299, thanks @bobbyrenwick
- Show component name when warning in prefixer, #302, thanks @AnSavvides
- Fix bug with _radiumDidResolveStyles that was breaking in React 0.14.0-beta2
- Un-prefix values before checking isUnitlessNumber, #305, thanks @AnSavvides
- Prevent errors from getters that do not have setters as static props of React components, #306, thanks @rolandpoulter
- Support for old and tweener flexbox syntax, #279, thanks @sylvaingi
- Only calls console.warn during development, not in production
- Don't call resolveStyles more than once on the same element, #293
- Allow null or undefined values in style, #263
- Remove redundant babel-core from dependencies
- Fix using numeric 0 as key to getState, #275
- Don't wrap display name with "Radium(...)", #271
- Fix older firefox missing
float
property, #277, thanks @bencao - Don't warn when mixing
transform
properties, #272, thanks @MattHauglustaine - Use for loop instead of Array prototype on the result of window.getComputedStyle, which was breaking Android web view, #267, thanks @bsbeeks
- Ignore functions as children instead of blowing up, #265, thanks @Cottin
- Add
test-dev
command for faster test feedback during development
- Fix regression with multiple states (tests were failing) from 0.13.3
- Fix hotloading component methods, #255, thanks @bobbyrenwick
- Add displayName to shorthand warning, #253, thanks @bobbyrenwick
- Warn and ignore null/undefined values, #250, thanks @AnSavvides
- Don't warn when mixing border & borderRadius, and more shorthand warning updates, #246, thanks @nathanfriemel
- Remove react from peerDependencies so Radium can be used with the 0.14 beta, #242, thanks @dariocravero
- Fix transfering defaultProps and friends in IE <11, #241, thanks @bobbyrenwick
- Don't alias matchMedia, fixes IE <11 bug, #238
- Stop mutating style state, #237
- Migrate tests to Karma, #240, thanks @exogen
- Use
console.warn
instead ofconsole.warning
(duh)
- Radium.Config.setMatchMedia for server rendering
- Don't resolve
style
prop of custom components, e.g.<MyComponent style={...} />
, #202 (thanks @azazdeaz) - Fix not using dash-case on server with Style, #207
- Fix server rendering when using fallback array of values (uses first one)
- Fix numeric fallbacks, #221
- Update dependencies
- Warn when mixing longhand and shorthand
Radium.wrap
andRadium.Enhancer
have been merged and moved toRadium()
. Just wrap your component,Button = Radium(Button);
, or use the decorator@Radium
Style
componentrules
prop now takes an object instead of an array
- Support fallback values (e.g.
#fff
forrgba(...)
)
- Fix react external in webpack config
- Fix keyframes throwing on IE9 (now does feature detection)
- Fix windows build
string
andnumber
children are no longer wrapped in an extraneous<span>
None
- Support prefixing for old flexbox implementations
- Stop using react internals
CSSPropertyOperations.createMarkupForStyles
, which further reduces the build size
- Fix Enhancer (displayName, etc) #165
- Reduce size of distributed build
- Tests for prefixing, fix #161
- Support for ES6 classes with Radium.Enhancer
- Vendor-prefixing
- Keyframes animation helper
- Radium.getState API
- Fix errors during server-side rendering #141
- Fix passing a single child or string #139
- Checked in updated
dist
files from0.11.0
. Whoops!
- Complete API rewrite.
- Added new "Wrap" API.
- Wrap React component config with
Radium.wrap()
to automatically add browser state handlers, media query behavior, and array-based style resolution.
- Removed all mixins.
- Removed context-based media query behavior.
- Replaced with global media query handler.
- Removed modifiers, states, and media queries from style objects.
- Replaced
modifiers
with array-basedstyle
prop resolution. - Replaced
states
object with inline state keys::hover
- Replaced
mediaQueries
object with inline queries:@media (min-width: 200px)
- Replaced
- Apply separate browser state styles to multiple elements in the same component.