@tradeshift/elements.typography
Advanced tools
Comparing version 0.2.8 to 0.3.0
@@ -1,115 +0,1 @@ | ||
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('@tradeshift/elements')) : | ||
typeof define === 'function' && define.amd ? define(['@tradeshift/elements'], factory) : | ||
(global = global || self, factory(global.ts.elements)); | ||
}(this, function (elements) { 'use strict'; | ||
function _defineProperties(target, props) { | ||
for (var i = 0; i < props.length; i++) { | ||
var descriptor = props[i]; | ||
descriptor.enumerable = descriptor.enumerable || false; | ||
descriptor.configurable = true; | ||
if ("value" in descriptor) descriptor.writable = true; | ||
Object.defineProperty(target, descriptor.key, descriptor); | ||
} | ||
} | ||
function _createClass(Constructor, protoProps, staticProps) { | ||
if (protoProps) _defineProperties(Constructor.prototype, protoProps); | ||
if (staticProps) _defineProperties(Constructor, staticProps); | ||
return Constructor; | ||
} | ||
function _inheritsLoose(subClass, superClass) { | ||
subClass.prototype = Object.create(superClass.prototype); | ||
subClass.prototype.constructor = subClass; | ||
subClass.__proto__ = superClass; | ||
} | ||
function _taggedTemplateLiteralLoose(strings, raw) { | ||
if (!raw) { | ||
raw = strings.slice(0); | ||
} | ||
strings.raw = raw; | ||
return strings; | ||
} | ||
var css = "/* General........................................................ */\n\n:host {\n\tdisplay: block;\n}\n\n:host [data-variant='default'] {\n\tfont-size: 14px;\n\tfont-size: var(--ts-fontsize);\n}\n\n:host [data-variant='title'] {\n\tfont-size: 16px;\n\tfont-size: var(--ts-fontsize-medium);\n\tfont-weight: 600;\n\tfont-weight: var(--ts-fontweight-semibold);\n}\n\n:host [data-variant='subtitle'] {\n\tfont-size: 12px;\n\tfont-size: var(--ts-fontsize-mini);\n\tcolor: rgb(80, 107, 119);\n\tcolor: var(--ts-color-slate-lightest);\n}\n\n:host [data-no-wrap] {\n\tposition: relative;\n\tmax-width: 100%;\n\twhite-space: nowrap;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n}\n\n:host [data-color='default'] {\n\tcolor: rgb(15, 21, 26);\n\tcolor: var(--ts-color-black);\n}\n\n:host [data-color='warning'] {\n\tcolor: rgb(255, 140, 0);\n\tcolor: var(--ts-color-orange);\n}\n\n:host [data-color='error'],\n:host [data-color='danger'] {\n\tcolor: rgb(189, 0, 0);\n\tcolor: var(--ts-color-red);\n}\n\n:host [data-color='primary'],\n:host [data-color='action'] {\n\tcolor: rgb(0, 174, 255);\n\tcolor: var(--ts-color-blue);\n}\n\n:host [data-color='success'] {\n\tcolor: rgb(80, 198, 16);\n\tcolor: var(--ts-color-green);\n}\n\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInR5cG9ncmFwaHkuY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLG9FQUFvRTs7QUFFcEU7Q0FDQyxjQUFjO0FBQ2Y7O0FBRUE7Q0FDQyxlQUE2QjtDQUE3Qiw2QkFBNkI7QUFDOUI7O0FBRUE7Q0FDQyxlQUFvQztDQUFwQyxvQ0FBb0M7Q0FDcEMsZ0JBQTBDO0NBQTFDLDBDQUEwQztBQUMzQzs7QUFFQTtDQUNDLGVBQWtDO0NBQWxDLGtDQUFrQztDQUNsQyx3QkFBcUM7Q0FBckMscUNBQXFDO0FBQ3RDOztBQUVBO0NBQ0Msa0JBQWtCO0NBQ2xCLGVBQWU7Q0FDZixtQkFBbUI7Q0FDbkIsZ0JBQWdCO0NBQ2hCLHVCQUF1QjtBQUN4Qjs7QUFFQTtDQUNDLHNCQUE0QjtDQUE1Qiw0QkFBNEI7QUFDN0I7O0FBRUE7Q0FDQyx1QkFBNkI7Q0FBN0IsNkJBQTZCO0FBQzlCOztBQUVBOztDQUVDLHFCQUEwQjtDQUExQiwwQkFBMEI7QUFDM0I7O0FBRUE7O0NBRUMsdUJBQTJCO0NBQTNCLDJCQUEyQjtBQUM1Qjs7QUFFQTtDQUNDLHVCQUE0QjtDQUE1Qiw0QkFBNEI7QUFDN0IiLCJmaWxlIj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G5cdGNvbG9yOiB2YXIoLS10cy1jb2xvci1yZWQpO1xufVxuXG46aG9zdCBbZGF0YS1jb2xvcj0ncHJpbWFyeSddLFxuOmhvc3QgW2RhdGEtY29sb3I9J2FjdGlvbiddIHtcblx0Y29sb3I6IHZhcigtLXRzLWNvbG9yLWJsdWUpO1xufVxuXG46aG9zdCBbZGF0YS1jb2xvcj0nc3VjY2VzcyddIHtcblx0Y29sb3I6IHZhcigtLXRzLWNvbG9yLWdyZWVuKTtcbn1cbiJdfQ== */"; | ||
function _templateObject() { | ||
var data = _taggedTemplateLiteralLoose(["\n\t\t\t\t<div\n\t\t\t\t\ttitle=\"", "\"\n\t\t\t\t\tclass=\"", "\"\n\t\t\t\t\tdata-color=\"", "\"\n\t\t\t\t\tdata-variant=\"", "\"\n\t\t\t\t\t?data-no-wrap=\"", "\"\n\t\t\t\t>\n\t\t\t\t\t", "\n\t\t\t\t</div>\n\t\t\t"]); | ||
_templateObject = function _templateObject() { | ||
return data; | ||
}; | ||
return data; | ||
} | ||
elements.customElementDefineHelper('ts-typography', | ||
/*#__PURE__*/ | ||
function (_TSElement) { | ||
_inheritsLoose(_class, _TSElement); | ||
function _class() { | ||
var _this; | ||
_this = _TSElement.call(this) || this; | ||
_this.text = ''; | ||
_this.color = 'default'; | ||
_this.variant = 'default'; | ||
_this.inline = false; | ||
_this.noWrap = false; | ||
return _this; | ||
} | ||
var _proto = _class.prototype; | ||
_proto.render = function render() { | ||
return elements.html(_templateObject(), this.text, this.classNames, this.color, this.variant, this.noWrap, this.text); | ||
}; | ||
_createClass(_class, null, [{ | ||
key: "styles", | ||
get: function get() { | ||
return [elements.TSElement.styles, elements.unsafeCSS(css)]; | ||
} | ||
}, { | ||
key: "properties", | ||
get: function get() { | ||
return { | ||
text: { | ||
type: String, | ||
reflect: true | ||
}, | ||
variant: { | ||
type: String, | ||
reflect: true | ||
}, | ||
color: { | ||
type: String, | ||
reflect: true | ||
}, | ||
inline: { | ||
type: Boolean, | ||
reflect: true | ||
}, | ||
classNames: { | ||
type: String, | ||
reflect: true, | ||
attribute: 'class-names' | ||
}, | ||
noWrap: { | ||
type: Boolean, | ||
reflect: true, | ||
attribute: 'no-wrap' | ||
} | ||
}; | ||
} | ||
}]); | ||
return _class; | ||
}(elements.TSElement)); | ||
})); | ||
//# sourceMappingURL=typography.umd.js.map | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(require("@tradeshift/elements")):"function"==typeof define&&define.amd?define(["@tradeshift/elements"],e):e((t=t||self).ts.elements)}(this,function(t){"use strict";function e(t,e){for(var o=0;o<e.length;o++){var r=e[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(){var t,e,r=(t=['\n\t\t\t\t<div\n\t\t\t\t\t?title="','"\n\t\t\t\t\tclass="','"\n\t\t\t\t\tdata-color="','"\n\t\t\t\t\tdata-variant="','"\n\t\t\t\t\t?data-no-wrap="','"\n\t\t\t\t>\n\t\t\t\t\t<slot>',"</slot>\n\t\t\t\t</div>\n\t\t\t"],e||(e=t.slice(0)),t.raw=e,t);return o=function(){return r},r}t.customElementDefineHelper("ts-typography",function(r){var a,n,s,i,l;function c(){var t=r.call(this)||this;return t.text="",t.color="default",t.variant="default",t.inline=!1,t.noWrap=!1,t}return n=r,(a=c).prototype=Object.create(n.prototype),a.prototype.constructor=a,a.__proto__=n,c.prototype.render=function(){return t.html(o(),this.text,this.classNames,this.color,this.variant,this.noWrap,this.text)},s=c,l=[{key:"styles",get:function(){return[t.TSElement.styles,t.unsafeCSS(":host,slot{display:block}:host [data-variant=default]{font-size:var(--ts-fontsize)}:host [data-variant=title]{font-size:var(--ts-fontsize-medium);font-weight:var(--ts-fontweight-semibold)}:host [data-variant=subtitle]{font-size:var(--ts-fontsize-mini);color:var(--ts-color-slate-lightest)}:host [data-no-wrap]{position:relative;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host [data-color=default]{color:var(--ts-color-black)}:host [data-color=warning]{color:var(--ts-color-orange)}:host [data-color=danger],:host [data-color=error]{color:var(--ts-color-red)}:host [data-color=action],:host [data-color=primary]{color:var(--ts-color-blue)}:host [data-color=success]{color:var(--ts-color-green)}")]}},{key:"properties",get:function(){return{text:{type:String,reflect:!0},variant:{type:String,reflect:!0},color:{type:String,reflect:!0},inline:{type:Boolean,reflect:!0},classNames:{type:String,reflect:!0,attribute:"class-names"},noWrap:{type:Boolean,reflect:!0,attribute:"no-wrap"}}}}],(i=null)&&e(s.prototype,i),l&&e(s,l),c}(t.TSElement))}); |
{ | ||
"name": "@tradeshift/elements.typography", | ||
"version": "0.2.8", | ||
"version": "0.3.0", | ||
"src": "src/typography.js", | ||
"main": "lib/typography.cjs.js", | ||
"main": "lib/typography.umd.js", | ||
"browser": "lib/typography.umd.js", | ||
@@ -11,5 +11,5 @@ "files": [ | ||
"dependencies": { | ||
"@tradeshift/elements": "^0.2.8" | ||
"@tradeshift/elements": "^0.3.0" | ||
}, | ||
"gitHead": "aaa800e79562e0e747635b18cb89517dcf10e254" | ||
"gitHead": "7ef0cb6cf4c0bea9992d4eeb5eee16d14d851a5c" | ||
} |
Sorry, the diff of this file is not supported yet
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
1
132
1
17312
9
1
+ Added@bundled-es-modules/url-polyfill@1.1.4(transitive)
+ Added@open-wc/polyfills-loader@0.3.3(transitive)
+ Added@tradeshift/elements@0.3.4(transitive)
+ Added@webcomponents/custom-elements@1.6.0(transitive)
+ Added@webcomponents/shadycss@1.11.2(transitive)
+ Added@webcomponents/shadydom@1.11.0(transitive)
+ Added@webcomponents/template@1.5.1(transitive)
+ Added@webcomponents/webcomponents-platform@1.0.1(transitive)
- Removed@tradeshift/elements@0.2.8(transitive)
Updated@tradeshift/elements@^0.3.0