Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cf-component-box

Package Overview
Dependencies
Maintainers
17
Versions
81
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cf-component-box - npm Package Compare versions

Comparing version 2.6.14 to 2.7.0

20

CHANGELOG.md
# Change Log
All notable changes to this project will be documented in this file.
See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
<a name="2.7.0"></a>
# 2.7.0 (2017-09-25)
### Bug Fixes
* **cf-style-provider:** remove className prefixes and fix snapshot formatting ([5cd447c](http://stash.cfops.it:7999/www/cf-ux/commits/5cd447c))
* **cf-style-provider:** use names imports for felaSnapshot and felaTestContext again ([a8973c7](http://stash.cfops.it:7999/www/cf-ux/commits/a8973c7))
### Features
* **cf-component-box:** Added clear to box ([#279](http://stash.cfops.it:7999/www/cf-ux/issues/279)) ([8f02afc](http://stash.cfops.it:7999/www/cf-ux/commits/8f02afc))
* **cf-style-provider:** Update snapshots - they use atomic classNames now ([d748b16](http://stash.cfops.it:7999/www/cf-ux/commits/d748b16))
<a name="2.6.13"></a>

@@ -7,0 +25,0 @@ ## [2.6.13](https://github.com/cloudflare/cf-ui/compare/cf-component-box@2.6.9...cf-component-box@2.6.13) (2017-09-20)

21

es/Box.js

@@ -90,12 +90,12 @@ var _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; };

};
var checkLineHeightViolations = function checkLineHeightViolations(props) {
var rem2px = function rem2px(rem) {
/*
const checkLineHeightViolations = props => {
const rem2px = rem => {
return parseFloat(rem) * props.fontSize;
};
var baseline = props.lineHeight * props.fontSize;
const baseline = props.lineHeight * props.fontSize;
// Calculate total margin, padding, and border
var totalMargin = 0;
let totalMargin = 0;
if (props.margin) {

@@ -108,3 +108,3 @@ totalMargin = rem2px(props.margin);

var totalPadding = 0;
let totalPadding = 0;
if (props.padding) {

@@ -117,3 +117,3 @@ totalPadding = rem2px(props.padding);

var totalBorder = 0;
let totalBorder = 0;
if (props.borderHeight) {

@@ -127,7 +127,10 @@ totalBorder = rem2px(props.borderHeight);

// Warn the user if the total spacing isn't a multiple of the baseline
var spacing = totalMargin + totalBorder + totalPadding;
const spacing = totalMargin + totalBorder + totalPadding;
if (spacing && baseline % spacing !== 0) {
console.warn('Spacing from padding, border, and margin surrounding element should be a multiple of baseline ' + baseline + '.');
console.warn(
`Spacing from padding, border, and margin surrounding element should be a multiple of baseline ${baseline}.`
);
}
};
*/

@@ -134,0 +137,0 @@ // Extract proptypes from the propertiesSpec

@@ -1,5 +0,7 @@

import propertiesSpec from './propertiesSpec';
function _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError("Cannot destructure undefined"); }
export default (function () {
export default (function (_ref) {
_objectDestructuringEmpty(_ref);
return {};
});

@@ -1,4 +0,3 @@

import React from 'react';
import PropTypes from 'prop-types';
import { variables } from 'cf-style-const';
import { variables } from 'cf-style-const'; // eslint-disable-line behance/no-deprecated

@@ -5,0 +4,0 @@ import { rem } from 'polished';

@@ -105,12 +105,12 @@ 'use strict';

};
var checkLineHeightViolations = function checkLineHeightViolations(props) {
var rem2px = function rem2px(rem) {
/*
const checkLineHeightViolations = props => {
const rem2px = rem => {
return parseFloat(rem) * props.fontSize;
};
var baseline = props.lineHeight * props.fontSize;
const baseline = props.lineHeight * props.fontSize;
// Calculate total margin, padding, and border
var totalMargin = 0;
let totalMargin = 0;
if (props.margin) {

@@ -123,3 +123,3 @@ totalMargin = rem2px(props.margin);

var totalPadding = 0;
let totalPadding = 0;
if (props.padding) {

@@ -132,3 +132,3 @@ totalPadding = rem2px(props.padding);

var totalBorder = 0;
let totalBorder = 0;
if (props.borderHeight) {

@@ -142,7 +142,10 @@ totalBorder = rem2px(props.borderHeight);

// Warn the user if the total spacing isn't a multiple of the baseline
var spacing = totalMargin + totalBorder + totalPadding;
const spacing = totalMargin + totalBorder + totalPadding;
if (spacing && baseline % spacing !== 0) {
console.warn('Spacing from padding, border, and margin surrounding element should be a multiple of baseline ' + baseline + '.');
console.warn(
`Spacing from padding, border, and margin surrounding element should be a multiple of baseline ${baseline}.`
);
}
};
*/

@@ -149,0 +152,0 @@ // Extract proptypes from the propertiesSpec

@@ -1,13 +0,11 @@

'use strict';
"use strict";
exports.__esModule = true;
var _propertiesSpec = require('./propertiesSpec');
function _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError("Cannot destructure undefined"); }
var _propertiesSpec2 = _interopRequireDefault(_propertiesSpec);
exports.default = function (_ref) {
_objectDestructuringEmpty(_ref);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.default = function () {
return {};
};

@@ -5,6 +5,2 @@ 'use strict';

var _react = require('react');
var _react2 = _interopRequireDefault(_react);
var _propTypes = require('prop-types');

@@ -20,3 +16,3 @@

var numberOrString = _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.number]);
var numberOrString = _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.number]); // eslint-disable-line behance/no-deprecated

@@ -23,0 +19,0 @@ var pxToRem = function pxToRem(value) {

{
"name": "cf-component-box",
"description": "Cloudflare Box Component",
"version": "2.6.14",
"version": "2.7.0",
"main": "lib/index.js",

@@ -15,3 +15,3 @@ "module": "es/index.js",

"cf-style-const": "^2.5.3",
"cf-style-container": "^5.0.1",
"cf-style-container": "^5.0.2",
"polished": "^1.2.1",

@@ -18,0 +18,0 @@ "prop-types": "^15.5.8"

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