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 2.0.0-beta.8 to 2.0.0-rc.0

116

lib/ClayButton.soy.js

@@ -47,19 +47,3 @@ 'use strict';

/**
* @param {{
* ariaLabel: (!goog.soy.data.SanitizedContent|null|string|undefined),
* block: (boolean|null|undefined),
* disabled: (boolean|null|undefined),
* elementClasses: (!goog.soy.data.SanitizedContent|null|string|undefined),
* icon: (!goog.soy.data.SanitizedContent|null|string|undefined),
* iconAlignment: (!goog.soy.data.SanitizedContent|null|string|undefined),
* id: (!goog.soy.data.SanitizedContent|null|string|undefined),
* label: (!goog.soy.data.SanitizedContent|function()|null|string|undefined),
* monospaced: (boolean|null|undefined),
* name: (!goog.soy.data.SanitizedContent|null|string|undefined),
* size: (!goog.soy.data.SanitizedContent|null|string|undefined),
* spritemap: (!goog.soy.data.SanitizedContent|null|string|undefined),
* style: (!goog.soy.data.SanitizedContent|null|string|undefined),
* type: (!goog.soy.data.SanitizedContent|null|string|undefined),
* value: (!goog.soy.data.SanitizedContent|null|string|undefined)
* }} opt_data
* @param {$render.Params} opt_data
* @param {Object<string, *>=} opt_ijData

@@ -70,3 +54,3 @@ * @param {Object<string, *>=} opt_ijData_deprecated

*/
function $render(opt_data, opt_ijData, opt_ijData_deprecated) {
var $render = function $render(opt_data, opt_ijData, opt_ijData_deprecated) {
opt_ijData = opt_ijData_deprecated || opt_ijData;

@@ -105,11 +89,11 @@ var $$temp;

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__soy19 = function attributes__soy19() {
var attributes__soy35 = function attributes__soy35() {
$attributes({ ariaLabel: ariaLabel, block: block, disabled: disabled, elementClasses: elementClasses, icon: icon, id: id, label: label, monospaced: monospaced, name: name, size: size, style: style, type: ($$temp = type) == null ? 'button' : $$temp, value: value }, null, opt_ijData);
};
incrementalDom.elementOpenStart('button');
attributes__soy19();
attributes__soy35();
incrementalDom.elementOpenEnd();
$content({ icon: icon, iconAlignment: ($$temp = iconAlignment) == null ? 'left' : $$temp, label: label, spritemap: spritemap }, null, opt_ijData);
incrementalDom.elementClose('button');
}
};
exports.render = $render;

@@ -132,3 +116,3 @@ /**

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

@@ -142,8 +126,3 @@ */

/**
* @param {{
* icon: (!goog.soy.data.SanitizedContent|null|string|undefined),
* iconAlignment: (!goog.soy.data.SanitizedContent|null|string|undefined),
* label: (!goog.soy.data.SanitizedContent|function()|null|string|undefined),
* spritemap: (!goog.soy.data.SanitizedContent|null|string|undefined)
* }} opt_data
* @param {$content.Params} opt_data
* @param {Object<string, *>=} opt_ijData

@@ -154,3 +133,3 @@ * @param {Object<string, *>=} opt_ijData_deprecated

*/
function $content(opt_data, opt_ijData, opt_ijData_deprecated) {
var $content = function $content(opt_data, opt_ijData, opt_ijData_deprecated) {
opt_ijData = opt_ijData_deprecated || opt_ijData;

@@ -167,3 +146,3 @@ var $$temp;

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__soy51 = function iconContent__soy51() {
var iconContent__soy62 = function iconContent__soy62() {
if (icon && spritemap) {

@@ -173,10 +152,10 @@ $icon(opt_data, null, opt_ijData);

};
if (iconContent__soy51 != '' && iconAlignment == 'left') {
iconContent__soy51();
if (iconContent__soy62 != '' && iconAlignment == 'left') {
iconContent__soy62();
}
soyIdom.print(($$temp = label) == null ? '' : $$temp);
if (iconContent__soy51 != '' && iconAlignment == 'right') {
iconContent__soy51();
if (iconContent__soy62 != '' && iconAlignment == 'right') {
iconContent__soy62();
}
}
};
exports.content = $content;

@@ -188,3 +167,3 @@ /**

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

@@ -198,8 +177,3 @@ */

/**
* @param {{
* icon: (!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
* @param {$icon.Params} opt_data
* @param {Object<string, *>=} opt_ijData

@@ -210,3 +184,3 @@ * @param {Object<string, *>=} opt_ijData_deprecated

*/
function $icon(opt_data, opt_ijData, opt_ijData_deprecated) {
var $icon = function $icon(opt_data, opt_ijData, opt_ijData_deprecated) {
opt_ijData = opt_ijData_deprecated || opt_ijData;

@@ -221,8 +195,8 @@ /** @type {!goog.soy.data.SanitizedContent|string} */

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() {
var iconContent__soy89 = function iconContent__soy89() {
$templateAlias1({ spritemap: spritemap, symbol: icon }, null, opt_ijData);
};
if (label) {
var iconWrapperClasses__soy94 = '';
iconWrapperClasses__soy94 += 'inline-item';
var iconWrapperClasses__soy101 = '';
iconWrapperClasses__soy101 += 'inline-item';
var $tmp = null;

@@ -236,12 +210,12 @@ if (iconAlignment == 'left') {

}
iconWrapperClasses__soy94 += $tmp;
iconWrapperClasses__soy101 += $tmp;
incrementalDom.elementOpenStart('span');
incrementalDom.attr('class', iconWrapperClasses__soy94);
incrementalDom.attr('class', iconWrapperClasses__soy101);
incrementalDom.elementOpenEnd();
iconContent__soy84();
iconContent__soy89();
incrementalDom.elementClose('span');
} else {
iconContent__soy84();
iconContent__soy89();
}
}
};
exports.icon = $icon;

@@ -253,3 +227,3 @@ /**

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

@@ -263,17 +237,3 @@ */

/**
* @param {{
* ariaLabel: (!goog.soy.data.SanitizedContent|null|string|undefined),
* block: (boolean|null|undefined),
* disabled: (boolean|null|undefined),
* elementClasses: (!goog.soy.data.SanitizedContent|null|string|undefined),
* icon: (!goog.soy.data.SanitizedContent|null|string|undefined),
* id: (!goog.soy.data.SanitizedContent|null|string|undefined),
* label: (!goog.soy.data.SanitizedContent|function()|null|string|undefined),
* monospaced: (boolean|null|undefined),
* name: (!goog.soy.data.SanitizedContent|null|string|undefined),
* size: (!goog.soy.data.SanitizedContent|null|string|undefined),
* style: (!goog.soy.data.SanitizedContent|null|string|undefined),
* type: (!goog.soy.data.SanitizedContent|null|string|undefined),
* value: (!goog.soy.data.SanitizedContent|null|string|undefined)
* }} opt_data
* @param {$attributes.Params} opt_data
* @param {Object<string, *>=} opt_ijData

@@ -284,3 +244,3 @@ * @param {Object<string, *>=} opt_ijData_deprecated

*/
function $attributes(opt_data, opt_ijData, opt_ijData_deprecated) {
var $attributes = function $attributes(opt_data, opt_ijData, opt_ijData_deprecated) {
opt_ijData = opt_ijData_deprecated || opt_ijData;

@@ -314,10 +274,10 @@ opt_data = opt_data || {};

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

@@ -343,3 +303,3 @@ incrementalDom.attr('aria-label', ariaLabel);

incrementalDom.attr('type', type);
}
};
exports.attributes = $attributes;

@@ -360,3 +320,3 @@ /**

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

@@ -363,0 +323,0 @@ */

{
"name": "clay-button",
"version": "2.0.0-beta.8",
"version": "2.0.0-rc.0",
"description": "Metal Clay Button component.",

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

"dependencies": {
"clay-component": "^2.0.0-beta.8",
"clay-icon": "^2.0.0-beta.8",
"clay-component": "^2.0.0-rc.0",
"clay-icon": "^2.0.0-rc.0",
"metal": "^2.16.0",

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

"browserslist-config-clay-components": "^1.0.0-alpha.2",
"clay": "^2.0.0-beta.8",
"metal-tools-soy": "^4.2.1",
"clay": "^2.0.0-rc.0",
"metal-tools-soy": "^5.0.0",
"webpack": "^3.0.0"

@@ -50,0 +50,0 @@ },

@@ -28,19 +28,3 @@ /* jshint ignore:start */

/**
* @param {{
* ariaLabel: (!goog.soy.data.SanitizedContent|null|string|undefined),
* block: (boolean|null|undefined),
* disabled: (boolean|null|undefined),
* elementClasses: (!goog.soy.data.SanitizedContent|null|string|undefined),
* icon: (!goog.soy.data.SanitizedContent|null|string|undefined),
* iconAlignment: (!goog.soy.data.SanitizedContent|null|string|undefined),
* id: (!goog.soy.data.SanitizedContent|null|string|undefined),
* label: (!goog.soy.data.SanitizedContent|function()|null|string|undefined),
* monospaced: (boolean|null|undefined),
* name: (!goog.soy.data.SanitizedContent|null|string|undefined),
* size: (!goog.soy.data.SanitizedContent|null|string|undefined),
* spritemap: (!goog.soy.data.SanitizedContent|null|string|undefined),
* style: (!goog.soy.data.SanitizedContent|null|string|undefined),
* type: (!goog.soy.data.SanitizedContent|null|string|undefined),
* value: (!goog.soy.data.SanitizedContent|null|string|undefined)
* }} opt_data
* @param {$render.Params} opt_data
* @param {Object<string, *>=} opt_ijData

@@ -51,3 +35,3 @@ * @param {Object<string, *>=} opt_ijData_deprecated

*/
function $render(opt_data, opt_ijData, opt_ijData_deprecated) {
var $render = function(opt_data, opt_ijData, opt_ijData_deprecated) {
opt_ijData = opt_ijData_deprecated || opt_ijData;

@@ -86,11 +70,11 @@ var $$temp;

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__soy19 = function() {
var attributes__soy35 = function() {
$attributes({ariaLabel: ariaLabel, block: block, disabled: disabled, elementClasses: elementClasses, icon: icon, id: id, label: label, monospaced: monospaced, name: name, size: size, style: style, type: ($$temp = type) == null ? 'button' : $$temp, value: value}, null, opt_ijData);
};
incrementalDom.elementOpenStart('button');
attributes__soy19();
attributes__soy35();
incrementalDom.elementOpenEnd();
$content({icon: icon, iconAlignment: ($$temp = iconAlignment) == null ? 'left' : $$temp, label: label, spritemap: spritemap}, null, opt_ijData);
$content({icon: icon, iconAlignment: ($$temp = iconAlignment) == null ? 'left' : $$temp, label: label, spritemap: spritemap}, null, opt_ijData);
incrementalDom.elementClose('button');
}
};
exports.render = $render;

@@ -113,3 +97,3 @@ /**

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

@@ -124,8 +108,3 @@ */

/**
* @param {{
* icon: (!goog.soy.data.SanitizedContent|null|string|undefined),
* iconAlignment: (!goog.soy.data.SanitizedContent|null|string|undefined),
* label: (!goog.soy.data.SanitizedContent|function()|null|string|undefined),
* spritemap: (!goog.soy.data.SanitizedContent|null|string|undefined)
* }} opt_data
* @param {$content.Params} opt_data
* @param {Object<string, *>=} opt_ijData

@@ -136,3 +115,3 @@ * @param {Object<string, *>=} opt_ijData_deprecated

*/
function $content(opt_data, opt_ijData, opt_ijData_deprecated) {
var $content = function(opt_data, opt_ijData, opt_ijData_deprecated) {
opt_ijData = opt_ijData_deprecated || opt_ijData;

@@ -149,3 +128,3 @@ var $$temp;

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__soy51 = function() {
var iconContent__soy62 = function() {
if (icon && spritemap) {

@@ -155,10 +134,10 @@ $icon(opt_data, null, opt_ijData);

};
if (iconContent__soy51 != '' && iconAlignment == 'left') {
iconContent__soy51();
if (iconContent__soy62 != '' && iconAlignment == 'left') {
iconContent__soy62();
}
soyIdom.print(($$temp = label) == null ? '' : $$temp);
if (iconContent__soy51 != '' && iconAlignment == 'right') {
iconContent__soy51();
if (iconContent__soy62 != '' && iconAlignment == 'right') {
iconContent__soy62();
}
}
};
exports.content = $content;

@@ -170,3 +149,3 @@ /**

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

@@ -181,8 +160,3 @@ */

/**
* @param {{
* icon: (!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
* @param {$icon.Params} opt_data
* @param {Object<string, *>=} opt_ijData

@@ -193,3 +167,3 @@ * @param {Object<string, *>=} opt_ijData_deprecated

*/
function $icon(opt_data, opt_ijData, opt_ijData_deprecated) {
var $icon = function(opt_data, opt_ijData, opt_ijData_deprecated) {
opt_ijData = opt_ijData_deprecated || opt_ijData;

@@ -204,26 +178,26 @@ /** @type {!goog.soy.data.SanitizedContent|string} */

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() {
var iconContent__soy89 = function() {
$templateAlias1({spritemap: spritemap, symbol: icon}, null, opt_ijData);
};
if (label) {
var iconWrapperClasses__soy94 = '';
iconWrapperClasses__soy94 += 'inline-item';
var iconWrapperClasses__soy101 = '';
iconWrapperClasses__soy101 += '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;
if (iconAlignment == 'left') {
$tmp = ' inline-item-before';
} else if (iconAlignment == 'right') {
$tmp = ' inline-item-after';
} else {
$tmp = '';
}
iconWrapperClasses__soy101 += $tmp;
incrementalDom.elementOpenStart('span');
incrementalDom.attr('class', iconWrapperClasses__soy94);
incrementalDom.attr('class', iconWrapperClasses__soy101);
incrementalDom.elementOpenEnd();
iconContent__soy84();
iconContent__soy89();
incrementalDom.elementClose('span');
} else {
iconContent__soy84();
iconContent__soy89();
}
}
};
exports.icon = $icon;

@@ -235,3 +209,3 @@ /**

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

@@ -246,17 +220,3 @@ */

/**
* @param {{
* ariaLabel: (!goog.soy.data.SanitizedContent|null|string|undefined),
* block: (boolean|null|undefined),
* disabled: (boolean|null|undefined),
* elementClasses: (!goog.soy.data.SanitizedContent|null|string|undefined),
* icon: (!goog.soy.data.SanitizedContent|null|string|undefined),
* id: (!goog.soy.data.SanitizedContent|null|string|undefined),
* label: (!goog.soy.data.SanitizedContent|function()|null|string|undefined),
* monospaced: (boolean|null|undefined),
* name: (!goog.soy.data.SanitizedContent|null|string|undefined),
* size: (!goog.soy.data.SanitizedContent|null|string|undefined),
* style: (!goog.soy.data.SanitizedContent|null|string|undefined),
* type: (!goog.soy.data.SanitizedContent|null|string|undefined),
* value: (!goog.soy.data.SanitizedContent|null|string|undefined)
* }} opt_data
* @param {$attributes.Params} opt_data
* @param {Object<string, *>=} opt_ijData

@@ -267,3 +227,3 @@ * @param {Object<string, *>=} opt_ijData_deprecated

*/
function $attributes(opt_data, opt_ijData, opt_ijData_deprecated) {
var $attributes = function(opt_data, opt_ijData, opt_ijData_deprecated) {
opt_ijData = opt_ijData_deprecated || opt_ijData;

@@ -297,10 +257,10 @@ opt_data = opt_data || {};

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

@@ -326,3 +286,3 @@ incrementalDom.attr('aria-label', ariaLabel);

incrementalDom.attr('type', type);
}
};
exports.attributes = $attributes;

@@ -343,3 +303,3 @@ /**

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

@@ -346,0 +306,0 @@ */

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