@govuk-react/text-area
Advanced tools
Comparing version 0.1.28 to 0.2.0
@@ -1,2 +0,2 @@ | ||
var _glamorous$textarea; | ||
var _styled; | ||
@@ -10,3 +10,3 @@ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
import PropTypes from 'prop-types'; | ||
import glamorous from 'glamorous'; | ||
import styled from 'react-emotion'; | ||
import { BLACK, YELLOW, ERROR_COLOUR } from 'govuk-colours'; | ||
@@ -19,3 +19,3 @@ import { FONT_SIZE, LINE_HEIGHT, MEDIA_QUERIES, NTA_LIGHT } from '@govuk-react/constants'; | ||
import { withWhiteSpace } from '@govuk-react/hoc'; | ||
var TextAreaField = glamorous.textarea((_glamorous$textarea = { | ||
var TextAreaField = styled('textarea')((_styled = { | ||
boxSizing: 'border-box', | ||
@@ -27,12 +27,10 @@ fontFamily: NTA_LIGHT, | ||
lineHeight: LINE_HEIGHT.SIZE_16 | ||
}, _glamorous$textarea[MEDIA_QUERIES.LARGESCREEN] = { | ||
}, _styled[MEDIA_QUERIES.LARGESCREEN] = { | ||
fontSize: FONT_SIZE.SIZE_19, | ||
lineHeight: LINE_HEIGHT.SIZE_19, | ||
width: '75%' | ||
}, _glamorous$textarea.width = '100%', _glamorous$textarea.padding = '5px 4px 4px', _glamorous$textarea.border = "2px solid " + BLACK, _glamorous$textarea['[disabled]'] = { | ||
cursor: 'auto' | ||
}, _glamorous$textarea[':focus'] = { | ||
}, _styled.width = '100%', _styled.padding = '5px 4px 4px', _styled.border = "2px solid " + BLACK, _styled[':focus'] = { | ||
outline: "3px solid " + YELLOW, | ||
outlineOffset: 0 | ||
}, _glamorous$textarea), function (_ref) { | ||
}, _styled), function (_ref) { | ||
var error = _ref.error; | ||
@@ -39,0 +37,0 @@ return { |
@@ -10,3 +10,3 @@ "use strict"; | ||
var _glamorous = _interopRequireDefault(require("glamorous")); | ||
var _reactEmotion = _interopRequireDefault(require("react-emotion")); | ||
@@ -27,3 +27,3 @@ var _govukColours = require("govuk-colours"); | ||
var _glamorous$textarea; | ||
var _styled; | ||
@@ -36,3 +36,3 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var TextAreaField = _glamorous.default.textarea((_glamorous$textarea = { | ||
var TextAreaField = (0, _reactEmotion.default)('textarea')((_styled = { | ||
boxSizing: 'border-box', | ||
@@ -44,12 +44,10 @@ fontFamily: _constants.NTA_LIGHT, | ||
lineHeight: _constants.LINE_HEIGHT.SIZE_16 | ||
}, _glamorous$textarea[_constants.MEDIA_QUERIES.LARGESCREEN] = { | ||
}, _styled[_constants.MEDIA_QUERIES.LARGESCREEN] = { | ||
fontSize: _constants.FONT_SIZE.SIZE_19, | ||
lineHeight: _constants.LINE_HEIGHT.SIZE_19, | ||
width: '75%' | ||
}, _glamorous$textarea.width = '100%', _glamorous$textarea.padding = '5px 4px 4px', _glamorous$textarea.border = "2px solid " + _govukColours.BLACK, _glamorous$textarea['[disabled]'] = { | ||
cursor: 'auto' | ||
}, _glamorous$textarea[':focus'] = { | ||
}, _styled.width = '100%', _styled.padding = '5px 4px 4px', _styled.border = "2px solid " + _govukColours.BLACK, _styled[':focus'] = { | ||
outline: "3px solid " + _govukColours.YELLOW, | ||
outlineOffset: 0 | ||
}, _glamorous$textarea), function (_ref) { | ||
}, _styled), function (_ref) { | ||
var error = _ref.error; | ||
@@ -60,3 +58,2 @@ return { | ||
}); | ||
exports.TextAreaField = TextAreaField; | ||
@@ -63,0 +60,0 @@ |
{ | ||
"name": "@govuk-react/text-area", | ||
"version": "0.1.28", | ||
"version": "0.2.0", | ||
"dependencies": { | ||
"@govuk-react/constants": "^0.1.28", | ||
"@govuk-react/error-text": "^0.1.28", | ||
"@govuk-react/hint-text": "^0.1.28", | ||
"@govuk-react/hoc": "^0.1.28", | ||
"@govuk-react/label": "^0.1.28", | ||
"@govuk-react/label-text": "^0.1.28", | ||
"@govuk-react/constants": "^0.2.0", | ||
"@govuk-react/error-text": "^0.2.0", | ||
"@govuk-react/hint-text": "^0.2.0", | ||
"@govuk-react/hoc": "^0.2.0", | ||
"@govuk-react/label": "^0.2.0", | ||
"@govuk-react/label-text": "^0.2.0", | ||
"govuk-colours": "^1.0.3" | ||
}, | ||
"peerDependencies": { | ||
"glamorous": ">=4", | ||
"emotion": ">=9", | ||
"prop-types": ">=15", | ||
"react": ">=15" | ||
"react": ">=16.2.0", | ||
"react-emotion": ">=9" | ||
}, | ||
@@ -29,3 +30,3 @@ "scripts": { | ||
"homepage": "https://github.com/penx/govuk-react#readme", | ||
"description": "govuk-react: A port of the govuk-frontend components for React using Glamorous.", | ||
"description": "govuk-react: A port of the govuk-frontend components for React using Emotion.", | ||
"private": false, | ||
@@ -32,0 +33,0 @@ "publishConfig": { |
@@ -5,4 +5,3 @@ // https://github.com/alphagov/govuk-frontend/tree/master/src/components/textarea | ||
import PropTypes from 'prop-types'; | ||
import glamorous from 'glamorous'; | ||
import styled from 'react-emotion'; | ||
import { BLACK, YELLOW, ERROR_COLOUR } from 'govuk-colours'; | ||
@@ -22,3 +21,3 @@ import { | ||
const TextAreaField = glamorous.textarea( | ||
const TextAreaField = styled('textarea')( | ||
{ | ||
@@ -39,5 +38,2 @@ boxSizing: 'border-box', | ||
border: `2px solid ${BLACK}`, | ||
'[disabled]': { | ||
cursor: 'auto', | ||
}, | ||
':focus': { | ||
@@ -44,0 +40,0 @@ outline: `3px solid ${YELLOW}`, |
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import { mount } from 'enzyme'; | ||
import Textarea from './'; | ||
@@ -5,0 +6,0 @@ |
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
Sorry, the diff of this file is not supported yet
53490
11
486
+ Added@govuk-react/constants@0.2.7(transitive)
+ Added@govuk-react/error-text@0.2.12(transitive)
+ Added@govuk-react/hint-text@0.2.12(transitive)
+ Added@govuk-react/hoc@0.2.7(transitive)
+ Added@govuk-react/icons@0.2.7(transitive)
+ Added@govuk-react/label@0.2.12(transitive)
+ Added@govuk-react/label-text@0.2.12(transitive)
+ Addedemotion@11.0.0(transitive)
+ Addedreact-emotion@10.0.0(transitive)
- Removed@govuk-react/constants@0.1.28(transitive)
- Removed@govuk-react/error-text@0.1.28(transitive)
- Removed@govuk-react/hint-text@0.1.28(transitive)
- Removed@govuk-react/hoc@0.1.28(transitive)
- Removed@govuk-react/icons@0.1.28(transitive)
- Removed@govuk-react/label@0.1.28(transitive)
- Removed@govuk-react/label-text@0.1.28(transitive)
- Removedasap@2.0.6(transitive)
- Removedbowser@1.9.4(transitive)
- Removedbrcast@3.0.2(transitive)
- Removedcore-js@1.2.7(transitive)
- Removedcss-in-js-utils@2.0.1(transitive)
- Removedcsstype@2.6.21(transitive)
- Removedencoding@0.1.13(transitive)
- Removedfast-memoize@2.5.2(transitive)
- Removedfbjs@0.8.18(transitive)
- Removedglamor@2.20.40(transitive)
- Removedglamorous@5.0.0(transitive)
- Removedhtml-element-attributes@1.3.1(transitive)
- Removedhtml-tag-names@1.1.5(transitive)
- Removedhyphenate-style-name@1.1.0(transitive)
- Removediconv-lite@0.6.3(transitive)
- Removedinline-style-prefixer@3.0.8(transitive)
- Removedis-function@1.0.2(transitive)
- Removedis-plain-object@2.0.4(transitive)
- Removedis-stream@1.1.0(transitive)
- Removedisobject@3.0.1(transitive)
- Removedisomorphic-fetch@2.2.1(transitive)
- Removednode-fetch@1.7.3(transitive)
- Removedpromise@7.3.1(transitive)
- Removedreact-html-attributes@1.4.6(transitive)
- Removedsafer-buffer@2.1.2(transitive)
- Removedsetimmediate@1.0.5(transitive)
- Removedsvg-tag-names@1.1.2(transitive)
- Removedthrough@2.3.8(transitive)
- Removedua-parser-js@0.7.40(transitive)
- Removedwhatwg-fetch@3.6.20(transitive)
Updated@govuk-react/hoc@^0.2.0
Updated@govuk-react/label@^0.2.0