@twilio-paste/heading
Advanced tools
Comparing version 1.1.13 to 1.2.0
@@ -6,2 +6,13 @@ # Change Log | ||
# [1.2.0](https://github.com/twilio-labs/paste/compare/@twilio-paste/heading@1.1.13...@twilio-paste/heading@1.2.0) (2020-04-07) | ||
### Features | ||
* **heading:** allow for adding html attributes ([b290a82](https://github.com/twilio-labs/paste/commit/b290a82088f39d00063137fba31075bc11e0afc2)) | ||
## [1.1.13](https://github.com/twilio-labs/paste/compare/@twilio-paste/heading@1.1.12...@twilio-paste/heading@1.1.13) (2020-04-07) | ||
@@ -8,0 +19,0 @@ |
import * as React from 'react'; | ||
export declare type asTags = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'div' | 'label' | 'span' | 'header'; | ||
export declare type HeadingVariants = 'heading10' | 'heading20' | 'heading30' | 'heading40' | 'heading50' | 'heading60'; | ||
export interface HeadingProps { | ||
export interface HeadingProps extends React.HTMLAttributes<HTMLHeadingElement> { | ||
as: asTags; | ||
className?: never; | ||
id?: string; | ||
className?: never; | ||
marginBottom?: 'space0'; | ||
@@ -9,0 +9,0 @@ variant?: HeadingVariants; |
@@ -1,2 +0,2 @@ | ||
import{createElement as e}from"react";import{oneOf as t}from"prop-types";import{Text as i}from"@twilio-paste/text"; | ||
import{createElement as e}from"react";import{oneOf as t}from"prop-types";import{Text as i,safelySpreadTextProps as n}from"@twilio-paste/text"; | ||
/*! ***************************************************************************** | ||
@@ -15,2 +15,2 @@ Copyright (c) Microsoft Corporation. All rights reserved. | ||
and limitations under the License. | ||
***************************************************************************** */var n=function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};var o=function(t){var o=t.as,a=t.children,r=t.id,g=t.marginBottom,h=t.variant;return e(i,n({},function(e,t){switch(e){case"heading10":return{marginBottom:t||"space70",fontSize:"fontSize90",fontWeight:"fontWeightSemibold",lineHeight:"lineHeight90"};case"heading30":return{marginBottom:t||"space50",fontSize:"fontSize60",fontWeight:"fontWeightSemibold",lineHeight:"lineHeight60"};case"heading40":return{marginBottom:t||"space40",fontSize:"fontSize40",fontWeight:"fontWeightSemibold",lineHeight:"lineHeight40"};case"heading50":return{marginBottom:t||"space30",fontSize:"fontSize30",fontWeight:"fontWeightSemibold",lineHeight:"lineHeight30"};case"heading60":return{marginBottom:t||"space30",fontSize:"fontSize20",fontWeight:"fontWeightSemibold",lineHeight:"lineHeight20"};case"heading20":default:return{marginBottom:t||"space60",fontSize:"fontSize70",fontWeight:"fontWeightSemibold",lineHeight:"lineHeight70"}}}(h,g),{as:o,display:"block",id:r,color:"colorText"}),a)};o.displayName="Heading",o.defaultProps={variant:"heading20"},"development"===process.env.NODE_ENV&&(o.propTypes={as:t(["h1","h2","h3","h4","h5","h6","div","label","span"]).isRequired,marginBottom:t(["space0"]),variant:t(["heading10","heading20","heading30","heading40","heading50","heading60"])});export{o as Heading}; | ||
***************************************************************************** */var o=function(){return(o=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};var r=function(t){var r=t.as,a=t.children,g=t.id,h=t.marginBottom,l=t.variant,f=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(i[n[o]]=e[n[o]])}return i}(t,["as","children","id","marginBottom","variant"]);return e(i,o({},n(f),function(e,t){switch(e){case"heading10":return{marginBottom:t||"space70",fontSize:"fontSize90",fontWeight:"fontWeightSemibold",lineHeight:"lineHeight90"};case"heading30":return{marginBottom:t||"space50",fontSize:"fontSize60",fontWeight:"fontWeightSemibold",lineHeight:"lineHeight60"};case"heading40":return{marginBottom:t||"space40",fontSize:"fontSize40",fontWeight:"fontWeightSemibold",lineHeight:"lineHeight40"};case"heading50":return{marginBottom:t||"space30",fontSize:"fontSize30",fontWeight:"fontWeightSemibold",lineHeight:"lineHeight30"};case"heading60":return{marginBottom:t||"space30",fontSize:"fontSize20",fontWeight:"fontWeightSemibold",lineHeight:"lineHeight20"};case"heading20":default:return{marginBottom:t||"space60",fontSize:"fontSize70",fontWeight:"fontWeightSemibold",lineHeight:"lineHeight70"}}}(l,h),{as:r,display:"block",id:g,color:"colorText"}),a)};r.displayName="Heading",r.defaultProps={variant:"heading20"},"development"===process.env.NODE_ENV&&(r.propTypes={as:t(["h1","h2","h3","h4","h5","h6","div","label","span"]).isRequired,marginBottom:t(["space0"]),variant:t(["heading10","heading20","heading30","heading40","heading50","heading60"])});export{r as Heading}; |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("prop-types"),i=require("@twilio-paste/text"),n=function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};var o=function(t){var o=t.as,a=t.children,r=t.id,g=t.marginBottom,h=t.variant;return e.createElement(i.Text,n({},function(e,t){switch(e){case"heading10":return{marginBottom:t||"space70",fontSize:"fontSize90",fontWeight:"fontWeightSemibold",lineHeight:"lineHeight90"};case"heading30":return{marginBottom:t||"space50",fontSize:"fontSize60",fontWeight:"fontWeightSemibold",lineHeight:"lineHeight60"};case"heading40":return{marginBottom:t||"space40",fontSize:"fontSize40",fontWeight:"fontWeightSemibold",lineHeight:"lineHeight40"};case"heading50":return{marginBottom:t||"space30",fontSize:"fontSize30",fontWeight:"fontWeightSemibold",lineHeight:"lineHeight30"};case"heading60":return{marginBottom:t||"space30",fontSize:"fontSize20",fontWeight:"fontWeightSemibold",lineHeight:"lineHeight20"};case"heading20":default:return{marginBottom:t||"space60",fontSize:"fontSize70",fontWeight:"fontWeightSemibold",lineHeight:"lineHeight70"}}}(h,g),{as:o,display:"block",id:r,color:"colorText"}),a)};o.displayName="Heading",o.defaultProps={variant:"heading20"},"development"===process.env.NODE_ENV&&(o.propTypes={as:t.oneOf(["h1","h2","h3","h4","h5","h6","div","label","span"]).isRequired,marginBottom:t.oneOf(["space0"]),variant:t.oneOf(["heading10","heading20","heading30","heading40","heading50","heading60"])}),exports.Heading=o; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("prop-types"),i=require("@twilio-paste/text"),n=function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};var o=function(t){var o=t.as,r=t.children,a=t.id,g=t.marginBottom,h=t.variant,l=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(i[n[o]]=e[n[o]])}return i}(t,["as","children","id","marginBottom","variant"]);return e.createElement(i.Text,n({},i.safelySpreadTextProps(l),function(e,t){switch(e){case"heading10":return{marginBottom:t||"space70",fontSize:"fontSize90",fontWeight:"fontWeightSemibold",lineHeight:"lineHeight90"};case"heading30":return{marginBottom:t||"space50",fontSize:"fontSize60",fontWeight:"fontWeightSemibold",lineHeight:"lineHeight60"};case"heading40":return{marginBottom:t||"space40",fontSize:"fontSize40",fontWeight:"fontWeightSemibold",lineHeight:"lineHeight40"};case"heading50":return{marginBottom:t||"space30",fontSize:"fontSize30",fontWeight:"fontWeightSemibold",lineHeight:"lineHeight30"};case"heading60":return{marginBottom:t||"space30",fontSize:"fontSize20",fontWeight:"fontWeightSemibold",lineHeight:"lineHeight20"};case"heading20":default:return{marginBottom:t||"space60",fontSize:"fontSize70",fontWeight:"fontWeightSemibold",lineHeight:"lineHeight70"}}}(h,g),{as:o,display:"block",id:a,color:"colorText"}),r)};o.displayName="Heading",o.defaultProps={variant:"heading20"},"development"===process.env.NODE_ENV&&(o.propTypes={as:t.oneOf(["h1","h2","h3","h4","h5","h6","div","label","span"]).isRequired,marginBottom:t.oneOf(["space0"]),variant:t.oneOf(["heading10","heading20","heading30","heading40","heading50","heading60"])}),exports.Heading=o; |
{ | ||
"name": "@twilio-paste/heading", | ||
"version": "1.1.13", | ||
"version": "1.2.0", | ||
"category": "typography", | ||
@@ -33,4 +33,4 @@ "status": "beta", | ||
"@twilio-paste/design-tokens": "^4.3.0", | ||
"@twilio-paste/style-props": "^0.2.3", | ||
"@twilio-paste/text": "^1.2.4", | ||
"@twilio-paste/style-props": "^1.0.0", | ||
"@twilio-paste/text": "^2.0.0", | ||
"@twilio-paste/theme": "^3.1.0", | ||
@@ -48,6 +48,6 @@ "prop-types": "^15.7.2", | ||
"@rollup/plugin-node-resolve": "^7.1.1", | ||
"@twilio-paste/design-tokens": "^4.3.0", | ||
"@twilio-paste/style-props": "^1.0.0", | ||
"@twilio-paste/text": "^2.0.0", | ||
"@twilio-paste/theme": "^3.1.0", | ||
"@twilio-paste/design-tokens": "^4.4.0", | ||
"@twilio-paste/style-props": "^1.0.1", | ||
"@twilio-paste/text": "^2.0.1", | ||
"@twilio-paste/theme": "^3.1.1", | ||
"prop-types": "^15.7.2", | ||
@@ -64,3 +64,3 @@ "react": "^16.8.6", | ||
}, | ||
"gitHead": "3cd7ae9ff23c1d5b473636e24fb11701f5cb80c7" | ||
"gitHead": "f6bfb3986a9e73270398b5b6b16c56ea2f9e9655" | ||
} |
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
17798
41