clay-dropdown
Advanced tools
Comparing version 2.8.0 to 2.8.2
@@ -258,2 +258,11 @@ 'use strict'; | ||
/** | ||
* Aria label attribute for the trigger element. | ||
* @default undefined | ||
* @instance | ||
* @memberof ClayActionsDropdown | ||
* @type {?(string|undefined)} | ||
*/ | ||
triggerAriaLabel: _metalState.Config.string(), | ||
/** | ||
* CSS classes to be applied to the trigger element. | ||
@@ -260,0 +269,0 @@ * @default undefined |
@@ -85,14 +85,16 @@ 'use strict'; | ||
/** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */ | ||
var triggerAriaLabel = soy.asserts.assertType(opt_data.triggerAriaLabel == null || goog.isString(opt_data.triggerAriaLabel) || opt_data.triggerAriaLabel instanceof goog.soy.data.SanitizedContent, 'triggerAriaLabel', opt_data.triggerAriaLabel, '!goog.soy.data.SanitizedContent|null|string|undefined'); | ||
/** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */ | ||
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__soy2015 = ''; | ||
var msg_1_6305962755687847469__soy2029 = ''; | ||
/** @desc */ | ||
var MSG_EXTERNAL_6305962755687847469 = goog.getMsg('actions'); | ||
msg_1_6305962755687847469__soy2015 += MSG_EXTERNAL_6305962755687847469; | ||
var dropdownElementClasses__soy26 = ''; | ||
dropdownElementClasses__soy26 += 'dropdown-action'; | ||
dropdownElementClasses__soy26 += elementClasses ? ' ' + elementClasses : ''; | ||
var trigger__soy33 = function trigger__soy33() { | ||
msg_1_6305962755687847469__soy2029 += MSG_EXTERNAL_6305962755687847469; | ||
var dropdownElementClasses__soy27 = ''; | ||
dropdownElementClasses__soy27 += 'dropdown-action'; | ||
dropdownElementClasses__soy27 += elementClasses ? ' ' + elementClasses : ''; | ||
var trigger__soy34 = function trigger__soy34() { | ||
$templateAlias2({ spritemap: spritemap, symbol: 'ellipsis-v' }, 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__soy2015 }, opt_ijData); | ||
$templateAlias1({ button: button, caption: caption, disabled: disabled, elementClasses: dropdownElementClasses__soy27, events: { buttonClicked: _handleButtonClick, itemClicked: _handleItemClick, toggle: toggle }, expanded: expanded, helpText: helpText, id: id, items: items, itemsIconAlignment: itemsIconAlignment, label: trigger__soy34, preferredAlign: preferredAlign, ref: 'dropdown', spritemap: spritemap, triggerAriaLabel: triggerAriaLabel, triggerClasses: triggerClasses, triggerTitle: '' + msg_1_6305962755687847469__soy2029 }, opt_ijData); | ||
}; | ||
@@ -116,2 +118,3 @@ exports.render = $render; | ||
* toggle: (*|null|undefined), | ||
* triggerAriaLabel: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
* triggerClasses: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
@@ -125,4 +128,4 @@ * }} | ||
exports.render.params = ["items", "spritemap", "_handleButtonClick", "_handleItemClick", "button", "caption", "disabled", "elementClasses", "expanded", "helpText", "id", "itemsIconAlignment", "preferredAlign", "toggle", "triggerClasses"]; | ||
exports.render.types = { "items": "list<?>", "spritemap": "string", "_handleButtonClick": "any", "_handleItemClick": "any", "button": "?", "caption": "string", "disabled": "bool", "elementClasses": "string", "expanded": "bool", "helpText": "string", "id": "string", "itemsIconAlignment": "string", "preferredAlign": "string", "toggle": "any", "triggerClasses": "string" }; | ||
exports.render.params = ["items", "spritemap", "_handleButtonClick", "_handleItemClick", "button", "caption", "disabled", "elementClasses", "expanded", "helpText", "id", "itemsIconAlignment", "preferredAlign", "toggle", "triggerAriaLabel", "triggerClasses"]; | ||
exports.render.types = { "items": "list<?>", "spritemap": "string", "_handleButtonClick": "any", "_handleItemClick": "any", "button": "?", "caption": "string", "disabled": "bool", "elementClasses": "string", "expanded": "bool", "helpText": "string", "id": "string", "itemsIconAlignment": "string", "preferredAlign": "string", "toggle": "any", "triggerAriaLabel": "string", "triggerClasses": "string" }; | ||
exports.templates = templates = exports; | ||
@@ -129,0 +132,0 @@ return exports; |
@@ -286,2 +286,11 @@ 'use strict'; | ||
/** | ||
* Aria label attribute for the trigger element. | ||
* @default undefined | ||
* @instance | ||
* @memberof ClayCreationMenuDropdown | ||
* @type {?(string|undefined)} | ||
*/ | ||
triggerAriaLabel: _metalState.Config.string(), | ||
/** | ||
* CSS classes to be applied to the trigger element. | ||
@@ -288,0 +297,0 @@ * @default undefined |
@@ -89,2 +89,4 @@ 'use strict'; | ||
/** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */ | ||
var triggerAriaLabel = soy.asserts.assertType(opt_data.triggerAriaLabel == null || goog.isString(opt_data.triggerAriaLabel) || opt_data.triggerAriaLabel instanceof goog.soy.data.SanitizedContent, 'triggerAriaLabel', opt_data.triggerAriaLabel, '!goog.soy.data.SanitizedContent|null|string|undefined'); | ||
/** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */ | ||
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'); | ||
@@ -95,41 +97,41 @@ /** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */ | ||
var viewMoreURL = soy.asserts.assertType(opt_data.viewMoreURL == null || goog.isString(opt_data.viewMoreURL) || opt_data.viewMoreURL instanceof goog.soy.data.SanitizedContent, 'viewMoreURL', opt_data.viewMoreURL, '!goog.soy.data.SanitizedContent|null|string|undefined'); | ||
var secondaryItemsFirstGroup__soy81 = secondaryItems != null ? secondaryItems[0] != null ? secondaryItems[0] : null : null; | ||
var secondaryItemsSecondGroup__soy83 = secondaryItems != null ? secondaryItems[1] != null ? secondaryItems[1] : null : null; | ||
var totalPrimaryItems__soy85 = primaryItems ? primaryItems.length : 0; | ||
var totalSecondaryItemsFirstGroup__soy87 = secondaryItemsFirstGroup__soy81 != null && secondaryItemsFirstGroup__soy81.items != null ? secondaryItemsFirstGroup__soy81.items.length : 0; | ||
var totalSecondaryItemsSecondGroup__soy89 = secondaryItemsSecondGroup__soy83 != null && secondaryItemsSecondGroup__soy83.items != null ? secondaryItemsSecondGroup__soy83.items.length : 0; | ||
var totalSecondaryItems__soy91 = totalSecondaryItemsFirstGroup__soy87 + totalSecondaryItemsSecondGroup__soy89; | ||
var totalItems__soy93 = totalPrimaryItems__soy85 + totalSecondaryItems__soy91; | ||
var defaultMaxPrimaryItems__soy95 = maxPrimaryItems ? totalPrimaryItems__soy85 > maxPrimaryItems ? maxPrimaryItems : totalPrimaryItems__soy85 : totalPrimaryItems__soy85 > 8 ? 8 : totalPrimaryItems__soy85; | ||
var tempDefaultMaxSecondaryItems__soy97 = maxSecondaryItems ? totalSecondaryItems__soy91 > maxSecondaryItems ? maxSecondaryItems : totalSecondaryItems__soy91 : totalSecondaryItems__soy91 > 7 ? 7 : totalSecondaryItems__soy91; | ||
var defaultMaxTotalItems__soy99 = maxTotalItems != null ? maxTotalItems : 15; | ||
var defaultMaxSecondaryItems__soy101 = tempDefaultMaxSecondaryItems__soy97 > defaultMaxTotalItems__soy99 - defaultMaxPrimaryItems__soy95 ? defaultMaxTotalItems__soy99 - defaultMaxPrimaryItems__soy95 : tempDefaultMaxSecondaryItems__soy97; | ||
var showingItems__soy103 = totalSecondaryItems__soy91 == 0 ? totalPrimaryItems__soy85 > defaultMaxTotalItems__soy99 ? defaultMaxTotalItems__soy99 : totalPrimaryItems__soy85 : totalPrimaryItems__soy85 > defaultMaxPrimaryItems__soy95 ? totalSecondaryItems__soy91 > defaultMaxSecondaryItems__soy101 ? defaultMaxPrimaryItems__soy95 + defaultMaxSecondaryItems__soy101 : defaultMaxPrimaryItems__soy95 + totalSecondaryItems__soy91 : totalSecondaryItems__soy91 > defaultMaxSecondaryItems__soy101 ? totalPrimaryItems__soy85 + defaultMaxSecondaryItems__soy101 : totalPrimaryItems__soy85 + totalSecondaryItems__soy91; | ||
var primaryDropdownItems__soy105 = { items: primaryItems, maxItems: totalSecondaryItems__soy91 > 0 ? defaultMaxPrimaryItems__soy95 : defaultMaxTotalItems__soy99, separator: totalPrimaryItems__soy85 > 0 && totalSecondaryItems__soy91 > 0, type: 'group' }; | ||
var secondaryDropdownItemsSecondGroup__soy107 = secondaryItemsSecondGroup__soy83 && totalSecondaryItemsFirstGroup__soy87 < defaultMaxSecondaryItems__soy101 ? { items: secondaryItemsSecondGroup__soy83.items, label: secondaryItemsSecondGroup__soy83.label, maxItems: defaultMaxSecondaryItems__soy101 - totalSecondaryItemsFirstGroup__soy87, type: 'group' } : null; | ||
var secondaryDropdownItemsFirstGroup__soy109 = secondaryItemsFirstGroup__soy81 ? { items: secondaryItemsFirstGroup__soy81.items, label: secondaryItemsFirstGroup__soy81.label, maxItems: defaultMaxSecondaryItems__soy101, separator: secondaryItemsFirstGroup__soy81.separator && secondaryDropdownItemsSecondGroup__soy107 != null, type: 'group' } : null; | ||
var items__soy111 = secondaryDropdownItemsFirstGroup__soy109 && secondaryDropdownItemsSecondGroup__soy107 ? [primaryDropdownItems__soy105, secondaryDropdownItemsFirstGroup__soy109, secondaryDropdownItemsSecondGroup__soy107] : secondaryDropdownItemsFirstGroup__soy109 ? [primaryDropdownItems__soy105, secondaryDropdownItemsFirstGroup__soy109] : [primaryDropdownItems__soy105]; | ||
var showMoreButton__soy113 = showingItems__soy103 < totalItems__soy93 ? viewMoreURL != null ? { buttonStyle: 'secondary', href: viewMoreURL, label: 'More' } : { label: 'More', style: 'secondary' } : null; | ||
var trigger__soy120 = function trigger__soy120() { | ||
var secondaryItemsFirstGroup__soy84 = secondaryItems != null ? secondaryItems[0] != null ? secondaryItems[0] : null : null; | ||
var secondaryItemsSecondGroup__soy86 = secondaryItems != null ? secondaryItems[1] != null ? secondaryItems[1] : null : null; | ||
var totalPrimaryItems__soy88 = primaryItems ? primaryItems.length : 0; | ||
var totalSecondaryItemsFirstGroup__soy90 = secondaryItemsFirstGroup__soy84 != null && secondaryItemsFirstGroup__soy84.items != null ? secondaryItemsFirstGroup__soy84.items.length : 0; | ||
var totalSecondaryItemsSecondGroup__soy92 = secondaryItemsSecondGroup__soy86 != null && secondaryItemsSecondGroup__soy86.items != null ? secondaryItemsSecondGroup__soy86.items.length : 0; | ||
var totalSecondaryItems__soy94 = totalSecondaryItemsFirstGroup__soy90 + totalSecondaryItemsSecondGroup__soy92; | ||
var totalItems__soy96 = totalPrimaryItems__soy88 + totalSecondaryItems__soy94; | ||
var defaultMaxPrimaryItems__soy98 = maxPrimaryItems ? totalPrimaryItems__soy88 > maxPrimaryItems ? maxPrimaryItems : totalPrimaryItems__soy88 : totalPrimaryItems__soy88 > 8 ? 8 : totalPrimaryItems__soy88; | ||
var tempDefaultMaxSecondaryItems__soy100 = maxSecondaryItems ? totalSecondaryItems__soy94 > maxSecondaryItems ? maxSecondaryItems : totalSecondaryItems__soy94 : totalSecondaryItems__soy94 > 7 ? 7 : totalSecondaryItems__soy94; | ||
var defaultMaxTotalItems__soy102 = maxTotalItems != null ? maxTotalItems : 15; | ||
var defaultMaxSecondaryItems__soy104 = tempDefaultMaxSecondaryItems__soy100 > defaultMaxTotalItems__soy102 - defaultMaxPrimaryItems__soy98 ? defaultMaxTotalItems__soy102 - defaultMaxPrimaryItems__soy98 : tempDefaultMaxSecondaryItems__soy100; | ||
var showingItems__soy106 = totalSecondaryItems__soy94 == 0 ? totalPrimaryItems__soy88 > defaultMaxTotalItems__soy102 ? defaultMaxTotalItems__soy102 : totalPrimaryItems__soy88 : totalPrimaryItems__soy88 > defaultMaxPrimaryItems__soy98 ? totalSecondaryItems__soy94 > defaultMaxSecondaryItems__soy104 ? defaultMaxPrimaryItems__soy98 + defaultMaxSecondaryItems__soy104 : defaultMaxPrimaryItems__soy98 + totalSecondaryItems__soy94 : totalSecondaryItems__soy94 > defaultMaxSecondaryItems__soy104 ? totalPrimaryItems__soy88 + defaultMaxSecondaryItems__soy104 : totalPrimaryItems__soy88 + totalSecondaryItems__soy94; | ||
var primaryDropdownItems__soy108 = { items: primaryItems, maxItems: totalSecondaryItems__soy94 > 0 ? defaultMaxPrimaryItems__soy98 : defaultMaxTotalItems__soy102, separator: totalPrimaryItems__soy88 > 0 && totalSecondaryItems__soy94 > 0, type: 'group' }; | ||
var secondaryDropdownItemsSecondGroup__soy110 = secondaryItemsSecondGroup__soy86 && totalSecondaryItemsFirstGroup__soy90 < defaultMaxSecondaryItems__soy104 ? { items: secondaryItemsSecondGroup__soy86.items, label: secondaryItemsSecondGroup__soy86.label, maxItems: defaultMaxSecondaryItems__soy104 - totalSecondaryItemsFirstGroup__soy90, type: 'group' } : null; | ||
var secondaryDropdownItemsFirstGroup__soy112 = secondaryItemsFirstGroup__soy84 ? { items: secondaryItemsFirstGroup__soy84.items, label: secondaryItemsFirstGroup__soy84.label, maxItems: defaultMaxSecondaryItems__soy104, separator: secondaryItemsFirstGroup__soy84.separator && secondaryDropdownItemsSecondGroup__soy110 != null, type: 'group' } : null; | ||
var items__soy114 = secondaryDropdownItemsFirstGroup__soy112 && secondaryDropdownItemsSecondGroup__soy110 ? [primaryDropdownItems__soy108, secondaryDropdownItemsFirstGroup__soy112, secondaryDropdownItemsSecondGroup__soy110] : secondaryDropdownItemsFirstGroup__soy112 ? [primaryDropdownItems__soy108, secondaryDropdownItemsFirstGroup__soy112] : [primaryDropdownItems__soy108]; | ||
var showMoreButton__soy116 = showingItems__soy106 < totalItems__soy96 ? viewMoreURL != null ? { buttonStyle: 'secondary', href: viewMoreURL, label: 'More' } : { label: 'More', style: 'secondary' } : null; | ||
var trigger__soy123 = function trigger__soy123() { | ||
$templateAlias2({ spritemap: spritemap, symbol: 'plus' }, opt_ijData); | ||
}; | ||
var param137 = ''; | ||
if (showMoreButton__soy113) { | ||
var msg_2_8004490453579465583__soy2017 = ''; | ||
var param140 = ''; | ||
if (showMoreButton__soy116) { | ||
var msg_2_8004490453579465583__soy2031 = ''; | ||
/** @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__soy2017 += MSG_EXTERNAL_8004490453579465583; | ||
param137 += msg_2_8004490453579465583__soy2017; | ||
var MSG_EXTERNAL_8004490453579465583 = goog.getMsg('showing-{$showingItems}-of-{$totalItems}-elements', { 'showingItems': showingItems__soy106, 'totalItems': totalItems__soy96 }); | ||
msg_2_8004490453579465583__soy2031 += MSG_EXTERNAL_8004490453579465583; | ||
param140 += msg_2_8004490453579465583__soy2031; | ||
} | ||
var param166 = ''; | ||
var param170 = ''; | ||
if (triggerTitle) { | ||
param166 += triggerTitle; | ||
param170 += triggerTitle; | ||
} else { | ||
var msg_3_7387635272539030076__soy2019 = ''; | ||
var msg_3_7387635272539030076__soy2033 = ''; | ||
/** @desc */ | ||
var MSG_EXTERNAL_7387635272539030076 = goog.getMsg('new'); | ||
msg_3_7387635272539030076__soy2019 += MSG_EXTERNAL_7387635272539030076; | ||
param166 += msg_3_7387635272539030076__soy2019; | ||
msg_3_7387635272539030076__soy2033 += MSG_EXTERNAL_7387635272539030076; | ||
param170 += msg_3_7387635272539030076__soy2033; | ||
} | ||
$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); | ||
$templateAlias1({ button: showMoreButton__soy116, caption: param140, disabled: disabled, elementClasses: elementClasses, events: { buttonClicked: _handleButtonClick, itemClicked: _handleItemClick, toggle: toggle }, expanded: expanded, helpText: showMoreButton__soy116 ? helpText : null, id: id, items: items__soy114, itemsIconAlignment: itemsIconAlignment, label: trigger__soy123, preferredAlign: preferredAlign, ref: 'dropdown', spritemap: spritemap, style: 'primary', triggerAriaLabel: triggerAriaLabel, triggerClasses: triggerClasses, triggerTitle: param170 }, opt_ijData); | ||
}; | ||
@@ -155,2 +157,3 @@ exports.render = $render; | ||
* toggle: (*|null|undefined), | ||
* triggerAriaLabel: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
* triggerClasses: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
@@ -166,4 +169,4 @@ * triggerTitle: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
exports.render.params = ["spritemap", "_handleButtonClick", "_handleItemClick", "disabled", "elementClasses", "expanded", "helpText", "id", "itemsIconAlignment", "maxPrimaryItems", "maxSecondaryItems", "maxTotalItems", "preferredAlign", "primaryItems", "secondaryItems", "toggle", "triggerClasses", "triggerTitle", "viewMoreURL"]; | ||
exports.render.types = { "spritemap": "string", "_handleButtonClick": "any", "_handleItemClick": "any", "disabled": "bool", "elementClasses": "string", "expanded": "bool", "helpText": "string", "id": "string", "itemsIconAlignment": "string", "maxPrimaryItems": "int", "maxSecondaryItems": "int", "maxTotalItems": "int", "preferredAlign": "string", "primaryItems": "list<?>", "secondaryItems": "list<?>", "toggle": "any", "triggerClasses": "string", "triggerTitle": "string", "viewMoreURL": "string" }; | ||
exports.render.params = ["spritemap", "_handleButtonClick", "_handleItemClick", "disabled", "elementClasses", "expanded", "helpText", "id", "itemsIconAlignment", "maxPrimaryItems", "maxSecondaryItems", "maxTotalItems", "preferredAlign", "primaryItems", "secondaryItems", "toggle", "triggerAriaLabel", "triggerClasses", "triggerTitle", "viewMoreURL"]; | ||
exports.render.types = { "spritemap": "string", "_handleButtonClick": "any", "_handleItemClick": "any", "disabled": "bool", "elementClasses": "string", "expanded": "bool", "helpText": "string", "id": "string", "itemsIconAlignment": "string", "maxPrimaryItems": "int", "maxSecondaryItems": "int", "maxTotalItems": "int", "preferredAlign": "string", "primaryItems": "list<?>", "secondaryItems": "list<?>", "toggle": "any", "triggerAriaLabel": "string", "triggerClasses": "string", "triggerTitle": "string", "viewMoreURL": "string" }; | ||
exports.templates = templates = exports; | ||
@@ -170,0 +173,0 @@ return exports; |
@@ -295,2 +295,11 @@ 'use strict'; | ||
/** | ||
* Aria label attribute for the trigger element. | ||
* @default undefined | ||
* @instance | ||
* @memberof ClayDropdown | ||
* @type {?(string|undefined)} | ||
*/ | ||
triggerAriaLabel: _metalState.Config.string(), | ||
/** | ||
* CSS classes to be applied to the trigger element. | ||
@@ -297,0 +306,0 @@ * @default undefined |
@@ -93,2 +93,4 @@ 'use strict'; | ||
/** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */ | ||
var triggerAriaLabel = soy.asserts.assertType(opt_data.triggerAriaLabel == null || goog.isString(opt_data.triggerAriaLabel) || opt_data.triggerAriaLabel instanceof goog.soy.data.SanitizedContent, 'triggerAriaLabel', opt_data.triggerAriaLabel, '!goog.soy.data.SanitizedContent|null|string|undefined'); | ||
/** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */ | ||
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'); | ||
@@ -99,3 +101,3 @@ /** @type {!goog.soy.data.SanitizedContent|null|string|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__soy220 = function trigger__soy220() { | ||
var trigger__soy225 = function trigger__soy225() { | ||
if (icon) { | ||
@@ -111,3 +113,3 @@ $templateAlias2({ elementClasses: label ? 'inline-item inline-item-before' : '', spritemap: spritemap, symbol: icon }, 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__soy220, 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__soy225, preferredAlign: preferredAlign, ref: 'dropdown', searchable: searchable, spritemap: spritemap, style: style, triggerAriaLabel: triggerAriaLabel, triggerClasses: triggerClasses, triggerSize: triggerSize, triggerTitle: triggerTitle }, opt_ijData); | ||
}; | ||
@@ -135,2 +137,3 @@ exports.render = $render; | ||
* toggle: (*|null|undefined), | ||
* triggerAriaLabel: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
* triggerClasses: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
@@ -146,4 +149,4 @@ * triggerSize: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
exports.render.params = ["items", "spritemap", "_handleButtonClick", "_handleItemClick", "button", "contentRenderer", "disabled", "elementClasses", "expanded", "icon", "id", "itemsIconAlignment", "label", "preferredAlign", "searchable", "showToggleIcon", "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", "showToggleIcon": "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", "showToggleIcon", "style", "toggle", "triggerAriaLabel", "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", "showToggleIcon": "bool", "style": "string", "toggle": "any", "triggerAriaLabel": "string", "triggerClasses": "string", "triggerSize": "string", "triggerTitle": "string" }; | ||
exports.templates = templates = exports; | ||
@@ -150,0 +153,0 @@ return exports; |
@@ -731,2 +731,11 @@ 'use strict'; | ||
/** | ||
* Aria label attribute for the trigger element. | ||
* @default undefined | ||
* @instance | ||
* @memberof ClayDropdownBase | ||
* @type {?(string|undefined)} | ||
*/ | ||
triggerAriaLabel: _metalState.Config.string(), | ||
/** | ||
* CSS classes to be applied to the trigger element. | ||
@@ -733,0 +742,0 @@ * @default undefined |
@@ -101,2 +101,4 @@ 'use strict'; | ||
/** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */ | ||
var triggerAriaLabel = soy.asserts.assertType(opt_data.triggerAriaLabel == null || goog.isString(opt_data.triggerAriaLabel) || opt_data.triggerAriaLabel instanceof goog.soy.data.SanitizedContent, 'triggerAriaLabel', opt_data.triggerAriaLabel, '!goog.soy.data.SanitizedContent|null|string|undefined'); | ||
/** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */ | ||
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'); | ||
@@ -107,3 +109,3 @@ /** @type {!goog.soy.data.SanitizedContent|null|string|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 attributes__soy283 = function attributes__soy283() { | ||
var attributes__soy290 = function attributes__soy290() { | ||
incrementalDom.attr('class', 'dropdown' + (elementClasses ? ' ' + elementClasses : '') + (expanded ? ' show' : '')); | ||
@@ -115,5 +117,5 @@ if (id) { | ||
incrementalDom.elementOpenStart('div'); | ||
attributes__soy283(); | ||
attributes__soy290(); | ||
incrementalDom.elementOpenEnd(); | ||
$trigger({ classes: triggerClasses, disabled: disabled, expanded: expanded, label: label, size: triggerSize, style: style, title: triggerTitle }, opt_ijData); | ||
$trigger({ ariaLabel: triggerAriaLabel, classes: triggerClasses, disabled: disabled, expanded: expanded, label: label, size: triggerSize, style: style, title: triggerTitle }, opt_ijData); | ||
$sections({ _handleButtonClick: _handleButtonClick, _handleItemClick: _handleItemClick, _handleSearch: _handleSearch, button: button, caption: caption, contentRenderer: contentRenderer != null ? contentRenderer : '', expanded: expanded, helpText: helpText, items: items, itemsIconAlignment: itemsIconAlignment, portalElementId: portalElementId, searchable: searchable, spritemap: spritemap }, opt_ijData); | ||
@@ -143,2 +145,3 @@ incrementalDom.elementClose('div'); | ||
* style: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
* triggerAriaLabel: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
* triggerClasses: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
@@ -175,21 +178,21 @@ * triggerSize: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
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 index319_RangeEnd = maxItems && maxItems < items.length ? maxItems : items.length; | ||
var index319ListLen = Math.max(0, Math.ceil((index319_RangeEnd - 0) / 1)); | ||
for (var index319Index = 0; index319Index < index319ListLen; index319Index++) { | ||
var index319Data = 0 + index319Index * 1; | ||
var item__soy322 = items[index319Data]; | ||
var variant__soy341 = ''; | ||
var index327_RangeEnd = maxItems && maxItems < items.length ? maxItems : items.length; | ||
var index327ListLen = Math.max(0, Math.ceil((index327_RangeEnd - 0) / 1)); | ||
for (var index327Index = 0; index327Index < index327ListLen; index327Index++) { | ||
var index327Data = 0 + index327Index * 1; | ||
var item__soy330 = items[index327Data]; | ||
var variant__soy349 = ''; | ||
var $tmp; | ||
if (contentRenderer != null && contentRenderer != '') { | ||
$tmp = contentRenderer; | ||
} else if (item__soy322.contentRenderer != null && item__soy322.contentRenderer != '') { | ||
$tmp = item__soy322.contentRenderer; | ||
} else if (item__soy322.type) { | ||
$tmp = item__soy322.type; | ||
} else if (item__soy330.contentRenderer != null && item__soy330.contentRenderer != '') { | ||
$tmp = item__soy330.contentRenderer; | ||
} else if (item__soy330.type) { | ||
$tmp = item__soy330.type; | ||
} else { | ||
$tmp = 'item'; | ||
} | ||
variant__soy341 += $tmp; | ||
$templateAlias3({ active: item__soy322.active, checked: item__soy322.checked, contentRenderer: variant__soy341, data: item__soy322.data, disabled: item__soy322.disabled, events: { itemClicked: _handleItemClick }, href: item__soy322.href, icon: item__soy322.icon, inputName: item__soy322.inputName, inputValue: item__soy322.inputValue, items: item__soy322.items, itemsIconAlignment: itemsIconAlignment, label: item__soy322.label ? '' + item__soy322.label : '', maxItems: item__soy322.maxItems, separator: item__soy322.separator, spritemap: spritemap, target: item__soy322.target, title: item__soy322.title, type: item__soy322.type }, opt_ijData); | ||
if (item__soy322.separator) { | ||
variant__soy349 += $tmp; | ||
$templateAlias3({ active: item__soy330.active, checked: item__soy330.checked, contentRenderer: variant__soy349, data: item__soy330.data, disabled: item__soy330.disabled, events: { itemClicked: _handleItemClick }, href: item__soy330.href, icon: item__soy330.icon, inputName: item__soy330.inputName, inputValue: item__soy330.inputValue, items: item__soy330.items, itemsIconAlignment: itemsIconAlignment, label: item__soy330.label ? '' + item__soy330.label : '', maxItems: item__soy330.maxItems, separator: item__soy330.separator, spritemap: spritemap, target: item__soy330.target, title: item__soy330.title, type: item__soy330.type }, opt_ijData); | ||
if (item__soy330.separator) { | ||
$templateAlias3({ contentRenderer: 'separator' }, opt_ijData); | ||
@@ -304,4 +307,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__soy484 = function dropdownMenu__soy484() { | ||
var listAttributes__soy411 = function listAttributes__soy411() { | ||
var dropdownMenu__soy492 = function dropdownMenu__soy492() { | ||
var listAttributes__soy419 = function listAttributes__soy419() { | ||
var $tmp; | ||
@@ -319,3 +322,3 @@ if (itemsIconAlignment == 'left') { | ||
incrementalDom.elementOpenStart('div'); | ||
listAttributes__soy411(); | ||
listAttributes__soy419(); | ||
incrementalDom.elementOpenEnd(); | ||
@@ -333,6 +336,6 @@ if (helpText) { | ||
} | ||
var listItemsContent__soy437 = function listItemsContent__soy437() { | ||
var listItemsContent__soy445 = function listItemsContent__soy445() { | ||
soy.$$getDelegateFn(soy.$$getDelTemplateId('ClayDropdownBase.Content.idom'), contentRenderer, false)({ _handleItemClick: _handleItemClick, contentRenderer: contentRenderer, items: items, itemsIconAlignment: itemsIconAlignment, spritemap: spritemap }, opt_ijData); | ||
}; | ||
var captionContent__soy446 = function captionContent__soy446() { | ||
var captionContent__soy454 = function captionContent__soy454() { | ||
if (caption) { | ||
@@ -351,5 +354,5 @@ incrementalDom.elementOpenStart('div'); | ||
incrementalDom.elementOpenEnd(); | ||
listItemsContent__soy437(); | ||
listItemsContent__soy445(); | ||
incrementalDom.elementClose('div'); | ||
captionContent__soy446(); | ||
captionContent__soy454(); | ||
incrementalDom.elementOpenStart('div'); | ||
@@ -367,11 +370,11 @@ incrementalDom.attr('class', 'dropdown-section'); | ||
} else { | ||
listItemsContent__soy437(); | ||
captionContent__soy446(); | ||
listItemsContent__soy445(); | ||
captionContent__soy454(); | ||
} | ||
incrementalDom.elementClose('div'); | ||
}; | ||
var param489 = function param489() { | ||
dropdownMenu__soy484(); | ||
var param497 = function param497() { | ||
dropdownMenu__soy492(); | ||
}; | ||
$templateAlias2({ content: param489, portalElement: '#' + portalElementId, ref: 'portal' }, opt_ijData); | ||
$templateAlias2({ content: param497, portalElement: '#' + portalElementId, ref: 'portal' }, opt_ijData); | ||
}; | ||
@@ -413,2 +416,4 @@ exports.sections = $sections; | ||
/** @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 {!goog.soy.data.SanitizedContent|null|string|undefined} */ | ||
var classes = soy.asserts.assertType(opt_data.classes == null || goog.isString(opt_data.classes) || opt_data.classes instanceof goog.soy.data.SanitizedContent, 'classes', opt_data.classes, '!goog.soy.data.SanitizedContent|null|string|undefined'); | ||
@@ -425,3 +430,3 @@ /** @type {boolean|null|undefined} */ | ||
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__soy542 = function buttonAttributes__soy542() { | ||
var buttonAttributes__soy557 = function buttonAttributes__soy557() { | ||
if (expanded) { | ||
@@ -433,3 +438,5 @@ incrementalDom.attr('aria-expanded', 'true'); | ||
incrementalDom.attr('aria-haspopup', 'true'); | ||
incrementalDom.attr('aria-label', 'toggle'); | ||
if (ariaLabel) { | ||
incrementalDom.attr('aria-label', ariaLabel); | ||
} | ||
incrementalDom.attr('class', 'dropdown-toggle btn' + (classes ? ' ' + classes : '') + (size ? ' btn-' + size : '') + (style ? ' btn-' + style : ' btn-unstyled')); | ||
@@ -448,3 +455,3 @@ if (disabled) { | ||
incrementalDom.elementOpenStart('button'); | ||
buttonAttributes__soy542(); | ||
buttonAttributes__soy557(); | ||
incrementalDom.elementOpenEnd(); | ||
@@ -458,2 +465,3 @@ soyIdom.print(label); | ||
* label: (!goog.soy.data.SanitizedContent|function()|string), | ||
* ariaLabel: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
* classes: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
@@ -516,4 +524,4 @@ * disabled: (boolean|null|undefined), | ||
exports.render.params = ["items", "label", "_handleButtonClick", "_handleItemClick", "_handleSearch", "button", "caption", "contentRenderer", "disabled", "elementClasses", "expanded", "helpText", "id", "itemsIconAlignment", "portalElementId", "searchable", "spritemap", "style", "triggerClasses", "triggerSize", "triggerTitle"]; | ||
exports.render.types = { "items": "list<?>", "label": "html|string", "_handleButtonClick": "any", "_handleItemClick": "any", "_handleSearch": "any", "button": "?", "caption": "string", "contentRenderer": "string", "disabled": "bool", "elementClasses": "string", "expanded": "bool", "helpText": "string", "id": "string", "itemsIconAlignment": "string", "portalElementId": "string", "searchable": "bool", "spritemap": "string", "style": "string", "triggerClasses": "string", "triggerSize": "string", "triggerTitle": "string" }; | ||
exports.render.params = ["items", "label", "_handleButtonClick", "_handleItemClick", "_handleSearch", "button", "caption", "contentRenderer", "disabled", "elementClasses", "expanded", "helpText", "id", "itemsIconAlignment", "portalElementId", "searchable", "spritemap", "style", "triggerAriaLabel", "triggerClasses", "triggerSize", "triggerTitle"]; | ||
exports.render.types = { "items": "list<?>", "label": "html|string", "_handleButtonClick": "any", "_handleItemClick": "any", "_handleSearch": "any", "button": "?", "caption": "string", "contentRenderer": "string", "disabled": "bool", "elementClasses": "string", "expanded": "bool", "helpText": "string", "id": "string", "itemsIconAlignment": "string", "portalElementId": "string", "searchable": "bool", "spritemap": "string", "style": "string", "triggerAriaLabel": "string", "triggerClasses": "string", "triggerSize": "string", "triggerTitle": "string" }; | ||
exports.items.params = ["items", "_handleItemClick", "contentRenderer", "itemsIconAlignment", "maxItems", "spritemap"]; | ||
@@ -525,4 +533,4 @@ exports.items.types = { "items": "list<?>", "_handleItemClick": "any", "contentRenderer": "string", "itemsIconAlignment": "string", "maxItems": "int", "spritemap": "string" }; | ||
exports.sections.types = { "items": "list<?>", "_handleButtonClick": "any", "_handleItemClick": "any", "_handleSearch": "any", "button": "?", "caption": "string", "contentRenderer": "string", "expanded": "bool", "helpText": "string", "itemsIconAlignment": "string", "portalElementId": "string", "searchable": "bool", "spritemap": "string" }; | ||
exports.trigger.params = ["label", "classes", "disabled", "expanded", "size", "style", "title"]; | ||
exports.trigger.types = { "label": "html|string", "classes": "string", "disabled": "bool", "expanded": "bool", "size": "string", "style": "string", "title": "string" }; | ||
exports.trigger.params = ["label", "ariaLabel", "classes", "disabled", "expanded", "size", "style", "title"]; | ||
exports.trigger.types = { "label": "html|string", "ariaLabel": "string", "classes": "string", "disabled": "bool", "expanded": "bool", "size": "string", "style": "string", "title": "string" }; | ||
exports.templates = templates = exports; | ||
@@ -529,0 +537,0 @@ return exports; |
@@ -105,4 +105,4 @@ 'use strict'; | ||
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__soy771 = contentRenderer != null ? contentRenderer : 'item'; | ||
soy.$$getDelegateFn(soy.$$getDelTemplateId('ClayDropdownItem.Item.idom'), variant__soy771, 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); | ||
var variant__soy785 = contentRenderer != null ? contentRenderer : 'item'; | ||
soy.$$getDelegateFn(soy.$$getDelTemplateId('ClayDropdownItem.Item.idom'), variant__soy785, 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); | ||
}; | ||
@@ -180,9 +180,9 @@ exports.render = $render; | ||
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__soy882 = function itemContent__soy882() { | ||
var elementClasses__soy821 = ''; | ||
elementClasses__soy821 += 'dropdown-item'; | ||
elementClasses__soy821 += active ? ' active' : ''; | ||
elementClasses__soy821 += disabled ? ' disabled' : ''; | ||
var labelContent__soy849 = function labelContent__soy849() { | ||
var iconContent__soy833 = function iconContent__soy833() { | ||
var itemContent__soy896 = function itemContent__soy896() { | ||
var elementClasses__soy835 = ''; | ||
elementClasses__soy835 += 'dropdown-item'; | ||
elementClasses__soy835 += active ? ' active' : ''; | ||
elementClasses__soy835 += disabled ? ' disabled' : ''; | ||
var labelContent__soy863 = function labelContent__soy863() { | ||
var iconContent__soy847 = function iconContent__soy847() { | ||
if (icon && spritemap) { | ||
@@ -197,7 +197,7 @@ incrementalDom.elementOpenStart('span'); | ||
if (icon && itemsIconAlignment == 'left') { | ||
iconContent__soy833(); | ||
iconContent__soy847(); | ||
} | ||
soyIdom.print(label); | ||
if (icon && itemsIconAlignment == 'right') { | ||
iconContent__soy833(); | ||
iconContent__soy847(); | ||
} | ||
@@ -214,8 +214,8 @@ }; | ||
} | ||
$templateAlias4({ elementClasses: elementClasses__soy821, href: '' + $tmp, label: labelContent__soy849, target: target, title: title }, opt_ijData); | ||
$templateAlias4({ elementClasses: elementClasses__soy835, href: '' + $tmp, label: labelContent__soy863, target: target, title: title }, opt_ijData); | ||
} else { | ||
$templateAlias5({ ariaLabel: label, disabled: disabled, elementClasses: elementClasses__soy821, label: labelContent__soy849, size: 'sm', spritemap: spritemap, style: 'link' }, opt_ijData); | ||
$templateAlias5({ ariaLabel: label, disabled: disabled, elementClasses: elementClasses__soy835, label: labelContent__soy863, size: 'sm', spritemap: spritemap, style: 'link' }, opt_ijData); | ||
} | ||
}; | ||
var itemAttributes__soy887 = function itemAttributes__soy887() { | ||
var itemAttributes__soy901 = function itemAttributes__soy901() { | ||
incrementalDom.attr('data-onclick', _handleItemClick); | ||
@@ -225,5 +225,5 @@ incrementalDom.attr('tabindex', '-1'); | ||
incrementalDom.elementOpenStart('li'); | ||
itemAttributes__soy887(); | ||
itemAttributes__soy901(); | ||
incrementalDom.elementOpenEnd(); | ||
itemContent__soy882(); | ||
itemContent__soy896(); | ||
incrementalDom.elementClose('li'); | ||
@@ -302,6 +302,6 @@ }; | ||
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__soy921 = function checkbox__soy921() { | ||
var checkbox__soy935 = function checkbox__soy935() { | ||
$templateAlias1({ checked: checked, disabled: disabled, inline: true, label: label, name: inputName, value: inputValue }, opt_ijData); | ||
}; | ||
var itemAttributes__soy930 = function itemAttributes__soy930() { | ||
var itemAttributes__soy944 = function itemAttributes__soy944() { | ||
incrementalDom.attr('class', 'dropdown-item' + (active || checked ? ' active' : '')); | ||
@@ -312,5 +312,5 @@ incrementalDom.attr('data-onclick', _handleItemClick); | ||
incrementalDom.elementOpenStart('li'); | ||
itemAttributes__soy930(); | ||
itemAttributes__soy944(); | ||
incrementalDom.elementOpenEnd(); | ||
checkbox__soy921(); | ||
checkbox__soy935(); | ||
incrementalDom.elementClose('li'); | ||
@@ -472,6 +472,6 @@ }; | ||
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__soy1000 = function radio__soy1000() { | ||
var radio__soy1014 = function radio__soy1014() { | ||
$templateAlias2({ checked: checked, disabled: disabled, inline: true, label: label, name: inputName, value: inputValue }, opt_ijData); | ||
}; | ||
var itemAttributes__soy1009 = function itemAttributes__soy1009() { | ||
var itemAttributes__soy1023 = function itemAttributes__soy1023() { | ||
incrementalDom.attr('class', 'dropdown-item' + (active || checked ? ' active' : '')); | ||
@@ -482,5 +482,5 @@ incrementalDom.attr('data-onclick', _handleItemClick); | ||
incrementalDom.elementOpenStart('li'); | ||
itemAttributes__soy1009(); | ||
itemAttributes__soy1023(); | ||
incrementalDom.elementOpenEnd(); | ||
radio__soy1000(); | ||
radio__soy1014(); | ||
incrementalDom.elementClose('li'); | ||
@@ -487,0 +487,0 @@ }; |
{ | ||
"name": "clay-dropdown", | ||
"version": "2.8.0", | ||
"version": "2.8.2", | ||
"description": "Clay Dropdown Component", | ||
@@ -31,9 +31,9 @@ "license": "BSD-3-Clause", | ||
"dependencies": { | ||
"clay-button": "^2.8.0", | ||
"clay-checkbox": "^2.8.0", | ||
"clay-component": "^2.8.0", | ||
"clay-icon": "^2.8.0", | ||
"clay-link": "^2.8.0", | ||
"clay-portal": "^2.8.0", | ||
"clay-radio": "^2.8.0", | ||
"clay-button": "^2.8.2", | ||
"clay-checkbox": "^2.8.2", | ||
"clay-component": "^2.8.2", | ||
"clay-icon": "^2.8.2", | ||
"clay-link": "^2.8.2", | ||
"clay-portal": "^2.8.2", | ||
"clay-radio": "^2.8.2", | ||
"metal": "^2.16.0", | ||
@@ -54,8 +54,8 @@ "metal-component": "^2.16.0", | ||
"babel-preset-env": "^1.6.0", | ||
"browserslist-config-clay": "^2.8.0", | ||
"clay-css": "^2.8.0", | ||
"browserslist-config-clay": "^2.8.2", | ||
"clay-css": "^2.8.2", | ||
"metal-dom": "^2.13.2", | ||
"metal-tools-soy": "^6.0.0", | ||
"webpack": "^3.0.0", | ||
"webpack-config-clay": "^2.8.0" | ||
"webpack-config-clay": "^2.8.2" | ||
}, | ||
@@ -65,3 +65,3 @@ "browserslist": [ | ||
], | ||
"gitHead": "96302c7d38bc968cb83651caaec70ddbcbe36b97" | ||
"gitHead": "0d503206d5c2123d1802191cfd53a952748c986f" | ||
} |
@@ -74,2 +74,22 @@ import {Align} from 'metal-position'; | ||
it('should render a dropdown with trigger aria-label', () => { | ||
clayDropdownBase = new ClayDropdownBase({ | ||
items: [ | ||
{ | ||
href: 'item1url', | ||
label: 'Item 1', | ||
}, | ||
{ | ||
href: 'item2url', | ||
label: 'Item 2', | ||
}, | ||
], | ||
label: 'Trigger', | ||
triggerAriaLabel: 'toggle', | ||
triggerSize: 'sm', | ||
}); | ||
expect(clayDropdownBase).toMatchSnapshot(); | ||
}); | ||
it('should render a dropdown with trigger size', () => { | ||
@@ -76,0 +96,0 @@ clayDropdownBase = new ClayDropdownBase({ |
@@ -199,2 +199,11 @@ import 'clay-icon'; | ||
/** | ||
* Aria label attribute for the trigger element. | ||
* @default undefined | ||
* @instance | ||
* @memberof ClayActionsDropdown | ||
* @type {?(string|undefined)} | ||
*/ | ||
triggerAriaLabel: Config.string(), | ||
/** | ||
* CSS classes to be applied to the trigger element. | ||
@@ -201,0 +210,0 @@ * @default undefined |
@@ -66,14 +66,16 @@ /* jshint ignore:start */ | ||
/** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */ | ||
var triggerAriaLabel = soy.asserts.assertType(opt_data.triggerAriaLabel == null || (goog.isString(opt_data.triggerAriaLabel) || opt_data.triggerAriaLabel instanceof goog.soy.data.SanitizedContent), 'triggerAriaLabel', opt_data.triggerAriaLabel, '!goog.soy.data.SanitizedContent|null|string|undefined'); | ||
/** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */ | ||
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__soy2015 = ''; | ||
var msg_1_6305962755687847469__soy2029 = ''; | ||
/** @desc */ | ||
var MSG_EXTERNAL_6305962755687847469 = goog.getMsg('actions'); | ||
msg_1_6305962755687847469__soy2015 += MSG_EXTERNAL_6305962755687847469; | ||
var dropdownElementClasses__soy26 = ''; | ||
dropdownElementClasses__soy26 += 'dropdown-action'; | ||
dropdownElementClasses__soy26 += elementClasses ? ' ' + elementClasses : ''; | ||
var trigger__soy33 = function() { | ||
msg_1_6305962755687847469__soy2029 += MSG_EXTERNAL_6305962755687847469; | ||
var dropdownElementClasses__soy27 = ''; | ||
dropdownElementClasses__soy27 += 'dropdown-action'; | ||
dropdownElementClasses__soy27 += elementClasses ? ' ' + elementClasses : ''; | ||
var trigger__soy34 = function() { | ||
$templateAlias2({spritemap: spritemap, symbol: 'ellipsis-v'}, 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__soy2015}, opt_ijData); | ||
$templateAlias1({button: button, caption: caption, disabled: disabled, elementClasses: dropdownElementClasses__soy27, events: {buttonClicked: _handleButtonClick, itemClicked: _handleItemClick, toggle: toggle}, expanded: expanded, helpText: helpText, id: id, items: items, itemsIconAlignment: itemsIconAlignment, label: trigger__soy34, preferredAlign: preferredAlign, ref: 'dropdown', spritemap: spritemap, triggerAriaLabel: triggerAriaLabel, triggerClasses: triggerClasses, triggerTitle: '' + msg_1_6305962755687847469__soy2029}, opt_ijData); | ||
}; | ||
@@ -97,2 +99,3 @@ exports.render = $render; | ||
* toggle: (*|null|undefined), | ||
* triggerAriaLabel: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
* triggerClasses: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
@@ -106,4 +109,4 @@ * }} | ||
exports.render.params = ["items","spritemap","_handleButtonClick","_handleItemClick","button","caption","disabled","elementClasses","expanded","helpText","id","itemsIconAlignment","preferredAlign","toggle","triggerClasses"]; | ||
exports.render.types = {"items":"list<?>","spritemap":"string","_handleButtonClick":"any","_handleItemClick":"any","button":"?","caption":"string","disabled":"bool","elementClasses":"string","expanded":"bool","helpText":"string","id":"string","itemsIconAlignment":"string","preferredAlign":"string","toggle":"any","triggerClasses":"string"}; | ||
exports.render.params = ["items","spritemap","_handleButtonClick","_handleItemClick","button","caption","disabled","elementClasses","expanded","helpText","id","itemsIconAlignment","preferredAlign","toggle","triggerAriaLabel","triggerClasses"]; | ||
exports.render.types = {"items":"list<?>","spritemap":"string","_handleButtonClick":"any","_handleItemClick":"any","button":"?","caption":"string","disabled":"bool","elementClasses":"string","expanded":"bool","helpText":"string","id":"string","itemsIconAlignment":"string","preferredAlign":"string","toggle":"any","triggerAriaLabel":"string","triggerClasses":"string"}; | ||
templates = exports; | ||
@@ -110,0 +113,0 @@ return exports; |
@@ -227,2 +227,11 @@ import 'clay-icon'; | ||
/** | ||
* Aria label attribute for the trigger element. | ||
* @default undefined | ||
* @instance | ||
* @memberof ClayCreationMenuDropdown | ||
* @type {?(string|undefined)} | ||
*/ | ||
triggerAriaLabel: Config.string(), | ||
/** | ||
* CSS classes to be applied to the trigger element. | ||
@@ -229,0 +238,0 @@ * @default undefined |
@@ -70,2 +70,4 @@ /* jshint ignore:start */ | ||
/** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */ | ||
var triggerAriaLabel = soy.asserts.assertType(opt_data.triggerAriaLabel == null || (goog.isString(opt_data.triggerAriaLabel) || opt_data.triggerAriaLabel instanceof goog.soy.data.SanitizedContent), 'triggerAriaLabel', opt_data.triggerAriaLabel, '!goog.soy.data.SanitizedContent|null|string|undefined'); | ||
/** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */ | ||
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'); | ||
@@ -76,41 +78,41 @@ /** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */ | ||
var viewMoreURL = soy.asserts.assertType(opt_data.viewMoreURL == null || (goog.isString(opt_data.viewMoreURL) || opt_data.viewMoreURL instanceof goog.soy.data.SanitizedContent), 'viewMoreURL', opt_data.viewMoreURL, '!goog.soy.data.SanitizedContent|null|string|undefined'); | ||
var secondaryItemsFirstGroup__soy81 = (secondaryItems != null) ? ((secondaryItems[0] != null) ? secondaryItems[0] : null) : null; | ||
var secondaryItemsSecondGroup__soy83 = (secondaryItems != null) ? ((secondaryItems[1] != null) ? secondaryItems[1] : null) : null; | ||
var totalPrimaryItems__soy85 = primaryItems ? (primaryItems.length) : 0; | ||
var totalSecondaryItemsFirstGroup__soy87 = (secondaryItemsFirstGroup__soy81 != null) && (secondaryItemsFirstGroup__soy81.items != null) ? (secondaryItemsFirstGroup__soy81.items.length) : 0; | ||
var totalSecondaryItemsSecondGroup__soy89 = (secondaryItemsSecondGroup__soy83 != null) && (secondaryItemsSecondGroup__soy83.items != null) ? (secondaryItemsSecondGroup__soy83.items.length) : 0; | ||
var totalSecondaryItems__soy91 = totalSecondaryItemsFirstGroup__soy87 + totalSecondaryItemsSecondGroup__soy89; | ||
var totalItems__soy93 = totalPrimaryItems__soy85 + totalSecondaryItems__soy91; | ||
var defaultMaxPrimaryItems__soy95 = maxPrimaryItems ? (totalPrimaryItems__soy85 > maxPrimaryItems ? maxPrimaryItems : totalPrimaryItems__soy85) : totalPrimaryItems__soy85 > 8 ? 8 : totalPrimaryItems__soy85; | ||
var tempDefaultMaxSecondaryItems__soy97 = maxSecondaryItems ? (totalSecondaryItems__soy91 > maxSecondaryItems ? maxSecondaryItems : totalSecondaryItems__soy91) : totalSecondaryItems__soy91 > 7 ? 7 : totalSecondaryItems__soy91; | ||
var defaultMaxTotalItems__soy99 = maxTotalItems != null ? maxTotalItems : 15; | ||
var defaultMaxSecondaryItems__soy101 = tempDefaultMaxSecondaryItems__soy97 > defaultMaxTotalItems__soy99 - defaultMaxPrimaryItems__soy95 ? defaultMaxTotalItems__soy99 - defaultMaxPrimaryItems__soy95 : tempDefaultMaxSecondaryItems__soy97; | ||
var showingItems__soy103 = totalSecondaryItems__soy91 == 0 ? (totalPrimaryItems__soy85 > defaultMaxTotalItems__soy99 ? defaultMaxTotalItems__soy99 : totalPrimaryItems__soy85) : totalPrimaryItems__soy85 > defaultMaxPrimaryItems__soy95 ? (totalSecondaryItems__soy91 > defaultMaxSecondaryItems__soy101 ? defaultMaxPrimaryItems__soy95 + defaultMaxSecondaryItems__soy101 : defaultMaxPrimaryItems__soy95 + totalSecondaryItems__soy91) : totalSecondaryItems__soy91 > defaultMaxSecondaryItems__soy101 ? totalPrimaryItems__soy85 + defaultMaxSecondaryItems__soy101 : totalPrimaryItems__soy85 + totalSecondaryItems__soy91; | ||
var primaryDropdownItems__soy105 = {items: primaryItems, maxItems: totalSecondaryItems__soy91 > 0 ? defaultMaxPrimaryItems__soy95 : defaultMaxTotalItems__soy99, separator: totalPrimaryItems__soy85 > 0 && totalSecondaryItems__soy91 > 0, type: 'group'}; | ||
var secondaryDropdownItemsSecondGroup__soy107 = secondaryItemsSecondGroup__soy83 && totalSecondaryItemsFirstGroup__soy87 < defaultMaxSecondaryItems__soy101 ? {items: secondaryItemsSecondGroup__soy83.items, label: secondaryItemsSecondGroup__soy83.label, maxItems: defaultMaxSecondaryItems__soy101 - totalSecondaryItemsFirstGroup__soy87, type: 'group'} : null; | ||
var secondaryDropdownItemsFirstGroup__soy109 = secondaryItemsFirstGroup__soy81 ? {items: secondaryItemsFirstGroup__soy81.items, label: secondaryItemsFirstGroup__soy81.label, maxItems: defaultMaxSecondaryItems__soy101, separator: secondaryItemsFirstGroup__soy81.separator && (secondaryDropdownItemsSecondGroup__soy107 != null), type: 'group'} : null; | ||
var items__soy111 = secondaryDropdownItemsFirstGroup__soy109 && secondaryDropdownItemsSecondGroup__soy107 ? [primaryDropdownItems__soy105, secondaryDropdownItemsFirstGroup__soy109, secondaryDropdownItemsSecondGroup__soy107] : secondaryDropdownItemsFirstGroup__soy109 ? [primaryDropdownItems__soy105, secondaryDropdownItemsFirstGroup__soy109] : [primaryDropdownItems__soy105]; | ||
var showMoreButton__soy113 = showingItems__soy103 < totalItems__soy93 ? ((viewMoreURL != null) ? {buttonStyle: 'secondary', href: viewMoreURL, label: 'More'} : {label: 'More', style: 'secondary'}) : null; | ||
var trigger__soy120 = function() { | ||
var secondaryItemsFirstGroup__soy84 = (secondaryItems != null) ? ((secondaryItems[0] != null) ? secondaryItems[0] : null) : null; | ||
var secondaryItemsSecondGroup__soy86 = (secondaryItems != null) ? ((secondaryItems[1] != null) ? secondaryItems[1] : null) : null; | ||
var totalPrimaryItems__soy88 = primaryItems ? (primaryItems.length) : 0; | ||
var totalSecondaryItemsFirstGroup__soy90 = (secondaryItemsFirstGroup__soy84 != null) && (secondaryItemsFirstGroup__soy84.items != null) ? (secondaryItemsFirstGroup__soy84.items.length) : 0; | ||
var totalSecondaryItemsSecondGroup__soy92 = (secondaryItemsSecondGroup__soy86 != null) && (secondaryItemsSecondGroup__soy86.items != null) ? (secondaryItemsSecondGroup__soy86.items.length) : 0; | ||
var totalSecondaryItems__soy94 = totalSecondaryItemsFirstGroup__soy90 + totalSecondaryItemsSecondGroup__soy92; | ||
var totalItems__soy96 = totalPrimaryItems__soy88 + totalSecondaryItems__soy94; | ||
var defaultMaxPrimaryItems__soy98 = maxPrimaryItems ? (totalPrimaryItems__soy88 > maxPrimaryItems ? maxPrimaryItems : totalPrimaryItems__soy88) : totalPrimaryItems__soy88 > 8 ? 8 : totalPrimaryItems__soy88; | ||
var tempDefaultMaxSecondaryItems__soy100 = maxSecondaryItems ? (totalSecondaryItems__soy94 > maxSecondaryItems ? maxSecondaryItems : totalSecondaryItems__soy94) : totalSecondaryItems__soy94 > 7 ? 7 : totalSecondaryItems__soy94; | ||
var defaultMaxTotalItems__soy102 = maxTotalItems != null ? maxTotalItems : 15; | ||
var defaultMaxSecondaryItems__soy104 = tempDefaultMaxSecondaryItems__soy100 > defaultMaxTotalItems__soy102 - defaultMaxPrimaryItems__soy98 ? defaultMaxTotalItems__soy102 - defaultMaxPrimaryItems__soy98 : tempDefaultMaxSecondaryItems__soy100; | ||
var showingItems__soy106 = totalSecondaryItems__soy94 == 0 ? (totalPrimaryItems__soy88 > defaultMaxTotalItems__soy102 ? defaultMaxTotalItems__soy102 : totalPrimaryItems__soy88) : totalPrimaryItems__soy88 > defaultMaxPrimaryItems__soy98 ? (totalSecondaryItems__soy94 > defaultMaxSecondaryItems__soy104 ? defaultMaxPrimaryItems__soy98 + defaultMaxSecondaryItems__soy104 : defaultMaxPrimaryItems__soy98 + totalSecondaryItems__soy94) : totalSecondaryItems__soy94 > defaultMaxSecondaryItems__soy104 ? totalPrimaryItems__soy88 + defaultMaxSecondaryItems__soy104 : totalPrimaryItems__soy88 + totalSecondaryItems__soy94; | ||
var primaryDropdownItems__soy108 = {items: primaryItems, maxItems: totalSecondaryItems__soy94 > 0 ? defaultMaxPrimaryItems__soy98 : defaultMaxTotalItems__soy102, separator: totalPrimaryItems__soy88 > 0 && totalSecondaryItems__soy94 > 0, type: 'group'}; | ||
var secondaryDropdownItemsSecondGroup__soy110 = secondaryItemsSecondGroup__soy86 && totalSecondaryItemsFirstGroup__soy90 < defaultMaxSecondaryItems__soy104 ? {items: secondaryItemsSecondGroup__soy86.items, label: secondaryItemsSecondGroup__soy86.label, maxItems: defaultMaxSecondaryItems__soy104 - totalSecondaryItemsFirstGroup__soy90, type: 'group'} : null; | ||
var secondaryDropdownItemsFirstGroup__soy112 = secondaryItemsFirstGroup__soy84 ? {items: secondaryItemsFirstGroup__soy84.items, label: secondaryItemsFirstGroup__soy84.label, maxItems: defaultMaxSecondaryItems__soy104, separator: secondaryItemsFirstGroup__soy84.separator && (secondaryDropdownItemsSecondGroup__soy110 != null), type: 'group'} : null; | ||
var items__soy114 = secondaryDropdownItemsFirstGroup__soy112 && secondaryDropdownItemsSecondGroup__soy110 ? [primaryDropdownItems__soy108, secondaryDropdownItemsFirstGroup__soy112, secondaryDropdownItemsSecondGroup__soy110] : secondaryDropdownItemsFirstGroup__soy112 ? [primaryDropdownItems__soy108, secondaryDropdownItemsFirstGroup__soy112] : [primaryDropdownItems__soy108]; | ||
var showMoreButton__soy116 = showingItems__soy106 < totalItems__soy96 ? ((viewMoreURL != null) ? {buttonStyle: 'secondary', href: viewMoreURL, label: 'More'} : {label: 'More', style: 'secondary'}) : null; | ||
var trigger__soy123 = function() { | ||
$templateAlias2({spritemap: spritemap, symbol: 'plus'}, opt_ijData); | ||
}; | ||
var param137 = ''; | ||
if (showMoreButton__soy113) { | ||
var msg_2_8004490453579465583__soy2017 = ''; | ||
var param140 = ''; | ||
if (showMoreButton__soy116) { | ||
var msg_2_8004490453579465583__soy2031 = ''; | ||
/** @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__soy2017 += MSG_EXTERNAL_8004490453579465583; | ||
param137 += msg_2_8004490453579465583__soy2017; | ||
var MSG_EXTERNAL_8004490453579465583 = goog.getMsg('showing-{$showingItems}-of-{$totalItems}-elements', {'showingItems': showingItems__soy106, 'totalItems': totalItems__soy96}); | ||
msg_2_8004490453579465583__soy2031 += MSG_EXTERNAL_8004490453579465583; | ||
param140 += msg_2_8004490453579465583__soy2031; | ||
} | ||
var param166 = ''; | ||
var param170 = ''; | ||
if (triggerTitle) { | ||
param166 += triggerTitle; | ||
param170 += triggerTitle; | ||
} else { | ||
var msg_3_7387635272539030076__soy2019 = ''; | ||
var msg_3_7387635272539030076__soy2033 = ''; | ||
/** @desc */ | ||
var MSG_EXTERNAL_7387635272539030076 = goog.getMsg('new'); | ||
msg_3_7387635272539030076__soy2019 += MSG_EXTERNAL_7387635272539030076; | ||
param166 += msg_3_7387635272539030076__soy2019; | ||
msg_3_7387635272539030076__soy2033 += MSG_EXTERNAL_7387635272539030076; | ||
param170 += msg_3_7387635272539030076__soy2033; | ||
} | ||
$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); | ||
$templateAlias1({button: showMoreButton__soy116, caption: param140, disabled: disabled, elementClasses: elementClasses, events: {buttonClicked: _handleButtonClick, itemClicked: _handleItemClick, toggle: toggle}, expanded: expanded, helpText: showMoreButton__soy116 ? helpText : null, id: id, items: items__soy114, itemsIconAlignment: itemsIconAlignment, label: trigger__soy123, preferredAlign: preferredAlign, ref: 'dropdown', spritemap: spritemap, style: 'primary', triggerAriaLabel: triggerAriaLabel, triggerClasses: triggerClasses, triggerTitle: param170}, opt_ijData); | ||
}; | ||
@@ -136,2 +138,3 @@ exports.render = $render; | ||
* toggle: (*|null|undefined), | ||
* triggerAriaLabel: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
* triggerClasses: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
@@ -147,4 +150,4 @@ * triggerTitle: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
exports.render.params = ["spritemap","_handleButtonClick","_handleItemClick","disabled","elementClasses","expanded","helpText","id","itemsIconAlignment","maxPrimaryItems","maxSecondaryItems","maxTotalItems","preferredAlign","primaryItems","secondaryItems","toggle","triggerClasses","triggerTitle","viewMoreURL"]; | ||
exports.render.types = {"spritemap":"string","_handleButtonClick":"any","_handleItemClick":"any","disabled":"bool","elementClasses":"string","expanded":"bool","helpText":"string","id":"string","itemsIconAlignment":"string","maxPrimaryItems":"int","maxSecondaryItems":"int","maxTotalItems":"int","preferredAlign":"string","primaryItems":"list<?>","secondaryItems":"list<?>","toggle":"any","triggerClasses":"string","triggerTitle":"string","viewMoreURL":"string"}; | ||
exports.render.params = ["spritemap","_handleButtonClick","_handleItemClick","disabled","elementClasses","expanded","helpText","id","itemsIconAlignment","maxPrimaryItems","maxSecondaryItems","maxTotalItems","preferredAlign","primaryItems","secondaryItems","toggle","triggerAriaLabel","triggerClasses","triggerTitle","viewMoreURL"]; | ||
exports.render.types = {"spritemap":"string","_handleButtonClick":"any","_handleItemClick":"any","disabled":"bool","elementClasses":"string","expanded":"bool","helpText":"string","id":"string","itemsIconAlignment":"string","maxPrimaryItems":"int","maxSecondaryItems":"int","maxTotalItems":"int","preferredAlign":"string","primaryItems":"list<?>","secondaryItems":"list<?>","toggle":"any","triggerAriaLabel":"string","triggerClasses":"string","triggerTitle":"string","viewMoreURL":"string"}; | ||
templates = exports; | ||
@@ -151,0 +154,0 @@ return exports; |
@@ -238,2 +238,11 @@ import 'clay-icon'; | ||
/** | ||
* Aria label attribute for the trigger element. | ||
* @default undefined | ||
* @instance | ||
* @memberof ClayDropdown | ||
* @type {?(string|undefined)} | ||
*/ | ||
triggerAriaLabel: Config.string(), | ||
/** | ||
* CSS classes to be applied to the trigger element. | ||
@@ -240,0 +249,0 @@ * @default undefined |
@@ -74,2 +74,4 @@ /* jshint ignore:start */ | ||
/** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */ | ||
var triggerAriaLabel = soy.asserts.assertType(opt_data.triggerAriaLabel == null || (goog.isString(opt_data.triggerAriaLabel) || opt_data.triggerAriaLabel instanceof goog.soy.data.SanitizedContent), 'triggerAriaLabel', opt_data.triggerAriaLabel, '!goog.soy.data.SanitizedContent|null|string|undefined'); | ||
/** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */ | ||
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'); | ||
@@ -80,3 +82,3 @@ /** @type {!goog.soy.data.SanitizedContent|null|string|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__soy220 = function() { | ||
var trigger__soy225 = function() { | ||
if (icon) { | ||
@@ -92,3 +94,3 @@ $templateAlias2({elementClasses: label ? 'inline-item inline-item-before' : '', spritemap: spritemap, symbol: icon}, 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__soy220, 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__soy225, preferredAlign: preferredAlign, ref: 'dropdown', searchable: searchable, spritemap: spritemap, style: style, triggerAriaLabel: triggerAriaLabel, triggerClasses: triggerClasses, triggerSize: triggerSize, triggerTitle: triggerTitle}, opt_ijData); | ||
}; | ||
@@ -116,2 +118,3 @@ exports.render = $render; | ||
* toggle: (*|null|undefined), | ||
* triggerAriaLabel: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
* triggerClasses: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
@@ -127,4 +130,4 @@ * triggerSize: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
exports.render.params = ["items","spritemap","_handleButtonClick","_handleItemClick","button","contentRenderer","disabled","elementClasses","expanded","icon","id","itemsIconAlignment","label","preferredAlign","searchable","showToggleIcon","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","showToggleIcon":"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","showToggleIcon","style","toggle","triggerAriaLabel","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","showToggleIcon":"bool","style":"string","toggle":"any","triggerAriaLabel":"string","triggerClasses":"string","triggerSize":"string","triggerTitle":"string"}; | ||
templates = exports; | ||
@@ -131,0 +134,0 @@ return exports; |
@@ -674,2 +674,11 @@ import 'clay-button'; | ||
/** | ||
* Aria label attribute for the trigger element. | ||
* @default undefined | ||
* @instance | ||
* @memberof ClayDropdownBase | ||
* @type {?(string|undefined)} | ||
*/ | ||
triggerAriaLabel: Config.string(), | ||
/** | ||
* CSS classes to be applied to the trigger element. | ||
@@ -676,0 +685,0 @@ * @default undefined |
@@ -82,2 +82,4 @@ /* jshint ignore:start */ | ||
/** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */ | ||
var triggerAriaLabel = soy.asserts.assertType(opt_data.triggerAriaLabel == null || (goog.isString(opt_data.triggerAriaLabel) || opt_data.triggerAriaLabel instanceof goog.soy.data.SanitizedContent), 'triggerAriaLabel', opt_data.triggerAriaLabel, '!goog.soy.data.SanitizedContent|null|string|undefined'); | ||
/** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */ | ||
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'); | ||
@@ -88,3 +90,3 @@ /** @type {!goog.soy.data.SanitizedContent|null|string|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 attributes__soy283 = function() { | ||
var attributes__soy290 = function() { | ||
incrementalDom.attr('class', 'dropdown' + (elementClasses ? ' ' + elementClasses : '') + (expanded ? ' show' : '')); | ||
@@ -96,5 +98,5 @@ if (id) { | ||
incrementalDom.elementOpenStart('div'); | ||
attributes__soy283(); | ||
attributes__soy290(); | ||
incrementalDom.elementOpenEnd(); | ||
$trigger({classes: triggerClasses, disabled: disabled, expanded: expanded, label: label, size: triggerSize, style: style, title: triggerTitle}, opt_ijData); | ||
$trigger({ariaLabel: triggerAriaLabel, classes: triggerClasses, disabled: disabled, expanded: expanded, label: label, size: triggerSize, style: style, title: triggerTitle}, opt_ijData); | ||
$sections({_handleButtonClick: _handleButtonClick, _handleItemClick: _handleItemClick, _handleSearch: _handleSearch, button: button, caption: caption, contentRenderer: contentRenderer != null ? contentRenderer : '', expanded: expanded, helpText: helpText, items: items, itemsIconAlignment: itemsIconAlignment, portalElementId: portalElementId, searchable: searchable, spritemap: spritemap}, opt_ijData); | ||
@@ -124,2 +126,3 @@ incrementalDom.elementClose('div'); | ||
* style: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
* triggerAriaLabel: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
* triggerClasses: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
@@ -157,21 +160,21 @@ * triggerSize: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
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 index319_RangeEnd = maxItems && maxItems < (items.length) ? maxItems : (items.length); | ||
var index319ListLen = Math.max(0, Math.ceil((index319_RangeEnd - 0) / 1)); | ||
for (var index319Index = 0; index319Index < index319ListLen; index319Index++) { | ||
var index319Data = 0 + index319Index * 1; | ||
var item__soy322 = items[index319Data]; | ||
var variant__soy341 = ''; | ||
var index327_RangeEnd = maxItems && maxItems < (items.length) ? maxItems : (items.length); | ||
var index327ListLen = Math.max(0, Math.ceil((index327_RangeEnd - 0) / 1)); | ||
for (var index327Index = 0; index327Index < index327ListLen; index327Index++) { | ||
var index327Data = 0 + index327Index * 1; | ||
var item__soy330 = items[index327Data]; | ||
var variant__soy349 = ''; | ||
var $tmp; | ||
if ((contentRenderer != null) && contentRenderer != '') { | ||
$tmp = contentRenderer; | ||
} else if ((item__soy322.contentRenderer != null) && item__soy322.contentRenderer != '') { | ||
$tmp = item__soy322.contentRenderer; | ||
} else if (item__soy322.type) { | ||
$tmp = item__soy322.type; | ||
} else if ((item__soy330.contentRenderer != null) && item__soy330.contentRenderer != '') { | ||
$tmp = item__soy330.contentRenderer; | ||
} else if (item__soy330.type) { | ||
$tmp = item__soy330.type; | ||
} else { | ||
$tmp = 'item'; | ||
} | ||
variant__soy341 += $tmp; | ||
$templateAlias3({active: item__soy322.active, checked: item__soy322.checked, contentRenderer: variant__soy341, data: item__soy322.data, disabled: item__soy322.disabled, events: {itemClicked: _handleItemClick}, href: item__soy322.href, icon: item__soy322.icon, inputName: item__soy322.inputName, inputValue: item__soy322.inputValue, items: item__soy322.items, itemsIconAlignment: itemsIconAlignment, label: item__soy322.label ? '' + item__soy322.label : '', maxItems: item__soy322.maxItems, separator: item__soy322.separator, spritemap: spritemap, target: item__soy322.target, title: item__soy322.title, type: item__soy322.type}, opt_ijData); | ||
if (item__soy322.separator) { | ||
variant__soy349 += $tmp; | ||
$templateAlias3({active: item__soy330.active, checked: item__soy330.checked, contentRenderer: variant__soy349, data: item__soy330.data, disabled: item__soy330.disabled, events: {itemClicked: _handleItemClick}, href: item__soy330.href, icon: item__soy330.icon, inputName: item__soy330.inputName, inputValue: item__soy330.inputValue, items: item__soy330.items, itemsIconAlignment: itemsIconAlignment, label: item__soy330.label ? '' + item__soy330.label : '', maxItems: item__soy330.maxItems, separator: item__soy330.separator, spritemap: spritemap, target: item__soy330.target, title: item__soy330.title, type: item__soy330.type}, opt_ijData); | ||
if (item__soy330.separator) { | ||
$templateAlias3({contentRenderer: 'separator'}, opt_ijData); | ||
@@ -288,4 +291,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__soy484 = function() { | ||
var listAttributes__soy411 = function() { | ||
var dropdownMenu__soy492 = function() { | ||
var listAttributes__soy419 = function() { | ||
var $tmp; | ||
@@ -303,3 +306,3 @@ if (itemsIconAlignment == 'left') { | ||
incrementalDom.elementOpenStart('div'); | ||
listAttributes__soy411(); | ||
listAttributes__soy419(); | ||
incrementalDom.elementOpenEnd(); | ||
@@ -317,6 +320,6 @@ if (helpText) { | ||
} | ||
var listItemsContent__soy437 = function() { | ||
var listItemsContent__soy445 = function() { | ||
soy.$$getDelegateFn(soy.$$getDelTemplateId('ClayDropdownBase.Content.idom'), contentRenderer, false)({_handleItemClick: _handleItemClick, contentRenderer: contentRenderer, items: items, itemsIconAlignment: itemsIconAlignment, spritemap: spritemap}, opt_ijData); | ||
}; | ||
var captionContent__soy446 = function() { | ||
var captionContent__soy454 = function() { | ||
if (caption) { | ||
@@ -335,5 +338,5 @@ incrementalDom.elementOpenStart('div'); | ||
incrementalDom.elementOpenEnd(); | ||
listItemsContent__soy437(); | ||
listItemsContent__soy445(); | ||
incrementalDom.elementClose('div'); | ||
captionContent__soy446(); | ||
captionContent__soy454(); | ||
incrementalDom.elementOpenStart('div'); | ||
@@ -351,11 +354,11 @@ incrementalDom.attr('class', 'dropdown-section'); | ||
} else { | ||
listItemsContent__soy437(); | ||
captionContent__soy446(); | ||
listItemsContent__soy445(); | ||
captionContent__soy454(); | ||
} | ||
incrementalDom.elementClose('div'); | ||
}; | ||
var param489 = function() { | ||
dropdownMenu__soy484(); | ||
var param497 = function() { | ||
dropdownMenu__soy492(); | ||
}; | ||
$templateAlias2({content: param489, portalElement: '#' + portalElementId, ref: 'portal'}, opt_ijData); | ||
$templateAlias2({content: param497, portalElement: '#' + portalElementId, ref: 'portal'}, opt_ijData); | ||
}; | ||
@@ -398,2 +401,4 @@ exports.sections = $sections; | ||
/** @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 {!goog.soy.data.SanitizedContent|null|string|undefined} */ | ||
var classes = soy.asserts.assertType(opt_data.classes == null || (goog.isString(opt_data.classes) || opt_data.classes instanceof goog.soy.data.SanitizedContent), 'classes', opt_data.classes, '!goog.soy.data.SanitizedContent|null|string|undefined'); | ||
@@ -410,3 +415,3 @@ /** @type {boolean|null|undefined} */ | ||
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__soy542 = function() { | ||
var buttonAttributes__soy557 = function() { | ||
if (expanded) { | ||
@@ -418,3 +423,5 @@ incrementalDom.attr('aria-expanded', 'true'); | ||
incrementalDom.attr('aria-haspopup', 'true'); | ||
incrementalDom.attr('aria-label', 'toggle'); | ||
if (ariaLabel) { | ||
incrementalDom.attr('aria-label', ariaLabel); | ||
} | ||
incrementalDom.attr('class', 'dropdown-toggle btn' + (classes ? ' ' + classes : '') + (size ? ' btn-' + size : '') + (style ? ' btn-' + style : ' btn-unstyled')); | ||
@@ -433,3 +440,3 @@ if (disabled) { | ||
incrementalDom.elementOpenStart('button'); | ||
buttonAttributes__soy542(); | ||
buttonAttributes__soy557(); | ||
incrementalDom.elementOpenEnd(); | ||
@@ -443,2 +450,3 @@ soyIdom.print(label); | ||
* label: (!goog.soy.data.SanitizedContent|function()|string), | ||
* ariaLabel: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
* classes: (!goog.soy.data.SanitizedContent|null|string|undefined), | ||
@@ -502,4 +510,4 @@ * disabled: (boolean|null|undefined), | ||
exports.render.params = ["items","label","_handleButtonClick","_handleItemClick","_handleSearch","button","caption","contentRenderer","disabled","elementClasses","expanded","helpText","id","itemsIconAlignment","portalElementId","searchable","spritemap","style","triggerClasses","triggerSize","triggerTitle"]; | ||
exports.render.types = {"items":"list<?>","label":"html|string","_handleButtonClick":"any","_handleItemClick":"any","_handleSearch":"any","button":"?","caption":"string","contentRenderer":"string","disabled":"bool","elementClasses":"string","expanded":"bool","helpText":"string","id":"string","itemsIconAlignment":"string","portalElementId":"string","searchable":"bool","spritemap":"string","style":"string","triggerClasses":"string","triggerSize":"string","triggerTitle":"string"}; | ||
exports.render.params = ["items","label","_handleButtonClick","_handleItemClick","_handleSearch","button","caption","contentRenderer","disabled","elementClasses","expanded","helpText","id","itemsIconAlignment","portalElementId","searchable","spritemap","style","triggerAriaLabel","triggerClasses","triggerSize","triggerTitle"]; | ||
exports.render.types = {"items":"list<?>","label":"html|string","_handleButtonClick":"any","_handleItemClick":"any","_handleSearch":"any","button":"?","caption":"string","contentRenderer":"string","disabled":"bool","elementClasses":"string","expanded":"bool","helpText":"string","id":"string","itemsIconAlignment":"string","portalElementId":"string","searchable":"bool","spritemap":"string","style":"string","triggerAriaLabel":"string","triggerClasses":"string","triggerSize":"string","triggerTitle":"string"}; | ||
exports.items.params = ["items","_handleItemClick","contentRenderer","itemsIconAlignment","maxItems","spritemap"]; | ||
@@ -511,4 +519,4 @@ exports.items.types = {"items":"list<?>","_handleItemClick":"any","contentRenderer":"string","itemsIconAlignment":"string","maxItems":"int","spritemap":"string"}; | ||
exports.sections.types = {"items":"list<?>","_handleButtonClick":"any","_handleItemClick":"any","_handleSearch":"any","button":"?","caption":"string","contentRenderer":"string","expanded":"bool","helpText":"string","itemsIconAlignment":"string","portalElementId":"string","searchable":"bool","spritemap":"string"}; | ||
exports.trigger.params = ["label","classes","disabled","expanded","size","style","title"]; | ||
exports.trigger.types = {"label":"html|string","classes":"string","disabled":"bool","expanded":"bool","size":"string","style":"string","title":"string"}; | ||
exports.trigger.params = ["label","ariaLabel","classes","disabled","expanded","size","style","title"]; | ||
exports.trigger.types = {"label":"html|string","ariaLabel":"string","classes":"string","disabled":"bool","expanded":"bool","size":"string","style":"string","title":"string"}; | ||
templates = exports; | ||
@@ -515,0 +523,0 @@ return exports; |
@@ -86,4 +86,4 @@ /* jshint ignore:start */ | ||
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__soy771 = contentRenderer != null ? contentRenderer : 'item'; | ||
soy.$$getDelegateFn(soy.$$getDelTemplateId('ClayDropdownItem.Item.idom'), variant__soy771, 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); | ||
var variant__soy785 = contentRenderer != null ? contentRenderer : 'item'; | ||
soy.$$getDelegateFn(soy.$$getDelTemplateId('ClayDropdownItem.Item.idom'), variant__soy785, 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); | ||
}; | ||
@@ -162,9 +162,9 @@ exports.render = $render; | ||
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__soy882 = function() { | ||
var elementClasses__soy821 = ''; | ||
elementClasses__soy821 += 'dropdown-item'; | ||
elementClasses__soy821 += active ? ' active' : ''; | ||
elementClasses__soy821 += disabled ? ' disabled' : ''; | ||
var labelContent__soy849 = function() { | ||
var iconContent__soy833 = function() { | ||
var itemContent__soy896 = function() { | ||
var elementClasses__soy835 = ''; | ||
elementClasses__soy835 += 'dropdown-item'; | ||
elementClasses__soy835 += active ? ' active' : ''; | ||
elementClasses__soy835 += disabled ? ' disabled' : ''; | ||
var labelContent__soy863 = function() { | ||
var iconContent__soy847 = function() { | ||
if (icon && spritemap) { | ||
@@ -179,7 +179,7 @@ incrementalDom.elementOpenStart('span'); | ||
if (icon && itemsIconAlignment == 'left') { | ||
iconContent__soy833(); | ||
iconContent__soy847(); | ||
} | ||
soyIdom.print(label); | ||
if (icon && itemsIconAlignment == 'right') { | ||
iconContent__soy833(); | ||
iconContent__soy847(); | ||
} | ||
@@ -196,8 +196,8 @@ }; | ||
} | ||
$templateAlias4({elementClasses: elementClasses__soy821, href: '' + $tmp, label: labelContent__soy849, target: target, title: title}, opt_ijData); | ||
$templateAlias4({elementClasses: elementClasses__soy835, href: '' + $tmp, label: labelContent__soy863, target: target, title: title}, opt_ijData); | ||
} else { | ||
$templateAlias5({ariaLabel: label, disabled: disabled, elementClasses: elementClasses__soy821, label: labelContent__soy849, size: 'sm', spritemap: spritemap, style: 'link'}, opt_ijData); | ||
$templateAlias5({ariaLabel: label, disabled: disabled, elementClasses: elementClasses__soy835, label: labelContent__soy863, size: 'sm', spritemap: spritemap, style: 'link'}, opt_ijData); | ||
} | ||
}; | ||
var itemAttributes__soy887 = function() { | ||
var itemAttributes__soy901 = function() { | ||
incrementalDom.attr('data-onclick', _handleItemClick); | ||
@@ -207,5 +207,5 @@ incrementalDom.attr('tabindex', '-1'); | ||
incrementalDom.elementOpenStart('li'); | ||
itemAttributes__soy887(); | ||
itemAttributes__soy901(); | ||
incrementalDom.elementOpenEnd(); | ||
itemContent__soy882(); | ||
itemContent__soy896(); | ||
incrementalDom.elementClose('li'); | ||
@@ -285,6 +285,6 @@ }; | ||
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__soy921 = function() { | ||
var checkbox__soy935 = function() { | ||
$templateAlias1({checked: checked, disabled: disabled, inline: true, label: label, name: inputName, value: inputValue}, opt_ijData); | ||
}; | ||
var itemAttributes__soy930 = function() { | ||
var itemAttributes__soy944 = function() { | ||
incrementalDom.attr('class', 'dropdown-item' + (active || checked ? ' active' : '')); | ||
@@ -295,5 +295,5 @@ incrementalDom.attr('data-onclick', _handleItemClick); | ||
incrementalDom.elementOpenStart('li'); | ||
itemAttributes__soy930(); | ||
itemAttributes__soy944(); | ||
incrementalDom.elementOpenEnd(); | ||
checkbox__soy921(); | ||
checkbox__soy935(); | ||
incrementalDom.elementClose('li'); | ||
@@ -457,6 +457,6 @@ }; | ||
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__soy1000 = function() { | ||
var radio__soy1014 = function() { | ||
$templateAlias2({checked: checked, disabled: disabled, inline: true, label: label, name: inputName, value: inputValue}, opt_ijData); | ||
}; | ||
var itemAttributes__soy1009 = function() { | ||
var itemAttributes__soy1023 = function() { | ||
incrementalDom.attr('class', 'dropdown-item' + (active || checked ? ' active' : '')); | ||
@@ -467,5 +467,5 @@ incrementalDom.attr('data-onclick', _handleItemClick); | ||
incrementalDom.elementOpenStart('li'); | ||
itemAttributes__soy1009(); | ||
itemAttributes__soy1023(); | ||
incrementalDom.elementOpenEnd(); | ||
radio__soy1000(); | ||
radio__soy1014(); | ||
incrementalDom.elementClose('li'); | ||
@@ -472,0 +472,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
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
865208
8343
Updatedclay-button@^2.8.2
Updatedclay-checkbox@^2.8.2
Updatedclay-component@^2.8.2
Updatedclay-icon@^2.8.2
Updatedclay-link@^2.8.2
Updatedclay-portal@^2.8.2
Updatedclay-radio@^2.8.2