UNPKG

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