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

clay-button

Package Overview
Dependencies
Maintainers
4
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 1.0.0-alpha.9 to 1.0.0-alpha.12

69

lib/ClayButton.soy.js

@@ -161,8 +161,13 @@ 'use strict';

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');
if (icon && iconAlignment == 'left' && spritemap) {
$icon(opt_data, null, opt_ijData);
var iconContent__soy51 = function iconContent__soy51() {
if (icon && spritemap) {
$icon(opt_data, null, opt_ijData);
}
};
if (iconContent__soy51 != '' && iconAlignment == 'left') {
iconContent__soy51();
}
soyIdom.print(($$temp = label) == null ? '' : $$temp);
if (icon && iconAlignment == 'right' && spritemap) {
$icon(opt_data, null, opt_ijData);
if (iconContent__soy51 != '' && iconAlignment == 'right') {
iconContent__soy51();
}

@@ -187,3 +192,5 @@ }

* icon: (!goog.soy.data.SanitizedContent|string),
* spritemap: (!goog.soy.data.SanitizedContent|string)
* spritemap: (!goog.soy.data.SanitizedContent|string),
* iconAlignment: (!goog.soy.data.SanitizedContent|null|string|undefined),
* label: (!goog.soy.data.SanitizedContent|function()|null|string|undefined)
* }} opt_data

@@ -201,3 +208,29 @@ * @param {Object<string, *>=} opt_ijData

var spritemap = soy.asserts.assertType(goog.isString(opt_data.spritemap) || opt_data.spritemap instanceof goog.soy.data.SanitizedContent, 'spritemap', opt_data.spritemap, '!goog.soy.data.SanitizedContent|string');
$templateAlias1({ spritemap: spritemap, symbol: icon }, null, opt_ijData);
/** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */
var iconAlignment = soy.asserts.assertType(opt_data.iconAlignment == null || goog.isString(opt_data.iconAlignment) || opt_data.iconAlignment instanceof goog.soy.data.SanitizedContent, 'iconAlignment', opt_data.iconAlignment, '!goog.soy.data.SanitizedContent|null|string|undefined');
/** @type {!goog.soy.data.SanitizedContent|function()|null|string|undefined} */
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__soy84 = function iconContent__soy84() {
$templateAlias1({ spritemap: spritemap, symbol: icon }, null, opt_ijData);
};
if (label) {
var iconWrapperClasses__soy94 = '';
iconWrapperClasses__soy94 += 'inline-item';
var $tmp = null;
if (iconAlignment == 'left') {
$tmp = ' inline-item-before';
} else if (iconAlignment == 'right') {
$tmp = ' inline-item-after';
} else {
$tmp = '';
}
iconWrapperClasses__soy94 += $tmp;
incrementalDom.elementOpenStart('span');
incrementalDom.attr('class', iconWrapperClasses__soy94);
incrementalDom.elementOpenEnd();
iconContent__soy84();
incrementalDom.elementClose('span');
} else {
iconContent__soy84();
}
}

@@ -208,3 +241,5 @@ exports.icon = $icon;

* icon: (!goog.soy.data.SanitizedContent|string),
* spritemap: (!goog.soy.data.SanitizedContent|string)
* spritemap: (!goog.soy.data.SanitizedContent|string),
* iconAlignment: (!goog.soy.data.SanitizedContent|null|string|undefined),
* label: (!goog.soy.data.SanitizedContent|function()|null|string|undefined)
* }}

@@ -267,10 +302,10 @@ */

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 classes__soy92 = '';
classes__soy92 += 'btn';
classes__soy92 += block ? ' btn-block' : '';
classes__soy92 += elementClasses ? ' ' + elementClasses : '';
classes__soy92 += monospaced ? ' btn-monospaced' : '';
classes__soy92 += size ? ' btn-' + size : '';
classes__soy92 += style ? ' btn-' + style : ' btn-primary';
incrementalDom.attr('class', classes__soy92);
var classes__soy127 = '';
classes__soy127 += 'btn';
classes__soy127 += block ? ' btn-block' : '';
classes__soy127 += elementClasses ? ' ' + elementClasses : '';
classes__soy127 += monospaced ? ' btn-monospaced' : '';
classes__soy127 += size ? ' btn-' + size : '';
classes__soy127 += style ? ' btn-' + style : ' btn-primary';
incrementalDom.attr('class', classes__soy127);
if (ariaLabel) {

@@ -324,4 +359,4 @@ incrementalDom.attr('aria-label', ariaLabel);

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

@@ -328,0 +363,0 @@ exports.attributes.types = { "ariaLabel": "string", "block": "bool", "disabled": "bool", "elementClasses": "string", "icon": "string", "id": "string", "label": "html|string", "monospaced": "bool", "name": "string", "size": "string", "style": "string", "type": "string", "value": "string" };

{
"name": "clay-button",
"version": "1.0.0-alpha.9",
"version": "1.0.0-alpha.12",
"description": "Metal Clay Button component.",

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

"dependencies": {
"clay-component": "^1.0.0-alpha.8",
"clay-icon": "^1.0.0-alpha.9",
"clay-component": "^1.0.0-alpha.12",
"clay-icon": "^1.0.0-alpha.12",
"metal": "^2.14.0",

@@ -46,3 +46,3 @@ "metal-component": "^2.14.0",

"browserslist-config-clay-components": "^1.0.0-alpha.2",
"clay": "^2.0.0-beta.4",
"clay": "^2.0.0-beta.5",
"metal-tools-soy": "^4.2.1",

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

@@ -143,8 +143,13 @@ /* jshint ignore:start */

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');
if (icon && iconAlignment == 'left' && spritemap) {
$icon(opt_data, null, opt_ijData);
var iconContent__soy51 = function() {
if (icon && spritemap) {
$icon(opt_data, null, opt_ijData);
}
};
if (iconContent__soy51 != '' && iconAlignment == 'left') {
iconContent__soy51();
}
soyIdom.print(($$temp = label) == null ? '' : $$temp);
if (icon && iconAlignment == 'right' && spritemap) {
$icon(opt_data, null, opt_ijData);
if (iconContent__soy51 != '' && iconAlignment == 'right') {
iconContent__soy51();
}

@@ -170,3 +175,5 @@ }

* icon: (!goog.soy.data.SanitizedContent|string),
* spritemap: (!goog.soy.data.SanitizedContent|string)
* spritemap: (!goog.soy.data.SanitizedContent|string),
* iconAlignment: (!goog.soy.data.SanitizedContent|null|string|undefined),
* label: (!goog.soy.data.SanitizedContent|function()|null|string|undefined)
* }} opt_data

@@ -184,4 +191,30 @@ * @param {Object<string, *>=} opt_ijData

var spritemap = soy.asserts.assertType(goog.isString(opt_data.spritemap) || opt_data.spritemap instanceof goog.soy.data.SanitizedContent, 'spritemap', opt_data.spritemap, '!goog.soy.data.SanitizedContent|string');
$templateAlias1({spritemap: spritemap, symbol: icon}, null, opt_ijData);
/** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */
var iconAlignment = soy.asserts.assertType(opt_data.iconAlignment == null || (goog.isString(opt_data.iconAlignment) || opt_data.iconAlignment instanceof goog.soy.data.SanitizedContent), 'iconAlignment', opt_data.iconAlignment, '!goog.soy.data.SanitizedContent|null|string|undefined');
/** @type {!goog.soy.data.SanitizedContent|function()|null|string|undefined} */
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__soy84 = function() {
$templateAlias1({spritemap: spritemap, symbol: icon}, null, opt_ijData);
};
if (label) {
var iconWrapperClasses__soy94 = '';
iconWrapperClasses__soy94 += 'inline-item';
var $tmp = null;
if (iconAlignment == 'left') {
$tmp = ' inline-item-before';
} else if (iconAlignment == 'right') {
$tmp = ' inline-item-after';
} else {
$tmp = '';
}
iconWrapperClasses__soy94 += $tmp;
incrementalDom.elementOpenStart('span');
incrementalDom.attr('class', iconWrapperClasses__soy94);
incrementalDom.elementOpenEnd();
iconContent__soy84();
incrementalDom.elementClose('span');
} else {
iconContent__soy84();
}
}
exports.icon = $icon;

@@ -191,3 +224,5 @@ /**

* icon: (!goog.soy.data.SanitizedContent|string),
* spritemap: (!goog.soy.data.SanitizedContent|string)
* spritemap: (!goog.soy.data.SanitizedContent|string),
* iconAlignment: (!goog.soy.data.SanitizedContent|null|string|undefined),
* label: (!goog.soy.data.SanitizedContent|function()|null|string|undefined)
* }}

@@ -251,10 +286,10 @@ */

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 classes__soy92 = '';
classes__soy92 += 'btn';
classes__soy92 += block ? ' btn-block' : '';
classes__soy92 += elementClasses ? ' ' + elementClasses : '';
classes__soy92 += monospaced ? ' btn-monospaced' : '';
classes__soy92 += size ? ' btn-' + size : '';
classes__soy92 += style ? ' btn-' + style : ' btn-primary';
incrementalDom.attr('class', classes__soy92);
var classes__soy127 = '';
classes__soy127 += 'btn';
classes__soy127 += block ? ' btn-block' : '';
classes__soy127 += elementClasses ? ' ' + elementClasses : '';
classes__soy127 += monospaced ? ' btn-monospaced' : '';
classes__soy127 += size ? ' btn-' + size : '';
classes__soy127 += style ? ' btn-' + style : ' btn-primary';
incrementalDom.attr('class', classes__soy127);
if (ariaLabel) {

@@ -308,4 +343,4 @@ incrementalDom.attr('aria-label', ariaLabel);

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

@@ -312,0 +347,0 @@ exports.attributes.types = {"ariaLabel":"string","block":"bool","disabled":"bool","elementClasses":"string","icon":"string","id":"string","label":"html|string","monospaced":"bool","name":"string","size":"string","style":"string","type":"string","value":"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