(NOTE: For fresh changelogs, please see the releases page)
- Tooltip: Add option to show tooltip on click (371190e5)
- Td: Reduce table cell height (5c1f7e3d)
- Animate: Use height as well as max-height when animating (#244) (3140735e)
- Table: 💄 Adapt styling to new design (38c3d7d0)
- Icon: update Profile icon and add new Market and Portfolio icons (04b024c0)
- Input: Fix styling when input has display inline-block (dab34ea6)
- Table: 💄 Make horizontal scrolling work on iOS devices (96af4082)
- Table: More compact tables on mobile (befa6ca9)
- Tr: Add pointer-events: none to the clone (9d1006ed)
- Animate: Add extra div around the children in Animate (88afb874)
- Tr: Height change now only affects sticky rows (e86e4f10)
- Flag: Check if flag exists before rendering (96b77763)
- Animate: Added new Animate component (#230) (76eba45d)
- Tr: Fix sticky row behaviour (036953e4)
- Table: Add responsive behaviour (11f5f415)
- Button: Remove button text animation in IE (40246598)
- Icon.Questionmark: Replace Questionmark icon (e27937d9)
- Icon: Add new File icon (1ff77096)
- Logo: Add iconOnly prop to only get icon (339e513e)
- Icon API changed: now takes
height
instead ofwidth
(339e513e)
- LabeledValue: Add mobile behaviour (04c80c2d)
- Button: Update secondary button (#223) (2f410d8d)
- Icons: Fix invalid propTypes declaration (7b28c4bf)
- release flow (d4338d06, closes #219)
- styling of select input. (#221) (7f690f8d, closes #219)
- remove broken file (c320114a)
- Set pointer-events to none on icons (#217)
- change circle arrow (#218)
- Remove default marginBottom (#216)
- addonRight for small input fields (#215)
- Add new modifier to proptypes (#214)
- Input[type="select"]: Styling fixes 💄.
- Button: Default buttons are now gray, blue button is now
modifier="action"
.
- Docs: Expand usage section in Readme & add a
Development
section. - SegmentedControl: Allow tabbing between options in
checkbox
mode. - SegmentedControl: Allow using arrow keys to go between options in
radio
mode. - Alert: Fix styling in M$ browsers.
- Flag/Logo: Fix svg styling issues in M$ browsers.
- Flag: Fix id-clashes.
- Alert: Add
vertical
option. - Dropdown: Now closes when clicking outside.
- Flag: Is now dynamic, and accepts more combinations of countryCode + secondaryCountryCode.
- Icon, Flag: Add screen reader attributes.
- Theme.typography:
- Add fallback fonts to fontFamily declarations
- Add more fontWeight declarations
- (S)CSS replaced with JSS
- Icon api changed from
<Icon type="icon-type" />
to<Icon.IconType />
- Removed variables (both scss and js versions)
- Removed components: GraphTooltip, HorizontalNav, Legend, NavBar, RangeSelector, RatioBar, Search, Select, SparkGraph, Widget
- Removed some icon types from Icon, see documentation for more information
- Update eslint and styleguidist
- Remove scss from styleguidist and move essential styles to style tag in template
- Export ThemeProvider, which will provide all children with context.styleManager
- Export test-utils for createShallow, createMount and createRenderToString
- Added new colors and typography to the theme
- Change how icons are presented in the documentation
- New components: Avatar, Li, SegmentedControl, Ul
- New theming functionality built in 💄
- A lot of new icons added and default icon style is updated (strokeWidth 2 -> 1)
- Flag component has a
round
option for rounded flags - Flag component has a
secondaryCountryCode
option for currency flags
// ℹ️ In your provider
import React, { Component } from 'react';
// import it
import { ThemeProvider } from 'nordnet-ui-kit';
export default class Wrapper extends Component {
// ...
render() {
return ( // this will get a default theme, you can override this with the `theme` prop to ThemeProvider
<ThemeProvider>
{this.props.children}
</ThemeProvider>
);
}
}
// ℹ️ Styling your component with the theme from nordnet-ui-kit
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import cn from 'classnames';
// import any component from the ui-kit that you want to use
import { Badge } from 'nordnet-ui-kit';
// import createStyleSheet
import { createStyleSheet } from 'jss-theme-reactor';
// Export styleSheet to make testing easier later
export const styleSheet = createStyleSheet('YourComponent', theme => ({
root: {
display: 'block',
},
header: {
color: theme.palette.text.default,
backgroundColor: theme.palette.text.default,
},
}));
// 1. If your component is a class do this:
export class YourComponent extends Component {
static contextTypes = {
styleManager: PropTypes.object.isRequired,
};
render() {
const isHeader = { this.props }
const classes = this.context.styleManager.render(styleSheet);
return (
<div className={cn(classes.root, {[classes.header]: isHeader})}>
Hello world!
</div>
);
}
}
// 2. If your component is a function do this:
export function YourComponent({ isHeader }, { styleManager }) {
const classes = styleManager.render(styleSheet);
return (
<div className={cn(classes.root, {[classes.header]: isHeader})}>
Hello world!
</div>
);
}
YourComponent.contextTypes = {
styleManager: PropTypes.object.isRequired,
};
// ℹ️ Testing your themed components (example in mocha, but ava shouldn't be that different)
import React from 'react';
import { expect } from 'chai';
import { shallow as enzymeShallow } from 'enzyme';
import { createShallow } from 'nordnet-ui-kit';
import YourComponent, { styleSheet } from './YourComponent';
describe('<YourComponent />', () => {
const shallow = createShallow(enzymeShallow);
const classes = shallow.context.styleManager.render(styleSheet);
let wrapper;
it('should have the class root', () => {
wrapper = shallow(<YourComponent />);
expect(wrapper.hasClass(classes.root)).to.equal(true);
});
it('should have the class header when isHeader is set', () => {
wrapper = shallow(<YourComponent isHeader />);
expect(wrapper.hasClass(classes.header)).to.equal(true);
});
});
- Remove SparkGraph again (issues with d3-interpolate and d3-color)
- Port SparkGraph
- Pane: Re-add Pane component
- Icons: Add more icons
- Flag: Add new combined flags
- Flag: Now accepts both uppercase and lowercase country codes
- Tooltip: Pixel pushing
- Remove Search component
- Tweak input styles
- Remove obsolete components: HorizontalNav, Pane, RatioBar, Widget
- Styling tweaks to: Table, Input
- New component: SegmentedControl
- More Avatar sizes
- Improved Table styles
- Add breakpoints and mixins to theme
- Fix for hardcoded styles in styleguidist
- Move JSS related dependencies from devdeps to deps
- Port remaining components to JSS. (SparkGraph is still missing)
- Clean up webpack dependencies
- New Li and Ul components
- Port Legend, Dropdown, Pane, Horizontal nav, Tooltip, Button and Search
- Add support to pass custom context to mount helper
- Remove SparkGraph because of issues with d3-interpolate
- All components ported to JSS
- Updated to Webpack 2
- Bumped styleguidist
- Removed some unused dependencies
- Replaced lodash.assign with Object.assign
- Replaced react-pure-render with React.PureComponent
- Replaced a few other lodash modules with own code.
- BREAKING: Removed ReactDatePicker component.
- BREAKING: Move ReactDatePicker to external dependency. Need to be imported when used.
- Tooltip: Multiple fixes. Added placement prop.
- Input Password: Removed show password toggle.
- Replaced react-onclickoutside with a custom solution that works in all browsers >= IE11.
- Icon: Added vertical-ellipsis icon.
- Tooltip: Created a tooltip component.
- Bump react-svg-sprite-icon to fix errors with IE11.
- Fixed development support for node 4.
- Icon: Added circle-arrow and ticking-clock icons.
- Badge: Changed text color of warning badge to NN Black.
- Button: Changed text color of warning button to NN Black.
- Button: Changed cursor to pointer on hover.
- Button: Changed link button color to primary.
- Button: Changed outline color to match button color.
- BREAKING: Removed graph themes.
- Input Select: Fix for IE11.
- Input Select: Cater for long options and placeholder.
- Legend: Accept nodes instead of just strings as labels.
- Table: Sticky rows now dissapearing when they should.
- Search: Text entered before server-side rendering complete now triggers a search.
- Legend component now scales more predictably.
- cssnano was messing up the spinner css, it is now configured more appropriately.
- Tweaks to table components.
- Added possibility to send in custom fadeRenderer to HorizontalNav component.
- Fixed styling of radio and checkbox inputs.
- Added RadioGroup component.
- Changed default color of alert box.
- Horizontal-nav: Added missing entry points.
- Search: Moved Transition to renderResults.
- Search: Moved handling of Search result to consumer, added alignResults and showNoResults props.
- Bumped react-motion-ui-pack.
- Updated
Select
component style. - Added key to search results in
Search
component to get rid of warning fromreact-motion
.
- Added arrow right icon.
- Tweak style for
Search
. - Replaced react-addons-css-transition-group with react-motion.
- Tweaked results view for
Search
.
- Added search component.
- Added muted graph theme.
- Added muted range selector variant.
- Styled "no-data" view for graphs correctly.
- Made sure sticky prop isn't passed to
<tr />
in<Tr />
component.
- Fixed export for flag component.
- Refactored
table
components and tweaked styles. - Added
nav-bar
andhorizontal-nav
components. - Added
flag
component.
- Updated graph tooltip component.
- Updated select component.
- Added new range selector component.
- Added new legend component.
- Added UMD build of UI kit.
- Added ReactDOM dependency to externals in webpack config.
- Removed x-axis min range in graph themes.
- React dependency moved to peer dependency.
- Null validation on Input components
- React Select bumped to stop warnings in React v15.0.0.
- Added candlestick and area graph icons
- Replaced reactable with custom
table
,tbody
,td
,tfoot
,th
,thead
andtr
components. - Spinner now renders primary circle as string due to unsupported
mask
attribute in React 0.14.0. - Added initial version of
graph-tooltip
component.
- Minor tweak to table component
- Added question mark icon #68.
- Added missing entry point for table component.
- Added graph themes
- Added table component
- Added spinner component.
- Chevron in select input is now clickable to expand select.
- The codebase is now much more well tested thanks to robineng.
- Fixed incorrect webpack entrypoint for LabeledValue component.
- Breaking change: Value component renamed to LabeledValue to avoid clashes with nordnet-component-kit.
- Ratio bar no longer reflows to a new line if a segment is very small.
- Ratio bar now supports
labelPositive
,labelNeutral
andlabelNegative
props to allow translation if needed. - Button component now correctly passes down href to the underlying a tag.
- Added ratio-bar component #50.
- Added spark-graph component thanks to robineng.
- Widget now has padding on top when no header is present thanks to bstream.
- Minor refactoring of various components to improve code quality.
- Added value formatter function to input.
- Checkbox and radio inputs now support validation.
- More icons.
- New react-select component.
event
is now passed to input components custom onBlur and onFocus functions #46.
- Build tool improvements.
- More icons.
- New badge component.
- Documentation is now powered by react-styleguidist.
- Input now properly renders label when value is an object and when value is set via props.
- Input now uses label prop as placeholder if placeholder is missing.
- Major refactoring of input component.
- Now supports addons (inline elements to the left or right of the actual input, great for icons).
- Date input now has a datepicker button.
- Mostly under the hood changes.
- Checkbox and radio components are now in the input component.
- New value component.
- New widget component.
- New block prop added to button component.
- Removed collapsible component, use react-collapse instead.
- Lots of small tweaks and bug fixes.
- Bumped react dependency in UI kit to allow both 0.14 and 15.
- Switch from
primary
andsecondary
props on buttons, tovariant
prop with the same values. - Bumped react-svg-sprite-icon dependency.