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

@entur/layout

Package Overview
Dependencies
Maintainers
12
Versions
157
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@entur/layout - npm Package Compare versions

Comparing version 0.2.2 to 0.3.0

6

CHANGELOG.md

@@ -6,2 +6,8 @@ # Change Log

# [0.3.0](https://bitbucket.org/enturas/design-system/compare/@entur/layout@0.2.2...@entur/layout@0.3.0) (2019-11-07)
### Features
- **CardComponent:** adding the CardBox and CardTab component to layout ([22a5da2](https://bitbucket.org/enturas/design-system/commits/22a5da2d696736d9074f3b778a753aad960834ab))
## [0.2.2](https://bitbucket.org/enturas/design-system/compare/@entur/layout@0.2.1...@entur/layout@0.2.2) (2019-10-30)

@@ -8,0 +14,0 @@

24

dist/index.d.ts

@@ -10,2 +10,24 @@ import React from "react";

declare const Contrast: React.FC<ContrastProps>;
export { Contrast };
declare type CardProps = {
/** HTML-elementet eller React-komponenten som lager CardBox */
as?: 'a' | 'button' | React.ElementType;
/** Tittelen/teksten som står i CardBox */
title: string;
/** Valgfritt ikon som står over tittelen */
titleIcon?: React.ReactNode;
/** Ekstra klassenavn */
className?: string;
[key: string]: any;
};
declare const CardBox: React.FC<CardProps>;
declare type CardProps_$0 = {
/** HTML-elementet eller React-komponenten som lager CardTab */
as?: 'a' | 'button' | React.ElementType;
/** Tittelen/teksten som står i CardTab */
title: string;
/** Ekstra klassenavn */
className?: string;
[key: string]: any;
};
declare const CardTab: React.FC<CardProps_$0>;
export { Contrast, CardBox, CardTab };

@@ -7,2 +7,4 @@ 'use strict';

var classNames = _interopDefault(require('classnames'));
var typography = require('@entur/typography');
var icons = require('@entur/icons');

@@ -35,3 +37,46 @@ function _objectWithoutPropertiesLoose(source, excluded) {

var CardBox = function CardBox(_ref) {
var _ref$as = _ref.as,
Element = _ref$as === void 0 ? 'a' : _ref$as,
title = _ref.title,
children = _ref.children,
titleIcon = _ref.titleIcon,
className = _ref.className,
rest = _objectWithoutPropertiesLoose(_ref, ["as", "title", "children", "titleIcon", "className"]);
var classList = classNames('entur-base-card', 'entur-card-box', className);
return React.createElement(Element, Object.assign({
className: classList
}, rest), titleIcon && React.createElement("div", {
className: "entur-card-box__title-icon"
}, titleIcon), React.createElement(typography.Heading3, {
as: "span",
className: "entur-card-box__heading"
}, title), React.createElement(typography.Paragraph, null, children), React.createElement(icons.ForwardIcon, {
className: "entur-card-box__arrow-icon"
}));
};
var CardTab = function CardTab(_ref) {
var _ref$as = _ref.as,
Element = _ref$as === void 0 ? 'a' : _ref$as,
title = _ref.title,
className = _ref.className,
rest = _objectWithoutPropertiesLoose(_ref, ["as", "title", "className"]);
var classList = classNames('entur-base-card', 'entur-card-tab', className);
return React.createElement(Element, Object.assign({
className: classList
}, rest), React.createElement(typography.Heading3, {
as: "span",
className: "entur-card-tab__heading"
}, title), React.createElement(icons.ForwardIcon, {
inline: true,
className: "entur-card-tab__arrow-icon"
}));
};
exports.CardBox = CardBox;
exports.CardTab = CardTab;
exports.Contrast = Contrast;
//# sourceMappingURL=layout.cjs.development.js.map

2

dist/layout.cjs.production.min.js

@@ -1,2 +0,2 @@

"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var t=e(require("react")),r=e(require("classnames"));exports.Contrast=function(e){var a=e.as,n=void 0===a?"div":a,s=e.className,c=function(e,t){if(null==e)return{};var r,a,n={},s=Object.keys(e);for(a=0;a<s.length;a++)t.indexOf(r=s[a])>=0||(n[r]=e[r]);return n}(e,["as","className"]);return t.createElement(n,Object.assign({className:r("entur-contrast",s)},c))};
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var a=e(require("react")),r=e(require("classnames")),t=require("@entur/typography"),n=require("@entur/icons");function s(e,a){if(null==e)return{};var r,t,n={},s=Object.keys(e);for(t=0;t<s.length;t++)a.indexOf(r=s[t])>=0||(n[r]=e[r]);return n}exports.CardBox=function(e){var c=e.as,l=void 0===c?"a":c,i=e.title,o=e.children,u=e.titleIcon,d=e.className,m=s(e,["as","title","children","titleIcon","className"]),b=r("entur-base-card","entur-card-box",d);return a.createElement(l,Object.assign({className:b},m),u&&a.createElement("div",{className:"entur-card-box__title-icon"},u),a.createElement(t.Heading3,{as:"span",className:"entur-card-box__heading"},i),a.createElement(t.Paragraph,null,o),a.createElement(n.ForwardIcon,{className:"entur-card-box__arrow-icon"}))},exports.CardTab=function(e){var c=e.as,l=void 0===c?"a":c,i=e.title,o=e.className,u=s(e,["as","title","className"]),d=r("entur-base-card","entur-card-tab",o);return a.createElement(l,Object.assign({className:d},u),a.createElement(t.Heading3,{as:"span",className:"entur-card-tab__heading"},i),a.createElement(n.ForwardIcon,{inline:!0,className:"entur-card-tab__arrow-icon"}))},exports.Contrast=function(e){var t=e.as,n=void 0===t?"div":t,c=e.className,l=s(e,["as","className"]);return a.createElement(n,Object.assign({className:r("entur-contrast",c)},l))};
//# sourceMappingURL=layout.cjs.production.min.js.map
import React from 'react';
import classNames from 'classnames';
import { Heading3, Paragraph } from '@entur/typography';
import { ForwardIcon } from '@entur/icons';

@@ -30,3 +32,44 @@ function _objectWithoutPropertiesLoose(source, excluded) {

export { Contrast };
var CardBox = function CardBox(_ref) {
var _ref$as = _ref.as,
Element = _ref$as === void 0 ? 'a' : _ref$as,
title = _ref.title,
children = _ref.children,
titleIcon = _ref.titleIcon,
className = _ref.className,
rest = _objectWithoutPropertiesLoose(_ref, ["as", "title", "children", "titleIcon", "className"]);
var classList = classNames('entur-base-card', 'entur-card-box', className);
return React.createElement(Element, Object.assign({
className: classList
}, rest), titleIcon && React.createElement("div", {
className: "entur-card-box__title-icon"
}, titleIcon), React.createElement(Heading3, {
as: "span",
className: "entur-card-box__heading"
}, title), React.createElement(Paragraph, null, children), React.createElement(ForwardIcon, {
className: "entur-card-box__arrow-icon"
}));
};
var CardTab = function CardTab(_ref) {
var _ref$as = _ref.as,
Element = _ref$as === void 0 ? 'a' : _ref$as,
title = _ref.title,
className = _ref.className,
rest = _objectWithoutPropertiesLoose(_ref, ["as", "title", "className"]);
var classList = classNames('entur-base-card', 'entur-card-tab', className);
return React.createElement(Element, Object.assign({
className: classList
}, rest), React.createElement(Heading3, {
as: "span",
className: "entur-card-tab__heading"
}, title), React.createElement(ForwardIcon, {
inline: true,
className: "entur-card-tab__arrow-icon"
}));
};
export { CardBox, CardTab, Contrast };
//# sourceMappingURL=layout.esm.js.map
{
"name": "@entur/layout",
"version": "0.2.2",
"version": "0.3.0",
"license": "EUPL-1.2",

@@ -30,2 +30,3 @@ "main": "dist/index.js",

"dependencies": {
"@entur/typography": "^0.4.3",
"classnames": "^2.2.6"

@@ -36,3 +37,3 @@ },

},
"gitHead": "33a589c66b9169353060466237d3e69972b7a726"
"gitHead": "1d8d2763bf32e5b215772afb871200eaa67e5238"
}

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

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