New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@govuk-react/label-text

Package Overview
Dependencies
Maintainers
5
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@govuk-react/label-text - npm Package Compare versions

Comparing version 0.6.0-alpha.4 to 0.6.0-rc.1

33

es/index.js

@@ -1,22 +0,15 @@

var _styled;
import styled from 'styled-components';
import React from 'react';
import PropTypes from 'prop-types';
import { BLACK } from 'govuk-colours';
import { withWhiteSpace } from '@govuk-react/hoc';
import { FONT_SIZE, LINE_HEIGHT, MEDIA_QUERIES, NTA_LIGHT } from '@govuk-react/constants';
var StyledLabelText = styled('span')((_styled = {
fontFamily: NTA_LIGHT,
WebkitFontSmoothing: 'antialiased',
MozOsxFontSmoothing: 'grayscale',
import { spacing, typography } from '@govuk-react/lib'; // TODO should `LabelText` and `Label` be consolidated?
// TODO add support for differing font sizes, as per govuk-frontend - see:
// https://github.com/alphagov/govuk-frontend/blob/master/src/components/label/_label.scss
var StyledLabelText = styled('span')(typography.font({
size: 19
}), typography.textColour, {
display: 'block',
clear: 'none',
fontWeight: 400,
fontSize: FONT_SIZE.SIZE_16,
lineHeight: LINE_HEIGHT.SIZE_16
}, _styled[MEDIA_QUERIES.LARGESCREEN] = {
fontSize: FONT_SIZE.SIZE_19,
lineHeight: LINE_HEIGHT.SIZE_19
}, _styled.color = "" + BLACK, _styled.paddingBottom = '2px', _styled), function (_ref) {
paddingBottom: '2px'
}, function (_ref) {
var error = _ref.error;

@@ -26,3 +19,5 @@ return {

};
});
}, spacing.withWhiteSpace({
marginBottom: 0
}));
/**

@@ -46,5 +41,3 @@ *

export default withWhiteSpace({
marginBottom: 0
})(LabelText);
export default LabelText;
//# sourceMappingURL=index.js.map

@@ -12,25 +12,16 @@ "use strict";

var _govukColours = require("govuk-colours");
var _lib = require("@govuk-react/lib");
var _hoc = require("@govuk-react/hoc");
var _constants = require("@govuk-react/constants");
var _styled;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var StyledLabelText = (0, _styledComponents.default)('span')((_styled = {
fontFamily: _constants.NTA_LIGHT,
WebkitFontSmoothing: 'antialiased',
MozOsxFontSmoothing: 'grayscale',
// TODO should `LabelText` and `Label` be consolidated?
// TODO add support for differing font sizes, as per govuk-frontend - see:
// https://github.com/alphagov/govuk-frontend/blob/master/src/components/label/_label.scss
var StyledLabelText = (0, _styledComponents.default)('span')(_lib.typography.font({
size: 19
}), _lib.typography.textColour, {
display: 'block',
clear: 'none',
fontWeight: 400,
fontSize: _constants.FONT_SIZE.SIZE_16,
lineHeight: _constants.LINE_HEIGHT.SIZE_16
}, _styled[_constants.MEDIA_QUERIES.LARGESCREEN] = {
fontSize: _constants.FONT_SIZE.SIZE_19,
lineHeight: _constants.LINE_HEIGHT.SIZE_19
}, _styled.color = "" + _govukColours.BLACK, _styled.paddingBottom = '2px', _styled), function (_ref) {
paddingBottom: '2px'
}, function (_ref) {
var error = _ref.error;

@@ -40,3 +31,5 @@ return {

};
});
}, _lib.spacing.withWhiteSpace({
marginBottom: 0
}));
/**

@@ -60,8 +53,5 @@ *

var _default = (0, _hoc.withWhiteSpace)({
marginBottom: 0
})(LabelText);
var _default = LabelText;
exports.default = _default;
module.exports = exports.default;
//# sourceMappingURL=index.js.map
{
"name": "@govuk-react/label-text",
"version": "0.6.0-alpha.4",
"version": "0.6.0-rc.1",
"dependencies": {
"@govuk-react/constants": "^0.6.0-alpha.4",
"@govuk-react/hoc": "^0.6.0-alpha.4",
"govuk-colours": "^1.0.3"
"@govuk-react/lib": "^0.6.0-rc.1"
},

@@ -9,0 +7,0 @@ "peerDependencies": {

import styled from 'styled-components';
import React from 'react';
import PropTypes from 'prop-types';
import { BLACK } from 'govuk-colours';
import { withWhiteSpace } from '@govuk-react/hoc';
import {
FONT_SIZE,
LINE_HEIGHT,
MEDIA_QUERIES,
NTA_LIGHT,
} from '@govuk-react/constants';
import { spacing, typography } from '@govuk-react/lib';
// TODO should `LabelText` and `Label` be consolidated?
// TODO add support for differing font sizes, as per govuk-frontend - see:
// https://github.com/alphagov/govuk-frontend/blob/master/src/components/label/_label.scss
const StyledLabelText = styled('span')(
typography.font({ size: 19 }),
typography.textColour,
{
fontFamily: NTA_LIGHT,
WebkitFontSmoothing: 'antialiased',
MozOsxFontSmoothing: 'grayscale',
display: 'block',
clear: 'none',
fontWeight: 400,
fontSize: FONT_SIZE.SIZE_16,
lineHeight: LINE_HEIGHT.SIZE_16,
[MEDIA_QUERIES.LARGESCREEN]: {
fontSize: FONT_SIZE.SIZE_19,
lineHeight: LINE_HEIGHT.SIZE_19,
},
color: `${BLACK}`,
paddingBottom: '2px',

@@ -33,2 +21,3 @@ },

}),
spacing.withWhiteSpace({ marginBottom: 0 }),
);

@@ -56,2 +45,2 @@

export default withWhiteSpace({ marginBottom: 0 })(LabelText);
export default LabelText;

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc