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

clay-button

Package Overview
Dependencies
Maintainers
6
Versions
92
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clay-button - npm Package Compare versions

Comparing version 2.1.6 to 2.1.7

9

lib/ClayButton.js

@@ -189,2 +189,11 @@ 'use strict';

/**
* The title attribute of the element.
* @default undefined
* @instance
* @memberof ClayButton
* @type {?(string|undefined)}
*/
title: _metalState.Config.string(),
/**
* The type attribute value of the element.

@@ -191,0 +200,0 @@ * @default button

38

lib/ClayButton.soy.js

@@ -83,6 +83,8 @@ 'use strict';

/** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */
var title = soy.asserts.assertType(opt_data.title == null || goog.isString(opt_data.title) || opt_data.title instanceof goog.soy.data.SanitizedContent, 'title', opt_data.title, '!goog.soy.data.SanitizedContent|null|string|undefined');
/** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */
var type = soy.asserts.assertType(opt_data.type == null || goog.isString(opt_data.type) || opt_data.type instanceof goog.soy.data.SanitizedContent, 'type', opt_data.type, '!goog.soy.data.SanitizedContent|null|string|undefined');
/** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */
var value = soy.asserts.assertType(opt_data.value == null || goog.isString(opt_data.value) || opt_data.value instanceof goog.soy.data.SanitizedContent, 'value', opt_data.value, '!goog.soy.data.SanitizedContent|null|string|undefined');
var attributes__soy86 = function attributes__soy86() {
var attributes__soy93 = function attributes__soy93() {
incrementalDom.attr('class', 'btn' + (block ? ' btn-block' : '') + (elementClasses ? ' ' + elementClasses : '') + (monospaced ? ' btn-monospaced' : '') + (size ? ' btn-' + size : '') + (style ? ' btn-' + style : ' btn-primary'));

@@ -105,2 +107,5 @@ if (ariaLabel) {

}
if (title) {
incrementalDom.attr('title', title);
}
if (value) {

@@ -112,3 +117,3 @@ incrementalDom.attr('value', value);

incrementalDom.elementOpenStart('button');
attributes__soy86();
attributes__soy93();
incrementalDom.elementOpenEnd();

@@ -134,2 +139,3 @@ $content({ icon: icon, iconAlignment: iconAlignment != null ? iconAlignment : 'left', label: label, spritemap: spritemap }, opt_ijData);

* style: (!goog.soy.data.SanitizedContent|null|string|undefined),
* title: (!goog.soy.data.SanitizedContent|null|string|undefined),
* type: (!goog.soy.data.SanitizedContent|null|string|undefined),

@@ -162,3 +168,3 @@ * value: (!goog.soy.data.SanitizedContent|null|string|undefined),

var spritemap = soy.asserts.assertType(opt_data.spritemap == null || goog.isString(opt_data.spritemap) || opt_data.spritemap instanceof goog.soy.data.SanitizedContent, 'spritemap', opt_data.spritemap, '!goog.soy.data.SanitizedContent|null|string|undefined');
var iconContent__soy113 = function iconContent__soy113() {
var iconContent__soy120 = function iconContent__soy120() {
if (icon && spritemap) {

@@ -168,8 +174,8 @@ $icon({ icon: icon, iconAlignment: iconAlignment, label: label, spritemap: spritemap }, opt_ijData);

};
if (iconContent__soy113 != '' && iconAlignment == 'left') {
iconContent__soy113();
if (iconContent__soy120 != '' && iconAlignment == 'left') {
iconContent__soy120();
}
soyIdom.print(label != null ? label : '');
if (iconContent__soy113 != '' && iconAlignment == 'right') {
iconContent__soy113();
if (iconContent__soy120 != '' && iconAlignment == 'right') {
iconContent__soy120();
}

@@ -208,8 +214,8 @@ };

var label = soy.asserts.assertType(opt_data.label == null || goog.isFunction(opt_data.label) || goog.isString(opt_data.label) || opt_data.label instanceof goog.soy.data.SanitizedContent, 'label', opt_data.label, '!goog.soy.data.SanitizedContent|function()|null|string|undefined');
var iconContent__soy140 = function iconContent__soy140() {
var iconContent__soy147 = function iconContent__soy147() {
$templateAlias1({ spritemap: spritemap, symbol: icon }, opt_ijData);
};
if (label) {
var iconWrapperClasses__soy152 = '';
iconWrapperClasses__soy152 += 'inline-item';
var iconWrapperClasses__soy159 = '';
iconWrapperClasses__soy159 += 'inline-item';
var $tmp;

@@ -223,10 +229,10 @@ if (iconAlignment == 'left') {

}
iconWrapperClasses__soy152 += $tmp;
iconWrapperClasses__soy159 += $tmp;
incrementalDom.elementOpenStart('span');
incrementalDom.attr('class', iconWrapperClasses__soy152);
incrementalDom.attr('class', iconWrapperClasses__soy159);
incrementalDom.elementOpenEnd();
iconContent__soy140();
iconContent__soy147();
incrementalDom.elementClose('span');
} else {
iconContent__soy140();
iconContent__soy147();
}

@@ -248,4 +254,4 @@ };

exports.render.params = ["ariaLabel", "block", "disabled", "elementClasses", "icon", "iconAlignment", "id", "label", "monospaced", "name", "size", "spritemap", "style", "type", "value"];
exports.render.types = { "ariaLabel": "string", "block": "bool", "disabled": "bool", "elementClasses": "string", "icon": "string", "iconAlignment": "string", "id": "string", "label": "html|string", "monospaced": "bool", "name": "string", "size": "string", "spritemap": "string", "style": "string", "type": "string", "value": "string" };
exports.render.params = ["ariaLabel", "block", "disabled", "elementClasses", "icon", "iconAlignment", "id", "label", "monospaced", "name", "size", "spritemap", "style", "title", "type", "value"];
exports.render.types = { "ariaLabel": "string", "block": "bool", "disabled": "bool", "elementClasses": "string", "icon": "string", "iconAlignment": "string", "id": "string", "label": "html|string", "monospaced": "bool", "name": "string", "size": "string", "spritemap": "string", "style": "string", "title": "string", "type": "string", "value": "string" };
exports.content.params = ["icon", "iconAlignment", "label", "spritemap"];

@@ -252,0 +258,0 @@ exports.content.types = { "icon": "string", "iconAlignment": "string", "label": "html|string", "spritemap": "string" };

{
"name": "clay-button",
"version": "2.1.6",
"version": "2.1.7",
"description": "Metal Clay Button component.",

@@ -31,4 +31,4 @@ "license": "BSD",

"dependencies": {
"clay-component": "^2.1.6",
"clay-icon": "^2.1.6",
"clay-component": "^2.1.7",
"clay-icon": "^2.1.7",
"metal": "^2.16.0",

@@ -46,4 +46,4 @@ "metal-component": "^2.16.0",

"babel-preset-env": "^1.6.0",
"browserslist-config-clay-components": "^2.1.6",
"clay-css": "^2.1.6",
"browserslist-config-clay-components": "^2.1.7",
"clay-css": "^2.1.7",
"metal-tools-soy": "^6.0.0",

@@ -50,0 +50,0 @@ "webpack": "^3.0.0"

@@ -152,2 +152,11 @@ import 'clay-icon';

/**
* The title attribute of the element.
* @default undefined
* @instance
* @memberof ClayButton
* @type {?(string|undefined)}
*/
title: Config.string(),
/**
* The type attribute value of the element.

@@ -154,0 +163,0 @@ * @default button

@@ -64,6 +64,8 @@ /* jshint ignore:start */

/** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */
var title = soy.asserts.assertType(opt_data.title == null || (goog.isString(opt_data.title) || opt_data.title instanceof goog.soy.data.SanitizedContent), 'title', opt_data.title, '!goog.soy.data.SanitizedContent|null|string|undefined');
/** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */
var type = soy.asserts.assertType(opt_data.type == null || (goog.isString(opt_data.type) || opt_data.type instanceof goog.soy.data.SanitizedContent), 'type', opt_data.type, '!goog.soy.data.SanitizedContent|null|string|undefined');
/** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */
var value = soy.asserts.assertType(opt_data.value == null || (goog.isString(opt_data.value) || opt_data.value instanceof goog.soy.data.SanitizedContent), 'value', opt_data.value, '!goog.soy.data.SanitizedContent|null|string|undefined');
var attributes__soy86 = function() {
var attributes__soy93 = function() {
incrementalDom.attr('class', 'btn' + (block ? ' btn-block' : '') + (elementClasses ? ' ' + elementClasses : '') + (monospaced ? ' btn-monospaced' : '') + (size ? ' btn-' + size : '') + (style ? ' btn-' + style : ' btn-primary'));

@@ -86,2 +88,5 @@ if (ariaLabel) {

}
if (title) {
incrementalDom.attr('title', title);
}
if (value) {

@@ -93,3 +98,3 @@ incrementalDom.attr('value', value);

incrementalDom.elementOpenStart('button');
attributes__soy86();
attributes__soy93();
incrementalDom.elementOpenEnd();

@@ -115,2 +120,3 @@ $content({icon: icon, iconAlignment: iconAlignment != null ? iconAlignment : 'left', label: label, spritemap: spritemap}, opt_ijData);

* style: (!goog.soy.data.SanitizedContent|null|string|undefined),
* title: (!goog.soy.data.SanitizedContent|null|string|undefined),
* type: (!goog.soy.data.SanitizedContent|null|string|undefined),

@@ -144,3 +150,3 @@ * value: (!goog.soy.data.SanitizedContent|null|string|undefined),

var spritemap = soy.asserts.assertType(opt_data.spritemap == null || (goog.isString(opt_data.spritemap) || opt_data.spritemap instanceof goog.soy.data.SanitizedContent), 'spritemap', opt_data.spritemap, '!goog.soy.data.SanitizedContent|null|string|undefined');
var iconContent__soy113 = function() {
var iconContent__soy120 = function() {
if (icon && spritemap) {

@@ -150,8 +156,8 @@ $icon({icon: icon, iconAlignment: iconAlignment, label: label, spritemap: spritemap}, opt_ijData);

};
if (iconContent__soy113 != '' && iconAlignment == 'left') {
iconContent__soy113();
if (iconContent__soy120 != '' && iconAlignment == 'left') {
iconContent__soy120();
}
soyIdom.print(label != null ? label : '');
if (iconContent__soy113 != '' && iconAlignment == 'right') {
iconContent__soy113();
if (iconContent__soy120 != '' && iconAlignment == 'right') {
iconContent__soy120();
}

@@ -191,8 +197,8 @@ };

var label = soy.asserts.assertType(opt_data.label == null || goog.isFunction(opt_data.label) || (goog.isString(opt_data.label) || opt_data.label instanceof goog.soy.data.SanitizedContent), 'label', opt_data.label, '!goog.soy.data.SanitizedContent|function()|null|string|undefined');
var iconContent__soy140 = function() {
var iconContent__soy147 = function() {
$templateAlias1({spritemap: spritemap, symbol: icon}, opt_ijData);
};
if (label) {
var iconWrapperClasses__soy152 = '';
iconWrapperClasses__soy152 += 'inline-item';
var iconWrapperClasses__soy159 = '';
iconWrapperClasses__soy159 += 'inline-item';
var $tmp;

@@ -206,10 +212,10 @@ if (iconAlignment == 'left') {

}
iconWrapperClasses__soy152 += $tmp;
iconWrapperClasses__soy159 += $tmp;
incrementalDom.elementOpenStart('span');
incrementalDom.attr('class', iconWrapperClasses__soy152);
incrementalDom.attr('class', iconWrapperClasses__soy159);
incrementalDom.elementOpenEnd();
iconContent__soy140();
iconContent__soy147();
incrementalDom.elementClose('span');
} else {
iconContent__soy140();
iconContent__soy147();
}

@@ -231,4 +237,4 @@ };

exports.render.params = ["ariaLabel","block","disabled","elementClasses","icon","iconAlignment","id","label","monospaced","name","size","spritemap","style","type","value"];
exports.render.types = {"ariaLabel":"string","block":"bool","disabled":"bool","elementClasses":"string","icon":"string","iconAlignment":"string","id":"string","label":"html|string","monospaced":"bool","name":"string","size":"string","spritemap":"string","style":"string","type":"string","value":"string"};
exports.render.params = ["ariaLabel","block","disabled","elementClasses","icon","iconAlignment","id","label","monospaced","name","size","spritemap","style","title","type","value"];
exports.render.types = {"ariaLabel":"string","block":"bool","disabled":"bool","elementClasses":"string","icon":"string","iconAlignment":"string","id":"string","label":"html|string","monospaced":"bool","name":"string","size":"string","spritemap":"string","style":"string","title":"string","type":"string","value":"string"};
exports.content.params = ["icon","iconAlignment","label","spritemap"];

@@ -235,0 +241,0 @@ exports.content.types = {"icon":"string","iconAlignment":"string","label":"html|string","spritemap":"string"};

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