UNPKG

16.7 kBMarkdownView Raw
1# Radium Changelog
2
3## 0.23.0 (March 15, 2018)
4- Support ES7 arrow functions for React class methods. (#738)
5
6## 0.22.1 (March 1, 2018)
7- Fix `keyframes` bug from prefixed inline styles. (#973)
8
9## 0.22.0 (February 9, 2018)
10### Breaking Changes
11- Radium now exports defaults as `.default`, so for runtimes like Node.js for all files in `lib/**`. We have changed `package.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 of `const Radium = require('radium');` works mostly as it did before. Caveats:
12 - When using webpack2+ to build code with `require('radium')` in it you will need to change that to become `require('radium').default`.
13 - Any imports of a default export from a file in lib like `const Enhancer = require('radium/lib/enhancer');` will need to be changed to `const Enhancer = require('radium/lib/enhancer').default;`.
14 - 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
15
16### Features
17- Add `es` ESM module export files.
18
19### Fixes
20- Fix `package.json:scripts.postinstall` task to correctly work for git-based dependencies.
21
22## 0.21.2 (January 25, 2018)
23- Fix multiple-value prefixed inline styles. (#962, #958, #951)
24
25## 0.21.1 (January 18, 2018)
26- Call `componentDidUpdate()` inherited method (#957).
27
28## 0.21.0 (January 8, 2018)
29- Automatically clear browser state of elements when unmounting and remounting (#956).
30 - `resolveStyles` returns `{ extraRadiumStateKeys, element }` instead of just `element`.
31
32## 0.20.1 (January 8, 2018)
33- Fix `v0.20.0` build.
34
35## 0.20.0 (January 8, 2018)
36- Upgrade `inline-style-prefixer` to version `^4.0.0`.
37
38## 0.19.6 (October 5, 2017)
39- Allow native ES classes to be used with the Radium enhancer.
40
41## 0.19.5 (October 5, 2017)
42- Enable React 16 in `peerDependencies` and update tests to React 16.
43
44## 0.19.4 (July 21, 2017)
45- Remove `.babelrc` from published npm registry package.
46
47## 0.19.3 (July 20, 2017)
48- Remove `publishr` from prod `dependencies` in npm registry package.
49
50## 0.19.2 (July 20, 2017)
51- Switch to `publishr` workflow. (#894, #731, #900)
52- Remove `rimraf` from prod `dependencies` in npm registry package.
53- Remove `postinstall` from `scripts` in npm registry package. (#794)
54
55## 0.19.1 (May 17, 2017)
56
57### Bug Fixes
58- Makes `prop-types` a `dependencies` instead of a `peerDependencies` in `package.json` per the `prop-types` [integration guide](https://github.com/facebook/prop-types#how-to-depend-on-this-package).
59
60## 0.19.0 (May 15, 2017)
61
62### Improvements
63- Unreverts PropTypes-related diff, which is now a minor version instead of a patch
64
65## 0.18.4 (May 15, 2017)
66
67### Bug Fixes
68- Reverts PropTypes-related diff, which should have been a minor version instead of a patch
69
70## 0.18.3 (May 15, 2017)
71
72### Improvements
73- Update dependencies
74- Update deprecated React syntax in examples
75- Use React "prop-types" package
76
77## 0.18.2 (March 15, 2017)
78
79### Improvements
80- Update `inline-style-prefixer` to v2.0.5 (#880).
81- Use `React.PureComponent` to avoid unnecessary rendering (#868).
82- Update all dependencies
83
84## 0.18.1 (July 19, 2016)
85
86### Bug Fixes
87- Fix unused props warning when passing `radiumConfig` to `StyleRoot` (#787).
88
89## 0.18.0 (July 15, 2016)
90
91### Breaking Changes
92- Revert `content` auto-quoting in `Style` component (#783).
93
94### Bug Fixes
95- Silence React 15.2 unused props deprecation warning (#782).
96
97## 0.17.2 (July 12, 2016)
98
99### Bug Fixes
100- Fix `content` values in `Style` component (#719).
101- Improve stateless component check to work with native arrow functions (#771).
102
103### Improvements
104- Add support for `:disabled` pseudo-class (#689).
105- Add plugin to remove nested style objects and prevent `[Object object]` from rendering in the DOM (#703).
106
107## 0.17.1 (March 30, 2016)
108
109### Bug Fixes
110- Remove babel modules accidentally published as dependencies.
111
112### Improvements
113- Add support for `scopeSelector` without nested selectors in `Style` component.
114
115## 0.17.0 (March 24, 2016)
116
117### Bug Fixes
118- Upgrade `inline-style-prefixer` to version `1.0.3` with a fix for `display` values being removed in IE10.
119
120### Improvements
121- Add `TestMode` for controlling internal Radium state and behavior during tests.
122
123### Breaking Changes
124- `inline-style-prefixer` has updated vendor prefixes, removing some outdated prefixes like `-moz-transform`.
125
126## 0.16.6 (February 9, 2016)
127
128### Bug Fixes
129- The `lib/` directory did not get built property in 0.16.6. `lib/` now contains all changes from 0.16.5.
130
131## 0.16.5 (January 27, 2016)
132
133### Bug Fixes
134- Don't merge media query styles, fixes #550
135- Don't add className if empty, fixes #539
136
137### Improvements
138- Passing `'all'` as the `userAgent` 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 of `keyframes`)
139- Add support for `:visited` styles:
140```jsx
141const url = 'https://github.com/formidablelabs/radium';
142const VisitedLink = Radium(() =>
143 <a href={url} style={{color: 'gray', ':visited': {color: 'black'}}}>{url}</a>
144);
145```
146
147## 0.16.4 (January 23, 2016)
148
149### Bug Fixes
150- Add `px` suffix if needed *before* prefixing, since the list in `appendPxIfNeeded` does not include prefixed variants
151- Radium now calls `toString` on values itself, instead of relying on `inline-style-prefixer` or React to do so (they don't)
152
153### Improvements
154- Much lighter `npm install radium` by removing `babel` & co from `dependencies` before publishing
155- Radium now ignores children or props that are themselves Radium enhanced components, for a nice perf gain. Thanks @spacenick
156
157## 0.16.3 (January 21, 2016)
158- Published under the `test` tag, so not installable via npm latest
159- Forgot to add `-test` to the version
160- See changelog for 0.16.4 instead
161
162## 0.16.2 (January 8, 2016)
163
164### Bug Fixes
165- `<StyleSheet/> Component:`
166 - Bind the private method _onChange to the class instance
167 - Wrap setState in setTimeout and keep track of isMounted, #500
168 - Remove duplicate declaration of componentWillUnmount and move `this._isMounted = true` inside `componentDidMount`
169- Clear up docs around StyleRoot props, clear up issues in #496
170- Properly prefix keyframes: Use `inline-style-prefixer`’s `prefixedKeyframes`, #488
171- Ensure unique classname is generated for media query rules (hash on query _and_ ruleCSS string)
172
173## 0.16.1 (January 5, 2016)
174
175### Bug Fixes
176- `<StyleRoot>` no longer throws an error on unmount
177
178## 0.16.0 (January 5, 2016)
179
180### New Features
181- Server-side rendering for media queries and keyframes!
182
183### Breaking Changes
184- 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
185- 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
186- 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
187
188### Bug Fixes
189- Don't add extra media query listeners
190- Append px to numeric values on properties that don't accept unitless values
191
192### Improvements
193- Upgrade `inline-style-prefixer` to version 0.6.2 (Edge support)
194- Better error on duplicate keys
195- Upgrade to Babel 6
196- `<Style>` adds the `scopeSelector` to comma separated selectors
197- `<Style>` now accepts `radiumConfig` directly with the `userAgent` field
198
199## 0.15.3 (November 16, 2015)
200
201### Bug Fixes
202
203- Fix `"files"` section in `package.json`, should fix `npm install issues`
204
205## 0.15.2 (November 15, 2015)
206
207### Bug Fixes
208
209- IE vender prefix (ms) is now converted to dash-case correctly (-ms), thanks @PallasKatze, fixes #413
210- Super getChildContext is no longer ignored, thanks @richardfickling, fixes #412
211- Update to inline-style-prefixer v0.5.1 and changed the userAgent error to a console.warning
212
213## 0.15.1 (November 11, 2015)
214
215### Bug Fixes
216
217- Fix bug where active styles on multiple elements in the same component were not being removed on mouse up, fixes #410
218
219## 0.15.0 (November 11, 2015)
220
221### New Features
222
223- Radium now uses [inline-style-prefixer](https://github.com/rofrischmann/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](https://github.com/FormidableLabs/radium/blob/master/examples/server.js)). Thanks much to @rofrischmann for putting up with my API suggestions and requests!
224- Any Radium component can also be configured at render time via a [`radiumConfig`](https://github.com/FormidableLabs/radium/blob/master/docs/api/README.md#radium). This was mainly required for passing the `userAgent` during a server-side render.
225
226### Breaking Changes
227
228- Style component no longer supports the `prefix` prop. It automatically gets the correct userAgent to pass to the prefixer from `radiumConfig` context
229
230### Bug Fixes
231
232- Radium wrapper now replaces the `style` propType, if defined, with array or object, fixing #396
233- Stateless components now support context, thanks @ThomWright
234- Static fields on stateless components are now transferred to the Radium wrapper (`defualtProps`, `propTypes`, etc)
235
236### Improvements
237
238- Code has been ES2015-ified: const and let, import/export, fat arrows,
239- Code has moved from `modules` to `src`
240
241## 0.14.3 (October 19, 2015)
242
243### Bug Fixes
244
245- camelCasePropsToDashCase handles uppercase first character correctly, fixing #387
246
247## 0.14.2 (October 17, 2015)
248
249### Bug Fixes
250
251- `:active` styles now triggered by space or enter
252- Callback `ref`s are now ignored, fixing #346
253- Heavy use of media queries no longer causes setState on an unmounted component, fixing #382
254
255### New Features
256
257- Stateless components (function taking props) are now supported
258
259### Improvements
260
261- Updated examples to for React 0.14.0
262- Allow replacing the prefixer used by `Radium.keyframes` and `<Style>`
263
264## 0.14.1 (September 15, 2015)
265
266### Bug Fixes
267
268- Don't require object-assign, which wasn't in normal dependencies
269
270## 0.14.0 (September 15, 2015)
271
272### Breaking Changes
273
274- `Config.setMatchMedia` has been replaced by the `matchMedia` field in the config passed to `@Radium` ([see documentation](https://github.com/FormidableLabs/radium/tree/master/docs/api#configmatchmedia))
275
276### New Features
277
278- Plugin system, via the config passed to `@Radium` (see docs for [`config.plugins`](https://github.com/FormidableLabs/radium/tree/master/docs/api#configplugins) and the [plugin API](https://github.com/FormidableLabs/radium/tree/master/docs/api#plugins))
279
280### Improvements
281
282- Flatten nested arrays in `style`, #344, thanks @almost
283- Universal/isomorphic example `npm run universal`, thanks @jurgob and @moret
284
285### Bug Fixes
286
287- Static properties are now copied again in IE < 10, #349, thanks @bobbyrenwick
288
289## 0.13.8 (August 24, 2015)
290
291### Bug Fixes
292
293- Fix static class methods disappearing in IE10, #313
294- Fix bug when using spread operator to pass props to a DOM element, #322
295
296## 0.13.7 (August 5, 2015)
297
298### Bug Fixes
299
300- Fix double resolving bug on props.children, #307
301
302## 0.13.6 (August 5, 2015)
303
304### New Features
305
306- Resolve styles on elements found in props and children as function, #298
307- [&lt;PrintStyleSheet&gt;](https://github.com/FormidableLabs/radium/tree/master/docs/api#printstylesheet-component) component and `printStyles` property to add print styles to your components, #299, thanks @bobbyrenwick
308
309### Improvements
310
311- Show component name when warning in prefixer, #302, thanks @AnSavvides
312
313### Bug Fixes
314
315- Fix bug with _radiumDidResolveStyles that was breaking in React 0.14.0-beta2
316- Un-prefix values before checking isUnitlessNumber, #305, thanks @AnSavvides
317- Prevent errors from getters that do not have setters as static props of React components, #306, thanks @rolandpoulter
318
319## 0.13.5 (July 29, 2015)
320
321### Improvements
322
323- Support for old and tweener flexbox syntax, #279, thanks @sylvaingi
324- Only calls console.warn during development, not in production
325
326### Bug Fixes
327
328- Don't call resolveStyles more than once on the same element, #293
329- Allow null or undefined values in style, #263
330- Remove redundant babel-core from dependencies
331- Fix using numeric 0 as key to getState, #275
332- Don't wrap display name with "Radium(...)", #271
333- Fix older firefox missing `float` property, #277, thanks @bencao
334- Don't warn when mixing `transform` properties, #272, thanks @MattHauglustaine
335- Use for loop instead of Array prototype on the result of window.getComputedStyle, which was breaking Android web view, #267, thanks @bsbeeks
336- Ignore functions as children instead of blowing up, #265, thanks @Cottin
337
338### Misc
339
340- Add `test-dev` command for faster test feedback during development
341
342## 0.13.4 (July 14, 2015)
343
344### Bug Fixes
345
346- Fix regression with multiple states (tests were failing) from 0.13.3
347
348## 0.13.3 (July 13, 2015)
349
350### Bug Fixes
351
352- Fix hotloading component methods, #255, thanks @bobbyrenwick
353- Add displayName to shorthand warning, #253, thanks @bobbyrenwick
354- Warn and ignore null/undefined values, #250, thanks @AnSavvides
355- Don't warn when mixing border & borderRadius, and more shorthand warning updates, #246, thanks @nathanfriemel
356- Remove react from peerDependencies so Radium can be used with the 0.14 beta, #242, thanks @dariocravero
357- Fix transfering defaultProps and friends in IE <11, #241, thanks @bobbyrenwick
358- Don't alias matchMedia, fixes IE <11 bug, #238
359- Stop mutating style state, #237
360
361### Misc
362
363- Migrate tests to Karma, #240, thanks @exogen
364
365## 0.13.2 (June 25, 2015)
366
367### Bug Fixes
368
369- Use `console.warn` instead of `console.warning` (duh)
370
371## 0.13.1 (June 24, 2015)
372
373### New Features
374
375- [Radium.Config.setMatchMedia](https://github.com/FormidableLabs/radium/tree/master/docs/api#configsetmatchmedia) for server rendering
376
377### Bug Fixes
378
379- Don't resolve `style` prop of custom components, e.g. `<MyComponent style={...} />`, #202 (thanks @azazdeaz)
380- Fix not using dash-case on server with Style, #207
381- Fix server rendering when using fallback array of values (uses first one)
382- Fix numeric fallbacks, #221
383
384### Misc
385
386- Update dependencies
387- Warn when mixing longhand and shorthand
388
389## 0.13.0 (June 7, 2015)
390
391### Breaking Changes
392
393- `Radium.wrap` and `Radium.Enhancer` have been merged and moved to `Radium()`. Just wrap your component, `Button = Radium(Button);`, or use the decorator `@Radium`
394- `Style` component `rules` prop now takes an object instead of an array
395
396### New Features
397
398- Support fallback values (e.g. `#fff` for `rgba(...)`)
399
400### Bug Fixes
401
402- Fix react external in webpack config
403- Fix keyframes throwing on IE9 (now does feature detection)
404- Fix windows build
405- `string` and `number` children are no longer wrapped in an extraneous `<span>`
406
407## 0.12.2 (May 22, 2015)
408
409### Breaking Changes
410
411None
412
413### New Features
414
415- Support prefixing for old flexbox implementations
416
417### Bug Fixes
418
419- Stop using react internals `CSSPropertyOperations.createMarkupForStyles`, which further reduces the build size
420
421## 0.12.1 (May 22, 2015)
422
423### Bug Fixes
424
425- Fix Enhancer (displayName, etc) #165
426- Reduce size of distributed build
427- Tests for prefixing, fix #161
428
429## 0.12.0 (May 16, 2015)
430
431### New Features
432
433- Support for ES6 classes with Radium.Enhancer
434- Vendor-prefixing
435- Keyframes animation helper
436- Radium.getState API
437
438### Bug Fixes
439
440- Fix errors during server-side rendering #141
441- Fix passing a single child or string #139
442
443## 0.11.1 (April 28, 2015)
444
445### Bug Fixes
446
447- Checked in updated `dist` files from `0.11.0`. Whoops!
448
449## 0.11.0 (April 28, 2015)
450
451### Breaking Changes
452
453- Complete API rewrite.
454 - Added new "Wrap" API.
455 - Wrap React component config with `Radium.wrap()` to automatically add
456 browser state handlers, media query behavior, and array-based style
457 resolution.
458- Removed all mixins.
459- Removed context-based media query behavior.
460 - Replaced with global media query handler.
461- Removed modifiers, states, and media queries from style objects.
462 - Replaced `modifiers` with array-based `style` prop resolution.
463 - Replaced `states` object with inline state keys: `:hover`
464 - Replaced `mediaQueries` object with inline queries:
465 `@media (min-width: 200px)`
466
467### New Features
468
469- Apply separate browser state styles to multiple elements in the same
470 component.