@entur/layout
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -6,2 +6,6 @@ # Change Log | ||
## [1.0.4](https://bitbucket.org/enturas/design-system/compare/@entur/layout@1.0.3...@entur/layout@1.0.4) (2020-01-14) | ||
**Note:** Version bump only for package @entur/layout | ||
## [1.0.3](https://bitbucket.org/enturas/design-system/compare/@entur/layout@1.0.2...@entur/layout@1.0.3) (2020-01-13) | ||
@@ -8,0 +12,0 @@ |
'use strict'; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } | ||
var utils = require('@entur/utils'); | ||
var _objectWithoutProperties = _interopDefault(require('@babel/runtime/helpers/objectWithoutProperties')); | ||
var React = _interopDefault(require('react')); | ||
@@ -12,2 +13,17 @@ var classNames = _interopDefault(require('classnames')); | ||
function _objectWithoutPropertiesLoose(source, excluded) { | ||
if (source == null) return {}; | ||
var target = {}; | ||
var sourceKeys = Object.keys(source); | ||
var key, i; | ||
for (i = 0; i < sourceKeys.length; i++) { | ||
key = sourceKeys[i]; | ||
if (excluded.indexOf(key) >= 0) continue; | ||
target[key] = source[key]; | ||
} | ||
return target; | ||
} | ||
var Contrast = function Contrast(_ref) { | ||
@@ -17,3 +33,3 @@ var _ref$as = _ref.as, | ||
className = _ref.className, | ||
rest = _objectWithoutProperties(_ref, ["as", "className"]); | ||
rest = _objectWithoutPropertiesLoose(_ref, ["as", "className"]); | ||
@@ -30,3 +46,3 @@ return React.createElement(Element, Object.assign({ | ||
className = _ref.className, | ||
rest = _objectWithoutProperties(_ref, ["as", "children", "className"]); | ||
rest = _objectWithoutPropertiesLoose(_ref, ["as", "children", "className"]); | ||
@@ -48,3 +64,3 @@ var classList = classNames('eds-base-card', className); | ||
className = _ref.className, | ||
rest = _objectWithoutProperties(_ref, ["as", "title", "children", "titleIcon", "compact", "className"]); | ||
rest = _objectWithoutPropertiesLoose(_ref, ["as", "title", "children", "titleIcon", "compact", "className"]); | ||
@@ -51,0 +67,0 @@ var classList = classNames('eds-base-card', 'eds-navigation-card', className, { |
@@ -1,2 +0,2 @@ | ||
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var a=require("@entur/utils"),t=e(require("@babel/runtime/helpers/objectWithoutProperties")),r=e(require("react")),s=e(require("classnames")),n=require("@entur/typography"),i=require("@entur/icons"),c=function(e){var a=e.as,n=void 0===a?"div":a,i=e.children,c=e.className,o=t(e,["as","children","className"]),l=s("eds-base-card",c);return r.createElement(n,Object.assign({className:l},o),i)};a.warnAboutMissingStyles("layout","typography"),exports.BaseCard=c,exports.Contrast=function(e){var a=e.as,n=void 0===a?"div":a,i=e.className,c=t(e,["as","className"]);return r.createElement(n,Object.assign({className:s("eds-contrast",i)},c))},exports.NavigationCard=function(e){var a=e.as,o=void 0===a?"a":a,l=e.title,d=e.children,u=e.titleIcon,m=e.compact,p=void 0!==m&&m,v=e.className,g=t(e,["as","title","children","titleIcon","compact","className"]),N=s("eds-base-card","eds-navigation-card",v,{"eds-navigation-card--compact":p});return r.createElement(c,Object.assign({as:o,className:N},g),!p&&u&&r.createElement("div",{className:"eds-navigation-card__title-icon"},u),r.createElement(n.Heading3,{as:"span",margin:p?"both":"top"},l),!p&&r.createElement(n.Paragraph,null,d),r.createElement(i.ForwardIcon,{inline:p,className:"eds-navigation-card__arrow-icon"}))}; | ||
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var a=require("@entur/utils"),t=e(require("react")),r=e(require("classnames")),s=require("@entur/typography"),n=require("@entur/icons");function c(e,a){if(null==e)return{};var t,r,s={},n=Object.keys(e);for(r=0;r<n.length;r++)a.indexOf(t=n[r])>=0||(s[t]=e[t]);return s}var i=function(e){var a=e.as,s=void 0===a?"div":a,n=e.children,i=e.className,o=c(e,["as","children","className"]),l=r("eds-base-card",i);return t.createElement(s,Object.assign({className:l},o),n)};a.warnAboutMissingStyles("layout","typography"),exports.BaseCard=i,exports.Contrast=function(e){var a=e.as,s=void 0===a?"div":a,n=e.className,i=c(e,["as","className"]);return t.createElement(s,Object.assign({className:r("eds-contrast",n)},i))},exports.NavigationCard=function(e){var a=e.as,o=void 0===a?"a":a,l=e.title,d=e.children,u=e.titleIcon,m=e.compact,v=void 0!==m&&m,p=e.className,g=c(e,["as","title","children","titleIcon","compact","className"]),f=r("eds-base-card","eds-navigation-card",p,{"eds-navigation-card--compact":v});return t.createElement(i,Object.assign({as:o,className:f},g),!v&&u&&t.createElement("div",{className:"eds-navigation-card__title-icon"},u),t.createElement(s.Heading3,{as:"span",margin:v?"both":"top"},l),!v&&t.createElement(s.Paragraph,null,d),t.createElement(n.ForwardIcon,{inline:v,className:"eds-navigation-card__arrow-icon"}))}; | ||
//# sourceMappingURL=layout.cjs.production.min.js.map |
import { warnAboutMissingStyles } from '@entur/utils'; | ||
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties'; | ||
import React from 'react'; | ||
@@ -8,2 +7,17 @@ import classNames from 'classnames'; | ||
function _objectWithoutPropertiesLoose(source, excluded) { | ||
if (source == null) return {}; | ||
var target = {}; | ||
var sourceKeys = Object.keys(source); | ||
var key, i; | ||
for (i = 0; i < sourceKeys.length; i++) { | ||
key = sourceKeys[i]; | ||
if (excluded.indexOf(key) >= 0) continue; | ||
target[key] = source[key]; | ||
} | ||
return target; | ||
} | ||
var Contrast = function Contrast(_ref) { | ||
@@ -13,3 +27,3 @@ var _ref$as = _ref.as, | ||
className = _ref.className, | ||
rest = _objectWithoutProperties(_ref, ["as", "className"]); | ||
rest = _objectWithoutPropertiesLoose(_ref, ["as", "className"]); | ||
@@ -26,3 +40,3 @@ return React.createElement(Element, Object.assign({ | ||
className = _ref.className, | ||
rest = _objectWithoutProperties(_ref, ["as", "children", "className"]); | ||
rest = _objectWithoutPropertiesLoose(_ref, ["as", "children", "className"]); | ||
@@ -44,3 +58,3 @@ var classList = classNames('eds-base-card', className); | ||
className = _ref.className, | ||
rest = _objectWithoutProperties(_ref, ["as", "title", "children", "titleIcon", "compact", "className"]); | ||
rest = _objectWithoutPropertiesLoose(_ref, ["as", "title", "children", "titleIcon", "compact", "className"]); | ||
@@ -47,0 +61,0 @@ var classList = classNames('eds-base-card', 'eds-navigation-card', className, { |
{ | ||
"name": "@entur/layout", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"license": "EUPL-1.2", | ||
@@ -30,10 +30,10 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@entur/typography": "^0.7.2", | ||
"@entur/utils": "^0.2.0", | ||
"@entur/typography": "^0.7.3", | ||
"@entur/utils": "^0.2.1", | ||
"classnames": "^2.2.6" | ||
}, | ||
"devDependencies": { | ||
"@entur/tokens": "^1.1.1" | ||
"@entur/tokens": "^1.1.2" | ||
}, | ||
"gitHead": "af54ee3149f8b3867555d5fdd68699821d5b8fae" | ||
"gitHead": "424f5b8ed5df86c1332f683d13a3ef59efc977ba" | ||
} |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
47770
18
252
Updated@entur/typography@^0.7.3
Updated@entur/utils@^0.2.1