clay-button
Advanced tools
Comparing version 2.0.0-rc.3 to 2.0.0-rc.4
@@ -87,7 +87,27 @@ 'use strict'; | ||
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__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); | ||
var attributes__soy86 = function attributes__soy86() { | ||
incrementalDom.attr('class', 'btn' + (block ? ' btn-block' : '') + (elementClasses ? ' ' + elementClasses : '') + (monospaced ? ' btn-monospaced' : '') + (size ? ' btn-' + size : '') + (style ? ' btn-' + style : ' btn-primary')); | ||
if (ariaLabel) { | ||
incrementalDom.attr('aria-label', ariaLabel); | ||
} else if (label) { | ||
incrementalDom.attr('aria-label', label); | ||
} else if (icon) { | ||
incrementalDom.attr('aria-label', icon); | ||
} | ||
if (disabled) { | ||
incrementalDom.attr('disabled', 'disabled'); | ||
} | ||
if (id) { | ||
incrementalDom.attr('id', id); | ||
} | ||
if (name) { | ||
incrementalDom.attr('name', name); | ||
} | ||
if (value) { | ||
incrementalDom.attr('value', value); | ||
} | ||
incrementalDom.attr('type', type); | ||
}; | ||
incrementalDom.elementOpenStart('button'); | ||
attributes__soy35(); | ||
attributes__soy86(); | ||
incrementalDom.elementOpenEnd(); | ||
@@ -141,3 +161,3 @@ $content({ icon: icon, iconAlignment: ($$temp = iconAlignment) == null ? 'left' : $$temp, label: label, spritemap: spritemap }, null, opt_ijData); | ||
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__soy62 = function iconContent__soy62() { | ||
var iconContent__soy113 = function iconContent__soy113() { | ||
if (icon && spritemap) { | ||
@@ -147,8 +167,8 @@ $icon(opt_data, null, opt_ijData); | ||
}; | ||
if (iconContent__soy62 != '' && iconAlignment == 'left') { | ||
iconContent__soy62(); | ||
if (iconContent__soy113 != '' && iconAlignment == 'left') { | ||
iconContent__soy113(); | ||
} | ||
soyIdom.print(($$temp = label) == null ? '' : $$temp); | ||
if (iconContent__soy62 != '' && iconAlignment == 'right') { | ||
iconContent__soy62(); | ||
if (iconContent__soy113 != '' && iconAlignment == 'right') { | ||
iconContent__soy113(); | ||
} | ||
@@ -187,8 +207,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__soy89 = function iconContent__soy89() { | ||
var iconContent__soy140 = function iconContent__soy140() { | ||
$templateAlias1({ spritemap: spritemap, symbol: icon }, null, opt_ijData); | ||
}; | ||
if (label) { | ||
var iconWrapperClasses__soy101 = ''; | ||
iconWrapperClasses__soy101 += 'inline-item'; | ||
var iconWrapperClasses__soy152 = ''; | ||
iconWrapperClasses__soy152 += 'inline-item'; | ||
var $tmp = null; | ||
@@ -202,10 +222,10 @@ if (iconAlignment == 'left') { | ||
} | ||
iconWrapperClasses__soy101 += $tmp; | ||
iconWrapperClasses__soy152 += $tmp; | ||
incrementalDom.elementOpenStart('span'); | ||
incrementalDom.attr('class', iconWrapperClasses__soy101); | ||
incrementalDom.attr('class', iconWrapperClasses__soy152); | ||
incrementalDom.elementOpenEnd(); | ||
iconContent__soy89(); | ||
iconContent__soy140(); | ||
incrementalDom.elementClose('span'); | ||
} else { | ||
iconContent__soy89(); | ||
iconContent__soy140(); | ||
} | ||
@@ -227,90 +247,2 @@ }; | ||
/** | ||
* @param {$attributes.Params} opt_data | ||
* @param {Object<string, *>=} opt_ijData | ||
* @param {Object<string, *>=} opt_ijData_deprecated | ||
* @return {void} | ||
* @suppress {checkTypes} | ||
*/ | ||
var $attributes = function $attributes(opt_data, opt_ijData, opt_ijData_deprecated) { | ||
opt_ijData = opt_ijData_deprecated || opt_ijData; | ||
opt_data = opt_data || {}; | ||
/** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */ | ||
var ariaLabel = soy.asserts.assertType(opt_data.ariaLabel == null || goog.isString(opt_data.ariaLabel) || opt_data.ariaLabel instanceof goog.soy.data.SanitizedContent, 'ariaLabel', opt_data.ariaLabel, '!goog.soy.data.SanitizedContent|null|string|undefined'); | ||
/** @type {boolean|null|undefined} */ | ||
var block = soy.asserts.assertType(opt_data.block == null || goog.isBoolean(opt_data.block) || opt_data.block === 1 || opt_data.block === 0, 'block', opt_data.block, 'boolean|null|undefined'); | ||
/** @type {boolean|null|undefined} */ | ||
var disabled = soy.asserts.assertType(opt_data.disabled == null || goog.isBoolean(opt_data.disabled) || opt_data.disabled === 1 || opt_data.disabled === 0, 'disabled', opt_data.disabled, 'boolean|null|undefined'); | ||
/** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */ | ||
var elementClasses = soy.asserts.assertType(opt_data.elementClasses == null || goog.isString(opt_data.elementClasses) || opt_data.elementClasses instanceof goog.soy.data.SanitizedContent, 'elementClasses', opt_data.elementClasses, '!goog.soy.data.SanitizedContent|null|string|undefined'); | ||
/** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */ | ||
var icon = soy.asserts.assertType(opt_data.icon == null || goog.isString(opt_data.icon) || opt_data.icon instanceof goog.soy.data.SanitizedContent, 'icon', opt_data.icon, '!goog.soy.data.SanitizedContent|null|string|undefined'); | ||
/** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */ | ||
var id = soy.asserts.assertType(opt_data.id == null || goog.isString(opt_data.id) || opt_data.id instanceof goog.soy.data.SanitizedContent, 'id', opt_data.id, '!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'); | ||
/** @type {boolean|null|undefined} */ | ||
var monospaced = soy.asserts.assertType(opt_data.monospaced == null || goog.isBoolean(opt_data.monospaced) || opt_data.monospaced === 1 || opt_data.monospaced === 0, 'monospaced', opt_data.monospaced, 'boolean|null|undefined'); | ||
/** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */ | ||
var name = soy.asserts.assertType(opt_data.name == null || goog.isString(opt_data.name) || opt_data.name instanceof goog.soy.data.SanitizedContent, 'name', opt_data.name, '!goog.soy.data.SanitizedContent|null|string|undefined'); | ||
/** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */ | ||
var size = soy.asserts.assertType(opt_data.size == null || goog.isString(opt_data.size) || opt_data.size instanceof goog.soy.data.SanitizedContent, 'size', opt_data.size, '!goog.soy.data.SanitizedContent|null|string|undefined'); | ||
/** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */ | ||
var style = soy.asserts.assertType(opt_data.style == null || goog.isString(opt_data.style) || opt_data.style instanceof goog.soy.data.SanitizedContent, 'style', opt_data.style, '!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 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) { | ||
incrementalDom.attr('aria-label', ariaLabel); | ||
} else if (label) { | ||
incrementalDom.attr('aria-label', label); | ||
} else if (icon) { | ||
incrementalDom.attr('aria-label', icon); | ||
} | ||
if (disabled) { | ||
incrementalDom.attr('disabled', 'disabled'); | ||
} | ||
if (id) { | ||
incrementalDom.attr('id', id); | ||
} | ||
if (name) { | ||
incrementalDom.attr('name', name); | ||
} | ||
if (value) { | ||
incrementalDom.attr('value', value); | ||
} | ||
incrementalDom.attr('type', type); | ||
}; | ||
exports.attributes = $attributes; | ||
/** | ||
* @typedef {{ | ||
* 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), | ||
* }} | ||
*/ | ||
$attributes.Params; | ||
if (goog.DEBUG) { | ||
$attributes.soyTemplateName = 'ClayButton.attributes'; | ||
} | ||
exports.render.params = ["ariaLabel", "block", "disabled", "elementClasses", "icon", "iconAlignment", "id", "label", "monospaced", "name", "size", "spritemap", "style", "type", "value"]; | ||
@@ -322,4 +254,2 @@ 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.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"]; | ||
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" }; | ||
exports.templates = templates = exports; | ||
@@ -326,0 +256,0 @@ return exports; |
{ | ||
"name": "clay-button", | ||
"version": "2.0.0-rc.3", | ||
"version": "2.0.0-rc.4", | ||
"description": "Metal Clay Button component.", | ||
@@ -30,4 +30,4 @@ "license": "BSD", | ||
"dependencies": { | ||
"clay-component": "^2.0.0-rc.3", | ||
"clay-icon": "^2.0.0-rc.3", | ||
"clay-component": "^2.0.0-rc.4", | ||
"clay-icon": "^2.0.0-rc.4", | ||
"metal": "^2.16.0", | ||
@@ -46,3 +46,3 @@ "metal-component": "^2.16.0", | ||
"browserslist-config-clay-components": "^2.0.0-rc.3", | ||
"clay": "^2.0.0-rc.3", | ||
"clay": "^2.0.0-rc.4", | ||
"metal-tools-soy": "^6.0.0", | ||
@@ -49,0 +49,0 @@ "webpack": "^3.0.0" |
@@ -68,7 +68,27 @@ /* jshint ignore:start */ | ||
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__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); | ||
var attributes__soy86 = function() { | ||
incrementalDom.attr('class', 'btn' + (block ? ' btn-block' : '') + (elementClasses ? ' ' + elementClasses : '') + (monospaced ? ' btn-monospaced' : '') + (size ? ' btn-' + size : '') + (style ? ' btn-' + style : ' btn-primary')); | ||
if (ariaLabel) { | ||
incrementalDom.attr('aria-label', ariaLabel); | ||
} else if (label) { | ||
incrementalDom.attr('aria-label', label); | ||
} else if (icon) { | ||
incrementalDom.attr('aria-label', icon); | ||
} | ||
if (disabled) { | ||
incrementalDom.attr('disabled', 'disabled'); | ||
} | ||
if (id) { | ||
incrementalDom.attr('id', id); | ||
} | ||
if (name) { | ||
incrementalDom.attr('name', name); | ||
} | ||
if (value) { | ||
incrementalDom.attr('value', value); | ||
} | ||
incrementalDom.attr('type', type); | ||
}; | ||
incrementalDom.elementOpenStart('button'); | ||
attributes__soy35(); | ||
attributes__soy86(); | ||
incrementalDom.elementOpenEnd(); | ||
@@ -123,3 +143,3 @@ $content({icon: icon, iconAlignment: ($$temp = iconAlignment) == null ? 'left' : $$temp, label: label, spritemap: spritemap}, null, opt_ijData); | ||
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__soy62 = function() { | ||
var iconContent__soy113 = function() { | ||
if (icon && spritemap) { | ||
@@ -129,8 +149,8 @@ $icon(opt_data, null, opt_ijData); | ||
}; | ||
if (iconContent__soy62 != '' && iconAlignment == 'left') { | ||
iconContent__soy62(); | ||
if (iconContent__soy113 != '' && iconAlignment == 'left') { | ||
iconContent__soy113(); | ||
} | ||
soyIdom.print(($$temp = label) == null ? '' : $$temp); | ||
if (iconContent__soy62 != '' && iconAlignment == 'right') { | ||
iconContent__soy62(); | ||
if (iconContent__soy113 != '' && iconAlignment == 'right') { | ||
iconContent__soy113(); | ||
} | ||
@@ -170,8 +190,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__soy89 = function() { | ||
var iconContent__soy140 = function() { | ||
$templateAlias1({spritemap: spritemap, symbol: icon}, null, opt_ijData); | ||
}; | ||
if (label) { | ||
var iconWrapperClasses__soy101 = ''; | ||
iconWrapperClasses__soy101 += 'inline-item'; | ||
var iconWrapperClasses__soy152 = ''; | ||
iconWrapperClasses__soy152 += 'inline-item'; | ||
var $tmp = null; | ||
@@ -185,10 +205,10 @@ if (iconAlignment == 'left') { | ||
} | ||
iconWrapperClasses__soy101 += $tmp; | ||
iconWrapperClasses__soy152 += $tmp; | ||
incrementalDom.elementOpenStart('span'); | ||
incrementalDom.attr('class', iconWrapperClasses__soy101); | ||
incrementalDom.attr('class', iconWrapperClasses__soy152); | ||
incrementalDom.elementOpenEnd(); | ||
iconContent__soy89(); | ||
iconContent__soy140(); | ||
incrementalDom.elementClose('span'); | ||
} else { | ||
iconContent__soy89(); | ||
iconContent__soy140(); | ||
} | ||
@@ -210,91 +230,2 @@ }; | ||
/** | ||
* @param {$attributes.Params} opt_data | ||
* @param {Object<string, *>=} opt_ijData | ||
* @param {Object<string, *>=} opt_ijData_deprecated | ||
* @return {void} | ||
* @suppress {checkTypes} | ||
*/ | ||
var $attributes = function(opt_data, opt_ijData, opt_ijData_deprecated) { | ||
opt_ijData = opt_ijData_deprecated || opt_ijData; | ||
opt_data = opt_data || {}; | ||
/** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */ | ||
var ariaLabel = soy.asserts.assertType(opt_data.ariaLabel == null || (goog.isString(opt_data.ariaLabel) || opt_data.ariaLabel instanceof goog.soy.data.SanitizedContent), 'ariaLabel', opt_data.ariaLabel, '!goog.soy.data.SanitizedContent|null|string|undefined'); | ||
/** @type {boolean|null|undefined} */ | ||
var block = soy.asserts.assertType(opt_data.block == null || (goog.isBoolean(opt_data.block) || opt_data.block === 1 || opt_data.block === 0), 'block', opt_data.block, 'boolean|null|undefined'); | ||
/** @type {boolean|null|undefined} */ | ||
var disabled = soy.asserts.assertType(opt_data.disabled == null || (goog.isBoolean(opt_data.disabled) || opt_data.disabled === 1 || opt_data.disabled === 0), 'disabled', opt_data.disabled, 'boolean|null|undefined'); | ||
/** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */ | ||
var elementClasses = soy.asserts.assertType(opt_data.elementClasses == null || (goog.isString(opt_data.elementClasses) || opt_data.elementClasses instanceof goog.soy.data.SanitizedContent), 'elementClasses', opt_data.elementClasses, '!goog.soy.data.SanitizedContent|null|string|undefined'); | ||
/** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */ | ||
var icon = soy.asserts.assertType(opt_data.icon == null || (goog.isString(opt_data.icon) || opt_data.icon instanceof goog.soy.data.SanitizedContent), 'icon', opt_data.icon, '!goog.soy.data.SanitizedContent|null|string|undefined'); | ||
/** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */ | ||
var id = soy.asserts.assertType(opt_data.id == null || (goog.isString(opt_data.id) || opt_data.id instanceof goog.soy.data.SanitizedContent), 'id', opt_data.id, '!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'); | ||
/** @type {boolean|null|undefined} */ | ||
var monospaced = soy.asserts.assertType(opt_data.monospaced == null || (goog.isBoolean(opt_data.monospaced) || opt_data.monospaced === 1 || opt_data.monospaced === 0), 'monospaced', opt_data.monospaced, 'boolean|null|undefined'); | ||
/** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */ | ||
var name = soy.asserts.assertType(opt_data.name == null || (goog.isString(opt_data.name) || opt_data.name instanceof goog.soy.data.SanitizedContent), 'name', opt_data.name, '!goog.soy.data.SanitizedContent|null|string|undefined'); | ||
/** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */ | ||
var size = soy.asserts.assertType(opt_data.size == null || (goog.isString(opt_data.size) || opt_data.size instanceof goog.soy.data.SanitizedContent), 'size', opt_data.size, '!goog.soy.data.SanitizedContent|null|string|undefined'); | ||
/** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */ | ||
var style = soy.asserts.assertType(opt_data.style == null || (goog.isString(opt_data.style) || opt_data.style instanceof goog.soy.data.SanitizedContent), 'style', opt_data.style, '!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 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) { | ||
incrementalDom.attr('aria-label', ariaLabel); | ||
} else if (label) { | ||
incrementalDom.attr('aria-label', label); | ||
} else if (icon) { | ||
incrementalDom.attr('aria-label', icon); | ||
} | ||
if (disabled) { | ||
incrementalDom.attr('disabled', 'disabled'); | ||
} | ||
if (id) { | ||
incrementalDom.attr('id', id); | ||
} | ||
if (name) { | ||
incrementalDom.attr('name', name); | ||
} | ||
if (value) { | ||
incrementalDom.attr('value', value); | ||
} | ||
incrementalDom.attr('type', type); | ||
}; | ||
exports.attributes = $attributes; | ||
/** | ||
* @typedef {{ | ||
* 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), | ||
* }} | ||
*/ | ||
$attributes.Params; | ||
if (goog.DEBUG) { | ||
$attributes.soyTemplateName = 'ClayButton.attributes'; | ||
} | ||
exports.render.params = ["ariaLabel","block","disabled","elementClasses","icon","iconAlignment","id","label","monospaced","name","size","spritemap","style","type","value"]; | ||
@@ -306,4 +237,2 @@ 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.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"]; | ||
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"}; | ||
templates = exports; | ||
@@ -310,0 +239,0 @@ return exports; |
Sorry, the diff of this file is not supported yet
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
82331
942
Updatedclay-component@^2.0.0-rc.4
Updatedclay-icon@^2.0.0-rc.4