@roo-ui/components
Advanced tools
Comparing version 0.8.0 to 0.8.1
@@ -6,2 +6,10 @@ # Change Log | ||
<a name="0.8.1"></a> | ||
## [0.8.1](https://github.com/hooroo/roo-ui/compare/v0.8.0...v0.8.1) (2018-05-11) | ||
**Note:** Version bump only for package @roo-ui/components | ||
<a name="0.8.0"></a> | ||
@@ -8,0 +16,0 @@ # [0.8.0](https://github.com/hooroo/roo-ui/compare/v0.7.0...v0.8.0) (2018-05-11) |
@@ -18,4 +18,3 @@ Object.defineProperty(exports, "__esModule", { | ||
Heading.defaultProps = Object.assign({}, _Text2['default'].defaultProps, { | ||
fontWeight: 'bold', | ||
fontSize: 'xl' | ||
textStyle: 'h3' | ||
}); | ||
@@ -25,3 +24,3 @@ | ||
Heading.h1.defaultProps = Object.assign({}, Heading.defaultProps, { | ||
fontSize: '3xl' | ||
textStyle: 'h1' | ||
}); | ||
@@ -31,3 +30,3 @@ | ||
Heading.h2.defaultProps = Object.assign({}, Heading.defaultProps, { | ||
fontSize: '2xl' | ||
textStyle: 'h2' | ||
}); | ||
@@ -37,4 +36,3 @@ | ||
Heading.h3.defaultProps = Object.assign({}, Heading.defaultProps, { | ||
fontSize: 'xl', | ||
lineHeight: 'loose' | ||
textStyle: 'h3' | ||
}); | ||
@@ -44,4 +42,3 @@ | ||
Heading.h4.defaultProps = Object.assign({}, Heading.defaultProps, { | ||
fontSize: 'lg', | ||
lineHeight: 'loose' | ||
textStyle: 'h4' | ||
}); | ||
@@ -51,4 +48,3 @@ | ||
Heading.h5.defaultProps = Object.assign({}, Heading.defaultProps, { | ||
fontSize: 'base', | ||
lineHeight: 'loose' | ||
textStyle: 'h5' | ||
}); | ||
@@ -58,6 +54,5 @@ | ||
Heading.h6.defaultProps = Object.assign({}, Heading.defaultProps, { | ||
fontSize: 'sm', | ||
lineHeight: 'loose' | ||
textStyle: 'h6' | ||
}); | ||
exports['default'] = Heading; |
@@ -5,3 +5,3 @@ Object.defineProperty(exports, "__esModule", { | ||
var _templateObject = _taggedTemplateLiteral(['\n display: block;\n width: 100%;\n line-height: ', ';\n\n ', '\n\n ', '\n ', '\n ', '\n ', '\n'], ['\n display: block;\n width: 100%;\n line-height: ', ';\n\n ', '\n\n ', '\n ', '\n ', '\n ', '\n']); | ||
var _templateObject = _taggedTemplateLiteral(['\n display: block;\n width: 100%;\n line-height: ', ';\n\n ', '\n \n ', '\n ', '\n ', '\n ', '\n ', '\n'], ['\n display: block;\n width: 100%;\n line-height: ', ';\n\n ', '\n \n ', '\n ', '\n ', '\n ', '\n ', '\n']); | ||
@@ -30,5 +30,5 @@ var _propTypes = require('prop-types'); | ||
return props.hidden && (0, _polished.hideVisually)(); | ||
}, _styledSystem.space, _styledSystem.fontSize, _styledSystem.color, _styledSystem.fontWeight); | ||
}, _styledSystem.textStyle, _styledSystem.space, _styledSystem.fontSize, _styledSystem.color, _styledSystem.fontWeight); | ||
Label.propTypes = Object.assign({}, _styledSystem.space.propTypes, _styledSystem.fontSize.propTypes, _styledSystem.color.propTypes, _styledSystem.fontWeight.propTypes, { | ||
Label.propTypes = Object.assign({}, _styledSystem.textStyle.propTypes, _styledSystem.space.propTypes, _styledSystem.fontSize.propTypes, _styledSystem.color.propTypes, _styledSystem.fontWeight.propTypes, { | ||
hidden: _propTypes2['default'].bool | ||
@@ -38,5 +38,3 @@ }); | ||
Label.defaultProps = { | ||
fontSize: 'sm', | ||
fontWeight: 'bold', | ||
color: 'grey.0', | ||
textStyle: 'label', | ||
m: 0, | ||
@@ -43,0 +41,0 @@ mb: 3, |
@@ -5,3 +5,3 @@ Object.defineProperty(exports, "__esModule", { | ||
var _templateObject = _taggedTemplateLiteral(['\n ', '\n ', '\n ', '\n ', '\n ', '\n ', '\n ', '\n'], ['\n ', '\n ', '\n ', '\n ', '\n ', '\n ', '\n ', '\n']); | ||
var _templateObject = _taggedTemplateLiteral(['\n ', '\n ', '\n ', '\n ', '\n ', '\n ', '\n ', '\n ', '\n'], ['\n ', '\n ', '\n ', '\n ', '\n ', '\n ', '\n ', '\n ', '\n']); | ||
@@ -22,10 +22,8 @@ var _styledComponents = require('styled-components'); | ||
var Text = (0, _styledComponents2['default'])(_cleanTag2['default'].p)(_templateObject, _styledSystem.color, _styledSystem.fontSize, _styledSystem.fontWeight, _styledSystem.letterSpacing, _styledSystem.lineHeight, _styledSystem.space, _styledSystem.textAlign); | ||
var Text = (0, _styledComponents2['default'])(_cleanTag2['default'].p)(_templateObject, _styledSystem.textStyle, _styledSystem.color, _styledSystem.fontSize, _styledSystem.fontWeight, _styledSystem.letterSpacing, _styledSystem.lineHeight, _styledSystem.space, _styledSystem.textAlign); | ||
Text.propTypes = Object.assign({}, _styledSystem.color.propTypes, _styledSystem.fontSize.propTypes, _styledSystem.fontWeight.propTypes, _styledSystem.letterSpacing.propTypes, _styledSystem.lineHeight.propTypes, _styledSystem.space.propTypes, _styledSystem.textAlign.propTypes); | ||
Text.propTypes = Object.assign({}, _styledSystem.textStyle.propTypes, _styledSystem.color.propTypes, _styledSystem.fontSize.propTypes, _styledSystem.fontWeight.propTypes, _styledSystem.letterSpacing.propTypes, _styledSystem.lineHeight.propTypes, _styledSystem.space.propTypes, _styledSystem.textAlign.propTypes); | ||
Text.defaultProps = { | ||
fontSize: 'base', | ||
lineHeight: 'loose', | ||
fontWeight: 'normal', | ||
textStyle: 'text', | ||
m: 0, | ||
@@ -32,0 +30,0 @@ mb: 2 |
{ | ||
"name": "@roo-ui/components", | ||
"version": "0.8.0", | ||
"version": "0.8.1", | ||
"main": "dist/index.js", | ||
@@ -15,3 +15,3 @@ "publishConfig": { | ||
"@roo-ui/test-utils": "^0.7.0", | ||
"@roo-ui/themes": "^0.7.0" | ||
"@roo-ui/themes": "^0.8.1" | ||
}, | ||
@@ -18,0 +18,0 @@ "peerDependencies": { |
@@ -9,4 +9,3 @@ import tag from 'clean-tag'; | ||
...Text.defaultProps, | ||
fontWeight: 'bold', | ||
fontSize: 'xl', | ||
textStyle: 'h3', | ||
}; | ||
@@ -17,3 +16,3 @@ | ||
...Heading.defaultProps, | ||
fontSize: '3xl', | ||
textStyle: 'h1', | ||
}; | ||
@@ -24,3 +23,3 @@ | ||
...Heading.defaultProps, | ||
fontSize: '2xl', | ||
textStyle: 'h2', | ||
}; | ||
@@ -31,4 +30,3 @@ | ||
...Heading.defaultProps, | ||
fontSize: 'xl', | ||
lineHeight: 'loose', | ||
textStyle: 'h3', | ||
}; | ||
@@ -39,4 +37,3 @@ | ||
...Heading.defaultProps, | ||
fontSize: 'lg', | ||
lineHeight: 'loose', | ||
textStyle: 'h4', | ||
}; | ||
@@ -47,4 +44,3 @@ | ||
...Heading.defaultProps, | ||
fontSize: 'base', | ||
lineHeight: 'loose', | ||
textStyle: 'h5', | ||
}; | ||
@@ -55,6 +51,5 @@ | ||
...Heading.defaultProps, | ||
fontSize: 'sm', | ||
lineHeight: 'loose', | ||
textStyle: 'h6', | ||
}; | ||
export default Heading; |
@@ -14,11 +14,3 @@ # Heading | ||
```js | ||
import { | ||
Heading, | ||
Heading.h1, | ||
Heading.h2, | ||
Heading.h3, | ||
Heading.h4, | ||
Heading.h5, | ||
Heading.h6, | ||
} from '@roo-ui/components'; | ||
import { Heading } from '@roo-ui/components'; | ||
@@ -25,0 +17,0 @@ export default ( |
import PropTypes from 'prop-types'; | ||
import styled from 'styled-components'; | ||
import { hideVisually } from 'polished'; | ||
import { themeGet, space, fontSize, fontWeight, color } from 'styled-system'; | ||
import { themeGet, textStyle, space, fontSize, fontWeight, color } from 'styled-system'; | ||
import tag from 'clean-tag'; | ||
@@ -13,3 +13,4 @@ | ||
${props => props.hidden && hideVisually()} | ||
${textStyle} | ||
${space} | ||
@@ -22,2 +23,3 @@ ${fontSize} | ||
Label.propTypes = { | ||
...textStyle.propTypes, | ||
...space.propTypes, | ||
@@ -31,5 +33,3 @@ ...fontSize.propTypes, | ||
Label.defaultProps = { | ||
fontSize: 'sm', | ||
fontWeight: 'bold', | ||
color: 'grey.0', | ||
textStyle: 'label', | ||
m: 0, | ||
@@ -36,0 +36,0 @@ mb: 3, |
import styled from 'styled-components'; | ||
import tag from 'clean-tag'; | ||
import { | ||
textStyle, | ||
color, | ||
@@ -14,2 +15,3 @@ fontSize, | ||
const Text = styled(tag.p)` | ||
${textStyle} | ||
${color} | ||
@@ -25,2 +27,3 @@ ${fontSize} | ||
Text.propTypes = { | ||
...textStyle.propTypes, | ||
...color.propTypes, | ||
@@ -36,5 +39,3 @@ ...fontSize.propTypes, | ||
Text.defaultProps = { | ||
fontSize: 'base', | ||
lineHeight: 'loose', | ||
fontWeight: 'normal', | ||
textStyle: 'text', | ||
m: 0, | ||
@@ -41,0 +42,0 @@ mb: 2, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
132041
2523