clay-sticker
Advanced tools
Comparing version 1.0.0-alpha.9 to 1.0.0-alpha.12
@@ -124,4 +124,5 @@ 'use strict'; | ||
/** | ||
* Sticker position if not static. Available positions are `bottom-left`, | ||
* `bottom-right`, `top-right`. | ||
* Position of the sticker in relation to the contents. | ||
* Available positions are `bottom-left`, `bottom-right`, `top-left` | ||
* and `top-right`. | ||
* @instance | ||
@@ -128,0 +129,0 @@ * @memberof ClaySticker |
@@ -151,2 +151,5 @@ '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'); | ||
incrementalDom.elementOpenStart('span'); | ||
incrementalDom.attr('class', 'sticker-overlay'); | ||
incrementalDom.elementOpenEnd(); | ||
if (icon && spritemap) { | ||
@@ -159,2 +162,3 @@ $templateAlias1({ spritemap: spritemap, symbol: icon }, null, opt_ijData); | ||
} | ||
incrementalDom.elementClose('span'); | ||
} | ||
@@ -178,4 +182,4 @@ exports.content = $content; | ||
* @param {{ | ||
* imageAlt: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
* imageSrc: (!goog.soy.data.SanitizedContent|null|string|undefined) | ||
* imageAlt: (!goog.soy.data.SanitizedContent|string), | ||
* imageSrc: (!goog.soy.data.SanitizedContent|string) | ||
* }} opt_data | ||
@@ -189,11 +193,13 @@ * @param {Object<string, *>=} opt_ijData | ||
opt_ijData = opt_ijData_deprecated || opt_ijData; | ||
opt_data = opt_data || {}; | ||
/** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */ | ||
var imageAlt = soy.asserts.assertType(opt_data.imageAlt == null || goog.isString(opt_data.imageAlt) || opt_data.imageAlt instanceof goog.soy.data.SanitizedContent, 'imageAlt', opt_data.imageAlt, '!goog.soy.data.SanitizedContent|null|string|undefined'); | ||
/** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */ | ||
var imageSrc = soy.asserts.assertType(opt_data.imageSrc == null || goog.isString(opt_data.imageSrc) || opt_data.imageSrc instanceof goog.soy.data.SanitizedContent, 'imageSrc', opt_data.imageSrc, '!goog.soy.data.SanitizedContent|null|string|undefined'); | ||
/** @type {!goog.soy.data.SanitizedContent|string} */ | ||
var imageAlt = soy.asserts.assertType(goog.isString(opt_data.imageAlt) || opt_data.imageAlt instanceof goog.soy.data.SanitizedContent, 'imageAlt', opt_data.imageAlt, '!goog.soy.data.SanitizedContent|string'); | ||
/** @type {!goog.soy.data.SanitizedContent|string} */ | ||
var imageSrc = soy.asserts.assertType(goog.isString(opt_data.imageSrc) || opt_data.imageSrc instanceof goog.soy.data.SanitizedContent, 'imageSrc', opt_data.imageSrc, '!goog.soy.data.SanitizedContent|string'); | ||
var imageAttributes__soy67 = function imageAttributes__soy67() { | ||
incrementalDom.attr('alt', imageAlt); | ||
incrementalDom.attr('class', 'sticker-img'); | ||
incrementalDom.attr('src', imageSrc); | ||
}; | ||
incrementalDom.elementOpenStart('img'); | ||
incrementalDom.attr('alt', imageAlt); | ||
incrementalDom.attr('class', 'img-fluid'); | ||
incrementalDom.attr('src', imageSrc); | ||
imageAttributes__soy67(); | ||
incrementalDom.elementOpenEnd(); | ||
@@ -205,4 +211,4 @@ incrementalDom.elementClose('img'); | ||
* @typedef {{ | ||
* imageAlt: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
* imageSrc: (!goog.soy.data.SanitizedContent|null|string|undefined) | ||
* imageAlt: (!goog.soy.data.SanitizedContent|string), | ||
* imageSrc: (!goog.soy.data.SanitizedContent|string) | ||
* }} | ||
@@ -209,0 +215,0 @@ */ |
{ | ||
"name": "clay-sticker", | ||
"version": "1.0.0-alpha.9", | ||
"version": "1.0.0-alpha.12", | ||
"description": "Clay Sticker Component", | ||
@@ -30,3 +30,3 @@ "license": "BSD", | ||
"dependencies": { | ||
"clay-icon": "^1.0.0-alpha.9", | ||
"clay-icon": "^1.0.0-alpha.12", | ||
"metal": "^2.14.0", | ||
@@ -45,3 +45,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-dom": "^2.13.2", | ||
@@ -48,0 +48,0 @@ "metal-tools-soy": "^4.2.1", |
@@ -85,4 +85,5 @@ import 'clay-icon'; | ||
/** | ||
* Sticker position if not static. Available positions are `bottom-left`, | ||
* `bottom-right`, `top-right`. | ||
* Position of the sticker in relation to the contents. | ||
* Available positions are `bottom-left`, `bottom-right`, `top-left` | ||
* and `top-right`. | ||
* @instance | ||
@@ -89,0 +90,0 @@ * @memberof ClaySticker |
@@ -133,9 +133,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 && spritemap) { | ||
$templateAlias1({spritemap: spritemap, symbol: icon}, null, opt_ijData); | ||
} else if (imageSrc) { | ||
$image({imageAlt: ($$temp = imageAlt) == null ? '' : $$temp, imageSrc: imageSrc}, null, opt_ijData); | ||
} else if (label) { | ||
soyIdom.print(label); | ||
} | ||
incrementalDom.elementOpenStart('span'); | ||
incrementalDom.attr('class', 'sticker-overlay'); | ||
incrementalDom.elementOpenEnd(); | ||
if (icon && spritemap) { | ||
$templateAlias1({spritemap: spritemap, symbol: icon}, null, opt_ijData); | ||
} else if (imageSrc) { | ||
$image({imageAlt: ($$temp = imageAlt) == null ? '' : $$temp, imageSrc: imageSrc}, null, opt_ijData); | ||
} else if (label) { | ||
soyIdom.print(label); | ||
} | ||
incrementalDom.elementClose('span'); | ||
} | ||
@@ -160,4 +164,4 @@ exports.content = $content; | ||
* @param {{ | ||
* imageAlt: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
* imageSrc: (!goog.soy.data.SanitizedContent|null|string|undefined) | ||
* imageAlt: (!goog.soy.data.SanitizedContent|string), | ||
* imageSrc: (!goog.soy.data.SanitizedContent|string) | ||
* }} opt_data | ||
@@ -171,11 +175,13 @@ * @param {Object<string, *>=} opt_ijData | ||
opt_ijData = opt_ijData_deprecated || opt_ijData; | ||
opt_data = opt_data || {}; | ||
/** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */ | ||
var imageAlt = soy.asserts.assertType(opt_data.imageAlt == null || (goog.isString(opt_data.imageAlt) || opt_data.imageAlt instanceof goog.soy.data.SanitizedContent), 'imageAlt', opt_data.imageAlt, '!goog.soy.data.SanitizedContent|null|string|undefined'); | ||
/** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */ | ||
var imageSrc = soy.asserts.assertType(opt_data.imageSrc == null || (goog.isString(opt_data.imageSrc) || opt_data.imageSrc instanceof goog.soy.data.SanitizedContent), 'imageSrc', opt_data.imageSrc, '!goog.soy.data.SanitizedContent|null|string|undefined'); | ||
/** @type {!goog.soy.data.SanitizedContent|string} */ | ||
var imageAlt = soy.asserts.assertType(goog.isString(opt_data.imageAlt) || opt_data.imageAlt instanceof goog.soy.data.SanitizedContent, 'imageAlt', opt_data.imageAlt, '!goog.soy.data.SanitizedContent|string'); | ||
/** @type {!goog.soy.data.SanitizedContent|string} */ | ||
var imageSrc = soy.asserts.assertType(goog.isString(opt_data.imageSrc) || opt_data.imageSrc instanceof goog.soy.data.SanitizedContent, 'imageSrc', opt_data.imageSrc, '!goog.soy.data.SanitizedContent|string'); | ||
var imageAttributes__soy67 = function() { | ||
incrementalDom.attr('alt', imageAlt); | ||
incrementalDom.attr('class', 'sticker-img'); | ||
incrementalDom.attr('src', imageSrc); | ||
}; | ||
incrementalDom.elementOpenStart('img'); | ||
incrementalDom.attr('alt', imageAlt); | ||
incrementalDom.attr('class', 'img-fluid'); | ||
incrementalDom.attr('src', imageSrc); | ||
imageAttributes__soy67(); | ||
incrementalDom.elementOpenEnd(); | ||
@@ -187,4 +193,4 @@ incrementalDom.elementClose('img'); | ||
* @typedef {{ | ||
* imageAlt: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
* imageSrc: (!goog.soy.data.SanitizedContent|null|string|undefined) | ||
* imageAlt: (!goog.soy.data.SanitizedContent|string), | ||
* imageSrc: (!goog.soy.data.SanitizedContent|string) | ||
* }} | ||
@@ -191,0 +197,0 @@ */ |
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
Sorry, the diff of this file is not supported yet
92695
998
Updatedclay-icon@^1.0.0-alpha.12