@entur/typography
Advanced tools
Comparing version 0.7.4 to 1.0.0
@@ -6,2 +6,20 @@ # Change Log | ||
# [1.0.0](https://bitbucket.org/enturas/design-system/compare/@entur/typography@0.7.4...@entur/typography@1.0.0) (2020-01-27) | ||
### Bug Fixes | ||
- add marigin prop for paragraph component ([c7c932a](https://bitbucket.org/enturas/design-system/commits/c7c932ac057e9c393200b6f84093ea62966fa6bd)) | ||
- ensure proper usage of margin props for paragraph ([c3fd065](https://bitbucket.org/enturas/design-system/commits/c3fd06501973537c5b6318cdd6a6090f88bce33d)) | ||
- updating margins for header and paragraph components ([a7cc7a0](https://bitbucket.org/enturas/design-system/commits/a7cc7a0cb15100613e4edca89fa18424c59d7987)) | ||
- **types:** place types in the correct place ([acace09](https://bitbucket.org/enturas/design-system/commits/acace09ec0e258c5cff3a65e13ab29d6603780d9)) | ||
- updating marigins for all typography components ([29e9a27](https://bitbucket.org/enturas/design-system/commits/29e9a273c6c45a7a417f59b59e9ec91971d72e8a)) | ||
### BREAKING CHANGES | ||
- as some typography components now have either removed or added marign, | ||
if these have been used directly in components or other places where | ||
their margins were used for styling purposes, you may experience issues | ||
with this. So doublecheck your usage of Heading1-6 and Paragraph in places | ||
where their margins may be interferring | ||
## [0.7.4](https://bitbucket.org/enturas/design-system/compare/@entur/typography@0.7.3...@entur/typography@0.7.4) (2020-01-20) | ||
@@ -8,0 +26,0 @@ |
@@ -223,7 +223,12 @@ 'use strict'; | ||
Element = _ref$as === void 0 ? 'p' : _ref$as, | ||
_ref$margin = _ref.margin, | ||
margin = _ref$margin === void 0 ? 'bottom' : _ref$margin, | ||
className = _ref.className, | ||
rest = _objectWithoutPropertiesLoose(_ref, ["as", "className"]); | ||
rest = _objectWithoutPropertiesLoose(_ref, ["as", "margin", "className"]); | ||
return React.createElement(Element, Object.assign({ | ||
className: classNames('eds-paragraph', className) | ||
className: classNames('eds-paragraph', { | ||
'eds-paragraph--margin-bottom': margin === 'bottom', | ||
'eds-paragraph--margin-none': margin === 'none' | ||
}, className) | ||
}, rest)); | ||
@@ -230,0 +235,0 @@ }; |
@@ -1,2 +0,2 @@ | ||
"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"),s=e(require("react")),t=e(require("classnames"));function r(e,a){if(null==e)return{};var s,t,r={},n=Object.keys(e);for(t=0;t<n.length;t++)a.indexOf(s=n[t])>=0||(r[s]=e[s]);return r}var n=function(e){var a,n=e.as,i=void 0===n?"h1":n,c=e.className,l=e.level,m=e.margin,o=r(e,["as","className","level","margin"]),d="eds-h"+l;return s.createElement(i,Object.assign({className:t(d,(a={},a[d+"--margin-top"]="top"===m,a[d+"--margin-bottom"]="bottom"===m,a[d+"--margin-none"]="none"===m,a),c)},o))},i=function(e){var a=e.as,n=void 0===a?"strong":a,i=e.className,c=r(e,["as","className"]);return s.createElement(n,Object.assign({className:t("eds-strong-text",i)},c))};a.warnAboutMissingStyles("typography"),exports.CodeText=function(e){var a=e.as,n=void 0===a?"code":a,i=e.className,c=r(e,["as","className"]);return s.createElement(n,Object.assign({className:t("eds-code-text",i)},c))},exports.EmphasizedText=function(e){var a=e.as,n=void 0===a?"em":a,i=e.className,c=r(e,["as","className"]);return s.createElement(n,Object.assign({className:t("eds-emphasized-text",i)},c))},exports.Heading1=function(e){var a=e.as,t=void 0===a?"h1":a,i=e.margin,c=void 0===i?"both":i,l=r(e,["as","margin"]);return s.createElement(n,Object.assign({as:t,margin:c},l,{level:1}))},exports.Heading2=function(e){var a=e.as,t=void 0===a?"h2":a,i=e.margin,c=void 0===i?"both":i,l=r(e,["as","margin"]);return s.createElement(n,Object.assign({as:t,margin:c},l,{level:2}))},exports.Heading3=function(e){var a=e.as,t=void 0===a?"h3":a,i=e.margin,c=void 0===i?"both":i,l=r(e,["as","margin"]);return s.createElement(n,Object.assign({as:t,margin:c},l,{level:3}))},exports.Heading4=function(e){var a=e.as,t=void 0===a?"h4":a,i=e.margin,c=void 0===i?"both":i,l=r(e,["as","margin"]);return s.createElement(n,Object.assign({as:t,margin:c},l,{level:4}))},exports.Heading5=function(e){var a=e.as,t=void 0===a?"h5":a,i=e.margin,c=void 0===i?"both":i,l=r(e,["as","margin"]);return s.createElement(n,Object.assign({as:t,margin:c},l,{level:5}))},exports.Heading6=function(e){var a=e.as,t=void 0===a?"h6":a,i=e.margin,c=void 0===i?"both":i,l=r(e,["as","margin"]);return s.createElement(n,Object.assign({as:t,margin:c},l,{level:6}))},exports.Label=function(e){var a=e.as,n=void 0===a?"label":a,i=e.className,c=r(e,["as","className"]);return s.createElement(n,Object.assign({className:t("eds-label",i)},c))},exports.LeadParagraph=function(e){var a=e.as,n=void 0===a?"p":a,i=e.className,c=r(e,["as","className"]);return s.createElement(n,Object.assign({className:t("eds-lead-paragraph",i)},c))},exports.Link=function(e){var a=e.as,n=void 0===a?"a":a,i=e.className,c=r(e,["as","className"]);return s.createElement(n,Object.assign({className:t("eds-link",i)},c))},exports.ListItem=function(e){var a=e.children,n=e.className,c=e.title,l=r(e,["children","className","title"]);return s.createElement("li",Object.assign({className:t("eds-list-item",n)},l),c&&s.createElement(i,{className:"eds-list-item__title"},c),a)},exports.NumberedList=function(e){var a=e.className,n=r(e,["className"]);return s.createElement("ol",Object.assign({className:t("eds-numbered-list",a)},n))},exports.Paragraph=function(e){var a=e.as,n=void 0===a?"p":a,i=e.className,c=r(e,["as","className"]);return s.createElement(n,Object.assign({className:t("eds-paragraph",i)},c))},exports.PreformattedText=function(e){var a=e.as,n=void 0===a?"pre":a,i=e.className,c=r(e,["as","className"]);return s.createElement(n,Object.assign({className:t("eds-preformatted-text",i)},c))},exports.SmallText=function(e){var a=e.as,n=void 0===a?"span":a,i=e.className,c=r(e,["as","className"]);return s.createElement(n,Object.assign({className:t("eds-small-text",i)},c))},exports.StrongText=i,exports.SubLabel=function(e){var a=e.as,n=void 0===a?"span":a,i=e.className,c=r(e,["as","className"]);return s.createElement(n,Object.assign({className:t("eds-sub-label",i)},c))},exports.SubParagraph=function(e){var a=e.as,n=void 0===a?"p":a,i=e.className,c=r(e,["as","className"]);return s.createElement(n,Object.assign({className:t("eds-sub-paragraph",i)},c))},exports.UnorderedList=function(e){var a=e.className,n=r(e,["className"]);return s.createElement("ul",Object.assign({className:t("eds-unordered-list",a)},n))}; | ||
"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"),s=e(require("react")),t=e(require("classnames"));function r(e,a){if(null==e)return{};var s,t,r={},n=Object.keys(e);for(t=0;t<n.length;t++)a.indexOf(s=n[t])>=0||(r[s]=e[s]);return r}var n=function(e){var a,n=e.as,i=void 0===n?"h1":n,c=e.className,l=e.level,m=e.margin,o=r(e,["as","className","level","margin"]),d="eds-h"+l;return s.createElement(i,Object.assign({className:t(d,(a={},a[d+"--margin-top"]="top"===m,a[d+"--margin-bottom"]="bottom"===m,a[d+"--margin-none"]="none"===m,a),c)},o))},i=function(e){var a=e.as,n=void 0===a?"strong":a,i=e.className,c=r(e,["as","className"]);return s.createElement(n,Object.assign({className:t("eds-strong-text",i)},c))};a.warnAboutMissingStyles("typography"),exports.CodeText=function(e){var a=e.as,n=void 0===a?"code":a,i=e.className,c=r(e,["as","className"]);return s.createElement(n,Object.assign({className:t("eds-code-text",i)},c))},exports.EmphasizedText=function(e){var a=e.as,n=void 0===a?"em":a,i=e.className,c=r(e,["as","className"]);return s.createElement(n,Object.assign({className:t("eds-emphasized-text",i)},c))},exports.Heading1=function(e){var a=e.as,t=void 0===a?"h1":a,i=e.margin,c=void 0===i?"both":i,l=r(e,["as","margin"]);return s.createElement(n,Object.assign({as:t,margin:c},l,{level:1}))},exports.Heading2=function(e){var a=e.as,t=void 0===a?"h2":a,i=e.margin,c=void 0===i?"both":i,l=r(e,["as","margin"]);return s.createElement(n,Object.assign({as:t,margin:c},l,{level:2}))},exports.Heading3=function(e){var a=e.as,t=void 0===a?"h3":a,i=e.margin,c=void 0===i?"both":i,l=r(e,["as","margin"]);return s.createElement(n,Object.assign({as:t,margin:c},l,{level:3}))},exports.Heading4=function(e){var a=e.as,t=void 0===a?"h4":a,i=e.margin,c=void 0===i?"both":i,l=r(e,["as","margin"]);return s.createElement(n,Object.assign({as:t,margin:c},l,{level:4}))},exports.Heading5=function(e){var a=e.as,t=void 0===a?"h5":a,i=e.margin,c=void 0===i?"both":i,l=r(e,["as","margin"]);return s.createElement(n,Object.assign({as:t,margin:c},l,{level:5}))},exports.Heading6=function(e){var a=e.as,t=void 0===a?"h6":a,i=e.margin,c=void 0===i?"both":i,l=r(e,["as","margin"]);return s.createElement(n,Object.assign({as:t,margin:c},l,{level:6}))},exports.Label=function(e){var a=e.as,n=void 0===a?"label":a,i=e.className,c=r(e,["as","className"]);return s.createElement(n,Object.assign({className:t("eds-label",i)},c))},exports.LeadParagraph=function(e){var a=e.as,n=void 0===a?"p":a,i=e.className,c=r(e,["as","className"]);return s.createElement(n,Object.assign({className:t("eds-lead-paragraph",i)},c))},exports.Link=function(e){var a=e.as,n=void 0===a?"a":a,i=e.className,c=r(e,["as","className"]);return s.createElement(n,Object.assign({className:t("eds-link",i)},c))},exports.ListItem=function(e){var a=e.children,n=e.className,c=e.title,l=r(e,["children","className","title"]);return s.createElement("li",Object.assign({className:t("eds-list-item",n)},l),c&&s.createElement(i,{className:"eds-list-item__title"},c),a)},exports.NumberedList=function(e){var a=e.className,n=r(e,["className"]);return s.createElement("ol",Object.assign({className:t("eds-numbered-list",a)},n))},exports.Paragraph=function(e){var a=e.as,n=void 0===a?"p":a,i=e.margin,c=void 0===i?"bottom":i,l=e.className,m=r(e,["as","margin","className"]);return s.createElement(n,Object.assign({className:t("eds-paragraph",{"eds-paragraph--margin-bottom":"bottom"===c,"eds-paragraph--margin-none":"none"===c},l)},m))},exports.PreformattedText=function(e){var a=e.as,n=void 0===a?"pre":a,i=e.className,c=r(e,["as","className"]);return s.createElement(n,Object.assign({className:t("eds-preformatted-text",i)},c))},exports.SmallText=function(e){var a=e.as,n=void 0===a?"span":a,i=e.className,c=r(e,["as","className"]);return s.createElement(n,Object.assign({className:t("eds-small-text",i)},c))},exports.StrongText=i,exports.SubLabel=function(e){var a=e.as,n=void 0===a?"span":a,i=e.className,c=r(e,["as","className"]);return s.createElement(n,Object.assign({className:t("eds-sub-label",i)},c))},exports.SubParagraph=function(e){var a=e.as,n=void 0===a?"p":a,i=e.className,c=r(e,["as","className"]);return s.createElement(n,Object.assign({className:t("eds-sub-paragraph",i)},c))},exports.UnorderedList=function(e){var a=e.className,n=r(e,["className"]);return s.createElement("ul",Object.assign({className:t("eds-unordered-list",a)},n))}; | ||
//# sourceMappingURL=typography.cjs.production.min.js.map |
@@ -217,7 +217,12 @@ import { warnAboutMissingStyles } from '@entur/utils'; | ||
Element = _ref$as === void 0 ? 'p' : _ref$as, | ||
_ref$margin = _ref.margin, | ||
margin = _ref$margin === void 0 ? 'bottom' : _ref$margin, | ||
className = _ref.className, | ||
rest = _objectWithoutPropertiesLoose(_ref, ["as", "className"]); | ||
rest = _objectWithoutPropertiesLoose(_ref, ["as", "margin", "className"]); | ||
return React.createElement(Element, Object.assign({ | ||
className: classNames('eds-paragraph', className) | ||
className: classNames('eds-paragraph', { | ||
'eds-paragraph--margin-bottom': margin === 'bottom', | ||
'eds-paragraph--margin-none': margin === 'none' | ||
}, className) | ||
}, rest)); | ||
@@ -224,0 +229,0 @@ }; |
{ | ||
"name": "@entur/typography", | ||
"version": "0.7.4", | ||
"version": "1.0.0", | ||
"license": "EUPL-1.2", | ||
@@ -30,3 +30,3 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@entur/utils": "^0.2.1", | ||
"@entur/utils": "^0.2.2", | ||
"@types/classnames": "^2.2.9", | ||
@@ -37,5 +37,5 @@ "classnames": "^2.2.6", | ||
"devDependencies": { | ||
"@entur/tokens": "^1.1.2" | ||
"@entur/tokens": "^1.1.3" | ||
}, | ||
"gitHead": "4e5dd73656a73309e6b1b02a5279e5dbcb86c234" | ||
"gitHead": "a0c928bf8497bee3271fa0ee886fb7c311777b0e" | ||
} |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
120684
1069
2
Updated@entur/utils@^0.2.2