clay-dropdown
Advanced tools
Comparing version 2.6.0 to 2.7.0
@@ -86,6 +86,6 @@ 'use strict'; | ||
var triggerClasses = soy.asserts.assertType(opt_data.triggerClasses == null || goog.isString(opt_data.triggerClasses) || opt_data.triggerClasses instanceof goog.soy.data.SanitizedContent, 'triggerClasses', opt_data.triggerClasses, '!goog.soy.data.SanitizedContent|null|string|undefined'); | ||
var msg_1_6305962755687847469__soy1999 = ''; | ||
var msg_1_6305962755687847469__soy2014 = ''; | ||
/** @desc */ | ||
var MSG_EXTERNAL_6305962755687847469 = goog.getMsg('actions'); | ||
msg_1_6305962755687847469__soy1999 += MSG_EXTERNAL_6305962755687847469; | ||
msg_1_6305962755687847469__soy2014 += MSG_EXTERNAL_6305962755687847469; | ||
var dropdownElementClasses__soy26 = ''; | ||
@@ -97,3 +97,3 @@ dropdownElementClasses__soy26 += 'dropdown-action'; | ||
}; | ||
$templateAlias1({ button: button, caption: caption, disabled: disabled, elementClasses: dropdownElementClasses__soy26, events: { buttonClicked: _handleButtonClick, itemClicked: _handleItemClick, toggle: toggle }, expanded: expanded, helpText: helpText, id: id, items: items, itemsIconAlignment: itemsIconAlignment, label: trigger__soy33, preferredAlign: preferredAlign, ref: 'dropdown', spritemap: spritemap, triggerClasses: triggerClasses, triggerTitle: '' + msg_1_6305962755687847469__soy1999 }, opt_ijData); | ||
$templateAlias1({ button: button, caption: caption, disabled: disabled, elementClasses: dropdownElementClasses__soy26, events: { buttonClicked: _handleButtonClick, itemClicked: _handleItemClick, toggle: toggle }, expanded: expanded, helpText: helpText, id: id, items: items, itemsIconAlignment: itemsIconAlignment, label: trigger__soy33, preferredAlign: preferredAlign, ref: 'dropdown', spritemap: spritemap, triggerClasses: triggerClasses, triggerTitle: '' + msg_1_6305962755687847469__soy2014 }, opt_ijData); | ||
}; | ||
@@ -100,0 +100,0 @@ exports.render = $render; |
@@ -116,7 +116,7 @@ 'use strict'; | ||
if (showMoreButton__soy113) { | ||
var msg_2_8004490453579465583__soy2001 = ''; | ||
var msg_2_8004490453579465583__soy2016 = ''; | ||
/** @desc Says how many items of the total are being showed */ | ||
var MSG_EXTERNAL_8004490453579465583 = goog.getMsg('showing-{$showingItems}-of-{$totalItems}-elements', { 'showingItems': showingItems__soy103, 'totalItems': totalItems__soy93 }); | ||
msg_2_8004490453579465583__soy2001 += MSG_EXTERNAL_8004490453579465583; | ||
param137 += msg_2_8004490453579465583__soy2001; | ||
msg_2_8004490453579465583__soy2016 += MSG_EXTERNAL_8004490453579465583; | ||
param137 += msg_2_8004490453579465583__soy2016; | ||
} | ||
@@ -127,7 +127,7 @@ var param166 = ''; | ||
} else { | ||
var msg_3_7387635272539030076__soy2003 = ''; | ||
var msg_3_7387635272539030076__soy2018 = ''; | ||
/** @desc */ | ||
var MSG_EXTERNAL_7387635272539030076 = goog.getMsg('new'); | ||
msg_3_7387635272539030076__soy2003 += MSG_EXTERNAL_7387635272539030076; | ||
param166 += msg_3_7387635272539030076__soy2003; | ||
msg_3_7387635272539030076__soy2018 += MSG_EXTERNAL_7387635272539030076; | ||
param166 += msg_3_7387635272539030076__soy2018; | ||
} | ||
@@ -134,0 +134,0 @@ $templateAlias1({ button: showMoreButton__soy113, caption: param137, disabled: disabled, elementClasses: elementClasses, events: { buttonClicked: _handleButtonClick, itemClicked: _handleItemClick, toggle: toggle }, expanded: expanded, helpText: showMoreButton__soy113 ? helpText : null, id: id, items: items__soy111, itemsIconAlignment: itemsIconAlignment, label: trigger__soy120, preferredAlign: preferredAlign, ref: 'dropdown', spritemap: spritemap, style: 'primary', triggerClasses: triggerClasses, triggerTitle: param166 }, opt_ijData); |
@@ -149,2 +149,11 @@ 'use strict'; | ||
/** | ||
* Content Renderer name of items. | ||
* @default undefined | ||
* @instance | ||
* @memberof ClayDropdown | ||
* @type {?(string|undefined)} | ||
*/ | ||
contentRenderer: _metalState.Config.string(), | ||
/** | ||
* Data to add to the element. | ||
@@ -151,0 +160,0 @@ * @default undefined |
@@ -66,2 +66,4 @@ 'use strict'; | ||
var button = opt_data.button; | ||
/** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */ | ||
var contentRenderer = soy.asserts.assertType(opt_data.contentRenderer == null || goog.isString(opt_data.contentRenderer) || opt_data.contentRenderer instanceof goog.soy.data.SanitizedContent, 'contentRenderer', opt_data.contentRenderer, '!goog.soy.data.SanitizedContent|null|string|undefined'); | ||
/** @type {boolean|null|undefined} */ | ||
@@ -95,3 +97,3 @@ 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'); | ||
var triggerTitle = soy.asserts.assertType(opt_data.triggerTitle == null || goog.isString(opt_data.triggerTitle) || opt_data.triggerTitle instanceof goog.soy.data.SanitizedContent, 'triggerTitle', opt_data.triggerTitle, '!goog.soy.data.SanitizedContent|null|string|undefined'); | ||
var trigger__soy218 = function trigger__soy218() { | ||
var trigger__soy219 = function trigger__soy219() { | ||
if (icon) { | ||
@@ -107,3 +109,3 @@ $templateAlias2({ elementClasses: label ? 'inline-item inline-item-before' : '', spritemap: spritemap, symbol: icon }, opt_ijData); | ||
}; | ||
$templateAlias1({ button: button, disabled: disabled, elementClasses: elementClasses, events: { buttonClicked: _handleButtonClick, itemClicked: _handleItemClick, toggle: toggle }, expanded: expanded, id: id, items: items, itemsIconAlignment: itemsIconAlignment, label: trigger__soy218, preferredAlign: preferredAlign, ref: 'dropdown', searchable: searchable, spritemap: spritemap, style: style, triggerClasses: triggerClasses, triggerSize: triggerSize, triggerTitle: triggerTitle }, opt_ijData); | ||
$templateAlias1({ button: button, contentRenderer: contentRenderer, disabled: disabled, elementClasses: elementClasses, events: { buttonClicked: _handleButtonClick, itemClicked: _handleItemClick, toggle: toggle }, expanded: expanded, id: id, items: items, itemsIconAlignment: itemsIconAlignment, label: trigger__soy219, preferredAlign: preferredAlign, ref: 'dropdown', searchable: searchable, spritemap: spritemap, style: style, triggerClasses: triggerClasses, triggerSize: triggerSize, triggerTitle: triggerTitle }, opt_ijData); | ||
}; | ||
@@ -118,2 +120,3 @@ exports.render = $render; | ||
* button: (?|undefined), | ||
* contentRenderer: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
* disabled: (boolean|null|undefined), | ||
@@ -140,4 +143,4 @@ * elementClasses: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
exports.render.params = ["items", "spritemap", "_handleButtonClick", "_handleItemClick", "button", "disabled", "elementClasses", "expanded", "icon", "id", "itemsIconAlignment", "label", "preferredAlign", "searchable", "style", "toggle", "triggerClasses", "triggerSize", "triggerTitle"]; | ||
exports.render.types = { "items": "list<?>", "spritemap": "string", "_handleButtonClick": "any", "_handleItemClick": "any", "button": "?", "disabled": "bool", "elementClasses": "string", "expanded": "bool", "icon": "string", "id": "string", "itemsIconAlignment": "string", "label": "html|string", "preferredAlign": "string", "searchable": "bool", "style": "string", "toggle": "any", "triggerClasses": "string", "triggerSize": "string", "triggerTitle": "string" }; | ||
exports.render.params = ["items", "spritemap", "_handleButtonClick", "_handleItemClick", "button", "contentRenderer", "disabled", "elementClasses", "expanded", "icon", "id", "itemsIconAlignment", "label", "preferredAlign", "searchable", "style", "toggle", "triggerClasses", "triggerSize", "triggerTitle"]; | ||
exports.render.types = { "items": "list<?>", "spritemap": "string", "_handleButtonClick": "any", "_handleItemClick": "any", "button": "?", "contentRenderer": "string", "disabled": "bool", "elementClasses": "string", "expanded": "bool", "icon": "string", "id": "string", "itemsIconAlignment": "string", "label": "html|string", "preferredAlign": "string", "searchable": "bool", "style": "string", "toggle": "any", "triggerClasses": "string", "triggerSize": "string", "triggerTitle": "string" }; | ||
exports.templates = templates = exports; | ||
@@ -144,0 +147,0 @@ return exports; |
@@ -106,3 +106,3 @@ 'use strict'; | ||
var triggerTitle = soy.asserts.assertType(opt_data.triggerTitle == null || goog.isString(opt_data.triggerTitle) || opt_data.triggerTitle instanceof goog.soy.data.SanitizedContent, 'triggerTitle', opt_data.triggerTitle, '!goog.soy.data.SanitizedContent|null|string|undefined'); | ||
var attributes__soy280 = function attributes__soy280() { | ||
var attributes__soy282 = function attributes__soy282() { | ||
incrementalDom.attr('class', 'dropdown' + (elementClasses ? ' ' + elementClasses : '') + (expanded ? ' show' : '')); | ||
@@ -114,3 +114,3 @@ if (id) { | ||
incrementalDom.elementOpenStart('div'); | ||
attributes__soy280(); | ||
attributes__soy282(); | ||
incrementalDom.elementOpenEnd(); | ||
@@ -173,19 +173,21 @@ $trigger({ classes: triggerClasses, disabled: disabled, expanded: expanded, label: label, size: triggerSize, style: style, title: triggerTitle }, 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 index316_RangeEnd = maxItems && maxItems < items.length ? maxItems : items.length; | ||
var index316ListLen = Math.max(0, Math.ceil((index316_RangeEnd - 0) / 1)); | ||
for (var index316Index = 0; index316Index < index316ListLen; index316Index++) { | ||
var index316Data = 0 + index316Index * 1; | ||
var item__soy319 = items[index316Data]; | ||
var variant__soy334 = ''; | ||
var index318_RangeEnd = maxItems && maxItems < items.length ? maxItems : items.length; | ||
var index318ListLen = Math.max(0, Math.ceil((index318_RangeEnd - 0) / 1)); | ||
for (var index318Index = 0; index318Index < index318ListLen; index318Index++) { | ||
var index318Data = 0 + index318Index * 1; | ||
var item__soy321 = items[index318Data]; | ||
var variant__soy340 = ''; | ||
var $tmp; | ||
if (contentRenderer != null && contentRenderer != '') { | ||
$tmp = contentRenderer; | ||
} else if (item__soy319.type) { | ||
$tmp = item__soy319.type; | ||
} else if (item__soy321.contentRenderer != null && item__soy321.contentRenderer != '') { | ||
$tmp = item__soy321.contentRenderer; | ||
} else if (item__soy321.type) { | ||
$tmp = item__soy321.type; | ||
} else { | ||
$tmp = 'item'; | ||
} | ||
variant__soy334 += $tmp; | ||
$templateAlias3({ active: item__soy319.active, checked: item__soy319.checked, contentRenderer: variant__soy334, data: item__soy319.data, disabled: item__soy319.disabled, events: { itemClicked: _handleItemClick }, href: item__soy319.href, icon: item__soy319.icon, inputName: item__soy319.inputName, inputValue: item__soy319.inputValue, items: item__soy319.items, itemsIconAlignment: itemsIconAlignment, label: item__soy319.label ? '' + item__soy319.label : '', maxItems: item__soy319.maxItems, separator: item__soy319.separator, spritemap: spritemap, target: item__soy319.target, title: item__soy319.title }, opt_ijData); | ||
if (item__soy319.separator) { | ||
variant__soy340 += $tmp; | ||
$templateAlias3({ active: item__soy321.active, checked: item__soy321.checked, contentRenderer: variant__soy340, data: item__soy321.data, disabled: item__soy321.disabled, events: { itemClicked: _handleItemClick }, href: item__soy321.href, icon: item__soy321.icon, inputName: item__soy321.inputName, inputValue: item__soy321.inputValue, items: item__soy321.items, itemsIconAlignment: itemsIconAlignment, label: item__soy321.label ? '' + item__soy321.label : '', maxItems: item__soy321.maxItems, separator: item__soy321.separator, spritemap: spritemap, target: item__soy321.target, title: item__soy321.title, type: item__soy321.type }, opt_ijData); | ||
if (item__soy321.separator) { | ||
$templateAlias3({ contentRenderer: 'separator' }, opt_ijData); | ||
@@ -300,4 +302,4 @@ } | ||
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 dropdownMenu__soy476 = function dropdownMenu__soy476() { | ||
var listAttributes__soy403 = function listAttributes__soy403() { | ||
var dropdownMenu__soy483 = function dropdownMenu__soy483() { | ||
var listAttributes__soy410 = function listAttributes__soy410() { | ||
var $tmp; | ||
@@ -315,3 +317,3 @@ if (itemsIconAlignment == 'left') { | ||
incrementalDom.elementOpenStart('div'); | ||
listAttributes__soy403(); | ||
listAttributes__soy410(); | ||
incrementalDom.elementOpenEnd(); | ||
@@ -329,6 +331,6 @@ if (helpText) { | ||
} | ||
var listItemsContent__soy429 = function listItemsContent__soy429() { | ||
var listItemsContent__soy436 = function listItemsContent__soy436() { | ||
soy.$$getDelegateFn(soy.$$getDelTemplateId('ClayDropdownBase.Content.idom'), contentRenderer, false)({ _handleItemClick: _handleItemClick, contentRenderer: contentRenderer, items: items, itemsIconAlignment: itemsIconAlignment, spritemap: spritemap }, opt_ijData); | ||
}; | ||
var captionContent__soy438 = function captionContent__soy438() { | ||
var captionContent__soy445 = function captionContent__soy445() { | ||
if (caption) { | ||
@@ -347,5 +349,5 @@ incrementalDom.elementOpenStart('div'); | ||
incrementalDom.elementOpenEnd(); | ||
listItemsContent__soy429(); | ||
listItemsContent__soy436(); | ||
incrementalDom.elementClose('div'); | ||
captionContent__soy438(); | ||
captionContent__soy445(); | ||
incrementalDom.elementOpenStart('div'); | ||
@@ -363,11 +365,11 @@ incrementalDom.attr('class', 'dropdown-section'); | ||
} else { | ||
listItemsContent__soy429(); | ||
captionContent__soy438(); | ||
listItemsContent__soy436(); | ||
captionContent__soy445(); | ||
} | ||
incrementalDom.elementClose('div'); | ||
}; | ||
var param481 = function param481() { | ||
dropdownMenu__soy476(); | ||
var param488 = function param488() { | ||
dropdownMenu__soy483(); | ||
}; | ||
$templateAlias2({ content: param481, portalElement: '#' + portalElementId, ref: 'portal' }, opt_ijData); | ||
$templateAlias2({ content: param488, portalElement: '#' + portalElementId, ref: 'portal' }, opt_ijData); | ||
}; | ||
@@ -420,3 +422,3 @@ exports.sections = $sections; | ||
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'); | ||
var buttonAttributes__soy534 = function buttonAttributes__soy534() { | ||
var buttonAttributes__soy541 = function buttonAttributes__soy541() { | ||
if (expanded) { | ||
@@ -442,3 +444,3 @@ incrementalDom.attr('aria-expanded', 'true'); | ||
incrementalDom.elementOpenStart('button'); | ||
buttonAttributes__soy534(); | ||
buttonAttributes__soy541(); | ||
incrementalDom.elementOpenEnd(); | ||
@@ -445,0 +447,0 @@ soyIdom.print(label); |
@@ -259,3 +259,12 @@ 'use strict'; | ||
*/ | ||
title: _validators.itemShape.title | ||
title: _validators.itemShape.title, | ||
/** | ||
* Type of the item. | ||
* @default undefined | ||
* @instance | ||
* @memberof ClayDropdownItem | ||
* @type {?(string|undefined)} | ||
*/ | ||
type: _metalState.Config.string() | ||
}; | ||
@@ -262,0 +271,0 @@ |
@@ -103,4 +103,6 @@ 'use strict'; | ||
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'); | ||
var variant__soy762 = contentRenderer != null ? contentRenderer : 'item'; | ||
soy.$$getDelegateFn(soy.$$getDelTemplateId('ClayDropdownItem.Item.idom'), variant__soy762, false)({ _handleItemClick: _handleItemClick, active: active, checked: checked, disabled: disabled, href: href, icon: icon, inputName: inputName, inputValue: inputValue, items: items, itemsIconAlignment: itemsIconAlignment, label: label ? '' + label : '', maxItems: maxItems, separator: separator, spritemap: spritemap, target: target, title: title }, opt_ijData); | ||
/** @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'); | ||
var variant__soy770 = contentRenderer != null ? contentRenderer : 'item'; | ||
soy.$$getDelegateFn(soy.$$getDelTemplateId('ClayDropdownItem.Item.idom'), variant__soy770, false)({ _handleItemClick: _handleItemClick, active: active, checked: checked, disabled: disabled, href: href, icon: icon, inputName: inputName, inputValue: inputValue, items: items, itemsIconAlignment: itemsIconAlignment, label: label ? '' + label : '', maxItems: maxItems, separator: separator, spritemap: spritemap, target: target, title: title, type: type }, opt_ijData); | ||
}; | ||
@@ -127,2 +129,3 @@ exports.render = $render; | ||
* title: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
* type: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
* }} | ||
@@ -176,9 +179,11 @@ */ | ||
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'); | ||
var itemContent__soy871 = function itemContent__soy871() { | ||
var elementClasses__soy810 = ''; | ||
elementClasses__soy810 += 'dropdown-item'; | ||
elementClasses__soy810 += active ? ' active' : ''; | ||
elementClasses__soy810 += disabled ? ' disabled' : ''; | ||
var labelContent__soy838 = function labelContent__soy838() { | ||
var iconContent__soy822 = function iconContent__soy822() { | ||
/** @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'); | ||
var itemContent__soy881 = function itemContent__soy881() { | ||
var elementClasses__soy820 = ''; | ||
elementClasses__soy820 += 'dropdown-item'; | ||
elementClasses__soy820 += active ? ' active' : ''; | ||
elementClasses__soy820 += disabled ? ' disabled' : ''; | ||
var labelContent__soy848 = function labelContent__soy848() { | ||
var iconContent__soy832 = function iconContent__soy832() { | ||
if (icon && spritemap) { | ||
@@ -193,7 +198,7 @@ incrementalDom.elementOpenStart('span'); | ||
if (icon && itemsIconAlignment == 'left') { | ||
iconContent__soy822(); | ||
iconContent__soy832(); | ||
} | ||
soyIdom.print(label); | ||
if (icon && itemsIconAlignment == 'right') { | ||
iconContent__soy822(); | ||
iconContent__soy832(); | ||
} | ||
@@ -210,8 +215,8 @@ }; | ||
} | ||
$templateAlias4({ elementClasses: elementClasses__soy810, href: '' + $tmp, label: labelContent__soy838, target: target, title: title }, opt_ijData); | ||
$templateAlias4({ elementClasses: elementClasses__soy820, href: '' + $tmp, label: labelContent__soy848, target: target, title: title }, opt_ijData); | ||
} else { | ||
$templateAlias5({ ariaLabel: label, disabled: disabled, elementClasses: elementClasses__soy810, label: labelContent__soy838, size: 'sm', spritemap: spritemap, style: 'link' }, opt_ijData); | ||
$templateAlias5({ ariaLabel: label, disabled: disabled, elementClasses: elementClasses__soy820, label: labelContent__soy848, size: 'sm', spritemap: spritemap, style: 'link' }, opt_ijData); | ||
} | ||
}; | ||
var itemAttributes__soy876 = function itemAttributes__soy876() { | ||
var itemAttributes__soy886 = function itemAttributes__soy886() { | ||
incrementalDom.attr('data-onclick', _handleItemClick); | ||
@@ -221,5 +226,5 @@ incrementalDom.attr('tabindex', '-1'); | ||
incrementalDom.elementOpenStart('li'); | ||
itemAttributes__soy876(); | ||
itemAttributes__soy886(); | ||
incrementalDom.elementOpenEnd(); | ||
itemContent__soy871(); | ||
itemContent__soy881(); | ||
incrementalDom.elementClose('li'); | ||
@@ -246,2 +251,3 @@ }; | ||
* title: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
* type: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
* }} | ||
@@ -296,6 +302,8 @@ */ | ||
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'); | ||
var checkbox__soy909 = function checkbox__soy909() { | ||
/** @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'); | ||
var checkbox__soy920 = function checkbox__soy920() { | ||
$templateAlias1({ checked: checked, disabled: disabled, inline: true, label: label, name: inputName, value: inputValue }, opt_ijData); | ||
}; | ||
var itemAttributes__soy918 = function itemAttributes__soy918() { | ||
var itemAttributes__soy929 = function itemAttributes__soy929() { | ||
incrementalDom.attr('class', 'dropdown-item' + (active || checked ? ' active' : '')); | ||
@@ -306,5 +314,5 @@ incrementalDom.attr('data-onclick', _handleItemClick); | ||
incrementalDom.elementOpenStart('li'); | ||
itemAttributes__soy918(); | ||
itemAttributes__soy929(); | ||
incrementalDom.elementOpenEnd(); | ||
checkbox__soy909(); | ||
checkbox__soy920(); | ||
incrementalDom.elementClose('li'); | ||
@@ -331,2 +339,3 @@ }; | ||
* title: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
* type: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
* }} | ||
@@ -381,2 +390,4 @@ */ | ||
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'); | ||
if (label && label != '') { | ||
@@ -413,2 +424,3 @@ incrementalDom.elementOpenStart('li'); | ||
* title: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
* type: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
* }} | ||
@@ -463,6 +475,8 @@ */ | ||
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'); | ||
var radio__soy986 = function radio__soy986() { | ||
/** @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'); | ||
var radio__soy999 = function radio__soy999() { | ||
$templateAlias2({ checked: checked, disabled: disabled, inline: true, label: label, name: inputName, value: inputValue }, opt_ijData); | ||
}; | ||
var itemAttributes__soy995 = function itemAttributes__soy995() { | ||
var itemAttributes__soy1008 = function itemAttributes__soy1008() { | ||
incrementalDom.attr('class', 'dropdown-item' + (active || checked ? ' active' : '')); | ||
@@ -473,5 +487,5 @@ incrementalDom.attr('data-onclick', _handleItemClick); | ||
incrementalDom.elementOpenStart('li'); | ||
itemAttributes__soy995(); | ||
itemAttributes__soy1008(); | ||
incrementalDom.elementOpenEnd(); | ||
radio__soy986(); | ||
radio__soy999(); | ||
incrementalDom.elementClose('li'); | ||
@@ -498,2 +512,3 @@ }; | ||
* title: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
* type: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
* }} | ||
@@ -548,2 +563,4 @@ */ | ||
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'); | ||
if (label && label != '') { | ||
@@ -589,2 +606,3 @@ incrementalDom.elementOpenStart('li'); | ||
* title: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
* type: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
* }} | ||
@@ -639,2 +657,4 @@ */ | ||
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'); | ||
incrementalDom.elementOpenStart('li'); | ||
@@ -666,2 +686,3 @@ incrementalDom.attr('aria-hidden', 'true'); | ||
* title: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
* type: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
* }} | ||
@@ -675,4 +696,4 @@ */ | ||
exports.render.params = ["_handleItemClick", "active", "checked", "contentRenderer", "disabled", "href", "icon", "inputName", "inputValue", "items", "itemsIconAlignment", "label", "maxItems", "separator", "spritemap", "target", "title"]; | ||
exports.render.types = { "_handleItemClick": "any", "active": "bool", "checked": "bool", "contentRenderer": "string", "disabled": "bool", "href": "string", "icon": "string", "inputName": "string", "inputValue": "string", "items": "list<?>", "itemsIconAlignment": "string", "label": "string", "maxItems": "int", "separator": "bool", "spritemap": "string", "target": "string", "title": "string" }; | ||
exports.render.params = ["_handleItemClick", "active", "checked", "contentRenderer", "disabled", "href", "icon", "inputName", "inputValue", "items", "itemsIconAlignment", "label", "maxItems", "separator", "spritemap", "target", "title", "type"]; | ||
exports.render.types = { "_handleItemClick": "any", "active": "bool", "checked": "bool", "contentRenderer": "string", "disabled": "bool", "href": "string", "icon": "string", "inputName": "string", "inputValue": "string", "items": "list<?>", "itemsIconAlignment": "string", "label": "string", "maxItems": "int", "separator": "bool", "spritemap": "string", "target": "string", "title": "string", "type": "string" }; | ||
exports.templates = templates = exports; | ||
@@ -679,0 +700,0 @@ return exports; |
@@ -13,2 +13,3 @@ 'use strict'; | ||
checked: _metalState.Config.bool().value(false), | ||
contentRenderer: _metalState.Config.string(), | ||
disabled: _metalState.Config.bool().value(false), | ||
@@ -24,3 +25,3 @@ href: _metalState.Config.string(), | ||
title: _metalState.Config.string(), | ||
type: _metalState.Config.oneOf(['checkbox', 'group', 'item', 'radio', 'radiogroup', 'separator']).value('item') | ||
type: _metalState.Config.oneOfType([_metalState.Config.oneOf(['checkbox', 'group', 'item', 'radio', 'radiogroup', 'separator']), _metalState.Config.string()]).value('item') | ||
}; | ||
@@ -27,0 +28,0 @@ |
{ | ||
"name": "clay-dropdown", | ||
"version": "2.6.0", | ||
"version": "2.7.0", | ||
"description": "Clay Dropdown Component", | ||
"license": "BSD", | ||
"license": "BSD-3-Clause", | ||
"repository": "https://github.com/liferay/clay/tree/master/packages/clay-dropdown", | ||
@@ -31,9 +31,9 @@ "engines": { | ||
"dependencies": { | ||
"clay-button": "^2.6.0", | ||
"clay-checkbox": "^2.6.0", | ||
"clay-component": "^2.6.0", | ||
"clay-icon": "^2.6.0", | ||
"clay-link": "^2.6.0", | ||
"clay-portal": "^2.6.0", | ||
"clay-radio": "^2.6.0", | ||
"clay-button": "^2.7.0", | ||
"clay-checkbox": "^2.7.0", | ||
"clay-component": "^2.7.0", | ||
"clay-icon": "^2.7.0", | ||
"clay-link": "^2.7.0", | ||
"clay-portal": "^2.7.0", | ||
"clay-radio": "^2.7.0", | ||
"metal": "^2.16.0", | ||
@@ -54,8 +54,8 @@ "metal-component": "^2.16.0", | ||
"babel-preset-env": "^1.6.0", | ||
"browserslist-config-clay": "^2.6.0", | ||
"clay-css": "^2.6.0", | ||
"browserslist-config-clay": "^2.7.0", | ||
"clay-css": "^2.7.0", | ||
"metal-dom": "^2.13.2", | ||
"metal-tools-soy": "^6.0.0", | ||
"webpack": "^3.0.0", | ||
"webpack-config-clay": "^2.6.0" | ||
"webpack-config-clay": "^2.7.0" | ||
}, | ||
@@ -65,3 +65,3 @@ "browserslist": [ | ||
], | ||
"gitHead": "8f75a89917eb3dbf9ad848975cea9e5606f4d917" | ||
"gitHead": "860f3be9e01cbab321bd7f2ff2abfdc931383b61" | ||
} |
@@ -67,6 +67,6 @@ /* jshint ignore:start */ | ||
var triggerClasses = soy.asserts.assertType(opt_data.triggerClasses == null || (goog.isString(opt_data.triggerClasses) || opt_data.triggerClasses instanceof goog.soy.data.SanitizedContent), 'triggerClasses', opt_data.triggerClasses, '!goog.soy.data.SanitizedContent|null|string|undefined'); | ||
var msg_1_6305962755687847469__soy1999 = ''; | ||
var msg_1_6305962755687847469__soy2014 = ''; | ||
/** @desc */ | ||
var MSG_EXTERNAL_6305962755687847469 = goog.getMsg('actions'); | ||
msg_1_6305962755687847469__soy1999 += MSG_EXTERNAL_6305962755687847469; | ||
msg_1_6305962755687847469__soy2014 += MSG_EXTERNAL_6305962755687847469; | ||
var dropdownElementClasses__soy26 = ''; | ||
@@ -78,3 +78,3 @@ dropdownElementClasses__soy26 += 'dropdown-action'; | ||
}; | ||
$templateAlias1({button: button, caption: caption, disabled: disabled, elementClasses: dropdownElementClasses__soy26, events: {buttonClicked: _handleButtonClick, itemClicked: _handleItemClick, toggle: toggle}, expanded: expanded, helpText: helpText, id: id, items: items, itemsIconAlignment: itemsIconAlignment, label: trigger__soy33, preferredAlign: preferredAlign, ref: 'dropdown', spritemap: spritemap, triggerClasses: triggerClasses, triggerTitle: '' + msg_1_6305962755687847469__soy1999}, opt_ijData); | ||
$templateAlias1({button: button, caption: caption, disabled: disabled, elementClasses: dropdownElementClasses__soy26, events: {buttonClicked: _handleButtonClick, itemClicked: _handleItemClick, toggle: toggle}, expanded: expanded, helpText: helpText, id: id, items: items, itemsIconAlignment: itemsIconAlignment, label: trigger__soy33, preferredAlign: preferredAlign, ref: 'dropdown', spritemap: spritemap, triggerClasses: triggerClasses, triggerTitle: '' + msg_1_6305962755687847469__soy2014}, opt_ijData); | ||
}; | ||
@@ -81,0 +81,0 @@ exports.render = $render; |
@@ -97,7 +97,7 @@ /* jshint ignore:start */ | ||
if (showMoreButton__soy113) { | ||
var msg_2_8004490453579465583__soy2001 = ''; | ||
var msg_2_8004490453579465583__soy2016 = ''; | ||
/** @desc Says how many items of the total are being showed */ | ||
var MSG_EXTERNAL_8004490453579465583 = goog.getMsg('showing-{$showingItems}-of-{$totalItems}-elements', {'showingItems': showingItems__soy103, 'totalItems': totalItems__soy93}); | ||
msg_2_8004490453579465583__soy2001 += MSG_EXTERNAL_8004490453579465583; | ||
param137 += msg_2_8004490453579465583__soy2001; | ||
msg_2_8004490453579465583__soy2016 += MSG_EXTERNAL_8004490453579465583; | ||
param137 += msg_2_8004490453579465583__soy2016; | ||
} | ||
@@ -108,7 +108,7 @@ var param166 = ''; | ||
} else { | ||
var msg_3_7387635272539030076__soy2003 = ''; | ||
var msg_3_7387635272539030076__soy2018 = ''; | ||
/** @desc */ | ||
var MSG_EXTERNAL_7387635272539030076 = goog.getMsg('new'); | ||
msg_3_7387635272539030076__soy2003 += MSG_EXTERNAL_7387635272539030076; | ||
param166 += msg_3_7387635272539030076__soy2003; | ||
msg_3_7387635272539030076__soy2018 += MSG_EXTERNAL_7387635272539030076; | ||
param166 += msg_3_7387635272539030076__soy2018; | ||
} | ||
@@ -115,0 +115,0 @@ $templateAlias1({button: showMoreButton__soy113, caption: param137, disabled: disabled, elementClasses: elementClasses, events: {buttonClicked: _handleButtonClick, itemClicked: _handleItemClick, toggle: toggle}, expanded: expanded, helpText: showMoreButton__soy113 ? helpText : null, id: id, items: items__soy111, itemsIconAlignment: itemsIconAlignment, label: trigger__soy120, preferredAlign: preferredAlign, ref: 'dropdown', spritemap: spritemap, style: 'primary', triggerClasses: triggerClasses, triggerTitle: param166}, opt_ijData); |
@@ -90,2 +90,11 @@ import 'clay-icon'; | ||
/** | ||
* Content Renderer name of items. | ||
* @default undefined | ||
* @instance | ||
* @memberof ClayDropdown | ||
* @type {?(string|undefined)} | ||
*/ | ||
contentRenderer: Config.string(), | ||
/** | ||
* Data to add to the element. | ||
@@ -92,0 +101,0 @@ * @default undefined |
@@ -47,2 +47,4 @@ /* jshint ignore:start */ | ||
var button = opt_data.button; | ||
/** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */ | ||
var contentRenderer = soy.asserts.assertType(opt_data.contentRenderer == null || (goog.isString(opt_data.contentRenderer) || opt_data.contentRenderer instanceof goog.soy.data.SanitizedContent), 'contentRenderer', opt_data.contentRenderer, '!goog.soy.data.SanitizedContent|null|string|undefined'); | ||
/** @type {boolean|null|undefined} */ | ||
@@ -76,3 +78,3 @@ 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'); | ||
var triggerTitle = soy.asserts.assertType(opt_data.triggerTitle == null || (goog.isString(opt_data.triggerTitle) || opt_data.triggerTitle instanceof goog.soy.data.SanitizedContent), 'triggerTitle', opt_data.triggerTitle, '!goog.soy.data.SanitizedContent|null|string|undefined'); | ||
var trigger__soy218 = function() { | ||
var trigger__soy219 = function() { | ||
if (icon) { | ||
@@ -88,3 +90,3 @@ $templateAlias2({elementClasses: label ? 'inline-item inline-item-before' : '', spritemap: spritemap, symbol: icon}, opt_ijData); | ||
}; | ||
$templateAlias1({button: button, disabled: disabled, elementClasses: elementClasses, events: {buttonClicked: _handleButtonClick, itemClicked: _handleItemClick, toggle: toggle}, expanded: expanded, id: id, items: items, itemsIconAlignment: itemsIconAlignment, label: trigger__soy218, preferredAlign: preferredAlign, ref: 'dropdown', searchable: searchable, spritemap: spritemap, style: style, triggerClasses: triggerClasses, triggerSize: triggerSize, triggerTitle: triggerTitle}, opt_ijData); | ||
$templateAlias1({button: button, contentRenderer: contentRenderer, disabled: disabled, elementClasses: elementClasses, events: {buttonClicked: _handleButtonClick, itemClicked: _handleItemClick, toggle: toggle}, expanded: expanded, id: id, items: items, itemsIconAlignment: itemsIconAlignment, label: trigger__soy219, preferredAlign: preferredAlign, ref: 'dropdown', searchable: searchable, spritemap: spritemap, style: style, triggerClasses: triggerClasses, triggerSize: triggerSize, triggerTitle: triggerTitle}, opt_ijData); | ||
}; | ||
@@ -99,2 +101,3 @@ exports.render = $render; | ||
* button: (?|undefined), | ||
* contentRenderer: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
* disabled: (boolean|null|undefined), | ||
@@ -121,4 +124,4 @@ * elementClasses: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
exports.render.params = ["items","spritemap","_handleButtonClick","_handleItemClick","button","disabled","elementClasses","expanded","icon","id","itemsIconAlignment","label","preferredAlign","searchable","style","toggle","triggerClasses","triggerSize","triggerTitle"]; | ||
exports.render.types = {"items":"list<?>","spritemap":"string","_handleButtonClick":"any","_handleItemClick":"any","button":"?","disabled":"bool","elementClasses":"string","expanded":"bool","icon":"string","id":"string","itemsIconAlignment":"string","label":"html|string","preferredAlign":"string","searchable":"bool","style":"string","toggle":"any","triggerClasses":"string","triggerSize":"string","triggerTitle":"string"}; | ||
exports.render.params = ["items","spritemap","_handleButtonClick","_handleItemClick","button","contentRenderer","disabled","elementClasses","expanded","icon","id","itemsIconAlignment","label","preferredAlign","searchable","style","toggle","triggerClasses","triggerSize","triggerTitle"]; | ||
exports.render.types = {"items":"list<?>","spritemap":"string","_handleButtonClick":"any","_handleItemClick":"any","button":"?","contentRenderer":"string","disabled":"bool","elementClasses":"string","expanded":"bool","icon":"string","id":"string","itemsIconAlignment":"string","label":"html|string","preferredAlign":"string","searchable":"bool","style":"string","toggle":"any","triggerClasses":"string","triggerSize":"string","triggerTitle":"string"}; | ||
templates = exports; | ||
@@ -125,0 +128,0 @@ return exports; |
@@ -87,3 +87,3 @@ /* jshint ignore:start */ | ||
var triggerTitle = soy.asserts.assertType(opt_data.triggerTitle == null || (goog.isString(opt_data.triggerTitle) || opt_data.triggerTitle instanceof goog.soy.data.SanitizedContent), 'triggerTitle', opt_data.triggerTitle, '!goog.soy.data.SanitizedContent|null|string|undefined'); | ||
var attributes__soy280 = function() { | ||
var attributes__soy282 = function() { | ||
incrementalDom.attr('class', 'dropdown' + (elementClasses ? ' ' + elementClasses : '') + (expanded ? ' show' : '')); | ||
@@ -95,3 +95,3 @@ if (id) { | ||
incrementalDom.elementOpenStart('div'); | ||
attributes__soy280(); | ||
attributes__soy282(); | ||
incrementalDom.elementOpenEnd(); | ||
@@ -155,19 +155,21 @@ $trigger({classes: triggerClasses, disabled: disabled, expanded: expanded, label: label, size: triggerSize, style: style, title: triggerTitle}, 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 index316_RangeEnd = maxItems && maxItems < (items.length) ? maxItems : (items.length); | ||
var index316ListLen = Math.max(0, Math.ceil((index316_RangeEnd - 0) / 1)); | ||
for (var index316Index = 0; index316Index < index316ListLen; index316Index++) { | ||
var index316Data = 0 + index316Index * 1; | ||
var item__soy319 = items[index316Data]; | ||
var variant__soy334 = ''; | ||
var index318_RangeEnd = maxItems && maxItems < (items.length) ? maxItems : (items.length); | ||
var index318ListLen = Math.max(0, Math.ceil((index318_RangeEnd - 0) / 1)); | ||
for (var index318Index = 0; index318Index < index318ListLen; index318Index++) { | ||
var index318Data = 0 + index318Index * 1; | ||
var item__soy321 = items[index318Data]; | ||
var variant__soy340 = ''; | ||
var $tmp; | ||
if ((contentRenderer != null) && contentRenderer != '') { | ||
$tmp = contentRenderer; | ||
} else if (item__soy319.type) { | ||
$tmp = item__soy319.type; | ||
} else if ((item__soy321.contentRenderer != null) && item__soy321.contentRenderer != '') { | ||
$tmp = item__soy321.contentRenderer; | ||
} else if (item__soy321.type) { | ||
$tmp = item__soy321.type; | ||
} else { | ||
$tmp = 'item'; | ||
} | ||
variant__soy334 += $tmp; | ||
$templateAlias3({active: item__soy319.active, checked: item__soy319.checked, contentRenderer: variant__soy334, data: item__soy319.data, disabled: item__soy319.disabled, events: {itemClicked: _handleItemClick}, href: item__soy319.href, icon: item__soy319.icon, inputName: item__soy319.inputName, inputValue: item__soy319.inputValue, items: item__soy319.items, itemsIconAlignment: itemsIconAlignment, label: item__soy319.label ? '' + item__soy319.label : '', maxItems: item__soy319.maxItems, separator: item__soy319.separator, spritemap: spritemap, target: item__soy319.target, title: item__soy319.title}, opt_ijData); | ||
if (item__soy319.separator) { | ||
variant__soy340 += $tmp; | ||
$templateAlias3({active: item__soy321.active, checked: item__soy321.checked, contentRenderer: variant__soy340, data: item__soy321.data, disabled: item__soy321.disabled, events: {itemClicked: _handleItemClick}, href: item__soy321.href, icon: item__soy321.icon, inputName: item__soy321.inputName, inputValue: item__soy321.inputValue, items: item__soy321.items, itemsIconAlignment: itemsIconAlignment, label: item__soy321.label ? '' + item__soy321.label : '', maxItems: item__soy321.maxItems, separator: item__soy321.separator, spritemap: spritemap, target: item__soy321.target, title: item__soy321.title, type: item__soy321.type}, opt_ijData); | ||
if (item__soy321.separator) { | ||
$templateAlias3({contentRenderer: 'separator'}, opt_ijData); | ||
@@ -284,4 +286,4 @@ } | ||
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 dropdownMenu__soy476 = function() { | ||
var listAttributes__soy403 = function() { | ||
var dropdownMenu__soy483 = function() { | ||
var listAttributes__soy410 = function() { | ||
var $tmp; | ||
@@ -299,3 +301,3 @@ if (itemsIconAlignment == 'left') { | ||
incrementalDom.elementOpenStart('div'); | ||
listAttributes__soy403(); | ||
listAttributes__soy410(); | ||
incrementalDom.elementOpenEnd(); | ||
@@ -313,6 +315,6 @@ if (helpText) { | ||
} | ||
var listItemsContent__soy429 = function() { | ||
var listItemsContent__soy436 = function() { | ||
soy.$$getDelegateFn(soy.$$getDelTemplateId('ClayDropdownBase.Content.idom'), contentRenderer, false)({_handleItemClick: _handleItemClick, contentRenderer: contentRenderer, items: items, itemsIconAlignment: itemsIconAlignment, spritemap: spritemap}, opt_ijData); | ||
}; | ||
var captionContent__soy438 = function() { | ||
var captionContent__soy445 = function() { | ||
if (caption) { | ||
@@ -331,5 +333,5 @@ incrementalDom.elementOpenStart('div'); | ||
incrementalDom.elementOpenEnd(); | ||
listItemsContent__soy429(); | ||
listItemsContent__soy436(); | ||
incrementalDom.elementClose('div'); | ||
captionContent__soy438(); | ||
captionContent__soy445(); | ||
incrementalDom.elementOpenStart('div'); | ||
@@ -347,11 +349,11 @@ incrementalDom.attr('class', 'dropdown-section'); | ||
} else { | ||
listItemsContent__soy429(); | ||
captionContent__soy438(); | ||
listItemsContent__soy436(); | ||
captionContent__soy445(); | ||
} | ||
incrementalDom.elementClose('div'); | ||
}; | ||
var param481 = function() { | ||
dropdownMenu__soy476(); | ||
var param488 = function() { | ||
dropdownMenu__soy483(); | ||
}; | ||
$templateAlias2({content: param481, portalElement: '#' + portalElementId, ref: 'portal'}, opt_ijData); | ||
$templateAlias2({content: param488, portalElement: '#' + portalElementId, ref: 'portal'}, opt_ijData); | ||
}; | ||
@@ -405,3 +407,3 @@ exports.sections = $sections; | ||
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'); | ||
var buttonAttributes__soy534 = function() { | ||
var buttonAttributes__soy541 = function() { | ||
if (expanded) { | ||
@@ -427,3 +429,3 @@ incrementalDom.attr('aria-expanded', 'true'); | ||
incrementalDom.elementOpenStart('button'); | ||
buttonAttributes__soy534(); | ||
buttonAttributes__soy541(); | ||
incrementalDom.elementOpenEnd(); | ||
@@ -430,0 +432,0 @@ soyIdom.print(label); |
@@ -207,2 +207,11 @@ import 'clay-button'; | ||
title: itemShape.title, | ||
/** | ||
* Type of the item. | ||
* @default undefined | ||
* @instance | ||
* @memberof ClayDropdownItem | ||
* @type {?(string|undefined)} | ||
*/ | ||
type: Config.string(), | ||
}; | ||
@@ -209,0 +218,0 @@ |
@@ -84,4 +84,6 @@ /* jshint ignore:start */ | ||
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'); | ||
var variant__soy762 = contentRenderer != null ? contentRenderer : 'item'; | ||
soy.$$getDelegateFn(soy.$$getDelTemplateId('ClayDropdownItem.Item.idom'), variant__soy762, false)({_handleItemClick: _handleItemClick, active: active, checked: checked, disabled: disabled, href: href, icon: icon, inputName: inputName, inputValue: inputValue, items: items, itemsIconAlignment: itemsIconAlignment, label: label ? '' + label : '', maxItems: maxItems, separator: separator, spritemap: spritemap, target: target, title: title}, opt_ijData); | ||
/** @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'); | ||
var variant__soy770 = contentRenderer != null ? contentRenderer : 'item'; | ||
soy.$$getDelegateFn(soy.$$getDelTemplateId('ClayDropdownItem.Item.idom'), variant__soy770, false)({_handleItemClick: _handleItemClick, active: active, checked: checked, disabled: disabled, href: href, icon: icon, inputName: inputName, inputValue: inputValue, items: items, itemsIconAlignment: itemsIconAlignment, label: label ? '' + label : '', maxItems: maxItems, separator: separator, spritemap: spritemap, target: target, title: title, type: type}, opt_ijData); | ||
}; | ||
@@ -108,2 +110,3 @@ exports.render = $render; | ||
* title: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
* type: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
* }} | ||
@@ -158,9 +161,11 @@ */ | ||
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'); | ||
var itemContent__soy871 = function() { | ||
var elementClasses__soy810 = ''; | ||
elementClasses__soy810 += 'dropdown-item'; | ||
elementClasses__soy810 += active ? ' active' : ''; | ||
elementClasses__soy810 += disabled ? ' disabled' : ''; | ||
var labelContent__soy838 = function() { | ||
var iconContent__soy822 = function() { | ||
/** @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'); | ||
var itemContent__soy881 = function() { | ||
var elementClasses__soy820 = ''; | ||
elementClasses__soy820 += 'dropdown-item'; | ||
elementClasses__soy820 += active ? ' active' : ''; | ||
elementClasses__soy820 += disabled ? ' disabled' : ''; | ||
var labelContent__soy848 = function() { | ||
var iconContent__soy832 = function() { | ||
if (icon && spritemap) { | ||
@@ -175,7 +180,7 @@ incrementalDom.elementOpenStart('span'); | ||
if (icon && itemsIconAlignment == 'left') { | ||
iconContent__soy822(); | ||
iconContent__soy832(); | ||
} | ||
soyIdom.print(label); | ||
if (icon && itemsIconAlignment == 'right') { | ||
iconContent__soy822(); | ||
iconContent__soy832(); | ||
} | ||
@@ -192,8 +197,8 @@ }; | ||
} | ||
$templateAlias4({elementClasses: elementClasses__soy810, href: '' + $tmp, label: labelContent__soy838, target: target, title: title}, opt_ijData); | ||
$templateAlias4({elementClasses: elementClasses__soy820, href: '' + $tmp, label: labelContent__soy848, target: target, title: title}, opt_ijData); | ||
} else { | ||
$templateAlias5({ariaLabel: label, disabled: disabled, elementClasses: elementClasses__soy810, label: labelContent__soy838, size: 'sm', spritemap: spritemap, style: 'link'}, opt_ijData); | ||
$templateAlias5({ariaLabel: label, disabled: disabled, elementClasses: elementClasses__soy820, label: labelContent__soy848, size: 'sm', spritemap: spritemap, style: 'link'}, opt_ijData); | ||
} | ||
}; | ||
var itemAttributes__soy876 = function() { | ||
var itemAttributes__soy886 = function() { | ||
incrementalDom.attr('data-onclick', _handleItemClick); | ||
@@ -203,5 +208,5 @@ incrementalDom.attr('tabindex', '-1'); | ||
incrementalDom.elementOpenStart('li'); | ||
itemAttributes__soy876(); | ||
itemAttributes__soy886(); | ||
incrementalDom.elementOpenEnd(); | ||
itemContent__soy871(); | ||
itemContent__soy881(); | ||
incrementalDom.elementClose('li'); | ||
@@ -228,2 +233,3 @@ }; | ||
* title: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
* type: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
* }} | ||
@@ -279,6 +285,8 @@ */ | ||
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'); | ||
var checkbox__soy909 = function() { | ||
/** @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'); | ||
var checkbox__soy920 = function() { | ||
$templateAlias1({checked: checked, disabled: disabled, inline: true, label: label, name: inputName, value: inputValue}, opt_ijData); | ||
}; | ||
var itemAttributes__soy918 = function() { | ||
var itemAttributes__soy929 = function() { | ||
incrementalDom.attr('class', 'dropdown-item' + (active || checked ? ' active' : '')); | ||
@@ -289,5 +297,5 @@ incrementalDom.attr('data-onclick', _handleItemClick); | ||
incrementalDom.elementOpenStart('li'); | ||
itemAttributes__soy918(); | ||
itemAttributes__soy929(); | ||
incrementalDom.elementOpenEnd(); | ||
checkbox__soy909(); | ||
checkbox__soy920(); | ||
incrementalDom.elementClose('li'); | ||
@@ -314,2 +322,3 @@ }; | ||
* title: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
* type: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
* }} | ||
@@ -365,2 +374,4 @@ */ | ||
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'); | ||
if (label && label != '') { | ||
@@ -397,2 +408,3 @@ incrementalDom.elementOpenStart('li'); | ||
* title: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
* type: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
* }} | ||
@@ -448,6 +460,8 @@ */ | ||
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'); | ||
var radio__soy986 = function() { | ||
/** @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'); | ||
var radio__soy999 = function() { | ||
$templateAlias2({checked: checked, disabled: disabled, inline: true, label: label, name: inputName, value: inputValue}, opt_ijData); | ||
}; | ||
var itemAttributes__soy995 = function() { | ||
var itemAttributes__soy1008 = function() { | ||
incrementalDom.attr('class', 'dropdown-item' + (active || checked ? ' active' : '')); | ||
@@ -458,5 +472,5 @@ incrementalDom.attr('data-onclick', _handleItemClick); | ||
incrementalDom.elementOpenStart('li'); | ||
itemAttributes__soy995(); | ||
itemAttributes__soy1008(); | ||
incrementalDom.elementOpenEnd(); | ||
radio__soy986(); | ||
radio__soy999(); | ||
incrementalDom.elementClose('li'); | ||
@@ -483,2 +497,3 @@ }; | ||
* title: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
* type: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
* }} | ||
@@ -534,2 +549,4 @@ */ | ||
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'); | ||
if (label && label != '') { | ||
@@ -575,2 +592,3 @@ incrementalDom.elementOpenStart('li'); | ||
* title: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
* type: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
* }} | ||
@@ -626,2 +644,4 @@ */ | ||
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'); | ||
incrementalDom.elementOpenStart('li'); | ||
@@ -653,2 +673,3 @@ incrementalDom.attr('aria-hidden', 'true'); | ||
* title: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
* type: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
* }} | ||
@@ -662,4 +683,4 @@ */ | ||
exports.render.params = ["_handleItemClick","active","checked","contentRenderer","disabled","href","icon","inputName","inputValue","items","itemsIconAlignment","label","maxItems","separator","spritemap","target","title"]; | ||
exports.render.types = {"_handleItemClick":"any","active":"bool","checked":"bool","contentRenderer":"string","disabled":"bool","href":"string","icon":"string","inputName":"string","inputValue":"string","items":"list<?>","itemsIconAlignment":"string","label":"string","maxItems":"int","separator":"bool","spritemap":"string","target":"string","title":"string"}; | ||
exports.render.params = ["_handleItemClick","active","checked","contentRenderer","disabled","href","icon","inputName","inputValue","items","itemsIconAlignment","label","maxItems","separator","spritemap","target","title","type"]; | ||
exports.render.types = {"_handleItemClick":"any","active":"bool","checked":"bool","contentRenderer":"string","disabled":"bool","href":"string","icon":"string","inputName":"string","inputValue":"string","items":"list<?>","itemsIconAlignment":"string","label":"string","maxItems":"int","separator":"bool","spritemap":"string","target":"string","title":"string","type":"string"}; | ||
templates = exports; | ||
@@ -666,0 +687,0 @@ return exports; |
@@ -6,2 +6,3 @@ import {Config} from 'metal-state'; | ||
checked: Config.bool().value(false), | ||
contentRenderer: Config.string(), | ||
disabled: Config.bool().value(false), | ||
@@ -17,9 +18,12 @@ href: Config.string(), | ||
title: Config.string(), | ||
type: Config.oneOf([ | ||
'checkbox', | ||
'group', | ||
'item', | ||
'radio', | ||
'radiogroup', | ||
'separator', | ||
type: Config.oneOfType([ | ||
Config.oneOf([ | ||
'checkbox', | ||
'group', | ||
'item', | ||
'radio', | ||
'radiogroup', | ||
'separator', | ||
]), | ||
Config.string(), | ||
]).value('item'), | ||
@@ -26,0 +30,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
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
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
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
Misc. License Issues
License(Experimental) A package's licensing information has fine-grained problems.
Found 1 instance in 1 package
847096
0
8183
1
Updatedclay-button@^2.7.0
Updatedclay-checkbox@^2.7.0
Updatedclay-component@^2.7.0
Updatedclay-icon@^2.7.0
Updatedclay-link@^2.7.0
Updatedclay-portal@^2.7.0
Updatedclay-radio@^2.7.0